949bd5572dfc7811c84654f3a4ee8dd3455bb877
[WebKit-https.git] / WebCore / ChangeLog
1 2009-03-31  Eric Carlson  <eric.carlson@apple.com>
2
3         Reviewed by Simon Fraser.
4
5         https://bugs.webkit.org/show_bug.cgi?id=24965
6         Bug 24965: HTMLMediaElement: network state changes can be missed
7         
8         * html/HTMLMediaElement.cpp:
9         (WebCore::HTMLMediaElement::setNetworkState): Always update m_networkState when the
10         state changes, even when no event needs to be fired.
11
12 2009-03-31  Eric Carlson  <eric.carlson@apple.com>
13
14         Reviewed by Darin Adler.
15         
16         https://bugs.webkit.org/show_bug.cgi?id=24964
17         Bug 24964: HTMLMediaElement: 'waiting' event may fire twice
18
19         * html/HTMLMediaElement.cpp:
20         (WebCore::HTMLMediaElement::setReadyState): Only fire 'waiting' event once when ready state
21         drops below HAVE_FUTURE_DATA.
22
23 2009-03-31  Eric Carlson  <eric.carlson@apple.com>
24
25         Reviewed by Darin Adler.
26
27         https://bugs.webkit.org/show_bug.cgi?id=24846
28         Bug 24846: HTMLMediaElement should implement 'autobuffer' attribute
29
30         Add 'autobuffer' attrubute to media element. 'autobuffer' is a hint that
31         the author recommends downloading the entire resource optimistically, so the
32         attribute is made available to the media engine to use if it is able.
33
34         Test: media/video-dom-autobuffer.html
35
36         * html/HTMLAttributeNames.in: Add autobuffer.
37
38         * html/HTMLMediaElement.cpp:
39         (WebCore::HTMLMediaElement::parseMappedAttribute): New.
40         (WebCore::HTMLMediaElement::autobuffer): Ditto.
41         (WebCore::HTMLMediaElement::setAutobuffer): Ditto.
42
43         * html/HTMLMediaElement.h: Declare autobuffer and setAutobuffer.
44
45         * html/HTMLMediaElement.idl: Add autobuffer.
46
47         * platform/graphics/MediaPlayer.cpp:
48         (WebCore::MediaPlayer::MediaPlayer): Initialize m_autobuffer.
49         (WebCore::MediaPlayer::autobuffer): New.
50         (WebCore::MediaPlayer::setAutobuffer): Ditto.
51         * platform/graphics/MediaPlayer.h: Declare m_autobuffer, autobuffer and setAutobuffer
52
53         * platform/graphics/MediaPlayerPrivate.h:
54         (WebCore::MediaPlayerPrivateInterface::setAutobuffer): Declare setAutobuffer.
55
56 2009-03-31  Craig Schlenter  <craig.schlenter@gmail.com>
57
58         Reviewed by Dimitri Glazkov.
59
60         https://bugs.webkit.org/show_bug.cgi?id=24550
61         Check return value of vasprintf. This should keep gcc 4.3.3
62         happy rather than have it complain about attribute warn_unused_result.
63
64         * dom/XMLTokenizerLibxml2.cpp:
65         (WebCore::XMLTokenizer::error):
66
67 2009-03-31  Dean Jackson  <dino@apple.com>
68
69         Style guide violation!
70
71         * loader/MediaDocument.cpp:
72         (WebCore::MediaDocument::defaultEventHandler):
73
74 2009-03-31  Dean Jackson  <dino@apple.com>
75
76         Fix Tiger build.
77
78         * loader/MediaDocument.cpp:
79         (WebCore::MediaDocument::defaultEventHandler):
80
81 2009-03-31  Jian Li  <jianli@chromium.org>
82
83         Reviewed by Darin Fisher.
84
85         Upstream V8DOMMap for v8 bindings.
86         https://bugs.webkit.org/show_bug.cgi?id=24951
87
88         * bindings/v8/V8DOMMap.cpp: Added.
89         * bindings/v8/V8DOMMap.h: Added.
90
91 2009-03-31  Dean Jackson  <dino@apple.com>
92
93         Reviewed by Simon Fraser.
94
95         https://bugs.webkit.org/show_bug.cgi?id=24955
96
97         Spacebar didn't play/pause in standalone MediaDocument
98
99         * loader/MediaDocument.cpp:
100         (WebCore::MediaDocument::defaultEventHandler):
101
102 2009-03-31  Alpha Lam  <hclam@chromium.org>
103
104         Reviewed by Eric Seidel.
105
106         https://bugs.webkit.org/show_bug.cgi?id=24901
107         Added the following methods to MediaPlayerPrivate for Chromium port.
108         void sizeChanged();
109         void rateChanged();
110         void durationChanged();
111
112         The above changes are to reflect changes in MediaPlayer.cpp.
113         More details can be found in the original changeset.
114         http://trac.webkit.org/changeset/41907
115
116         * platform/graphics/chromium/MediaPlayerPrivateChromium.h:
117
118 2009-03-31  Rafael Weinstein  <rafaelw@chromium.org>
119
120         Reviewed by Eric Seidel.
121
122         https://bugs.webkit.org/show_bug.cgi?id=24947
123
124         Special-case drawing text-shadow on win32, to let GDI draw in cases
125         when both fill & shadow color are opaque and the shadow has no blur.
126
127         * platform/graphics/chromium/FontChromiumWin.cpp:
128         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
129         (WebCore::Font::drawComplexText):
130         * platform/graphics/skia/SkiaFontWin.cpp:
131         (WebCore::windowsCanHandleDrawTextShadow):
132         (WebCore::windowsCanHandleTextDrawing):
133         * platform/graphics/skia/SkiaFontWin.h:
134
135 2009-03-31  Jeremy Moskovich  <jeremy@chromium.org>
136
137         Reviewed by Darin Fisher.
138
139         r42055 removed some functions in FrameLoader used by Chrome,
140         this CL backs out some of those changes to unbreak the Chrome build.
141
142         https://bugs.webkit.org/show_bug.cgi?id=24949
143
144         * WebCore.base.exp:
145         * loader/FrameLoader.cpp:
146         * loader/FrameLoader.h:
147
148 2009-03-31  Jeremy Moskovich  <jeremy@chromium.org>
149
150         Reviewed by Darin Adler.
151
152         Build fixes for Chromium.
153
154         https://bugs.webkit.org/show_bug.cgi?id=24945
155
156         * dom/Document.h:
157         * platform/chromium/ClipboardChromium.cpp:
158         (WebCore::imageToMarkup):
159
160 2009-03-31  Simon Hausmann  <simon.hausmann@nokia.com>
161
162         Fix the Qt build.
163
164         * dom/XMLTokenizerQt.cpp:
165         (WebCore::XMLTokenizer::XMLTokenizer): Use NamedNodeMap instead of NamedAttrMap.
166
167 2009-03-30  Steve Falkenburg  <sfalken@apple.com>
168
169         Don't create CFDataRef with a fixed size.
170         Fixes synchronous XMLHTTPRequests on Windows.
171         
172         Reviewed by Ada Chan.
173
174         * platform/network/cf/ResourceHandleCFNet.cpp:
175         (WebCore::WebCoreSynchronousLoader::didReceiveData):
176
177 2009-03-30  Darin Adler  <darin@apple.com>
178
179         Reviewed by Sam Weinig.
180
181         Bug 24594: PolicyDelegate NavigationAction is WebNavigationTypeOther instead of WebNavigationTypeReload
182         https://bugs.webkit.org/show_bug.cgi?id=24594
183         rdar://problem/6682110
184
185         Test: fast/loader/reload-policy-delegate.html
186
187         * loader/FrameLoader.cpp:
188         (WebCore::FrameLoader::loadWithDocumentLoader): Set the triggering action here where we know it's
189         the policy loader and can use m_policyLoadType rather than letting it get set inside
190         checkNavigationPolicy.
191
192 2009-03-30  Timothy Hatcher  <timothy@apple.com>
193
194         <rdar://problem/5838871> CrashTracer: 1483 crashes Quicklooking
195         in Finder (painting without up to date layout)
196
197         Reviewed by Dan Bernstein.
198
199         * page/FrameView.cpp:
200         (WebCore::FrameView::paintContents): Add an early return when
201         painting is attempted when layout is needed.
202
203 2009-03-30  Greg Bolsinga  <bolsinga@apple.com>
204
205         Reviewed by Simon Fraser.
206
207         https://bugs.webkit.org/show_bug.cgi?id=24938
208         
209         Sort alphabetically.
210
211         * css/CSSComputedStyleDeclaration.cpp:
212         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
213
214 2009-03-30  Greg Bolsinga  <bolsinga@apple.com>
215
216         Reviewed by Simon Fraser.
217
218         https://bugs.webkit.org/show_bug.cgi?id=24938
219         
220         Build fixes for building --3d-rendering and --no-svg
221
222         * rendering/RenderLayerBacking.cpp:
223
224 2009-03-30  Greg Bolsinga  <bolsinga@apple.com>
225
226         Reviewed by Simon Fraser.
227         
228         https://bugs.webkit.org/show_bug.cgi?id=24938
229
230         Build fixes when building --no-svg
231         
232         * css/CSSComputedStyleDeclaration.cpp:
233         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Add missing CSS properties
234         * css/CSSCursorImageValue.cpp:
235         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed): Handle unused param
236         * css/CSSParser.cpp:
237         (WebCore::CSSParser::parseValue): Add missing CSS properties
238         * css/CSSStyleSelector.cpp:
239         (WebCore::CSSStyleSelector::applyProperty): Add missing CSS properties
240         * dom/Node.cpp:
241         (WebCore::updateSVGElementInstancesAfterEventListenerChange): Handle unused param
242         * platform/graphics/Font.cpp:
243         (WebCore::Font::floatWidth): Handle unused param
244         * platform/graphics/SimpleFontData.cpp:
245         (WebCore::SimpleFontData::SimpleFontData): Handle unused param
246
247 2009-03-30  Darin Adler  <darin@apple.com>
248
249         Reviewed by Adam Roben.
250
251         Bug 24916: REGRESSION: NavigationAction policy dispatch broken
252         https://bugs.webkit.org/show_bug.cgi?id=24916
253
254         * loader/FrameLoader.cpp:
255         (WebCore::FrameLoader::loadURL): Rearrange the code so that the "event" PassRefPtr
256         is not used twice. This also optimizes the case where a frame name is specified,
257         but it's the name of the frame being loaded. Also called release in all the final
258         uses of FormState.
259
260 2009-03-30  Darin Adler  <darin@apple.com>
261
262         Reviewed by Adam Roben.
263
264         Bug 24937: NamedNodeMap and NamedAttrMap should not be separate classes
265         https://bugs.webkit.org/show_bug.cgi?id=24937
266
267         Also should fix the Windows COM bindings build.
268
269         * bindings/scripts/CodeGeneratorJS.pm: Removed special case for NamedNodeMap.
270         * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
271
272         * dom/NamedAttrMap.h: Renamed class from NamedAttrMap to
273         NamedNodeMap and removed NamedNodeMap base class. Made the NamedNodeMap
274         functions all public and non-virtual. Removed virtualLength.
275
276         * dom/NamedNodeMap.h: Replaced file with just an include
277         of NamedAttrMap.h. As a follow up we will rename the NamedAttrMap
278         files and remove this file.
279
280         * bindings/js/JSNamedNodesCollection.cpp: Renamed from NamedAttrMap to NamedNodeMap.
281         * dom/Attr.h: Ditto.
282         * dom/Attribute.h: Ditto.
283         * dom/Document.cpp:
284         (WebCore::Document::importNode): Ditto.
285         * dom/Element.cpp:
286         (WebCore::Element::attributes): Ditto.
287         (WebCore::Element::setAttributeMap): Ditto.
288         (WebCore::Element::createAttributeMap): Ditto.
289         (WebCore::Element::insertedIntoDocument): Ditto.
290         (WebCore::Element::removedFromDocument): Ditto.
291         (WebCore::Element::openTagStartToString): Ditto.
292         (WebCore::Element::removeAttributeNode): Ditto.
293         (WebCore::Element::getAttributeNode): Ditto.
294         (WebCore::Element::getAttributeNodeNS): Ditto.
295         (WebCore::Element::hasAttribute): Ditto.
296         (WebCore::Element::hasAttributeNS): Ditto.
297         (WebCore::Element::normalizeAttributes): Ditto.
298         * dom/Element.h: Ditto.
299         * dom/NamedAttrMap.cpp:
300         (WebCore::NamedNodeMap::detachAttributesFromElement): Ditto.
301         (WebCore::NamedNodeMap::~NamedNodeMap): Ditto.
302         (WebCore::NamedNodeMap::isMappedAttributeMap): Ditto.
303         (WebCore::NamedNodeMap::getNamedItem): Ditto.
304         (WebCore::NamedNodeMap::getNamedItemNS): Ditto.
305         (WebCore::NamedNodeMap::removeNamedItem): Ditto.
306         (WebCore::NamedNodeMap::removeNamedItemNS): Ditto.
307         (WebCore::NamedNodeMap::setNamedItem): Ditto.
308         (WebCore::NamedNodeMap::item): Ditto.
309         (WebCore::NamedNodeMap::getAttributeItem): Ditto.
310         (WebCore::NamedNodeMap::clearAttributes): Ditto.
311         (WebCore::NamedNodeMap::detachFromElement): Ditto.
312         (WebCore::NamedNodeMap::setAttributes): Ditto.
313         (WebCore::NamedNodeMap::addAttribute): Ditto.
314         (WebCore::NamedNodeMap::removeAttribute): Ditto.
315         (WebCore::NamedNodeMap::mapsEquivalent): Ditto.
316         * dom/NamedMappedAttrMap.cpp:
317         (WebCore::NamedMappedAttrMap::clearAttributes): Ditto.
318         * dom/NamedMappedAttrMap.h:
319         (WebCore::NamedMappedAttrMap::NamedMappedAttrMap): Ditto.
320         * dom/Node.cpp:
321         (WebCore::Node::dumpStatistics): Ditto.
322         (WebCore::Node::isEqualNode): Ditto.
323         (WebCore::Node::isDefaultNamespace): Ditto.
324         (WebCore::Node::lookupNamespaceURI): Ditto.
325         (WebCore::Node::lookupNamespacePrefix): Ditto.
326         (WebCore::Node::compareDocumentPosition): Ditto.
327         * dom/Node.h: Ditto.
328         * dom/XMLTokenizerLibxml2.cpp:
329         (WebCore::XMLTokenizer::XMLTokenizer): Ditto.
330         * editing/ApplyStyleCommand.cpp:
331         (WebCore::isSpanWithoutAttributesOrUnstyleStyleSpan): Ditto.
332         (WebCore::isEmptyFontTag): Ditto.
333         (WebCore::areIdenticalElements): Ditto.
334         * editing/markup.cpp:
335         (WebCore::appendStartMarkup): Ditto.
336         (WebCore::completeURLs): Ditto.
337         * html/HTMLParser.cpp:
338         (WebCore::HTMLParser::handleError): Ditto.
339         * rendering/RenderPartObject.cpp:
340         (WebCore::RenderPartObject::updateWidget): Ditto.
341         * svg/SVGAnimatedProperty.h:
342         (WebCore::synchronizeProperty): Ditto.
343         * xml/XPathFunctions.cpp:
344         (WebCore::XPath::FunLang::evaluate): Ditto.
345         * xml/XPathStep.cpp:
346         (WebCore::XPath::Step::nodesInAxis): Ditto.
347
348 2009-03-30  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
349
350         Reviewed by Holger Freyther.
351
352         https://bugs.webkit.org/show_bug.cgi?id=24750
353         [GTK] requests download instead of displaying page
354
355         Use soup facilities to append parameters to the content type, to
356         make that more robust;
357
358         * platform/network/soup/ResourceHandleSoup.cpp:
359         (WebCore::fillResponseFromMessage):
360
361 2009-03-30  David Kilzer  <ddkilzer@apple.com>
362
363         <rdar://problem/6735683> Move SECTORDER_FLAGS from Xcode project to WebCore.xcconfig
364
365         Reviewed by Timothy Hatcher, Mark Rowe and Darin Adler.
366
367         * Configurations/Base.xcconfig: Moved Production definition of
368         SECTORDER_FLAGS to here from Xcode project file.
369         * Configurations/DebugRelease.xcconfig: Override SECTORDER_FLAGS
370         in Base.xcconfig to the empty string since it is not used for
371         Debug and Release configurations.
372         * WebCore.xcodeproj/project.pbxproj: Removed SECTORDER_FLAGS.
373
374 2009-03-30  Adam Roben  <aroben@apple.com>
375
376         Windows build fix after recent Node.idl changes
377
378         * bindings/scripts/CodeGeneratorCOM.pm: Touched this to force sources
379         of classes that derive from Node to rebuild.
380
381 2009-03-30  Adam Roben  <aroben@apple.com>
382
383         Windows build fix
384
385         * svg/graphics/SVGImage.cpp: Added a missing #include.
386
387 2009-03-30  Mads Ager  <ager@chromium.org>
388
389         Reviewed by Darin Adler.
390
391         https://bugs.webkit.org/show_bug.cgi?id=24879
392         Add frame accessor to Screen, Console, and BarInfo objects. Add type 
393         accessor to BarInfo objects.
394
395         In the V8 JavaScript bindings, we need access to the frame and
396         type for already created Screen, Console, and BarInfo objects in
397         order to keep their wrappers alive across GCs.
398
399         * page/BarInfo.cpp:
400         (WebCore::BarInfo::frame): Added.
401         (WebCore::BarInfo::type): Added.
402         * page/BarInfo.h:
403         * page/Console.cpp:
404         (WebCore::Console::frame): Added.
405         * page/Console.h:
406         * page/Screen.cpp:
407         (WebCore::Screen::frame): Added.
408         * page/Screen.h:
409
410 2009-03-29  Darin Adler  <darin@apple.com>
411
412         Requested by Antti Koivisto.
413
414         * loader/DocumentLoader.cpp:
415         (WebCore::DocumentLoader::subresource): Tweaked code to be a little clearer and added
416         a better comment.
417
418 2009-03-29  Darin Adler  <darin@apple.com>
419
420         Reviewed by Dan Bernstein.
421
422         Bug 23445: Copying certain hidden text causes a crash
423         https://bugs.webkit.org/show_bug.cgi?id=23445
424         rdar://problem/6512520
425
426         Test: editing/pasteboard/copy-display-none.html
427
428         * editing/markup.cpp:
429         (WebCore::createMarkup): Added a check for the case where adjusting the start node moves
430         the start of the selection past the end of the range entirely. If we try to iterate we'll
431         never hit the end of the range and will probably crash iterating the rest of the document.
432
433 2009-03-29  Darin Adler  <darin@apple.com>
434
435         Reviewed by Dan Bernstein.
436
437         Bug 24672: ASSERTION FAILURE: !m_purgeableData in WebCore::CachedResource::data() saving a WebArchive
438         https://bugs.webkit.org/show_bug.cgi?id=24672
439         rdar://problem/6574263
440
441         I couldn't create a test case for this. In fact, the case in the bug doesn't exist any more,
442         but there is an Apple-internal website I was able to use to reproduce and fix.
443
444         * loader/CachedResource.h: Made makePurgeable public.
445         * loader/DocumentLoader.cpp:
446         (WebCore::DocumentLoader::subresource): Call makePurgeable to make the resource non-purgeable
447         so we can get its data if it hasn't yet been purged.
448
449 2009-03-29  Darin Adler  <darin@apple.com>
450
451         Fix build again.
452
453         * loader/EmptyClients.h: Fix typo in name of FormState.h.
454
455 2009-03-29  Darin Adler  <darin@apple.com>
456
457         Try to fix the release build.
458
459         * history/CachedPage.cpp: Make include unconditional, not debug-only.
460
461 2009-03-29  Greg Bolsinga  <bolsinga@apple.com>
462
463         Undo that last build fix, since it turned out the file wasn't deleted.
464
465         * WebCore.xcodeproj/project.pbxproj:
466
467 2009-03-29  Greg Bolsinga  <bolsinga@apple.com>
468
469         Fix build break by removing references to deleted header files.
470
471         * WebCore.xcodeproj/project.pbxproj:
472
473 2009-03-29  Darin Adler  <darin@apple.com>
474
475         Try to fix the Windows build.
476
477         * loader/EmptyClients.h: Added include of FormState.h.
478         * loader/MainResourceLoader.cpp: Ditto.
479
480 2009-03-29  Dmitry Titov  <dimich@chromium.org>
481
482         Reviewed by Darin Adler.
483
484         https://bugs.webkit.org/show_bug.cgi?id=24926
485         Fix Chromium build break.
486
487         * bindings/v8/custom/V8DOMWindowCustom.cpp:
488         (WebCore::CALLBACK_FUNC_DECL(DOMWindowShowModalDialog)): renamed 'features' into 'windowFeatures'.
489
490 2009-03-29  Darin Adler  <darin@apple.com>
491
492         Another attempt to fix the Qt build.
493
494         * WebCore.pro: Added CheckedRadioButtons.cpp.
495
496 2009-03-29  Darin Adler  <darin@apple.com>
497
498         Reviewed by Cameron Zwarich.
499
500         Bug 24921: remove include of HTMLFormElement.h from Document.h
501         https://bugs.webkit.org/show_bug.cgi?id=24921
502
503         * GNUmakefile.am: Added CheckedRadioButtons source files.
504         * WebCore.scons: Ditto.
505         * WebCore.vcproj/WebCore.vcproj: Ditto.
506         * WebCore.xcodeproj/project.pbxproj: Ditto.
507         * WebCoreSources.bkl: Ditto.
508
509         * bindings/objc/PublicDOMInterfaces.h: Changed type of parentElement to Element.
510
511         * dom/CheckedRadioButtons.cpp: Copied from WebCore/html/HTMLFormElement.cpp.
512         Removed all the code except for CheckedRadioButtons, and moved that out to be
513         a namespace-level class instead of a member of HTMLFormElement.
514
515         * dom/CheckedRadioButtons.h: Copied from WebCore/html/HTMLFormElement.h.
516         Removed all the code except for CheckedRadioButtons, and moved that out to be
517         a namespace-level class instead of a member of HTMLFormElement.
518
519         * dom/Document.h: Removed unneeded includes, including HTMLFormElement.h.
520         Added include of CheckedRadioButtons.h. Changed uses of CheckedRadioButtons
521         class to use a namespace-level class instead of a member of HTMLFormElement.
522
523         * dom/Node.idl: Changed the type of parentElement from Node to Element for
524         two reasons. 1) Node was incorrect, since parentElement returns an Element.
525         2) The bindings won't compile any more unless they know parentElement's
526         return value is an Element due to include changes.
527
528         * html/HTMLFormElement.cpp: Moved definitions of the functions in the
529         CheckedRadioButtons class to the new CheckedRadioButtons.cpp.
530
531         * html/HTMLFormElement.h: Moved definition of the CheckedRadioButtons
532         class to the new CheckedRadioButtons.h.
533
534         * html/HTMLInputElement.cpp:
535         (WebCore::checkedRadioButtons): Changed use of CheckedRadioButtons
536         class to use a namespace-level class instead of a member of HTMLFormElement.
537
538         * page/Chrome.cpp:
539         (WebCore::Chrome::createWindow): Tweaked formatting.
540
541         * css/CSSGrammar.y: Added newly-needed include.
542         * dom/Range.cpp: Ditto.
543         * editing/BreakBlockquoteCommand.cpp: Ditto.
544         * editing/CompositeEditCommand.cpp: Ditto.
545         * editing/InsertLineBreakCommand.cpp: Ditto.
546         * editing/ModifySelectionListLevel.cpp: Ditto.
547         * editing/RemoveFormatCommand.cpp: Ditto.
548         * editing/TextIterator.cpp: Ditto.
549         * editing/VisiblePosition.cpp: Ditto.
550         * loader/DocLoader.cpp: Ditto.
551         * page/AccessibilityRenderObject.cpp: Ditto.
552         * page/Page.cpp: Ditto.
553         * rendering/RenderBlock.cpp: Ditto.
554         * rendering/RenderLayer.cpp: Ditto.
555         * rendering/RenderObject.h: Ditto.
556         * storage/LocalStorageArea.cpp: Ditto.
557         * storage/SessionStorageArea.cpp: Ditto.
558
559 2009-03-29  Darin Adler  <darin@apple.com>
560
561         Reviewed by Dan Bernstein.
562
563         <rdar://problem/6015407> attr parsing should allow only identifiers
564
565         Test: fast/css/attr-parsing.html
566
567         * css/CSSParser.cpp:
568         (WebCore::CSSParser::parseContent): Allow only CSS_IDENT, and filter out
569         identifiers that start with "-".
570         * css/CSSPrimitiveValue.cpp:
571         (WebCore::CSSPrimitiveValue::cssText): Added a case for CSS_ATTR so the test
572         case works. This has the pleasant side effect of fixing a bug too.
573
574 2009-03-29  Alexey Proskuryakov  <ap@webkit.org>
575
576         <rdar://problem/6492712> Cross-origin redirects are not handled correctly.
577
578         Forgot to save the file after applying changes for review comments.
579
580         * platform/network/cf/ResourceHandleCFNet.cpp:
581         (WebCore::willSendRequest):
582         (WebCore::didReceiveResponse):
583         (WebCore::didReceiveData):
584         (WebCore::didSendBodyData):
585         (WebCore::didFinishLoading):
586         (WebCore::didFail):
587         (WebCore::willCacheResponse):
588         (WebCore::didReceiveChallenge):
589         (WebCore::WebCoreSynchronousLoader::willSendRequest):
590         (WebCore::WebCoreSynchronousLoader::didReceiveResponse):
591         (WebCore::WebCoreSynchronousLoader::didReceiveData):
592         (WebCore::WebCoreSynchronousLoader::didFinishLoading):
593         (WebCore::WebCoreSynchronousLoader::didFail):
594         (WebCore::WebCoreSynchronousLoader::didReceiveChallenge):
595
596 2009-03-28  Alexey Proskuryakov  <ap@webkit.org>
597
598         Reviewed by Darin Adler.
599
600         <rdar://problem/6492712> Cross-origin redirects are not handled correctly.
601
602         Test: http/tests/xmlhttprequest/redirect-cross-origin-tripmine.html
603
604         * platform/network/cf/ResourceHandleCFNet.cpp:
605         (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader):
606         (WebCore::ResourceHandle::loadResourceSynchronously):
607         (WebCore::WebCoreSynchronousLoader::willSendRequest):
608         (WebCore::WebCoreSynchronousLoader::didReceiveResponse):
609         (WebCore::WebCoreSynchronousLoader::didReceiveData):
610         (WebCore::WebCoreSynchronousLoader::didFinishLoading):
611         (WebCore::WebCoreSynchronousLoader::didFail):
612         (WebCore::WebCoreSynchronousLoader::didReceiveChallenge):
613         (WebCore::WebCoreSynchronousLoader::load):
614         Match Mac behavior more closely - we shouldn't rely on underlying library handling of
615         synchronous requests.
616
617         * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::willSendRequest):
618         -[NSURLConnection cancel] doesn't fully cancel the connection if called from willSendRequest
619         delegate method for a redirect.
620
621         * platform/network/mac/ResourceHandleMac.mm:
622         (-[WebCoreSynchronousLoader connection:willSendRequest:redirectResponse:]):
623         Match async behavior more closely.
624
625 2009-03-28  Darin Adler  <darin@apple.com>
626
627         Reviewed by Mark Rowe.
628
629         Bug 24914: empty-string assertion crash when running storage tests
630         https://bugs.webkit.org/show_bug.cgi?id=24914
631
632         * storage/Database.cpp:
633         (WebCore::Database::performOpenAndVerify): Don't store empty version strings
634         in the map, since empty strings are per-thread.
635
636 2009-03-28  Dmitry Titov  <dimich@chromium.org>
637
638         Reviewed by Dimitri Glazkov.
639
640         https://bugs.webkit.org/show_bug.cgi?id=24910
641         Fixes for Chromium build.
642
643         * bindings/v8/V8LazyEventListener.h: renamed IsInline() into virtualIsInline()
644         * bindings/v8/custom/V8CustomEventListener.h: ditto.
645         * dom/EventListener.h: used #if USE(JSC) to fix the build on non-JSC platform.
646
647 2009-03-28  Dimitri Glazkov  <dglazkov@chromium.org>
648
649         Not reviewed, correcting landing error.
650
651         https://bugs.webkit.org/show_bug.cgi?id=24812
652         Custom bindings should be in v8/custom, not v8.
653
654         * bindings/v8/V8HTMLDocumentCustom.cpp: Removed.
655         * bindings/v8/custom/V8HTMLDocumentCustom.cpp: Moved from parent dir.
656
657 2009-03-28  Mike Belshe  <mike@belshe.com>
658
659         Reviewed by Dimitri Glazkov.
660
661         https://bugs.webkit.org/show_bug.cgi?id=24616
662         Add V8 custom bindings for DOMWindow.
663
664         * bindings/v8/custom/V8DOMWindowCustom.cpp: Added.
665
666 2009-03-28  Mike Belshe  <mike@belshe.com>
667
668         Reviewed by Dimitri Glazkov.
669
670         https://bugs.webkit.org/show_bug.cgi?id=24812
671         Add V8 custom bindings for HTMLDocument.
672
673         * bindings/v8/V8HTMLDocumentCustom.cpp: Added.
674
675 2009-03-27  Mark Rowe  <mrowe@apple.com>
676
677         Reviewed by Sam Weinig.
678
679         Fix two SVG test failures in 64-bit.
680
681         getSubStringLength's arguments were declared as unsigned in the IDL and as signed long in the implementation.
682         This led to a value of -1 in JavaScript being converted to MAX_UINT in the bindings.  In 32-bit this was
683         identical to -1 when interpeted as signed long, but in 64-bit it was still equal to MAX_UINT.
684
685         The solution for this is to use the IsIndex attribute on arguments that the SVG spec declares as "unsigned long"
686         but requires an exception be thrown when a negative value is passed.  This results in the JS bindings handling the
687         check for a negative value and lets the implementation treat the arguments purely as unsigned values.
688
689         * svg/SVGTextContentElement.cpp:
690         (WebCore::SVGTextContentElement::getNumberOfChars):
691         (WebCore::SVGTextContentElement::getSubStringLength):
692         (WebCore::SVGTextContentElement::getStartPositionOfChar):
693         (WebCore::SVGTextContentElement::getEndPositionOfChar):
694         (WebCore::SVGTextContentElement::getExtentOfChar):
695         (WebCore::SVGTextContentElement::getRotationOfChar):
696         (WebCore::SVGTextContentElement::getCharNumAtPosition):
697         (WebCore::SVGTextContentElement::selectSubString):
698         * svg/SVGTextContentElement.h:
699         * svg/SVGTextContentElement.idl:
700
701 2009-03-27  Darin Adler  <darin@apple.com>
702
703         Reviewed by Sam Weinig.
704
705         Get mailto code out of FrameLoader.
706
707         * html/HTMLFormElement.cpp:
708         (WebCore::transferMailtoPostFormDataToURL): Added. Factored out the mailto
709         logic so HTMLFormElement::submit isn't full of ugly bits. This includes the
710         part of the logic that involves transformeing the URL that was previously
711         inside FrameLoader.
712         (WebCore::HTMLFormElement::submit): Call transferMailtoPostFormDataToURL and
713         also release the data for slightly less refcount churn.
714
715         * loader/FrameLoader.cpp:
716         (WebCore::FrameLoader::submitForm): Removed all the special casing for mailto,
717         since HTMLFormElement now properly prepares both the URL and the form data.
718
719 2009-03-27  Dan Bernstein  <mitz@apple.com>
720
721         Reviewed by Mark Rowe.
722
723         - fix <rdar://problem/6724514> A bit of OpenTypeUtilities cleanup
724
725         * platform/graphics/chromium/FontCustomPlatformData.cpp:
726         (WebCore::EOTStream::EOTStream): Changed to use EOTHeader.
727         (WebCore::createFontCustomPlatformData): Ditto.
728         * platform/graphics/opentype/OpenTypeUtilities.cpp:
729         (WebCore::EOTHeader::EOTHeader): Added. Initializes the buffer size to
730         the size of an EOTPrefix.
731         (WebCore::EOTHeader::updateEOTSize): Added. Updates the size field in
732         the prefix.
733         (WebCore::EOTHeader::appendBigEndianString): Changed the static
734         appendBigEndianStringToEOTHeader() into this member function.
735         (WebCore::EOTHeader::appendPaddingShort): Added.
736         (WebCore::getEOTHeader): Changed to use EOTHeader.
737         * platform/graphics/opentype/OpenTypeUtilities.h:
738         (WebCore::EOTHeader::size):
739         (WebCore::EOTHeader::data):
740         (WebCore::EOTHeader::prefix):
741         * platform/graphics/win/FontCustomPlatformData.cpp:
742         (WebCore::EOTStream::EOTStream): Changed to use EOTHeader.
743         (WebCore::createFontCustomPlatformData): Ditto.
744
745 2009-03-27  Darin Adler  <darin@apple.com>
746
747         Reviewed by Sam Weinig.
748
749         To prepare for work on a form loading fix, remove some unused functions,
750         consolidate some functions, and make many more functions private in
751         FrameLoader.
752
753         * WebCore.base.exp: Remove some unused entry points, update another.
754
755         * dom/Document.cpp:
756         (WebCore::Document::detach): Clear m_frame directly instead of using
757         clearFramePointer.
758         * dom/Document.h: Ditto.
759
760         * loader/FrameLoader.cpp:
761         (WebCore::FrameLoader::urlSelected): Consolidate the two functions
762         of this name into a single function. Also changed the event argument
763         to be PassRefPtr<Event>.
764         (WebCore::FrameLoader::submitForm): Changed the event argument to
765         be PassRefPtr<Event>.
766         (WebCore::FrameLoader::scheduleLocationChange): Call completeURL
767         explicitly so we can remove the version of changeLocation that does
768         completeURL for us.
769         (WebCore::FrameLoader::redirectionTimerFired): Ditto.
770         (WebCore::FrameLoader::loadURLIntoChildFrame): Set m_provisionalHistoryItem
771         directly so we don't need a setProvisionalHistoryItem function.
772         (WebCore::FrameLoader::canCachePageContainingThisFrame): Get at
773         m_quickRedirectComing directly so we don't need a isQuickRedirectComing
774         function.
775         (WebCore::FrameLoader::logCanCacheFrameDecision): Ditto.
776         (WebCore::FrameLoader::loadFrameRequestWithFormAndValues): Changed the
777         event argument to be PassRefPtr<Event>.
778         (WebCore::FrameLoader::loadURL): Move the logic of the continueLoadWithData
779         function here because this is the only caller. If we want to make the
780         resulting function smaller we should refactor some other way. Also
781         streamlined the user-chosen encoding logic, but did not change what it does.
782         (WebCore::FrameLoader::finishedLoadingDocument): Changed the event argument
783         to be PassRefPtr<Event>.
784         (WebCore::FrameLoader::loadPostRequest): Ditto.
785         (WebCore::FrameLoader::receivedMainResourceError): Moved the logic from
786         the didNotOpenURL function here, since this was the only caller.
787
788         * loader/FrameLoader.h: Removed include of FormState.h and used a forward
789         declaration instead. Removed unneeded forward declation of Element.
790         Moved many functions into the private section, and removed some other
791         unused or uneeded functions.
792
793 2009-03-27  Xiaomei Ji  <xji@chromium.org>
794
795         Reviewed by Dan Bernstein.
796
797         Fix https://bugs.webkit.org/show_bug.cgi?id=24303
798         Using keyboard select RTL text, Highlights goes to opposite direction from Firefox and IE.
799
800         Test: editing/selection/extend-selection.html
801
802         * editing/SelectionController.cpp:
803         (WebCore::SelectionController::directionOfEnclosingBlock): Added
804         (WebCore::SelectionController::modifyExtendingRight): Added. Currenctly 
805         implemented for character and word granularity, all other granularities
806         are treated as "forward".
807         (WebCore::SelectionController::modifyExtendingForward): Renamed 
808         modifyExtendingRightForward() to this.
809         (WebCore::SelectionController::modifyExtendingLeft): Added. Currenctly
810         implemented for character and word granularity, all other granularities
811         are treated as "backward".
812         (WebCore::SelectionController::modifyExtendingBackward): Renamed
813         modifyExtendingLeftBackward() to this.
814         (WebCore::SelectionController::modify): Change to call either the 
815         left/right or backward/forward methods depending on the 'dir' argument
816         for extends.
817         * editing/SelectionController.h:
818
819 2009-03-27  John Abd-El-Malek  <jam@google.com>
820
821         Reviewed by Eric Seidel.
822
823         https://bugs.webkit.org/show_bug.cgi?id=24836
824         Fix navigator.plugins.refresh(false) in Chromium.
825
826         * plugins/chromium/PluginDataChromium.cpp:
827         (WebCore::PluginData::refresh):
828
829 2009-03-27  Timothy Hatcher  <timothy@apple.com>
830
831         Make scrollLeft, scrollTop, scrollWidth, and scrollHeight
832         virtual to fix the broken layout tests from my last commit.
833
834         Reviewed by Mark Rowe.
835
836         * dom/Element.cpp:
837         (WebCore::Element::scrollLeft):
838         (WebCore::Element::scrollTop):
839         (WebCore::Element::scrollWidth):
840         (WebCore::Element::scrollHeight):
841         * dom/Element.h:
842         * html/HTMLBodyElement.h:
843
844 2009-03-27  Mark Rowe  <mrowe@apple.com>
845
846         Reviewed by Sam Weinig.
847
848         Fix <https://bugs.webkit.org/show_bug.cgi?id=24876>.
849         Bug 24876: fast/forms/select-max-length.html times out in debug builds due to HTMLSelectElement::setLength being O(N^2)
850
851         * html/HTMLSelectElement.cpp:
852         (WebCore::HTMLSelectElement::setLength): Repeatedly calling remove to remove elements causes us to recalculate the list
853         items after each node is removed, leading to O(N^2) behaviour.  By inlining the batch removal in to setLength we can avoid
854         this gratuitous recalcuation.
855
856 2009-03-27  Dirk Schulze  <krit@webkit.org>
857
858         Reviewed by Eric Seidel.
859
860         We don't support images for GtkCursors yet. We need a  placeholder to avoid crashes.
861         I took crosshair to have a common behavior with firefox.
862
863         [GTK] SVG - Crash on setting the cursor icon
864         https://bugs.webkit.org/show_bug.cgi?id=24565
865
866         * platform/gtk/CursorGtk.cpp:
867         (WebCore::Cursor::Cursor):
868
869 2009-03-27  Timothy Hatcher  <timothy@apple.com>
870
871         Remove redundant attributes and functions from IDL files that have the
872         same attributes and functions defined in the super class.
873
874         Reviewed by Simon Fraser.
875
876         * WebCore.xcodeproj/project.pbxproj: Remove DOMHTMLBodyElementPrivate.h.
877         * bindings/objc/PublicDOMInterfaces.h: Remove focus and blur from DOMHTMLElement.
878         * html/HTMLBodyElement.idl: Remove scrollLeft, scrollTop, scrollWidth
879         and scrollHeight.
880         * html/HTMLElement.idl: Remove blur and focus.
881
882 2009-03-27  Adam Roben  <aroben@apple.com>
883
884         Don't include substitute data URLs in global history redirect chains
885
886         <rdar://6690169>
887
888         Reviewed by Darin Adler.
889
890         This might be testable if:
891           - support were added to DRT for providing substitute data on failed
892             loads
893           - support were added to DRT for dumping redirect chains
894
895         I tried doing the above and was still unable to make a test.
896
897         * loader/FrameLoader.cpp:
898         (WebCore::FrameLoader::updateHistoryForStandardLoad):
899         (WebCore::FrameLoader::updateHistoryForRedirectWithLockedBackForwardList):
900         Call updateGlobalHistoryRedirectLinks only if the load succeeded
901         (i.e., there is no unreachableURL). Previous the FrameLoaderClient
902         implementations were unconditionally calling
903         updateGlobalHistoryRedirectLinks from within updateGlobalHistory.
904
905 2009-03-27  Peter Kasting  <pkasting@google.com>
906
907         Reviewed by Eric Seidel.
908
909         https://bugs.webkit.org/show_bug.cgi?id=24861
910         Chromium port did not render decorations for <input type="search">.
911         This copies RenderThemeWin.*.
912
913         * css/themeChromiumWin.css: Removed.
914         * rendering/RenderThemeChromiumLinux.cpp:
915         (WebCore::RenderThemeChromiumLinux::extraDefaultStyleSheet):
916         (WebCore::RenderThemeChromiumLinux::adjustSearchFieldCancelButtonStyle):
917         (WebCore::RenderThemeChromiumLinux::paintSearchFieldCancelButton):
918         (WebCore::RenderThemeChromiumLinux::adjustSearchFieldDecorationStyle):
919         (WebCore::RenderThemeChromiumLinux::adjustSearchFieldResultsDecorationStyle):
920         (WebCore::RenderThemeChromiumLinux::paintSearchFieldResultsDecoration):
921         (WebCore::RenderThemeChromiumLinux::adjustSearchFieldResultsButtonStyle):
922         (WebCore::RenderThemeChromiumLinux::paintSearchFieldResultsButton):
923         * rendering/RenderThemeChromiumLinux.h:
924         (WebCore::RenderThemeChromiumLinux::paintSearchField):
925         * rendering/RenderThemeChromiumWin.cpp:
926         (WebCore::):
927         (WebCore::RenderThemeChromiumWin::extraDefaultStyleSheet):
928         (WebCore::RenderThemeChromiumWin::adjustSearchFieldCancelButtonStyle):
929         (WebCore::RenderThemeChromiumWin::paintSearchFieldCancelButton):
930         (WebCore::RenderThemeChromiumWin::adjustSearchFieldDecorationStyle):
931         (WebCore::RenderThemeChromiumWin::adjustSearchFieldResultsDecorationStyle):
932         (WebCore::RenderThemeChromiumWin::paintSearchFieldResultsDecoration):
933         (WebCore::RenderThemeChromiumWin::adjustSearchFieldResultsButtonStyle):
934         (WebCore::RenderThemeChromiumWin::paintSearchFieldResultsButton):
935         * rendering/RenderThemeChromiumWin.h:
936         (WebCore::RenderThemeChromiumWin::paintSearchField):
937
938 2009-03-27  David Hyatt  <hyatt@apple.com>
939
940         Reviewed by Simon Fraser
941
942         If an object has a self-painting layer, don't count it as part of a block's visual overflow.
943         This fix has only been made for block-level children.   The inline-level case is still broken
944         (and covered by an existing bug).
945
946         Added fast/block/positioning/negative-rel-position.html
947
948         * rendering/InlineFlowBox.cpp:
949         (WebCore::InlineFlowBox::placeBoxesVertically):
950         * rendering/RenderBlock.cpp:
951         (WebCore::RenderBlock::layoutBlockChildren):
952         (WebCore::RenderBlock::lowestPosition):
953         (WebCore::RenderBlock::rightmostPosition):
954         (WebCore::RenderBlock::leftmostPosition):
955
956 2009-03-27  Anders Carlsson  <andersca@apple.com>
957
958         Reviewed by Darin Adler.
959
960         <rdar://problem/6642221>
961         REGRESSION: With the Movie widget, movie trailer fails to load if movie had been previously viewed
962         
963         Add a dashboard specific workaround so that we always create renderers for object elements, even if display:none is set.
964         
965         I've filed <rdar://problem/6731022> against the Movies widget.
966         
967         * html/HTMLObjectElement.cpp:
968         (WebCore::HTMLObjectElement::rendererIsNeeded):
969
970 2009-03-25  Timothy Hatcher  <timothy@apple.com>
971
972         Expose new DOM methods as public Objective-C API.
973
974         <rdar://problem/5837350> Expose new DOM classes and methods
975         as public API (match the additions to the JavaScript DOM)
976
977         Reviewed by Mark Rowe and Darin Adler.
978
979         * WebCore.xcodeproj/project.pbxproj:
980         * bindings/objc/DOMHTML.h:
981         * bindings/objc/DOMPrivate.h:
982         * bindings/objc/PublicDOMInterfaces.h:
983
984 2009-03-27  Zack Rusin <zack@kde.org>
985
986         Reviewed by Simon Hausmann.
987
988         https://bugs.webkit.org/show_bug.cgi?id=24280
989
990         Fix propagation of fill rules when rendering paths in the Qt build.
991
992         * platform/graphics/qt/GraphicsContextQt.cpp:
993         (WebCore::toQtFillRule):
994         (WebCore::GraphicsContext::fillPath):
995         (WebCore::GraphicsContext::strokePath):
996
997 2009-03-27  Zack Rusin <zack@kde.org>
998
999         Reviewed by Tor Arne Vestbø.
1000
1001         https://bugs.webkit.org/show_bug.cgi?id=24275
1002
1003         Fix text field theming in the Qt build with the KDE 4 Oxygen
1004         style by adjusting the size vertically and horizontally to
1005         set padding on the element equal to the width of the style painted border.
1006
1007         * platform/qt/RenderThemeQt.cpp:
1008         (WebCore::RenderThemeQt::RenderThemeQt):
1009         (WebCore::RenderThemeQt::computeSizeBasedOnStyle):
1010         (WebCore::RenderThemeQt::adjustTextFieldStyle):
1011         (WebCore::RenderThemeQt::paintTextField):
1012         * platform/qt/RenderThemeQt.h:
1013
1014 2009-03-27  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1015
1016         Reviewed by Simon Hausmann.
1017
1018         https://bugs.webkit.org/show_bug.cgi?id=24852
1019         Build fix for GNU mode RVCT compilation
1020
1021         * html/PreloadScanner.cpp:
1022
1023 2009-03-27  Erik L. Bunce  <elbunce@xendom.com>
1024
1025         Reviewed by Simon Hausmann.
1026
1027         https://bugs.webkit.org/show_bug.cgi?id=24868
1028
1029         Make text of the writing direction items more user friendly.
1030
1031         * platform/qt/Localizations.cpp:
1032         (WebCore::contextMenuItemTagLeftToRight):
1033         (WebCore::contextMenuItemTagRightToLeft):
1034
1035 2009-03-27  Erik L. Bunce  <elbunce@xendom.com>
1036
1037         Reviewed by Simon Hausmann.
1038
1039         https://bugs.webkit.org/show_bug.cgi?id=24274
1040
1041         Fixed the Qt 4.4 Mac build with netscape plugins enabled.
1042
1043         * plugins/mac/PluginViewMac.cpp:
1044
1045 2009-03-26  Mark Rowe  <mrowe@apple.com>
1046
1047         Try and fix the Qt build.
1048
1049         * platform/text/TextEncodingDetectorNone.cpp:
1050         (WebCore::detectTextEncoding):
1051
1052 2009-03-26  Eric Carlson  <eric.carlson@apple.com>
1053
1054         Reviewed by Simon Fraser.
1055
1056         https://bugs.webkit.org/show_bug.cgi?id=24874
1057         24874: HTMLMediaElement: 'duration' defaults to NaN, deal with it
1058         
1059         The 'duration' attribute is NaN when no media is available, so the
1060         media element should take care when comparing with duration().
1061
1062         * html/HTMLMediaElement.cpp:
1063         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Don't compare with duration when
1064         it is NaN.
1065         (WebCore::HTMLMediaElement::endedPlayback): Ditto.
1066
1067 2009-03-26  Mark Rowe  <mrowe@apple.com>
1068
1069         Fix the build.
1070
1071         * platform/text/TextEncodingDetectorICU.cpp:
1072         * platform/text/TextEncodingDetectorNone.cpp:
1073
1074 2009-03-26  Jungshik Shin  <jshin@chromium.org>
1075
1076         Reviewed by Cameron Zwarich.
1077
1078         1. Fix the crash in setHintEncoding
1079         2. Fix build failures on Tiger and Qt.
1080         UnusedParam.h was not included by TextEncodingDetector{None,ICU}.cpp
1081         in the patch landed in r42023
1082         for http://bugs.webkit.org/show_bug.cgi?id=16482
1083
1084         * loader/TextResourceDecoder.h:
1085         (WebCore::TextResourceDecoder::setHintEncoding):
1086         * platform/text/TextEncodingDetectorICU.cpp:
1087         * platform/text/TextEncodingDetectorNone.cpp:
1088
1089 2009-03-26  Simon Fraser  <simon.fraser@apple.com>
1090
1091         Build fix when ACCELERATED_COMPOSITING is turned on.
1092
1093         * rendering/RenderLayerBacking.cpp:
1094         (WebCore::RenderLayerBacking::canUseDirectCompositing):
1095
1096 2009-03-26  Eric Seidel  <eric@webkit.org>
1097
1098         No additional review, committing previously reviewed files for build fix only.
1099
1100         Add files I missed when commiting Jungshik's patch in r42022.
1101         https://bugs.webkit.org/show_bug.cgi?id=16482
1102
1103         * icu/unicode/ucsdet.h: Added.
1104         * platform/text/TextEncodingDetector.h: Added.
1105         * platform/text/TextEncodingDetectorICU.cpp: Added.
1106         (WebCore::detectTextEncoding):
1107         * platform/text/TextEncodingDetectorNone.cpp: Added.
1108         (WebCore::detectTextEncoding):
1109
1110 2009-03-26  Jungshik Shin  <jshin@chromium.org>
1111
1112         Reviewed by Alexey Proskuryakov.
1113
1114         Add an encoding detector 'hook' to TextResourceDecoder.
1115          - add |usesEncodingDetector| to Settings. It's off by default.
1116          - add a new encoding source type |EncodingFromParent| 
1117            to distinguish cases when the encoding is inherited from
1118            the parent frame from cases when it's actually auto-detected.
1119          - add TextEncodingDetector* to platform/text. Currently,
1120            the only implementation uses ICU. Stub is added for 
1121            ports that do not use ICU and a build on Tiger. Mac OS 
1122            Tiger comes with ICU 3.2 that does not support encoding detector.
1123          - add ucsdet.h to icu/unicode for ports using ICU.
1124
1125         Layout tests will be added once bug 20534 is fixed and a WebPreference
1126         can be controlled in test_shell. With UsesEncodingDetector off, there
1127         is no change to test. 
1128
1129         http://bugs.webkit.org/show_bug.cgi?id=16482
1130
1131         * WebCore.vcproj/WebCore.vcproj:
1132         * WebCore.xcodeproj/project.pbxproj:
1133         * WebCore/GNUmakefile.am
1134         * WebCore/WebCore.pro
1135         * WebCore/WebCore.scons
1136         * WebCore/WebCoreSources.bkl
1137         * WebCore.base.exp
1138         * icu/unicode/ucsdet.h
1139         * loader/FrameLoader.cpp:
1140         (WebCore::FrameLoader::write): turn on/off encoding detector depending on Settings and set hintEncoding of TextResourceDecoder to the parent frame encoding if necessary and the security policy allows refering to the parent frame encoding.
1141         * loader/TextResourceDecoder.cpp:
1142         (WebCore::TextResourceDecoder::TextResourceDecoder):
1143         (WebCore::TextResourceDecoder::checkForCSSCharset): add check for EncodingFromParentFrame
1144         (WebCore::TextResourceDecoder::checkForHeadCharset): ditto
1145         (WebCore::TextResourceDecoder::shouldAutoDetect):
1146         (WebCore::TextResourceDecoder::decode): call encoding detector if shouldAutoDetect returns true.
1147         (WebCore::TextResourceDecoder::flush): if encoding is not determined by now, call encoding detector if shouldAutoDetect returns true.
1148         * loader/TextResourceDecoder.h:
1149         (WebCore::TextResourceDecoder::):
1150         (WebCore::TextResourceDecoder::create):
1151         (WebCore::TextResourceDecoder::setHintEncoding):
1152         (WebCore::TextResourceDecoder::source):
1153         * page/Settings.cpp: add m_usesEncodingDetector
1154         (WebCore::Settings::Settings):
1155         (WebCore::Settings::setUsesEncodingDetector):
1156         * page/Settings.h:
1157         (WebCore::Settings::usesEncodingDetector):
1158         * platform/text/TextEncodingDetector.h: Added.
1159         * platform/text/TextEncodingDetectorICU.cpp: Added.
1160         (WebCore::detectTextEncoding):
1161         * platform/text/TextEncodingDetectorNone.cpp: Added.
1162         (WebCore::detectTextEncoding):
1163
1164 2009-03-26  Darin Adler  <darin@apple.com>
1165
1166         Reviewed by Geoff Garen.
1167
1168         Removed code that casts EventListener down to derived classes
1169         without type checking. A crash could happen if you added event
1170         listeners with Objective-C and then manipulated the class with
1171         JavaScript.
1172
1173         * bindings/js/JSDOMApplicationCacheCustom.cpp:
1174         (WebCore::JSDOMApplicationCache::mark): Removed all the casts
1175         and used the markIfNotNull function and mark functions on
1176         EventListener instead.
1177         * bindings/js/JSMessagePortCustom.cpp:
1178         (WebCore::JSMessagePort::mark): Ditto.
1179         * bindings/js/JSWorkerContextCustom.cpp:
1180         (WebCore::JSWorkerContext::mark): Ditto.
1181         * bindings/js/JSWorkerCustom.cpp:
1182         (WebCore::JSWorker::mark): Ditto.
1183         * bindings/js/JSXMLHttpRequestCustom.cpp:
1184         (WebCore::JSXMLHttpRequest::mark): Ditto.
1185         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
1186         (WebCore::JSXMLHttpRequestUpload::mark): Ditto.
1187
1188         * bindings/js/JSEventListener.cpp:
1189         (WebCore::JSAbstractEventListener::handleEvent): Used function,
1190         the new name for what used to be called listenerObj.
1191         (WebCore::JSAbstractEventListener::virtualIsInline): Renamed since
1192         this doesn't need to be virtual for callers who have a pointer to
1193         this class, not the base class.
1194         (WebCore::JSEventListener::function): Renamed from listenerObj.
1195         (WebCore::JSProtectedEventListener::function): Ditto.
1196
1197         * bindings/js/JSEventListener.h: Removed unneeded forward class
1198         declarations. Made all virtual functions private since there's no
1199         need to call any of them on a particular derived class, only on
1200         EventListener. Explicitly declare JSEventListener::mark as virtual
1201         since it's now overriding a function in the EventListener base class.
1202         Made JSProtectedEventListener::m_globalObject protected so the
1203         JSLazyEventListener derived class can use it directly instead of using
1204         a virtual function to get the pointer.
1205
1206         * bindings/js/JSLazyEventListener.cpp:
1207         (WebCore::JSLazyEventListener::parseCode): Use m_globalObject instead
1208         of globalObject since the latter is a virtual function and there's no
1209         need to pay virtual function overhead.
1210         (WebCore::JSLazyEventListener::function): Renamed from listenerObj.
1211
1212         * bindings/js/JSLazyEventListener.h: Moved forward declaration of the
1213         Node class here from JSEventListener.h.
1214
1215         * bindings/scripts/CodeGeneratorJS.pm: Removed now-unneeded cast to
1216         JSEventListener when getting the script object from a listener.
1217
1218         * dom/EventListener.h: Added virtual function and mark functions
1219         so we can extract the JavaScript function object or mark a JavaScript
1220         event listener in a type safe manner.
1221
1222 2009-03-26  Peter Kasting  <pkasting@google.com>
1223
1224         Reviewed by Adele Peterson.
1225
1226         https://bugs.webkit.org/show_bug.cgi?id=24859
1227         Use CSS file instead of code to adjust search field styling.
1228
1229         * css/themeWin.css:
1230         * rendering/RenderThemeWin.cpp:
1231         * rendering/RenderThemeWin.h:
1232
1233 2009-03-26  Darin Adler  <darin@apple.com>
1234
1235         Reviewed by Geoff Garen.
1236
1237         Split JSLazyEventListener out into its own separate source file.
1238         We'll be removing JSAbstractEventListener and JSProtectedEventListener soon,
1239         so leave those in the same file with JSEventListener.
1240
1241         * GNUmakefile.am: Added JSLazyEventListener.
1242         * WebCore.pro: Ditto.
1243         * WebCore.scons: Ditto.
1244         * WebCore.vcproj/WebCore.vcproj: Ditto.
1245         * WebCore.xcodeproj/project.pbxproj: Ditto.
1246         * WebCoreSources.bkl: Ditto.
1247
1248         * bindings/js/JSEventListener.cpp: Removed the JSLazyEventListener part.
1249         Removed unneeded includes. Removed incorrect ASSERT_CLASS_FITS_IN_CELL, since
1250         JSAbstractEventListener is not derived from JSCell.
1251
1252         * bindings/js/JSEventListener.h: Removed the JSLazyEventListener part
1253         and the now-unneeded include of PlatformString.h.
1254
1255         * bindings/js/JSLazyEventListener.cpp: Copied from bindings/js/JSEventListener.cpp.
1256         Kept only the JSLazyEventListener part.
1257         (WebCore::eventParameterName): Made this have internal linkage by adding "static".
1258         Also moved the default case out of the switch statement so we will get a warning
1259         if we omit any cases in the future.
1260
1261         * bindings/js/JSLazyEventListener.h: Copied from bindings/js/JSEventListener.h.
1262         Kept only the JSLazyEventListener part.
1263
1264         * bindings/js/ScriptController.cpp: Removed unneeded includes and sorted the
1265         remanining ones. Include JSLazyEventListener.h instead of JSEventListener.h.
1266
1267 2009-03-26  Darin Adler  <darin@apple.com>
1268
1269         Reviewed by Geoff Garen.
1270
1271         Renamed JSUnprotectedEventListener to JSEventListener.
1272         And related renames.
1273
1274         Soon Geoff will make all JavaScript event listeners use mark instead
1275         of protect, so there's no need to emphasize "unprotected".
1276
1277         * bindings/js/JSDOMApplicationCacheCustom.cpp:
1278         (WebCore::JSDOMApplicationCache::mark):
1279         (WebCore::JSDOMApplicationCache::addEventListener):
1280         (WebCore::JSDOMApplicationCache::removeEventListener):
1281         * bindings/js/JSDOMGlobalObject.cpp:
1282         (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject):
1283         (WebCore::JSDOMGlobalObject::findJSEventListener):
1284         (WebCore::JSDOMGlobalObject::findOrCreateJSEventListener):
1285         (WebCore::JSDOMGlobalObject::jsEventListeners):
1286         (WebCore::JSDOMGlobalObject::jsInlineEventListeners):
1287         * bindings/js/JSDOMGlobalObject.h:
1288         * bindings/js/JSDOMWindowBase.h:
1289         * bindings/js/JSEventListener.cpp:
1290         (WebCore::JSEventListener::JSEventListener):
1291         (WebCore::JSEventListener::~JSEventListener):
1292         (WebCore::JSEventListener::listenerObj):
1293         (WebCore::JSEventListener::globalObject):
1294         (WebCore::JSEventListener::clearGlobalObject):
1295         (WebCore::JSEventListener::mark):
1296         * bindings/js/JSEventListener.h:
1297         (WebCore::JSEventListener::create):
1298         * bindings/js/JSMessagePortCustom.cpp:
1299         (WebCore::JSMessagePort::mark):
1300         (WebCore::JSMessagePort::addEventListener):
1301         (WebCore::JSMessagePort::removeEventListener):
1302         * bindings/js/JSWorkerContextCustom.cpp:
1303         (WebCore::JSWorkerContext::mark):
1304         (WebCore::JSWorkerContext::addEventListener):
1305         (WebCore::JSWorkerContext::removeEventListener):
1306         * bindings/js/JSWorkerCustom.cpp:
1307         (WebCore::JSWorker::mark):
1308         (WebCore::JSWorker::addEventListener):
1309         (WebCore::JSWorker::removeEventListener):
1310         * bindings/js/JSXMLHttpRequestCustom.cpp:
1311         (WebCore::JSXMLHttpRequest::mark):
1312         (WebCore::JSXMLHttpRequest::addEventListener):
1313         (WebCore::JSXMLHttpRequest::removeEventListener):
1314         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
1315         (WebCore::JSXMLHttpRequestUpload::mark):
1316         (WebCore::JSXMLHttpRequestUpload::addEventListener):
1317         (WebCore::JSXMLHttpRequestUpload::removeEventListener):
1318         * bindings/scripts/CodeGeneratorJS.pm:
1319         All just renaming.
1320
1321 2009-03-26  Darin Adler  <darin@apple.com>
1322
1323         Reviewed by Geoff Garen.
1324
1325         Renamed JSEventListener to JSProtectedEventListener.
1326         And related renames.
1327
1328         Soon Geoff will make all JavaScript event listeners use mark instead
1329         of protect, and so this class will be be obsolete. We will rename
1330         JSUnrpotectedEventListener to JSEventListener in the next check-in,
1331         since that one will remain.
1332
1333         * bindings/js/JSDOMGlobalObject.cpp:
1334         (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject):
1335         (WebCore::JSDOMGlobalObject::findJSProtectedEventListener):
1336         (WebCore::JSDOMGlobalObject::findOrCreateJSProtectedEventListener):
1337         (WebCore::JSDOMGlobalObject::jsProtectedEventListeners):
1338         (WebCore::JSDOMGlobalObject::jsProtectedInlineEventListeners):
1339         * bindings/js/JSDOMGlobalObject.h:
1340         * bindings/js/JSDOMWindowBase.h:
1341         * bindings/js/JSDOMWindowCustom.cpp:
1342         (WebCore::JSDOMWindow::addEventListener):
1343         (WebCore::JSDOMWindow::removeEventListener):
1344         * bindings/js/JSEventListener.cpp:
1345         (WebCore::JSProtectedEventListener::JSProtectedEventListener):
1346         (WebCore::JSProtectedEventListener::~JSProtectedEventListener):
1347         (WebCore::JSProtectedEventListener::listenerObj):
1348         (WebCore::JSProtectedEventListener::globalObject):
1349         (WebCore::JSProtectedEventListener::clearGlobalObject):
1350         (WebCore::JSLazyEventListener::JSLazyEventListener):
1351         (WebCore::JSLazyEventListener::parseCode):
1352         * bindings/js/JSEventListener.h:
1353         (WebCore::JSProtectedEventListener::create):
1354         * bindings/js/JSNodeCustom.cpp:
1355         (WebCore::JSNode::addEventListener):
1356         (WebCore::JSNode::removeEventListener):
1357         * bindings/js/JSSVGElementInstanceCustom.cpp:
1358         (WebCore::JSSVGElementInstance::addEventListener):
1359         (WebCore::JSSVGElementInstance::removeEventListener):
1360         * bindings/scripts/CodeGeneratorJS.pm:
1361         All just renaming.
1362
1363 2009-03-26  Dan Bernstein  <mitz@apple.com>
1364
1365         Reviewed by Anders Carlsson.
1366
1367         - fix <rdar://problem/6725042> BidiResolver::createBidiRunsForLine can
1368           create runs extending beyond the end
1369
1370         No test because Safari does not use this version of
1371         createBidiRunsForLine() with the end iterator not pointing to the end
1372         of the text run.
1373
1374         * platform/text/BidiResolver.h:
1375         (WebCore::BidiResolver::appendRun): Cap the end of the run at the end
1376         of the line and set the reachedEndOfLine flag. This mirrors the logic
1377         in the specialized version of appendRun() in bidi.cpp, which is why the
1378         problem did not show up in HTML. Also avoid creating empty runs.
1379
1380 2009-03-26  Simon Fraser  <simon.fraser@apple.com>
1381
1382         Reviewed by Dave Hyatt
1383         
1384         https://bugs.webkit.org/show_bug.cgi?id=24864
1385
1386         Change the terminology from "inner content layer" to "direct compositing"
1387         for cases where we can push an image directly over to the compositing system,
1388         without having to draw it.
1389         
1390         Clean up much of the code which looks at style to determine if this is possible,
1391         and fix some bugs when backgrounds change dynamically.
1392         
1393         * rendering/RenderLayerBacking.cpp:
1394         (WebCore::hasBorderOutlineOrShadow):
1395         (WebCore::hasBoxDecorations):
1396         (WebCore::hasBoxDecorationsWithBackgroundImage):
1397         (WebCore::RenderLayerBacking::canBeSimpleContainerCompositingLayer):
1398         (WebCore::RenderLayerBacking::canUseDirectCompositing):
1399         (WebCore::RenderLayerBacking::detectDrawingOptimizations):
1400         (WebCore::RenderLayerBacking::rendererContentChanged):
1401         (WebCore::RenderLayerBacking::updateImageContents):
1402         * rendering/RenderLayerBacking.h:
1403
1404 2009-03-26  Simon Fraser  <simon.fraser@apple.com>
1405
1406         Reviewed by Dave Hyatt
1407         
1408         https://bugs.webkit.org/show_bug.cgi?id=23914
1409
1410         Tests: compositing/overflow/ancestor-overflow.html
1411                compositing/overflow/parent-overflow.html
1412
1413         * rendering/RenderLayer.cpp:
1414         (WebCore::RenderLayer::calculateClipRects):
1415         * rendering/RenderLayer.h:
1416         (WebCore::ClipRects::infiniteRect):
1417         New static method that returns a large rect that is used by the clipping
1418         logic.
1419         
1420         * rendering/RenderLayerBacking.cpp:
1421         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1422         Use parentClipRects(), rather than calculateRects(), to compute the overflow
1423         rect that we'll use to create a masking layer for composited clipping.
1424         
1425         * rendering/RenderLayerCompositor.cpp:
1426         (WebCore::RenderLayerCompositor::clippedByAncestor):
1427         Use parentClipRects() to see whether there's a layer between us and our
1428         compositing ancestor which applies clipping.
1429         
1430         (WebCore::RenderLayerCompositor::clipsCompositingDescendants):
1431         A layer which imposes clipping to its children doesn't have to be a stacking
1432         context; it might be a normal flow layer; in either case, we can rely on the
1433         hasCompositingDescendant() bit.
1434
1435 2009-03-26  Steve Falkenburg  <sfalken@apple.com>
1436
1437         https://bugs.webkit.org/show_bug.cgi?id=24837
1438         Escape key should dismiss select menu
1439
1440         Reviewed by Adam Roben.
1441
1442         * platform/win/PopupMenuWin.cpp:
1443         (WebCore::PopupWndProc):
1444
1445 2009-03-26  Kevin Ollivier  <kevino@theolliviers.com>
1446
1447         Reviewed by Alexey Proskuryakov.
1448
1449         Make sure the script uses LF line endings even on Windows.
1450         
1451         https://bugs.webkit.org/show_bug.cgi?id=24805
1452
1453         * WebCore/make-generated-sources.sh: Change svn:eol-style to LF
1454
1455 2009-03-26  Eli Fidler  <eli.fidler@torchmobile.com>
1456
1457         Reviewed by George Staikos.
1458
1459         Remove warnings all over the place by making operator precedence
1460         explicit in cases like x && y || z.  No functional change.
1461
1462         * css/CSSFontSelector.cpp:
1463         (WebCore::CSSFontSelector::addFontFaceRule):
1464         * css/CSSParser.cpp:
1465         (WebCore::CSSParser::parseValue):
1466         (WebCore::CSSParser::parseShadow):
1467         * dom/Document.cpp:
1468         (WebCore::Document::shouldScheduleLayout):
1469         * dom/Node.cpp:
1470         (WebCore::Node::isBlockFlowOrBlockTable):
1471         * dom/Node.h:
1472         (WebCore::Node::document):
1473         * dom/Position.cpp:
1474         (WebCore::Position::next):
1475         (WebCore::Position::upstream):
1476         (WebCore::Position::downstream):
1477         (WebCore::Position::getInlineBoxAndOffset):
1478         * dom/PositionIterator.cpp:
1479         (WebCore::PositionIterator::atStart):
1480         * dom/Range.cpp:
1481         (WebCore::Range::intersectsNode):
1482         * editing/Editor.cpp:
1483         (WebCore::Editor::setBaseWritingDirection):
1484         * editing/InsertParagraphSeparatorCommand.cpp:
1485         (WebCore::InsertParagraphSeparatorCommand::doApply):
1486         * editing/ReplaceSelectionCommand.cpp:
1487         (WebCore::ReplaceSelectionCommand::doApply):
1488         * editing/TextIterator.cpp:
1489         (WebCore::TextIterator::advance):
1490         (WebCore::SimplifiedBackwardsTextIterator::advance):
1491         * editing/VisiblePosition.cpp:
1492         (WebCore::VisiblePosition::leftVisuallyDistinctCandidate):
1493         (WebCore::VisiblePosition::rightVisuallyDistinctCandidate):
1494         (WebCore::VisiblePosition::canonicalPosition):
1495         * editing/htmlediting.cpp:
1496         (WebCore::isMailBlockquote):
1497         (WebCore::lineBreakExistsAtPosition):
1498         * html/HTMLSelectElement.cpp:
1499         (WebCore::HTMLSelectElement::parseMappedAttribute):
1500         * loader/FTPDirectoryDocument.cpp:
1501         (WebCore::processFileDateString):
1502         * loader/ImageLoader.cpp:
1503         (WebCore::ImageLoader::updateFromElement):
1504         * loader/TextResourceDecoder.cpp:
1505         (WebCore::TextResourceDecoder::checkForHeadCharset):
1506         * page/AccessibilityObject.cpp:
1507         (WebCore::updateAXLineStartForVisiblePosition):
1508         * page/EventHandler.cpp:
1509         (WebCore::EventHandler::sendContextMenuEvent):
1510         * page/animation/AnimationBase.cpp:
1511         (WebCore::PropertyWrapperGetter::equals):
1512         (WebCore::PropertyWrapperShadow::equals):
1513         * platform/ContextMenu.cpp:
1514         (WebCore::ContextMenu::populate):
1515         * platform/ScrollView.cpp:
1516         (WebCore::ScrollView::adjustScrollbarsAvoidingResizerCount):
1517         * platform/text/Base64.cpp:
1518         (WebCore::base64Encode):
1519         * platform/text/BidiResolver.h:
1520         (WebCore::::raiseExplicitEmbeddingLevel):
1521         (WebCore::::createBidiRunsForLine):
1522         * rendering/InlineTextBox.cpp:
1523         (WebCore::InlineTextBox::placeEllipsisBox):
1524         * rendering/RenderBlock.cpp:
1525         (WebCore::RenderBlock::addChild):
1526         (WebCore::RenderBlock::repaintOverhangingFloats):
1527         (WebCore::RenderBlock::fillInlineSelectionGaps):
1528         (WebCore::RenderBlock::positionForPoint):
1529         (WebCore::RenderBlock::calcInlinePrefWidths):
1530         (WebCore::RenderBlock::hasLineIfEmpty):
1531         * rendering/RenderBox.cpp:
1532         (WebCore::RenderBox::imageChanged):
1533         (WebCore::RenderBox::localCaretRect):
1534         (WebCore::RenderBox::positionForPoint):
1535         (WebCore::RenderBox::shrinkToAvoidFloats):
1536         * rendering/RenderObject.h:
1537         (WebCore::objectIsRelayoutBoundary):
1538         * rendering/RenderTableCell.cpp:
1539         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
1540         * rendering/RenderText.cpp:
1541         (WebCore::RenderText::calcPrefWidths):
1542         * rendering/bidi.cpp:
1543         (WebCore::RenderBlock::determineStartPosition):
1544         (WebCore::textWidth):
1545         * rendering/style/RenderStyle.cpp:
1546         (WebCore::RenderStyle::diff):
1547         * rendering/style/StyleInheritedData.cpp:
1548         (WebCore::cursorDataEquivalent):
1549         * rendering/style/StyleRareInheritedData.cpp:
1550         (WebCore::StyleRareInheritedData::shadowDataEquivalent):
1551         * rendering/style/StyleRareNonInheritedData.cpp:
1552         (WebCore::StyleRareNonInheritedData::shadowDataEquivalent):
1553         (WebCore::StyleRareNonInheritedData::animationDataEquivalent):
1554         (WebCore::StyleRareNonInheritedData::transitionDataEquivalent):
1555
1556 2009-03-26  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
1557
1558         Reviewed by Holger Freyther.
1559
1560         https://bugs.webkit.org/show_bug.cgi?id=24804
1561         [GTK] 401 responses cause rogue content to be loaded
1562
1563         Our soup code handles 401 responses itself, so we should not feed
1564         the headers and data of those responses to the loader.
1565
1566         * platform/network/soup/ResourceHandleSoup.cpp:
1567         (WebCore::gotHeadersCallback):
1568         (WebCore::gotChunkCallback):
1569
1570 2009-03-25  Geoffrey Garen  <ggaren@apple.com>
1571
1572         Reviewed by Oliver Hunt and Darin Adler.
1573         
1574         Fixed <rdar://problem/6603167> Crash in WebKit!JSC::JSGlobalObject::resetPrototype
1575         during Stress test (#3 & #7 WER crashes for Safari 4 Beta)
1576         
1577         The problem was that allocation of the global object would, for just a
1578         moment, leave the global object's prototype unprotected from GC. This
1579         bug doesn't apply to non-global DOM objects because their prototypes are
1580         cached and marked by the global object.
1581
1582         No test case because the crashing condition is hard to deterministically
1583         produce in a normal build, and in a Windows Release build with
1584         COLLECT_ON_EVERY_ALLOCATION set to 1, existing tests crash/hang.
1585
1586         * bindings/js/JSDOMWindowShell.cpp:
1587         (WebCore::JSDOMWindowShell::setWindow):
1588         * bindings/js/WorkerScriptController.cpp:
1589         (WebCore::WorkerScriptController::initScript): Protect the global object's
1590         prototype from GC during construction, since the global object does not
1591         yet point to it, and therefore won't mark it.
1592
1593 2009-03-25  Dean Jackson  <dino@apple.com>
1594
1595         Reviewed by Simon Fraser
1596
1597         https://bugs.webkit.org/show_bug.cgi?id=23361
1598
1599         When using hardware compositing, some images can be directly
1600         rendered by the hardware - no need to draw them into a separate
1601         context, therefore saving memory.
1602         Only images with certain style properties can be directly
1603         composited - basically anything that is not a simple image requires
1604         the usual rendering path (eg. if the image has borders).
1605
1606         Test: compositing/direct-image-compositing.html
1607
1608         * manual-tests/resources/simple_image.png: Added.
1609         * manual-tests/simple-image-compositing.html: Added.
1610         * platform/graphics/Image.h:
1611         (WebCore::Image::startAnimation):
1612             - move this to public
1613         * rendering/RenderImage.cpp:
1614         (WebCore::RenderImage::imageChanged):
1615             - poke compositing layer if image has changed
1616         (WebCore::RenderImage::notifyFinished):
1617             - let the compositing layer know that it can render the image
1618         * rendering/RenderImage.h:
1619         * rendering/RenderLayer.cpp:
1620         (WebCore::RenderLayer::rendererContentChanged):
1621         * rendering/RenderLayer.h:
1622         * rendering/RenderLayerBacking.cpp:
1623         (WebCore::RenderLayerBacking::canUseInnerContentLayer):
1624         (WebCore::RenderLayerBacking::detectDrawingOptimizations):
1625         (WebCore::RenderLayerBacking::rendererContentChanged):
1626         * rendering/RenderLayerBacking.h:
1627             - code to hook up direct compositing of images where
1628               possible
1629
1630 2009-03-25  David Levin  <levin@chromium.org>
1631
1632         Reviewed by Dimitri Glazkov.
1633
1634         Chromium build fix. Fix #include in V8NodeFilterCondition.cpp due to the
1635         rename of V8NodeFilter to V8NodeFilterCondition.
1636
1637         * bindings/v8/V8NodeFilterCondition.cpp:
1638
1639 2009-03-25  Simon Fraser  <simon.fraser@apple.com>
1640
1641         Reviewed by Darin Adler
1642         
1643         https://bugs.webkit.org/show_bug.cgi?id=24817
1644         
1645         When the slider range is zero, avoid a divide by zero, which caused the
1646         thumb to be positioned off in the weeds, which broke painting.
1647
1648         Test: media/video-empty-source.html
1649
1650         * rendering/RenderSlider.cpp:
1651         (WebCore::SliderRange::proportionFromValue):
1652         (WebCore::SliderRange::valueFromProportion):
1653         (WebCore::sliderPosition):
1654         (WebCore::RenderSlider::setValueForPosition):
1655
1656 2009-03-24  Eric Seidel  <eric@webkit.org>
1657
1658         Reviewed by Darin Adler.
1659
1660         Remove dead code and style cleanup
1661         https://bugs.webkit.org/show_bug.cgi?id=24684
1662
1663         * html/CanvasStyle.cpp:
1664         (WebCore::CanvasStyle::CanvasStyle):
1665           Coverty was annoyed that we didn't initialize all of our members.  I agree, but I didn't
1666           want to paste all 8 members each time, so I just cleaned up the existing constructors and left them.
1667         * page/FocusController.cpp:
1668         (WebCore::FocusController::setFocusedNode):
1669           "node" was checked just above and is already known to be non-null
1670         * rendering/RenderLayer.cpp:
1671         (WebCore::RenderLayer::insertOnlyThisLayer):
1672           We were already using parentLayer w/o a NULL check above, so just add an explicit ASSERT and use it w/o NULL check
1673         (WebCore::RenderLayer::resize):
1674           element is already ASSERTed above, no need to null check it here
1675         * rendering/RenderTableSection.cpp:
1676         (WebCore::RenderTableSection::addCell):
1677           currentCell.cell was just assigned to the value "cell" which is known to be non-null, no need to null check again.
1678
1679 2009-03-24  Eric Seidel  <eric@webkit.org>
1680
1681         Reviewed by Darin Adler.
1682
1683         Move ASSERT(foo) to before where foo-> is used
1684         https://bugs.webkit.org/show_bug.cgi?id=24684
1685
1686         * platform/chromium/PasteboardChromium.cpp:
1687         (WebCore::Pasteboard::writeImage):
1688           Move ASSERTs to the top of the function, code was using "node" before ASSERT(node), once I moved
1689           ASSERT(node) to the top of the function it made sense to move the rest of them there too.
1690         * rendering/SVGRenderSupport.cpp:
1691         (WebCore::prepareToRenderSVGContent):
1692           move ASSERT(object) to *before* we use "object" :)
1693
1694 2009-03-24  Eric Seidel  <eric@webkit.org>
1695
1696         Reviewed by Simon Fraser.
1697
1698         Make TextTokenizer ASSERT that the buffer was freed
1699         https://bugs.webkit.org/show_bug.cgi?id=24684
1700
1701         * loader/TextDocument.cpp:
1702         (WebCore::TextTokenizer::TextTokenizer):
1703         (WebCore::TextTokenizer::~TextTokenizer):
1704         (WebCore::TextTokenizer::finish):
1705           Make it clear by adding a ~TextTokenizer that finish() will always be called and the memory never leaked.
1706
1707 2009-03-24  Eric Seidel  <eric@webkit.org>
1708
1709         Reviewed by Darin Adler.
1710
1711         Fix case where lBreak.obj->isBR() when lBreak.obj was NULL
1712         https://bugs.webkit.org/show_bug.cgi?id=24684
1713
1714         I don't have a test case where we were taking the wrong path here
1715         However, adding an ASSERT(lBreak.obj) before this usage caused
1716         multiple bidi tests to fail, so lBreak.obj can be null here.
1717
1718         * rendering/bidi.cpp:
1719         (WebCore::RenderBlock::findNextLineBreak):
1720           lBreak.obj can be null, so we can't call ->isBR() on it unconditionally.
1721
1722 2009-03-24  Eric Seidel  <eric@webkit.org>
1723
1724         Reviewed by Simon Fraser.
1725
1726         Style cleanup and dead code removal in dom, editing
1727         https://bugs.webkit.org/show_bug.cgi?id=24684
1728
1729         * dom/ContainerNode.cpp:
1730         (WebCore::ContainerNode::getUpperLeftCorner):
1731         (WebCore::ContainerNode::getLowerRightCorner):
1732         (WebCore::ContainerNode::getRect):
1733           Coverty was (rightly) confused as to what the hell "o" was being used for
1734           and whether or not it would ever be NULL.  I added some ASSERTS so that people (and machines)
1735           would be less confused about the logic in getUpperLeftCorner/getLowerRightCorner
1736         * dom/Document.cpp:
1737         (WebCore::Document::recalcStyle):
1738           Remove dead code, this block already checked that change == Force
1739         * editing/ApplyStyleCommand.cpp:
1740         (WebCore::ApplyStyleCommand::removeInlineStyle):
1741           Coverty correctly identified that traversePreviousNodePostOrder can return NULL, thus
1742           prev will be null, and we don't really explicitly handle it (like we probably should)
1743           It's OK though, because we end up creating a null position object, which may not have
1744           been what we intended, but we certainly don't crash.
1745         * editing/InsertParagraphSeparatorCommand.cpp:
1746         (WebCore::InsertParagraphSeparatorCommand::doApply):
1747           Remove dead code, insertionPosition.node() is already checked to be non-null above.
1748         * editing/markup.cpp:
1749         (WebCore::appendStartMarkup):
1750           removed dead code, annotate is already known to be true at this point in the file
1751           !annotate was checked above, and break; was called.
1752
1753 2009-03-24  Eric Seidel  <eric@webkit.org>
1754
1755         Reviewed by Simon Fraser.
1756
1757         CSS dead code removal and cleanup from Coverty errors
1758         https://bugs.webkit.org/show_bug.cgi?id=24684
1759
1760         * css/CSSStyleSelector.cpp:
1761         (WebCore::CSSStyleSelector::applyProperty):
1762           Every other place in the code we check settings() for NULL, so I made these places
1763           check too, even though we should never be resolving style against a document which has
1764           no frame (which I believe is the only time settings() can be null)
1765         * css/CSSStyleSheet.cpp:
1766         (WebCore::CSSStyleSheet::styleSheetChanged):
1767           Removing dead code, "root" can never be null here.
1768         * css/SVGCSSStyleSelector.cpp:
1769         (WebCore::colorFromSVGColorCSSValue):
1770         (WebCore::CSSStyleSelector::applySVGProperty):
1771           Extra returns in the old macros caused dead code.  Removing the old macros and use modern
1772           ones instead. :)
1773           Extra null checks to value were not needed.  Added an ASSERT at the top of the function
1774           to make it clear that value will never be NULL.
1775           Added colorFromSVGColorCSSValue to clean up the code a little.
1776
1777 2009-03-24  Eric Seidel  <eric@webkit.org>
1778
1779         Reviewed by Simon Fraser.
1780
1781         Font fallback cleanup and added ASSERT for GlyphPageTreeNode
1782         https://bugs.webkit.org/show_bug.cgi?id=24684
1783
1784         * css/CSSFontSelector.cpp:
1785         (WebCore::compareFontFaces):
1786           Coverty was concerned that it was possible to index off the end of weightFallbackRuleSets
1787           I can't read the code well enough to tell, so I tried to make the code clearer
1788           and added an ASSERT.        
1789         * platform/graphics/GlyphPageTreeNode.cpp:
1790         (WebCore::GlyphPageTreeNode::initializePage):
1791           Coverty believes we can crash here due to j being larger than GlyphPage::size.  I think to is already
1792           known to be < GlyphPage::size due to the min() statement above, but not being sure I added an ASSERT.
1793
1794 2009-03-24  Eric Seidel  <eric@webkit.org>
1795
1796         Reviewed by Simon Fraser.
1797
1798         Coverty inspired fixes in Animations/Transforms
1799         https://bugs.webkit.org/show_bug.cgi?id=24684
1800
1801         * page/animation/AnimationBase.h:
1802           Fix animate() signatures to match so that the virtual methods actually override one another. :)
1803         * page/animation/AnimationController.cpp:
1804         (WebCore::AnimationControllerPrivate::removeFromStartTimeResponseWaitList):
1805           Attempt to fix this method, prevAnimation was never set to anything but NULL,
1806           as far as I can tell the author originally intended to update it at the end
1807           of the loop, which is what I changed this code to do.
1808         * page/animation/ImplicitAnimation.cpp:
1809         (WebCore::ImplicitAnimation::animate):
1810           Make method signature match AnimationBase::animate
1811         * page/animation/ImplicitAnimation.h:
1812         * page/animation/KeyframeAnimation.cpp:
1813         (WebCore::KeyframeAnimation::animate):
1814           Make method signature match AnimationBase::animate
1815         * page/animation/KeyframeAnimation.h:
1816         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
1817         (WebCore::PerspectiveTransformOperation::blend):
1818           if (blendToIdentity) already returned above.
1819         * platform/graphics/transforms/RotateTransformOperation.cpp:
1820         (WebCore::RotateTransformOperation::blend):
1821           if (blendToIdentity) already returned above.
1822
1823 2009-03-25  Eli Fidler  <eli.fidler@torchmobile.com>
1824
1825         Reviewed by George Staikos.
1826
1827         Fix compiler warnings regarding assignments in if statements.
1828
1829         * html/HTMLFormElement.cpp:
1830         (WebCore::HTMLFormElement::createFormData):
1831         * plugins/PluginPackage.cpp:
1832         (WebCore::PluginPackage::compare):
1833
1834 2009-03-25  Dan Bernstein  <mitz@apple.com>
1835
1836         Reviewed by Dave Hyatt.
1837
1838         - fix <rdar://problem/6472150> repro crash in
1839           RenderBlock::rightmostPosition(bool, bool) const at mercotte.fr using
1840           menus
1841
1842         Test: fast/inline/continuation-positioned-reparenting.html
1843
1844         * rendering/RenderInline.cpp:
1845         (WebCore::RenderInline::splitFlow): When repurposing the existing
1846         container as the "pre" block, clear its positioned objects list, because
1847         positioned descendants may end up in a different block after the split.
1848
1849 2009-03-24  Simon Fraser  <simon.fraser@apple.com>
1850
1851         Reviewed by Dave Hyatt
1852         
1853         https://bugs.webkit.org/show_bug.cgi?id=24784
1854         
1855         Length values in transform operations need to take zoom into account.
1856
1857         Test: fast/transforms/transforms-with-zoom.html
1858
1859         * css/CSSStyleSelector.cpp:
1860         (WebCore::CSSStyleSelector::createTransformOperations):
1861
1862 2009-03-25  David Hyatt  <hyatt@apple.com>
1863
1864         Reviewed by Simon Fraser.
1865
1866         https://bugs.webkit.org/show_bug.cgi?id=24809, background-clip/origin don't use the correct
1867         values.  Add support for the new values (while preserving the old values for backwards
1868         compatibility).
1869
1870         Changed some existing test cases to use the new values.
1871
1872         * css/CSSParser.cpp:
1873         (WebCore::CSSParser::parseFillProperty):
1874         * css/CSSPrimitiveValueMappings.h:
1875         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1876         (WebCore::CSSPrimitiveValue::operator EFillBox):
1877         * css/CSSValueKeywords.in:
1878
1879 2009-03-25  Brett Wilson  <brettw@dhcp-172-22-71-191.mtv.corp.google.com>
1880
1881         Reviewed by Dimitri Glazkov.
1882
1883         Fix complex text opacity on the Chromium Windows port.
1884         https://bugs.webkit.org/show_bug.cgi?id=24757
1885
1886         Test: fast/text/complex-text-opacity.html
1887
1888         * platform/graphics/chromium/FontChromiumWin.cpp:
1889         (WebCore::):
1890         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::TransparencyAwareFontPainter):
1891         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::init):
1892         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI):
1893         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter):
1894         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::TransparencyAwareGlyphPainter):
1895         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::~TransparencyAwareGlyphPainter):
1896         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::estimateTextBounds):
1897         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
1898         (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::hdc):
1899         (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::TransparencyAwareUniscribePainter):
1900         (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::~TransparencyAwareUniscribePainter):
1901         (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::estimateTextBounds):
1902         (WebCore::Font::drawGlyphs):
1903         (WebCore::Font::drawComplexText):
1904
1905 2009-03-25  David Hyatt  <hyatt@apple.com>
1906
1907         Reviewed by Eric Seidel
1908
1909         Fix for bug 23198, border images should not clip to border radii.  The border-image should just ignore
1910         the border-radius, since the assumption is that any desired rounding will be built into the border-image
1911         itself.
1912
1913         Note that I do not agree with this change, but I am matching the spec.
1914
1915         Added fast/borders/border-image-border-radius.html
1916
1917         * rendering/RenderBoxModelObject.cpp:
1918         (WebCore::RenderBoxModelObject::paintNinePieceImage):
1919
1920 2009-03-25  Gustavo Noronha Silva  <gns@gnome.org>
1921
1922         Reviewed by Holger Freyther.
1923
1924         https://bugs.webkit.org/show_bug.cgi?id=24750
1925         [GTK] requests download instead of displaying page
1926
1927         Fix the Content-Type headers we get from soup, so that we set a
1928         proper media type on the ResourceResponse.
1929
1930         * platform/network/soup/ResourceHandleSoup.cpp:
1931         (WebCore::fillResponseFromMessage):
1932
1933 2009-03-25  Gustavo Noronha Silva  <gns@gnome.org>
1934
1935         Reviewed by Holger Freyther.
1936
1937         https://bugs.webkit.org/show_bug.cgi?id=24600
1938         [GTK] responses with status code >= 400 should not be given special treatment
1939
1940         Do not special case requests that have HTTP responses >=
1941         400. Redirects are handled automatically by libsoup, but the rest
1942         of the responses should be treated like any other.
1943
1944         * platform/network/soup/ResourceHandleSoup.cpp:
1945         (WebCore::):
1946         (WebCore::gotHeadersCallback):
1947         (WebCore::gotChunkCallback):
1948         (WebCore::finishedCallback):
1949
1950 2009-03-25  Darin Adler  <darin@apple.com>
1951
1952         Reviewed by John Sullivan.
1953
1954         Tidy up LegacyWebArchive a bit. And don't include favicons in web archives when
1955         they are being used only for selections, not an entire document.
1956
1957         * WebCore.base.exp: Remove exported function that's not used in WebKit.
1958
1959         * loader/archive/cf/LegacyWebArchive.cpp:
1960         (WebCore::LegacyWebArchive::createPropertyListRepresentation): Made a static member
1961         function so it can share private things with other member functions. Added some FIXME
1962         comments to a branch of code I think is dead. Changed boolean argument into a named
1963         one. Renamed to match other similar functions.
1964         (WebCore::LegacyWebArchive::createResourceResponseFromPropertyListData): Ditto.
1965         (WebCore::LegacyWebArchive::createResource): Ditto.
1966         (WebCore::LegacyWebArchive::create): Merged the create and init functions.
1967         (WebCore::LegacyWebArchive::rawDataRepresentation): Added some assertions because
1968         we should never fail to write (we can fail to read).
1969         (WebCore::LegacyWebArchive::createResourceResponseFromMacArchivedData): Made a static
1970         member function as above.
1971         (WebCore::LegacyWebArchive::createFromSelection): Ditto.
1972         (WebCore::LegacyWebArchive::create): Iterate the vector with indices rather than
1973         iterators. Only include the favicon if the first node is the document since we don't
1974         want to include the favicon when copying and pasting.
1975
1976         * loader/archive/cf/LegacyWebArchive.h: Made one of the create functions private.
1977         Made the Mac-specific functions be static member functions. Made other helpers be
1978         static member functions. Removed the nit function.
1979
1980         * loader/archive/cf/LegacyWebArchiveMac.mm:
1981         (WebCore::LegacyWebArchive::createResourceResponseFromMacArchivedData): Updated
1982         comment and made this a static member function.
1983         (WebCore::LegacyWebArchive::createPropertyListRepresentation): Ditto. Also made
1984         it so we only type cast in one place.
1985
1986 2009-03-25  Darin Adler  <darin@apple.com>
1987
1988         Reviewed by David Hyatt.
1989
1990         Bug 24740: crash in RenderSlider::setPositionFromValue when calling pause() after setting <video> to display: none
1991         https://bugs.webkit.org/show_bug.cgi?id=24740
1992         rdar://problem/6679873
1993
1994         Bug 12104: Native Slider: When the thumb's height is specified as a percentage, it is not centered properly
1995         https://bugs.webkit.org/show_bug.cgi?id=12104
1996
1997         Test: media/video-display-none-crash.html
1998
1999         The problem here was that RenderSlider was trying to position its thumb in a way that
2000         requires it to call updateLayout inside rendering code. The right way to position a
2001         child renderer is to do layout, so I had to write a layout function. And then fix a few
2002         other small problems shown by the same test case.
2003
2004         * rendering/RenderSlider.cpp: Made defaultTrackLength have internal linkage.
2005         Renamed HTMLSliderThumbElement to SliderThumbElement because we only use the HTML
2006         prefix for public DOM classes, not elements used as implementation details.
2007         Made SliderThumbElement function members private and got rid of unneeded default
2008         argument value for shadowParent.
2009         (WebCore::SliderRange::SliderRange): Added. Parses precision, max, and min attributes.
2010         (WebCore::SliderRange::clampValue): Added. Does standard clamping based on the above.
2011         (WebCore::SliderRange::valueFromElement): Added. Reads the value from the element in
2012         a way that clamps to the range.
2013         (WebCore::sliderPosition): Added. Computes the slider position: a double.
2014         (WebCore::SliderThumbElement::SliderThumbElement): Removed unneeded explicit
2015         initialization of m_initialClickPoint.
2016         (WebCore::SliderThumbElement::defaultEventHandler): Call setValueForPosition instead
2017         of calling setCurrentPosition and valueChanged.
2018         (WebCore::RenderSlider::RenderSlider): Remove unneeded explicit initialization of m_thumb.
2019         (WebCore::RenderSlider::styleDidChange): Remove unneeded second argument to createThumbStyle.
2020         (WebCore::RenderSlider::createThumbStyle): Remove unneeded second argument. Get rid of code
2021         setting the position to relative and setting the left and top. We now handle positioning
2022         in a custom layout function.
2023         (WebCore::RenderSlider::layout): Rewrote to handle positioning of the thumb as layout.
2024         (WebCore::RenderSlider::updateFromElement): Added code to immediately update the value
2025         in the element if it's out of range. This clamping used to be done as a side effect of
2026         setPositionFromValue. Also, this has nothing to do with the renderer, so at some point
2027         it could be moved into HTMLInputElement. Removed call to setPositionFromValue
2028         and instead just rely on the call to setNeedsLayout. Fix the setNeedsLayout call to be
2029         a normal setNeedsLayout(true), not a setNeedsLayout(true, false), because we do want
2030         this to be propagated to the parent -- it's not called during layout.
2031         (WebCore::RenderSlider::setValueForPosition): Refactor to use the new SliderRange
2032         class. Also don't call setCurrentPosition; instead just call setNeedsLayout.
2033         (WebCore::RenderSlider::currentPosition): Use the actual position of the renderer rather
2034         than the style to find the position; that means this needs to be done after layout is done.
2035         Also removed unneeded runtime checks and replaced them with assertions, after checking
2036         all callers to see they already guarantee this.
2037         (WebCore::RenderSlider::trackSize): Removed unneeded runtime checks and replaced them
2038         with assertions, after checking all callers to see they already guarantee this.
2039         (WebCore::RenderSlider::inDragMode): Added a null check for m_thumb so this won't
2040         crash if called early on a brand new RenderSlider.
2041
2042         * rendering/RenderSlider.h: Made all functions private except for forwardEvent and inDragMode.
2043         Renamed HTMLSliderThumbElement to SliderThumbElement because we only use the HTML
2044         prefix for public DOM classes, not elements used as implementation details. Made the
2045         mouseEventIsInThumb function non-virtual. Removed the return value and argument from
2046         setPositionFromValue. Removed valueChanged and setCurrentPosition. Removed the oldStyle
2047         argument to createThumbStyle (see above). Made SliderThumbElement a friend so it can use some
2048         private member functions.
2049
2050 2009-03-25  Eli Fidler  <eli.fidler@torchmobile.com>
2051
2052         Reviewed by George Staikos.
2053
2054         Fix ambiguous else cases by adding braces to nested if()s with elses.
2055
2056         * loader/MainResourceLoader.cpp:
2057         (WebCore::MainResourceLoader::continueAfterContentPolicy):
2058         * page/EventHandler.cpp:
2059         (WebCore::EventHandler::updateDragAndDrop):
2060         * rendering/RenderListMarker.cpp:
2061         (WebCore::toArmenianUnder10000):
2062         * rendering/TextControlInnerElements.cpp:
2063         (WebCore::TextControlInnerTextElement::defaultEventHandler):
2064
2065 2009-03-24  Eli Fidler  <eli.fidler@torchmobile.com>
2066
2067         Reviewed by George Staikos.
2068
2069         Move variable into proper platform block to quiet warning.
2070
2071         * html/CanvasRenderingContext2D.cpp:
2072         (WebCore::CanvasRenderingContext2D::drawTextInternal):
2073
2074 2009-03-24  Eric Carlson  <eric.carlson@apple.com>
2075
2076         Reviewed by Antti Koivisto.
2077
2078         Fix for <rdar://problem/6719375> Deal with QTKit loadstate changes when playing streaming movies
2079
2080         *  WebCore/html/HTMLMediaElement.cpp:
2081         (WebCore::HTMLMediaElement::setNetworkState): Deal with media engine reviving after having
2082         network state of NETWORK_NO_SOURCE.
2083
2084         *  WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2085         (WebCore::MediaPlayerPrivate::updateStates): Reset m_readyState at each state change since
2086         some types of movies currently cause QTKit's load state to bounce around. QTMovieLoadStatePlaythroughOK
2087         corresponds to HaveFutureData, not HaveEnoughData.
2088
2089 2009-03-24  Adele Peterson  <adele@apple.com>
2090
2091         Reviewed by Darin Adler.
2092
2093         Fix for https://bugs.webkit.org/show_bug.cgi?id=24707
2094         <rdar://problem/6593021> Deleting with a caret in a blank, quoted line decreases the quoting, but does not delete the line
2095
2096         * editing/TypingCommand.cpp: (WebCore::TypingCommand::deleteKeyPressed):
2097         After breaking out of an empty mail blockquote, we still want continue with the deletion
2098         so actual content will get deleted, and not just the quote style.
2099
2100 2009-03-24  Darin Adler  <darin@apple.com>
2101
2102         Reviewed by Brady Eidson.
2103
2104         <rdar://problem/6624662> REGRESSION (r39904): can't save certain web pages as web archive (ones without favicons!)
2105
2106         * loader/archive/cf/LegacyWebArchive.cpp:
2107         (WebCore::LegacyWebArchive::create): Added a null check.
2108
2109 2009-03-24  Adam Langley  <agl@google.com>
2110
2111         Reviewed by Darin Fisher.
2112
2113         https://bugs.webkit.org/show_bug.cgi?id=24685
2114
2115         The Skia drawLine function takes subpixel values and attempts to draw
2116         a line with subpixel precision. This is complex and slow for drawing
2117         scrollbars which use only vertical and horizontal lines.
2118
2119         This changes the Chromium Linux scrollbar code to use drawIRect.
2120
2121         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
2122         (WebCore::ScrollbarThemeChromium::invalidateOnMouseEnterExit):
2123         (WebCore::drawVertLine):
2124         (WebCore::drawHorizLine):
2125         (WebCore::drawBox):
2126         (WebCore::ScrollbarThemeChromium::paintTrackPiece):
2127         (WebCore::ScrollbarThemeChromium::paintThumb):
2128
2129 2009-03-24  David Kilzer  <ddkilzer@apple.com>
2130
2131         Bug 23310: Setting an absolute path (/abs) on an <iframe> with no src doesn't resolve the URL properly
2132
2133         <https://bugs.webkit.org/show_bug.cgi?id=23310>
2134
2135         Reviewed by Darin Adler.
2136
2137         Test: fast/frames/iframe-no-src-set-location.html
2138
2139         * dom/Document.cpp:
2140         (WebCore::Document::completeURL): If m_baseURL is empty or is
2141         about:blank and we have a parent document, use the parent
2142         document's URL for the base when completing a new URL.
2143
2144 2009-03-24  Simon Fraser  <simon.fraser@apple.com>
2145
2146         Reviewed by Dave Hyatt
2147         
2148         https://bugs.webkit.org/show_bug.cgi?id=24659
2149         
2150         When hit-testing 3d-transformed layers, it doesn't make sense to project the hitTestRect
2151         into the coordinate space of the layer, and doing so can result in pathalogical quads
2152         that break hit testing. In that case, simply use the same bounds as used for painting,
2153         which are the composited bounds for this layer.
2154
2155         Test: transforms/3d/hit-testing/rotated-hit-test.html
2156
2157         * rendering/RenderLayer.cpp:
2158         (WebCore::RenderLayer::hitTestLayer):
2159
2160 2009-03-24  Simon Fraser  <simon.fraser@apple.com>
2161
2162         Reviewed by Dave Hyatt
2163
2164         https://bugs.webkit.org/show_bug.cgi?id=24436
2165         
2166         When compositing is enabled, painting and hit testing end up using different
2167         clipping roots, because, for painting, every composited layer is a clipping root,
2168         but for hit testing only layers with transforms are. To fix this, we use
2169         temporary clip rects for hit testing, if the page is in compositing mode.
2170
2171         * rendering/RenderLayer.cpp:
2172         (WebCore::RenderLayer::paintLayer):
2173         (WebCore::RenderLayer::hitTestLayer):
2174         (WebCore::RenderLayer::parentClipRects):
2175         (WebCore::RenderLayer::calculateRects):
2176         * rendering/RenderLayer.h:
2177
2178 2009-03-24  Simon Fraser  <simon.fraser@apple.com>
2179
2180         Reviewed by Dan Bernstein
2181         
2182         https://bugs.webkit.org/show_bug.cgi?id=24782
2183
2184         Fix regression with CSS clip rects with non-length values, by reverting to
2185         the original code, but passing the zoom multiplier through convertToLength().
2186         
2187         Also make stylistic change in createTransformOperations(), renaming 'inStyle'
2188         to 'style.
2189         
2190         Tested by existing tests.
2191
2192         * css/CSSStyleSelector.cpp:
2193         (WebCore::convertToLength):
2194         (WebCore::CSSStyleSelector::applyProperty):
2195         (WebCore::CSSStyleSelector::createTransformOperations):
2196
2197 2009-03-24  David Hyatt  <hyatt@apple.com>
2198
2199         Reviewed by Simon Fraser
2200
2201         https://bugs.webkit.org/show_bug.cgi?id=21789, overflow:hidden elements should clip their foreground contents
2202         to a border-radius.
2203
2204         This patch makes non-self-painting overflow layers and control clips work with border-radius.  RenderLayers
2205         that should be clipped by overflow ancestors with border-radius are still broken.
2206
2207         Added fast/clip/overflow-border-radius-clip.html
2208
2209         * rendering/RenderBox.cpp:
2210         (WebCore::RenderBox::pushContentsClip):
2211
2212 2009-03-24  David Hyatt  <hyatt@apple.com>
2213
2214         Reviewed by Simon Fraser
2215
2216         https://bugs.webkit.org/show_bug.cgi?id=21789, overflow:hidden elements should clip their foreground contents.
2217         
2218         This first patch makes overflow:hidden properly clip the foreground contents of overflow:hidden replaced elements.  Common
2219         replaced elements now default to overflow:hidden in the UA stylesheet (this is what the spec specifically recommends be
2220         done).
2221     
2222         Added fast/replaced/border-radius-clip.html
2223
2224         * css/html4.css:
2225         * rendering/RenderReplaced.cpp:
2226         (WebCore::RenderReplaced::paint):
2227         * rendering/RenderWidget.cpp:
2228         (WebCore::RenderWidget::paint):
2229
2230 2009-03-24  Adele Peterson  <adele@apple.com>
2231
2232         RS by Mark Rowe.
2233
2234         Only build these Mail quirks checks in on the Mac.
2235
2236         * dom/Document.cpp: (WebCore::disableRangeMutation):
2237         * html/HTMLElement.cpp: (WebCore::HTMLElement::inEitherTagList):
2238
2239 2009-03-24  Brent Fulgham  <bfulgham@webkit.org>
2240
2241         Build fix, no review.
2242
2243         Remove ResourceLoaderCFNet.cpp from build list for Cairo Releas
2244         and Debug targets.
2245
2246         * WebCore.vcproj/WebCore.vcproj:
2247
2248 2009-03-24  Eric Carlson  <eric.carlson@apple.com>
2249
2250         Fix layout tests broken by r41907.
2251
2252         * html/HTMLMediaElement.cpp:
2253         (WebCore::HTMLMediaElement::setReadyState): Don't set "was playing" based on the new ready state
2254
2255 2009-03-24  Dmitry Titov  <dimich@chromium.org>
2256
2257         Reviewed by Dimitri Glazkov.
2258
2259         https://bugs.webkit.org/show_bug.cgi?id=24689
2260         Fix Chromium compilation errors.
2261
2262         * bindings/v8/WorkerContextExecutionProxy.cpp:
2263         (WebCore::WorkerContextExecutionProxy::FindOrCreateEventListener):
2264         (WebCore::WorkerContextExecutionProxy::RemoveEventListener):
2265
2266 2009-03-24  Yury Semikhatsky  <yurys@chromium.org>
2267
2268         Reviewed by Darin Adler.
2269
2270         https://bugs.webkit.org/show_bug.cgi?id=24759
2271         Add missing methods Element.prototype.removeMatchingStyleClasses and
2272         Node.prototype.enclosingNodeOrSelfWithNodeNameInArray to SourceFrame content
2273         iframe. These methods are called by Element.prototype.removeStyleClass and
2274         Node.prototype.enclosingNodeOrSelfWithNodeName.
2275
2276         * inspector/front-end/SourceFrame.js:
2277         (WebInspector.SourceFrame.prototype._loaded):
2278
2279 2009-03-24  Mark Mentovai  <mark@chromium.org>
2280
2281         Reviewed by Mark Rowe.
2282
2283         https://bugs.webkit.org/show_bug.cgi?id=24653
2284         WebKit should be buildable without prefix header injection.
2285         Adds missing #includes and forward declarations as needed.
2286
2287         * editing/SmartReplaceCF.cpp:
2288         * platform/graphics/mac/ColorMac.mm:
2289         * platform/graphics/mac/FontCacheMac.mm:
2290         * platform/graphics/mac/FontCustomPlatformData.h:
2291         * platform/graphics/mac/FontMac.mm:
2292         * platform/graphics/mac/FontMacATSUI.mm:
2293         * platform/graphics/mac/FontPlatformData.h:
2294         * platform/graphics/mac/FontPlatformDataMac.mm:
2295         * platform/graphics/mac/GraphicsContextMac.mm:
2296         * platform/graphics/mac/SimpleFontDataMac.mm:
2297         * platform/mac/FoundationExtras.h:
2298         * platform/mac/LocalCurrentGraphicsContext.h:
2299         * platform/mac/WebCoreSystemInterface.h:
2300         * platform/mac/WebCoreSystemInterface.mm:
2301         * platform/mac/WebCoreTextRenderer.h:
2302         * platform/mac/WebCoreTextRenderer.mm:
2303         * platform/mac/WebFontCache.h:
2304         * platform/mac/WebFontCache.mm:
2305         * platform/text/PlatformString.h:
2306         * platform/text/mac/ShapeArabic.c:
2307         * platform/text/mac/StringMac.mm:
2308         * rendering/RenderThemeChromiumMac.h:
2309
2310 2009-03-24  Dan Bernstein  <mitz@apple.com>
2311
2312         Reviewed by Darin Adler.
2313
2314         - fix <rdar://problem/6107874> by capping the nesting depth of
2315           "block-level" elements generated by the parser
2316
2317         Test: fast/parser/block-nesting-cap.html
2318
2319         * html/HTMLParser.cpp:
2320         (WebCore::HTMLParser::HTMLParser):
2321         (WebCore::HTMLParser::insertNode):
2322         (WebCore::HTMLParser::pushBlock):
2323         (WebCore::HTMLParser::popOneBlockCommon):
2324         (WebCore::HTMLParser::freeBlock):
2325         * html/HTMLParser.h:
2326
2327 2009-03-23  Greg Bolsinga  <bolsinga@apple.com>
2328
2329         Reviewed by David Kilzer.
2330
2331         https://bugs.webkit.org/show_bug.cgi?id=24771
2332         
2333         DOMTimeStamps are based upon 1970.
2334
2335         * platform/mac/GeolocationServiceMac.mm:
2336         (-[WebCoreCoreLocationObserver locationManager:didUpdateToLocation:fromLocation:]):
2337
2338 2009-03-23  Eric Seidel  <eric@webkit.org>
2339
2340         Build fix, no review.
2341
2342         * rendering/RenderObject.cpp:
2343         (WebCore::RenderObject::createVisiblePosition): change .container to .isNotNull()
2344
2345 2009-03-23  Eric Seidel  <eric@webkit.org>
2346
2347         Reviewed by Darin Adler.
2348
2349         Rename Position::container to m_anchorNode and make it private
2350         https://bugs.webkit.org/show_bug.cgi?id=24760
2351
2352         More code cleanup for Position.
2353
2354         Change all uses of m_container to node()
2355         Eventually most uses of node() should change to anchorNode() to designate
2356         that it's the node the Position is anchored to, but not necessarily the
2357         container of the position (it could be the before/after neighbor).
2358
2359         Remove any code which sets m_container, and change it to use a new
2360         Position::moveToPosition function which takes a node and offset.
2361         It never makes sense to change the node and leave the offset.
2362
2363         * dom/Position.h:
2364         (WebCore::Position::Position):
2365         (WebCore::Position::clear):
2366         (WebCore::Position::anchorNode):
2367         (WebCore::Position::node):
2368         (WebCore::Position::moveToPosition):
2369         (WebCore::Position::moveToOffset):
2370         (WebCore::Position::isNull):
2371         (WebCore::Position::isNotNull):
2372         (WebCore::operator==):
2373         * dom/Range.cpp:
2374         (WebCore::Range::create):
2375         (WebCore::Range::compareBoundaryPoints):
2376         * dom/RangeBoundaryPoint.h:
2377         (WebCore::RangeBoundaryPoint::container):
2378         (WebCore::RangeBoundaryPoint::set):
2379         (WebCore::RangeBoundaryPoint::setOffset):
2380         (WebCore::RangeBoundaryPoint::setToChild):
2381         (WebCore::RangeBoundaryPoint::setToStart):
2382         (WebCore::RangeBoundaryPoint::setToEnd):
2383
2384 2009-03-17  Eric Seidel  <eric@webkit.org>
2385
2386         Reviewed by David Hyatt.
2387
2388         document.write() should be able to make a document strict mode
2389         https://bugs.webkit.org/show_bug.cgi?id=24336
2390
2391         Remove an implicit write of "<html>" on the first document.write call
2392         this was added as part of a KDE import http://trac.webkit.org/changeset/798
2393         with no layout test or explanation.  I can't think of any reason why
2394         an implicit <html> write is necessary (or correct), so I'm removing it and
2395         adding a test for the correct behavior.  The parser will add any necessary
2396         HTMLHTMLElements during the write() anyway.
2397
2398         Our behavior is now tested by fast/dom/Document/document-write-doctype
2399         and matches IE, FF fails this new test.  Mozilla bug filed:
2400         https://bugzilla.mozilla.org/show_bug.cgi?id=483908
2401
2402         * dom/Document.cpp:
2403         (WebCore::Document::write):
2404
2405 2009-03-23  Sam Weinig  <sam@webkit.org>
2406
2407         Reviewed by Dan Bernstein.
2408
2409         Fix for <rdar://problem/6140966>
2410         Empty Caches does not clear the Cross-site XMLHttpRequest preflight cache
2411
2412         * WebCore.base.exp:
2413         * WebCore.xcodeproj/project.pbxproj:
2414         * loader/CrossOriginPreflightResultCache.cpp:
2415         (WebCore::CrossOriginPreflightResultCache::empty):
2416         * loader/CrossOriginPreflightResultCache.h:
2417
2418 2009-03-23  Darin Adler  <darin@apple.com>
2419
2420         Reviewed by Adele Peterson.
2421
2422         Bug 24726: hit testing doesn't work right when the click is on anonymous content
2423         https://bugs.webkit.org/show_bug.cgi?id=24726
2424         rdar://problem/6696992
2425
2426         Test: editing/selection/hit-test-anonymous.html
2427
2428         * rendering/RenderBR.cpp:
2429         (WebCore::RenderBR::positionForPoint): Call createVisiblePosition instead of
2430         creating a VisiblePosition directly. It will handle finding non-anonymous
2431         content nearby if node() is 0.
2432         * rendering/RenderBlock.cpp:
2433         (WebCore::positionForPointRespectingEditingBoundaries): Ditto.
2434         (WebCore::positionForPointWithInlineChildren): Ditto.
2435         (WebCore::RenderBlock::positionForPoint): Ditto.
2436         * rendering/RenderBox.cpp:
2437         (WebCore::RenderBox::positionForPoint): Ditto.
2438         * rendering/RenderObject.cpp:
2439         (WebCore::RenderObject::positionForPoint): Ditto.
2440         (WebCore::RenderObject::createVisiblePosition): Added.
2441         * rendering/RenderObject.h: Added createVisiblePosition.
2442         * rendering/RenderReplaced.cpp:
2443         (WebCore::RenderReplaced::positionForPoint): Call createVisiblePosition.
2444         * rendering/RenderSVGInlineText.cpp:
2445         (WebCore::RenderSVGInlineText::positionForPoint): Ditto.
2446         * rendering/RenderText.cpp:
2447         (WebCore::RenderText::positionForPoint): Ditto.
2448
2449 2009-03-23  Adele Peterson  <adele@apple.com>
2450
2451         Reviewed by Darin Adler & Dave Hyatt.
2452
2453         Fix for <rdar://problem/6621310> REGRESSION(35185): Apple Travel HTML emails missing some style after Safari 4 upgrade
2454
2455         Leopard Mail doesn't expect <style> to be in the body.  This change reverts back to the old behavior of
2456         moving <style> to <head> for that version of Mail.
2457
2458         * html/HTMLElement.cpp: (WebCore::HTMLElement::inEitherTagList):
2459
2460 2009-03-23  Adele Peterson  <adele@apple.com>
2461
2462         Reviewed by Mark Rowe & Dave Hyatt.
2463
2464         Merge some of the individual Mail quirks into two settings that we can check for future quirks.
2465
2466         * WebCore.base.exp:
2467         * dom/Document.cpp:
2468         (WebCore::disableRangeMutation):
2469         (WebCore::Document::nodeChildrenChanged):
2470         (WebCore::Document::nodeWillBeRemoved):
2471         (WebCore::Document::textInserted):
2472         (WebCore::Document::textRemoved):
2473         (WebCore::Document::textNodesMerged):
2474         (WebCore::Document::textNodeSplit):
2475         * page/Settings.cpp:
2476         (WebCore::Settings::Settings):
2477         (WebCore::Settings::setNeedsLeopardMailQuirks):
2478         (WebCore::Settings::setNeedsTigerMailQuirks):
2479         * page/Settings.h:
2480         (WebCore::Settings::needsLeopardMailQuirks):
2481         (WebCore::Settings::needsTigerMailQuirks):
2482
2483 2009-03-23  Ada Chan  <adachan@apple.com>
2484
2485         https://bugs.webkit.org/show_bug.cgi?id=24762
2486         Support text-indent in <option> elements on windows platform.
2487
2488         Reviewed by Adele Peterson.
2489
2490         * css/themeWin.css:
2491         * platform/PopupMenuStyle.h: We don't honor font specified on <option> elements right now.  Make this
2492         explicit via windows themed default stylesheet.
2493         (WebCore::PopupMenuStyle::PopupMenuStyle): Also store text-indent and text-direction.
2494         (WebCore::PopupMenuStyle::textIndent):
2495         (WebCore::PopupMenuStyle::textDirection):
2496         * platform/win/PopupMenuWin.cpp:
2497         (WebCore::PopupMenu::paint): Adjust the text's x-coordinate if text-indent is supported for options and 
2498         text-indent is specified with LTR direction.
2499         * rendering/RenderMenuList.cpp:
2500         (WebCore::RenderMenuList::updateOptionsWidth): Take text-indent into account if theme supports text-indent for options.
2501         (WebCore::RenderMenuList::itemStyle): Use new PopupMenuStyle constructor on windows.
2502         (WebCore::RenderMenuList::menuStyle): Ditto.
2503         * rendering/RenderTextControlSingleLine.cpp:
2504         (WebCore::RenderTextControlSingleLine::menuStyle): Ditto.
2505         * rendering/RenderTheme.h:
2506         (WebCore::RenderTheme::popupOptionSupportsTextIndent): Added.  Default is false since we are only supporting it in windows for now.
2507         * rendering/RenderThemeWin.h:
2508         (WebCore::RenderThemeWin::popupOptionSupportsTextIndent): Returns true for windows.
2509
2510 2009-03-23  Sam Weinig  <sam@webkit.org>
2511
2512         Reviewed by Anders Carlsson.
2513
2514         Fix for https://bugs.webkit.org/show_bug.cgi?id=24699
2515         REGRESSION: Java Applets broken
2516         <rdar://problem/6707494>
2517
2518         Fix loading Java applets without a codeBase. Only pass the base (up to the
2519         the last path component) of the baseURL to the plug-in.
2520
2521         * html/HTMLAppletElement.cpp:
2522         (WebCore::HTMLAppletElement::createRenderer):
2523         * platform/KURL.cpp:
2524         (WebCore::KURL::baseAsString):
2525         * platform/KURL.h:
2526
2527 2009-03-23  Darin Adler  <darin@apple.com>
2528
2529         Reviewed by Sam Weinig.
2530
2531         * platform/KURL.h: Removed now-incorrect comments.
2532         None of the parts include the separator characters any more, now that
2533         query doesn't include the "?", so the comments explaining which do and do
2534         not are no-longer helpful.
2535
2536 2009-03-23  David Levin  <levin@chromium.org>
2537
2538         Reviewed by Dimitri Glazkov.
2539
2540         https://bugs.webkit.org/show_bug.cgi?id=24764
2541
2542         Renamed files V8NodeFilter -> V8NodeFilterCondition to reflect
2543         class names.  Also fixed some headers that got mangled in search/replace
2544         operations.
2545
2546         No change in behavior, so no test.
2547
2548         * bindings/v8/V8NodeFilter.h: Removed.
2549         * bindings/v8/V8NodeFilterCondition.cpp: Renamed from WebCore/bindings/v8/V8NodeFilter.cpp.
2550         * bindings/v8/V8NodeFilterCondition.h: Added.
2551         * bindings/v8/custom/V8ClipboardCustom.cpp:
2552         * bindings/v8/custom/V8DocumentCustom.cpp:
2553         * bindings/v8/custom/V8ElementCustom.cpp:
2554         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
2555         * bindings/v8/custom/V8NavigatorCustom.cpp:
2556
2557 2009-03-23  Darin Fisher  <darin@chromium.org>
2558
2559         Reviewed by Antti Koivisto.
2560
2561         https://bugs.webkit.org/show_bug.cgi?id=24741
2562
2563         Adds a unique across-browser-sessions identifier to FormData, which may
2564         be used by ResourceHandle as a secondary cache key to enable cached
2565         form submissions.
2566
2567         At issue: two otherwise identical form submissions may result in
2568         completely independent responses, which may each be appropriate to
2569         store and reuse from cache.
2570
2571         * html/HTMLFormElement.cpp: Added call to FormData::setIdentifier so that
2572         we only enable cached form submissions for those generated by HTML.  This
2573         way we do not bother with POSTs generated by XMLHttpRequest.
2574         (WebCore::generateFormDataIdentifier):
2575         (WebCore::HTMLFormElement::createFormData):
2576         * platform/network/FormData.cpp: Initialize m_identifier to 0, which means
2577         the unspecified identifier.  So by default there is no identifier and
2578         nothing changes.
2579         (WebCore::FormData::FormData):
2580         * platform/network/FormData.h: Added m_identifier with setter and getter.
2581         (WebCore::FormData::setIdentifier):
2582         (WebCore::FormData::identifier):
2583
2584 2009-03-23  Simon Fraser  <simon.fraser@apple.com>
2585
2586         Reviewed by Antti Koivisto
2587         
2588         https://bugs.webkit.org/show_bug.cgi?id=24733
2589         
2590         Fix media controller with full-page zoom. Previously, the media controller
2591         shadow nodes never saw style changes on the RenderMedia, so did not respond
2592         to zooming at all. Now, we update the style on the shadow renderers
2593         whenever RenderMedia gets a style change. Also fix the video thumb in
2594         the theme to be scaled properly.
2595
2596         Test: media/video-controls-zoomed.html
2597
2598         * rendering/MediaControlElements.cpp:
2599         (WebCore::MediaControlShadowRootElement::updateStyle):
2600         (WebCore::MediaTextDisplayElement::MediaTextDisplayElement):
2601         (WebCore::MediaTextDisplayElement::updateStyle):
2602         (WebCore::MediaControlInputElement::MediaControlInputElement):
2603         (WebCore::MediaControlInputElement::updateStyle):
2604         * rendering/MediaControlElements.h:
2605         * rendering/RenderMedia.cpp:
2606         (WebCore::RenderMedia::styleDidChange):
2607         * rendering/RenderMedia.h:
2608         * rendering/RenderThemeMac.mm:
2609         (WebCore::RenderThemeMac::adjustSliderThumbSize):
2610
2611 2009-03-23  Mike Belshe  <mike@belshe.com>
2612
2613         Reviewed by Darin Adler.
2614
2615         https://bugs.webkit.org/show_bug.cgi?id=24739
2616
2617         Rework StringImpl::create methods to try to allocate a single buffer
2618         rather than allocating both the StringImpl class and a separate data
2619         buffer.
2620
2621         * platform/text/StringImpl.cpp:
2622         * platform/text/StringImpl.h:
2623
2624 2009-03-23  Darin Adler  <darin@apple.com>
2625
2626         Reviewed by Antti Koivisto.
2627
2628         Based on a patch by Nico Weber <nicolasweber@gmx.de>
2629
2630         Bug 24755: LayoutTests/http/tests/misc/url-in-utf16le.html regression
2631         https://bugs.webkit.org/show_bug.cgi?id=24755
2632
2633         * platform/text/TextEncoding.cpp:
2634         (WebCore::TextEncoding::isUTF7Encoding): Added. Checks if the current encoding
2635         is UTF7 without loading extended codecs.
2636         (WebCore::TextEncoding::encodingForFormSubmission): Use isUTF7Encoding() instead
2637         of comparing with UTF7Encoding(). Eliminate the explicit check of
2638         noExtendedTextEncodingNameUsed() because that's now handled by the functions
2639         that this function calls instead.
2640
2641         * platform/text/TextEncoding.h: Added isUTF7Encoding function.
2642         Also tweaked formatting a bit.
2643
2644 2009-03-20  Peter Kasting  <pkasting@google.com>
2645
2646         Reviewed by Darin Fisher.
2647
2648         https://bugs.webkit.org/show_bug.cgi?id=24720
2649         RenderThemeChromium should draw something for Slider parts instead of
2650         dropping them on the floor.
2651
2652         * platform/chromium/ChromiumBridge.h:
2653         * rendering/RenderThemeChromiumWin.cpp:
2654         (WebCore::RenderThemeChromiumWin::adjustSliderThumbSize):
2655         (WebCore::RenderThemeChromiumWin::paintSliderTrack):
2656         (WebCore::RenderThemeChromiumWin::determineSliderThumbState):
2657         (WebCore::RenderThemeChromiumWin::getThemeData):
2658         * rendering/RenderThemeChromiumWin.h:
2659         (WebCore::RenderThemeChromiumWin::paintSliderThumb):
2660
2661 2009-03-23  Glen Murphy  <glen@chromium.org>
2662
2663         Reviewed by Darin Fisher.
2664
2665         https://bugs.webkit.org/show_bug.cgi?id=24657
2666
2667         Fix Skia drawing of highly scaled bitmaps; the conversion to
2668         IntRect produced visible layout test failures in highly scaled 
2669         coordinate systems.
2670
2671         Test: svg/custom/image-small-width-height.svg
2672
2673         * WebCore\platform\graphics\skia\ImageSkia.cpp:
2674
2675 2009-03-23  David Kilzer  <ddkilzer@apple.com>
2676
2677         Provide JavaScript exception information after slow script timeout
2678
2679         Reviewed by Oliver Hunt.
2680
2681         * bindings/js/ScriptController.cpp:
2682         (WebCore::ScriptController::evaluate): Changed to report
2683         exceptions for the Interrupted completion type as well.
2684
2685 2009-03-23  Simon Fraser  <simon.fraser@apple.com>
2686
2687         Reviewed by Darin Adler
2688
2689         https://bugs.webkit.org/show_bug.cgi?id=24736
2690         
2691         Fix three mostly-unrelated problems with full-page zoom:
2692         
2693         * dom/Document.cpp:
2694         (WebCore::Document::elementFromPoint):
2695         Document::elementFromPoint() needs to take full-page zoom into account.
2696         
2697         * dom/MouseRelatedEvent.cpp:
2698         (WebCore::MouseRelatedEvent::receivedTarget):
2699         Take full-page zoom into account when computing offsetX/offsetY.
2700         
2701         * html/HTMLSelectElement.cpp:
2702         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
2703         Don't use offsetX/offsetY when hit testing list boxes; offsets were broken
2704         with full-page zoom, and using pageX/pageY is easier because we don't
2705         have to worry about the event target, and we already have a point in
2706         absolute coordinates.
2707
2708         Tests: fast/forms/listbox-hit-test-zoomed.html
2709                fast/forms/search-zoomed.html
2710                fast/forms/slider-zoomed.html
2711
2712 2009-03-23  Simon Fraser  <simon.fraser@apple.com>
2713
2714         Reviewed by Dan Bernstein
2715
2716         https://bugs.webkit.org/show_bug.cgi?id=24753
2717         
2718         The rect for CSS 'clip' needs to have zooming applied to it.
2719
2720         Test: fast/css/clip-zooming.html
2721
2722         * css/CSSStyleSelector.cpp:
2723         (WebCore::CSSStyleSelector::applyProperty):
2724
2725 2009-03-23  Eric Carlson  <eric.carlson@apple.com>
2726
2727         Reviewed by Adam Roben.
2728
2729         <rdar://problem/6704282>
2730         https://bugs.webkit.org/show_bug.cgi?id=24719
2731         QTMovieWinTimer logic inversion
2732
2733         Fix logic inversion in the Win32 timer used by QTMovieWin that caused it to always
2734         use SetTimer, even when the intervals was below USER_TIMER_MINIMUM. A side effect of
2735         this was that a movie timer would sometimes be blocked for significant amounts of time 
2736         because WM_TIMER messages are not processed when the thread's message queue has any
2737         higher priority messages, and WebCore/Win's timer uses PostMessage for low interval
2738         timers. Also change SetTimer call to use HWND and custom message instead of 
2739         timer function since the timer already has an HWND for processing PostMessage.
2740
2741         Not possible to make a test for this because it is so timing dependant.
2742
2743         * platform/graphics/win/QTMovieWinTimer.cpp:
2744         (TimerWindowWndProc):
2745         (setSharedTimerFireDelay):
2746
2747 2009-03-23  Eric Carlson  <eric.carlson@apple.com>
2748
2749         Reviewed by Adele Peterson.
2750
2751         https://bugs.webkit.org/show_bug.cgi?id=24588
2752         
2753         Update media element implementation to current HTML5 spec
2754
2755         New tests: 
2756                media/media-constants.html
2757                media/video-seek-no-src-exception.html
2758                media/video-source-add-src.html
2759                media/video-src-invalid-remove.html
2760                media/video-src-plus-source.html
2761                media/video-timeupdate-during-playback.html
2762
2763         * dom/EventNames.h: Remove obsolute events, add new ones.
2764         * html/HTMLMediaElement.cpp:
2765         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize new member vars.
2766         (WebCore::HTMLMediaElement::attributeChanged): Trigger load() only when we don't
2767         have a source.
2768         (WebCore::HTMLMediaElement::removedFromDocument): Deal with state name changes.
2769         (WebCore::HTMLMediaElement::scheduleProgressEvent): New, create a progress event and 
2770         add it to the event queue to be dispatch when the timer fires.
2771         (WebCore::HTMLMediaElement::scheduleEvent): New, create a generic event and add
2772         it to the event queue to be dispatch when the timer fires.
2773         (WebCore::HTMLMediaElement::enqueueEvent): Add an event to the queue and ticke the 
2774         asynch event timer.
2775         (WebCore::HTMLMediaElement::asyncEventTimerFired): Dispatch all pending events.
2776         (WebCore::HTMLMediaElement::loadTimerFired): Either trigger the initial load or
2777         try to load the next <source> url.
2778         (WebCore::HTMLMediaElement::load): Minor style change.
2779         (WebCore::HTMLMediaElement::loadInternal): The first part of the spec load algorithm, cleanup
2780         the current load (if any) and set up state for a new load.
2781         (WebCore::HTMLMediaElement::selectMediaResource): Deal with no 'src' or <source>, post 'loadstart'
2782         event, and initiate load from 'src' if present.
2783         (WebCore::HTMLMediaElement::loadNextSourceChild): Initiate load from next <source> url, or trigger
2784         noneSupported() if no more to consider.
2785         (WebCore::HTMLMediaElement::loadResource): Instantiate a new MediaPlayer and ask it to load a url.
2786         (WebCore::HTMLMediaElement::startProgressEventTimer): Start the repeating progress event timer.
2787         (WebCore::HTMLMediaElement::noneSupported): Post error event and set up state when no valid 
2788         media url was found.
2789         (WebCore::HTMLMediaElement::mediaEngineError): Post error event and set up state when no valid 
2790         media engine failed with a decode error or a network error.
2791         (WebCore::HTMLMediaElement::mediaPlayerNetworkStateChanged):
2792         (WebCore::HTMLMediaElement::setNetworkState): Updated for new spec network states.
2793         (WebCore::HTMLMediaElement::mediaPlayerReadyStateChanged):
2794         (WebCore::HTMLMediaElement::setReadyState): Updated for new spec ready state.
2795         (WebCore::HTMLMediaElement::progressEventTimerFired): Bail if the network is not active.
2796         (WebCore::HTMLMediaElement::seek): Return INVALID_STATE_ERR exception if state is too low or
2797         if player hasn't been set up yet. This is necessary becase load() is async. Clear the flag
2798         we use to guard against sending 'ended' more than once.
2799         (WebCore::HTMLMediaElement::duration): Don't bother calling media engine before it has metadata.
2800         (WebCore::HTMLMediaElement::setDefaultPlaybackRate): Remove exception param, 0 is no longer an
2801         invalid rate. 
2802         (WebCore::HTMLMediaElement::setPlaybackRate): Remove exception param, 0 is no longer an
2803         invalid rate. Cache rate being set so we can use it later if media engine isn't ready now.
2804         (WebCore::HTMLMediaElement::play): Remove exception param, play() before load() now just
2805         starts loading asynchronously.
2806         (WebCore::HTMLMediaElement::playInternal): Remove exception param. Fire 'waiting' or 'playing'
2807         event depending on current state.
2808         (WebCore::HTMLMediaElement::pause): Remove exception param, pause() before load() now just
2809         starts loading asynchronously.
2810         (WebCore::HTMLMediaElement::pauseInternal): Remove exception param.
2811         (WebCore::HTMLMediaElement::setVolume): dispatchEventAsync -> scheduleEvent
2812         (WebCore::HTMLMediaElement::setMuted): dispatchEventAsync -> scheduleEvent
2813         (WebCore::HTMLMediaElement::togglePlayState): Remove exception param.
2814         (WebCore::HTMLMediaElement::beginScrubbing): pause() doesn't take an exception param.
2815         (WebCore::HTMLMediaElement::startPlaybackProgressTimer): New, starts timer that fires 4 times per
2816         second when the movie is playing to timeupdate so we can post 'timeupdate' events.
2817         (WebCore::HTMLMediaElement::playbackProgressTimerFired): Timer proc.
2818         (WebCore::HTMLMediaElement::scheduleTimeupdateEvent): Bottleneck around scheduling a 'timeupdate'
2819         event because we both fire them them when the spec says we should and when the media engine
2820         says that time has jumped, but we don't want to fire more than one at a given movie time. We also
2821         use this bottleneck to keep track of the last time one was posted so we won't fire too often
2822         during playback.
2823         (WebCore::HTMLMediaElement::canPlay): readyState now tracks whether or not we have metadata.
2824         (WebCore::HTMLMediaElement::havePotentialSourceChild): New, checks to see if there are a <source>
2825         element with a 'src' attribute that we have not tried to load yet.
2826         (WebCore::HTMLMediaElement::nextSourceChild): New, returns the url and content type of the next
2827         <source> element that we haven't tried to load.
2828         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Schedule 'seeked' event when seeking completes.
2829         Set a flag when we post the 'ended' event, clear it when time changed and we aren't at the end since
2830         some media engines call this proc more than once when playback reaches the end and stops, but we
2831         don't want to post 'ended' more than once.
2832         (WebCore::HTMLMediaElement::mediaPlayerDurationChanged): New, added so media engine can inform
2833         when the movie duration changes and we can post 'durationchanged' event.
2834         (WebCore::HTMLMediaElement::mediaPlayerRateChanged): New, added so media engine can inform when
2835         the rate changed and we can updated our cached rate. This is useful because we only want to know
2836         post periodic 'timeupdate' events when the movie is actually playing, and because we want to know
2837         the actual playback rate when it differs from what we tried to set.
2838         (WebCore::HTMLMediaElement::mediaPlayerSizeChanged): New, added so media engine can inform when
2839         a movie's intrinsic size changes and we can inform the renderer.
2840         (WebCore::HTMLMediaElement::potentiallyPlaying): Renamed from activelyPlaying since the spec now
2841         uses "actively playing" for this concept. Update logic for new state names and un-comment calls
2842         to stoppedDueToErrors() and pausedForUserInteraction() since the spec says those condiditons
2843         are part of the answer.
2844         (WebCore::HTMLMediaElement::endedPlayback): Update logic for new state names. 
2845         (WebCore::HTMLMediaElement::stoppedDueToErrors): New, spec says this logic should be part of
2846         the determination of "potentially playing".
2847         (WebCore::HTMLMediaElement::pausedForUserInteraction): New, placeholder for when (if) user
2848         agent supports this spec concept.
2849         (WebCore::HTMLMediaElement::updatePlayState): Stop timer used to fire periodic 'timeupdate' 
2850         events when we pauses the movie. Set the media engine rate before calling play() in case it
2851         wasn't set up when the rate was changed.
2852         (WebCore::HTMLMediaElement::stopPeriodicTimers): New, stop the progress event and 'timeupate'
2853         event timers.
2854         (WebCore::HTMLMediaElement::userCancelledLoad): New, logic pulled out of documentWillBecomeInactive
2855         and updated for the current spec.
2856         (WebCore::HTMLMediaElement::documentWillBecomeInactive): Moved some logic to userCancelledLoad.
2857         (WebCore::HTMLMediaElement::documentDidBecomeActive): Update comments.
2858         (WebCore::HTMLMediaElement::initialURL): Update for refactoring of code that determines the 
2859         initial url.
2860         * html/HTMLMediaElement.h: Change ReadyState and NetworkState enums to match names in the spec,
2861         update for changes in .cpp.
2862         (WebCore::HTMLMediaElement::):
2863
2864         * html/HTMLMediaElement.idl: Update ready state and network state constants for spec changes.
2865         defaultPlaybackRate, playbackRate, play(), and pause() no longer raise exceptions.
2866
2867         * html/HTMLSourceElement.cpp:
2868         (WebCore::HTMLSourceElement::insertedIntoDocument): Update for network state name changes.
2869
2870         * html/HTMLVideoElement.cpp:
2871         (WebCore::HTMLVideoElement::updatePosterImage): Update for ready state name changes.
2872
2873         * html/MediaError.h:
2874         (WebCore::MediaError::): add MEDIA_ERR_NONE_SUPPORTED.
2875
2876         * html/MediaError.idl: add MEDIA_ERR_NONE_SUPPORTED.
2877
2878         * loader/MediaDocument.cpp:
2879         (WebCore::MediaDocument::defaultEventHandler): play() and pause() don't take an exception.
2880
2881         * platform/graphics/MediaPlayer.cpp:
2882         (WebCore::NullMediaPlayerPrivate::readyState): Update for newtork state name changes.
2883         (WebCore::MediaPlayer::sizeChanged): New, so engine can report intrinsic size changes.
2884         (WebCore::MediaPlayer::rateChanged): New, so engine can report rate changes.
2885         (WebCore::MediaPlayer::durationChanged): New, so engine can report duration changes.
2886         * platform/graphics/MediaPlayer.h: Update NetworkState and ReadyState enum names to match spec
2887         states.
2888         (WebCore::MediaPlayerClient::mediaPlayerDurationChanged): New.
2889         (WebCore::MediaPlayerClient::mediaPlayerRateChanged): New.
2890         (WebCore::MediaPlayerClient::mediaPlayerSizeChanged): New.
2891         (WebCore::MediaPlayer::):
2892
2893         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
2894         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Update for network/ready state name changes.
2895         (WebCore::MediaPlayerPrivate::load): Ditto.
2896         (WebCore::MediaPlayerPrivate::updateStates): Ditto.
2897         (WebCore::MediaPlayerPrivate::loadingFailed): Ditto.
2898
2899         * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Update for network/ready state name changes.
2900         Remove endPointTimer, it is no longer necessary. Add m_enabledTrackCount and m_duration.
2901         (WebCore::MediaPlayerPrivate::metaDataAvailable):
2902         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2903         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): No more m_endPointTimer or m_endTime. Initialize
2904         m_enabledTrackCount and m_duration. Update for network/ready state name changes.
2905         (WebCore::MediaPlayerPrivate::load): Update for network/ready state name changes.
2906         (WebCore::MediaPlayerPrivate::play): No more m_endPointTimer.
2907         (WebCore::MediaPlayerPrivate::pause): Ditto.
2908         (WebCore::MediaPlayerPrivate::currentTime): No more m_endTime.
2909         (WebCore::MediaPlayerPrivate::seek): Ditto.
2910         (WebCore::MediaPlayerPrivate::doSeek): Ditto, plus don't call setRate(0) when the rate is
2911         already zero.
2912         (WebCore::MediaPlayerPrivate::setEndTime): No more m_endTime.
2913         (WebCore::MediaPlayerPrivate::updateStates): Update for network/ready state name changes. Return
2914         different errors depending on what causes a failure. Watch for and report duration changes.
2915         (WebCore::MediaPlayerPrivate::rateChanged): Report rate changes.
2916         (WebCore::MediaPlayerPrivate::sizeChanged): Report size changes.
2917         (WebCore::MediaPlayerPrivate::didEnd): No more endpoint timer.
2918         (WebCore::MediaPlayerPrivate::setVisible): Update for network/ready state name changes.
2919         (WebCore::MediaPlayerPrivate::disableUnsupportedTracks): Don't return number of unsupported
2920         tracks, store in m_enabledTrackCount so we can use it to help determine causes of failure.
2921
2922         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
2923         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Update for network/ready state name changes.
2924         (WebCore::MediaPlayerPrivate::load): Ditto.
2925         (WebCore::MediaPlayerPrivate::duration): Ditto.
2926         (WebCore::MediaPlayerPrivate::updateStates): Ditto.
2927         (WebCore::MediaPlayerPrivate::naturalSize): Ditto.
2928
2929         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
2930         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): No more m_endPointTimer. Update for 
2931         network/ready state name changes.
2932         (WebCore::MediaPlayerPrivate::load): Update for network/ready state name changes. No more
2933         m_endPointTimer.
2934         (WebCore::MediaPlayerPrivate::play): No more m_endPointTimer.
2935         (WebCore::MediaPlayerPrivate::pause): Ditto. 
2936         (WebCore::MediaPlayerPrivate::setEndTime): Ditto.
2937         (WebCore::MediaPlayerPrivate::updateStates): Update for network/ready state name changes.
2938         (WebCore::MediaPlayerPrivate::didEnd): No more m_endPointTimer.
2939         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
2940
2941         * rendering/MediaControlElements.cpp:
2942         (WebCore::MediaControlPlayButtonElement::defaultEventHandler): Update for network/ready state 
2943         name changes.
2944         (WebCore::MediaControlSeekButtonElement::defaultEventHandler): Ditto.
2945
2946 2009-03-22  Kevin Ollivier  <kevino@theolliviers.com>
2947
2948         wxGTK build fix. Add missing header.
2949
2950         * platform/wx/wxcode/gtk/non-kerned-drawing.cpp:
2951
2952 2009-03-22  Simon Fraser  <simon.fraser@apple.com>
2953
2954         Reviewed by Dan Bernstein
2955         
2956         https://bugs.webkit.org/show_bug.cgi?id=24665
2957         
2958         Image-map code in RenderImage could result in RenderImage::nodeAtPoint()
2959         setting HitTestResult::innerNode(), but returning false, which violates
2960         hit testing rules. Use a temporary HitTestResult so that we only fill in
2961         result when we know we've hit.
2962
2963         * rendering/RenderImage.cpp:
2964         (WebCore::RenderImage::nodeAtPoint):
2965
2966 2009-03-22  Simon Fraser  <simon.fraser@apple.com>
2967
2968         Reviewed by Dan Bernstein
2969         
2970         https://bugs.webkit.org/show_bug.cgi?id=24743
2971         
2972         Fix hit testing regression from r41840. We need to pass the temporary
2973         HitTestResult when testing sublayers, then only copy to 'result' when
2974         the layer is known to have been hit.
2975
2976         Test: fast/layers/zindex-hit-test.html
2977
2978         * rendering/RenderLayer.cpp:
2979         (WebCore::RenderLayer::hitTestLayer):
2980
2981 2009-03-20  Simon Fraser  <simon.fraser@apple.com>
2982
2983         Reviewed by Darin Adler
2984
2985         https://bugs.webkit.org/show_bug.cgi?id=24733
2986         
2987         Fix hit testing on video controls after full page zoom by fixing wider issue
2988         with event->pageX(), pageY() with zooming. pageX and pageY are "fixed" to be
2989         invariant under zooming (for JavaScript), so we keep an actual page point around
2990         in MouseEvent::absoluteLocation() to avoid the need to factor in zooming everywhere.
2991
2992         * dom/MouseRelatedEvent.cpp:
2993         (WebCore::MouseRelatedEvent::initCoordinates):
2994         (WebCore::MouseRelatedEvent::computePageLocation):
2995         * dom/MouseRelatedEvent.h:
2996         (WebCore::MouseRelatedEvent::absoluteLocation):
2997         (WebCore::MouseRelatedEvent::setAbsoluteLocation):
2998         Member var, and getter and setter for absoluteLocation.
2999         New method, computePageLocation(), to compute the actual page point,
3000         and call it when creating and initting mouse-related events.
3001
3002         * dom/Node.cpp:
3003         (WebCore::Node::dispatchMouseEvent):
3004         (WebCore::Node::dispatchWheelEvent):
3005         Keep non-adjusted pageX and pageY around, and call setAbsoluteLocation()
3006         on the event to replace a potentially rounded point.
3007         
3008         * html/HTMLInputElement.cpp:
3009         (WebCore::HTMLInputElement::defaultEventHandler):
3010         Clean up slider handling code.
3011         
3012         * html/HTMLSelectElement.cpp:
3013         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
3014         Add FIXME comment for use of offsetX/offsetY.
3015         
3016         * page/ContextMenuController.cpp:
3017         (WebCore::ContextMenuController::handleContextMenuEvent):
3018         Use absoluteLocation() when hit testing for context menus.
3019         
3020         * rendering/RenderFrameSet.cpp:
3021         (WebCore::RenderFrameSet::userResize):
3022         Use absoluteLocation() when resizing frames.
3023         
3024         * rendering/RenderMedia.cpp:
3025         (WebCore::RenderMedia::forwardEvent):
3026         Use absoluteLocation() when hit testing media controls.
3027
3028         * rendering/RenderSlider.cpp:
3029         (WebCore::HTMLSliderThumbElement::defaultEventHandler):
3030         (WebCore::RenderSlider::mouseEventIsInThumb):
3031         Use absoluteLocation() when handling slider events.
3032
3033         (WebCore::RenderSlider::forwardEvent):
3034         Factor some code out of HTMLInputElement::defaultEventHandler().
3035         
3036         * rendering/RenderTextControlSingleLine.cpp:
3037         (WebCore::RenderTextControlSingleLine::forwardEvent):
3038         Use absoluteLocation() when hit testing search field buttons, which fixees
3039         bugs in the search field with zooming.
3040
3041 2009-03-21  David Levin  <levin@chromium.org>
3042
3043         Reviewed by Dimitri Glazkov.
3044
3045         https://bugs.webkit.org/show_bug.cgi?id=24727
3046         Add V8XMLHttpRequest*.
3047
3048         * bindings/v8/V8XMLHttpRequestUtilities.cpp: Added.
3049         * bindings/v8/V8XMLHttpRequestUtilities.h: Added.
3050         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp: Added.
3051         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: Added.
3052         * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp: Added.
3053
3054 2009-03-21  David Levin  <levin@chromium.org>
3055
3056         Reviewed by Dimitri Glazkov.
3057
3058         https://bugs.webkit.org/show_bug.cgi?id=24725
3059         Add V8NodeFilter.
3060
3061         * bindings/v8/V8NodeFilter.cpp: Added.
3062         * bindings/v8/V8NodeFilter.h: Added.
3063
3064 2009-03-21  Dan Bernstein  <mitz@apple.com>
3065
3066         Rubber-stamped by Kevin Decker
3067
3068         - remove some redundant #include statements
3069
3070         * bindings/js/JSDOMWindowBase.cpp:
3071
3072 2009-03-20  Dan Bernstein  <mitz@apple.com>
3073
3074         Reviewed by Mark Rowe.
3075
3076         - fix <rdar://problem/6574185> REGRESSION (3.2.2-TOT): hang in text drawing code
3077
3078         * platform/graphics/win/FontCGWin.cpp:
3079         (WebCore::drawGDIGlyphs): Changed glyph stroking to fill and stroke each
3080         glyph as a separate path, instead of all glyphs as a single path. This
3081         matches what CGContextShowGlyphsWithAdvances() does, and has comparable
3082         performance.
3083
3084 2009-03-20  Dean Jackson  <dino@apple.com>
3085
3086         Reviewed by Simon Fraser
3087
3088         Build fix for ENABLE(3D_RENDERING)
3089
3090         * rendering/RenderObject.h:
3091         (WebCore::makeMatrixRenderable):
3092
3093 2009-03-20  Dave Moore  <davemoore@google.com>
3094
3095         Reviewed by Dimitri Glazkov.
3096
3097         https://bugs.webkit.org/show_bug.cgi?id=24705
3098
3099         A bug in the V8 bindings is preventing chromium from setting the href on the
3100         location object...any attempt throws a security error, not just for javascript
3101         protocol
3102
3103         * page/Location.idl:
3104
3105 2009-03-20  Craig Schlenter  <craig.schlenter@gmail.com>
3106
3107         Reviewed by Dimitri Glazkov.
3108
3109         https://bugs.webkit.org/show_bug.cgi?id=24608
3110
3111         Include stdio.h needed for printf on gcc 4.4.0
3112
3113         * platform/KURLGoogle.cpp:
3114
3115 2009-03-20  Mike Belshe <mike@belshe.com>
3116
3117         Reviewed by Darin Fisher.
3118
3119         https://bugs.webkit.org/show_bug.cgi?id=24577
3120
3121         Don't let comments at the end of an event handler
3122         break the event handler.
3123
3124         No change in behavior, so no test.
3125
3126         * bindings/v8/V8LazyEventListener.cpp:
3127         (WebCore::V8LazyEventListener::getWrappedListenerFunction):
3128
3129 2009-03-20  Norbert Leser  <norbert.leser@nokia.com>
3130
3131         Reviewed by Darin Adler.
3132
3133         https://bugs.webkit.org/show_bug.cgi?id=24535
3134
3135         Fixes missing line terminator character (;) after macro call.
3136         It is common practice to add the trailing ";" where macros are substituted
3137         and not where they are defined with #define.
3138         This change is consistent with other macro declarations across webkit,
3139         and it also solves compilation failure with symbian compilers. 
3140  
3141         No change in behavior, so no test.
3142
3143         * bindings/js/JSDOMWindowShell.cpp:
3144         * bindings/js/JSEventListener.cpp:
3145         * bindings/js/JSImageConstructor.cpp:
3146         * bindings/js/JSInspectedObjectWrapper.cpp:
3147         * bindings/js/JSInspectorCallbackWrapper.cpp:
3148         * bindings/js/JSNamedNodesCollection.cpp:
3149         * bindings/js/JSNodeFilterCondition.cpp:
3150         * bindings/js/JSOptionConstructor.cpp:
3151         * bindings/js/JSQuarantinedObjectWrapper.cpp:
3152         * bindings/js/JSRGBColor.cpp:
3153         * bindings/js/JSWorkerContextBase.cpp:
3154         * bindings/js/JSXMLHttpRequestConstructor.cpp:
3155         * bindings/js/JSXSLTProcessorConstructor.cpp:
3156         * bindings/scripts/CodeGeneratorJS.pm:
3157
3158 2009-03-20  Mike Belshe  <mike@belshe.com>
3159
3160         Reviewed by Dimitri Glazkov and Dave Hyatt.
3161
3162         https://bugs.webkit.org/show_bug.cgi?id=24324
3163
3164         Make the minimum timer configurable for different platforms.
3165
3166         * page/DOMTimer.cpp:
3167         (WebCore::DOMTimer::DOMTimer):
3168         (WebCore::DOMTimer::fired):
3169         * page/DOMTimer.h:
3170         (WebCore::DOMTimer::minTimerInterval):
3171         (WebCore::DOMTimer::setMinTimerInterval):
3172
3173 2009-03-20  Dean McNamee  <deanm@chromium.org>
3174
3175         Reviewed by Darin Adler.
3176
3177         https://bugs.webkit.org/show_bug.cgi?id=22834
3178
3179         Make sure to consistently match new/delete and fastMalloc/fastFree.
3180
3181         * css/CSSSelectorList.cpp:
3182         (WebCore::CSSSelectorList::adoptSelectorVector):
3183         (WebCore::CSSSelectorList::deleteSelectors):
3184
3185 2009-03-20  Dan Bernstein  <mitz@apple.com>
3186
3187         Reviewed by Dave Hyatt.
3188
3189         - fix https://bugs.webkit.org/show_bug.cgi?id=23739
3190           <rdar://problem/6556371> REGRESSION (r36513): iframe isn't sized properly upon load
3191
3192         * rendering/RenderBlock.cpp:
3193         (WebCore::RenderBlock::percentHeightDescendants): Added this accessor.
3194         * rendering/RenderBlock.h:
3195         * rendering/RenderTableSection.cpp:
3196         (WebCore::RenderTableSection::layoutRows): Extended the check for
3197         children that flex to include other descendants with percent height
3198         which is relative to the cell.
3199
3200 2009-03-20  Dmitry Titov  <dimich@chromium.org>
3201
3202         Reviewed by Alexey Proskuryakov.
3203
3204         https://bugs.webkit.org/show_bug.cgi?id=24706
3205         Remove ScriptExecutionContext::encoding() since Workers do not need it.
3206         WorkerContext::encoding() is simply removed, while Document::encoding()
3207         made non-virtual and private. Workers use UTF-8 now except when instructed
3208         otherwise by http header. Also updated test.
3209
3210         * dom/Document.h: Made encoding() non-virtual and private.
3211         * dom/ScriptExecutionContext.h: removed encoding().
3212
3213         * workers/Worker.cpp:
3214         (WebCore::Worker::Worker):
3215         (WebCore::Worker::notifyFinished):
3216         * workers/WorkerContext.cpp: removed encoding() implementation.
3217         (WebCore::WorkerContext::WorkerContext):
3218         (WebCore::WorkerContext::completeURL):
3219         * workers/WorkerContext.h: removed encoding()
3220         (WebCore::WorkerContext::create):
3221         * workers/WorkerContextProxy.h:
3222         * workers/WorkerImportScriptsClient.cpp:
3223         (WebCore::WorkerImportScriptsClient::didReceiveData):
3224         * workers/WorkerMessagingProxy.cpp:
3225         (WebCore::WorkerMessagingProxy::startWorkerContext):
3226         * workers/WorkerMessagingProxy.h:
3227         * workers/WorkerThread.cpp:
3228         (WebCore::WorkerThreadStartupData::create):
3229         (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
3230         (WebCore::WorkerThread::create):
3231         (WebCore::WorkerThread::WorkerThread):
3232         (WebCore::WorkerThread::workerThread):
3233         * workers/WorkerThread.h:
3234         In all these, removed storing encoding and 'inheriting' it from the parent.
3235         Instead, they are all using UTF-8 now.
3236
3237 2009-03-20  Timothy Hatcher  <timothy@apple.com>
3238
3239         Change how threading exceptions are checked so they are reported
3240         by what round they were added. That way WebKit can decided the
3241         behavior per-round based on linked-on-or-after checks.
3242
3243         <rdar://problem/6626741&6648478&6635474&6674079>
3244
3245         Reviewed by Darin Adler.
3246
3247         * WebCore.base.exp: Export the new symbols.
3248         * bindings/objc/DOMAbstractView.mm: Use the new WebCoreThreadViolationCheckRoundOne macro.
3249         * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
3250         * platform/ThreadCheck.h:
3251         * platform/mac/ThreadCheck.mm:
3252         (WebCore::readThreadViolationBehaviorFromUserDefaults): Refactor how the default is read.
3253         (WebCore::setDefaultThreadViolationBehavior): Take a round argument.
3254         (WebCore::reportThreadViolation): Ditto.
3255         (WebCoreReportThreadViolation): Ditto.
3256
3257 2009-03-20  Geoffrey Garen  <ggaren@apple.com>
3258
3259         Reviewed by Sam Weinig.
3260
3261         Fixed up an out-of-date comment.
3262
3263         * bindings/js/JSDOMWindowCustom.h:
3264         (WebCore::JSDOMWindow::customPut):
3265
3266 2009-03-20  Beth Dakin  <bdakin@apple.com>
3267
3268         Reviewed by Dave Hyatt.
3269
3270         Fix for https://bugs.webkit.org/show_bug.cgi?id=20909 REGRESSION 
3271         (r35318): A press release at pfizer.com does not display correctly
3272         - and corresponding -
3273         <rdar://problem/6680073>
3274
3275         * rendering/RenderObject.cpp:
3276         (WebCore::RenderObject::invalidateContainerPrefWidths):
3277         * rendering/RenderObject.h:
3278         (WebCore::RenderObject::markContainingBlocksForLayout):
3279
3280 2009-03-20  Eric Seidel  <eric@webkit.org>
3281
3282         Reviewed by Justin Garcia.
3283
3284         maxDeepOffset is confusing and should be removed
3285         https://bugs.webkit.org/show_bug.cgi?id=24586
3286
3287         Abstract some hard-to-read (but shared) logic into a new renderedAsNonInlineTableOrHR function.
3288         Add first/lastDeepEditingPositionForNode Position creation functions
3289         and deploy them to places we used to call maxDeepOffset.
3290
3291         Rename Position::atStart and atEnd to atStartOfTree atEndOfTree
3292         Add a new Position::atFirst/atLastEditingPositionForNode() and use these
3293         to replace a few more callers for maxDeepOffset()
3294         
3295         Rename maxDeepOffset to lastEditingOffsetForNode (so that we mere mortals have some clue what it does)
3296
3297         "Editing positions" are confusing because they have one
3298         of two behaviors, depending on if the container node is ignored
3299         by editing (if editingIgnoresContent(node) returns true) or not.
3300         Positions referring to nodes ignored by editing are
3301         neighbor-relative (they are before or after the node) where as
3302         positions reffering to other nodes are container-relative
3303         (they are between two child nodes of the container, identified
3304         by the offset() member).  I will be fixing this confusion in
3305         future patches.  These renames hopefully make the current behavior clearer.
3306
3307         * dom/Position.cpp:
3308         (WebCore::Position::previous):
3309         (WebCore::Position::next):
3310         (WebCore::Position::atFirstEditingPositionForNode):
3311         (WebCore::Position::atLastEditingPositionForNode):
3312         (WebCore::Position::atStartOfTree):
3313         (WebCore::Position::atEndOfTree):
3314         (WebCore::Position::previousCharacterPosition):
3315         (WebCore::Position::nextCharacterPosition):
3316         (WebCore::Position::upstream):
3317         (WebCore::Position::isCandidate):
3318         (WebCore::firstDeepEditingPositionForNode):
3319         (WebCore::lastDeepEditingPositionForNode):
3320         * dom/Position.h:
3321         * dom/PositionIterator.cpp:
3322         (WebCore::PositionIterator::operator Position):
3323         (WebCore::PositionIterator::increment):
3324         (WebCore::PositionIterator::decrement):
3325         (WebCore::PositionIterator::atEnd):
3326         (WebCore::PositionIterator::atEndOfNode):
3327         * editing/CompositeEditCommand.cpp:
3328         (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary):
3329         * editing/DeleteSelectionCommand.cpp:
3330         (WebCore::isTableCellEmpty):
3331         (WebCore::DeleteSelectionCommand::removeNode):
3332         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
3333         * editing/Editor.cpp:
3334         (WebCore::Editor::advanceToNextMisspelling):
3335         * editing/InsertLineBreakCommand.cpp:
3336         (WebCore::InsertLineBreakCommand::doApply):
3337         * editing/InsertListCommand.cpp:
3338         (WebCore::InsertListCommand::doApply):
3339         * editing/ReplaceSelectionCommand.cpp:
3340         (WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent):
3341         * editing/TypingCommand.cpp:
3342         (WebCore::TypingCommand::forwardDeleteKeyPressed):
3343         * editing/VisiblePosition.cpp:
3344         (WebCore::VisiblePosition::previous):
3345         (WebCore::VisiblePosition::leftVisuallyDistinctCandidate):
3346         (WebCore::VisiblePosition::left):
3347         (WebCore::VisiblePosition::rightVisuallyDistinctCandidate):
3348         (WebCore::VisiblePosition::right):
3349         * editing/VisibleSelection.cpp:
3350         (WebCore::VisibleSelection::selectionFromContentsOfNode):
3351         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries):
3352         * editing/htmlediting.cpp:
3353         (WebCore::nextVisuallyDistinctCandidate):
3354         (WebCore::previousVisuallyDistinctCandidate):
3355         (WebCore::firstEditablePositionAfterPositionInRoot):
3356         (WebCore::lastEditablePositionBeforePositionInRoot):
3357         (WebCore::lastOffsetForEditing):
3358         (WebCore::isFirstPositionAfterTable):
3359         (WebCore::isLastPositionBeforeTable):
3360         (WebCore::positionBeforeNode):
3361         (WebCore::positionAfterNode):
3362         (WebCore::enclosingEmptyListItem):
3363         (WebCore::caretMaxOffset):
3364         * editing/htmlediting.h:
3365         * editing/visible_units.cpp:
3366         (WebCore::renderedAsNonInlineTableOrHR):
3367         (WebCore::startOfParagraph):
3368         (WebCore::endOfParagraph):
3369         (WebCore::startOfEditableContent):
3370         (WebCore::endOfEditableContent):
3371         * page/AccessibilityObject.cpp:
3372         (WebCore::endOfStyleRange):
3373         * page/AccessibilityRenderObject.cpp:
3374         (WebCore::AccessibilityRenderObject::visiblePositionRange):
3375         * rendering/RenderBox.cpp:
3376         (WebCore::RenderBox::positionForPoint):
3377
3378 2009-03-20  Dmitry Titov  <dimich@chromium.org>
3379
3380         Reviewed by Dimitri Glazkov.
3381
3382         https://bugs.webkit.org/show_bug.cgi?id=24689
3383         Add (upstream) V8 bindings for Workers. Mostly style cleaning.
3384
3385         * bindings/v8/WorkerContextExecutionProxy.cpp: Added.
3386         * bindings/v8/WorkerContextExecutionProxy.h: Added.
3387         * bindings/v8/WorkerScriptController.cpp: Added.
3388         * bindings/v8/WorkerScriptController.h: Added.
3389         * bindings/v8/V8Index.h: Added. This is just a wrapper for v8_index.h, like V8Proxy.h
3390         * bindings/v8/V8Proxy.h: Added domObjectMap() function that wraps GetDOMObjectMap().
3391         * bindings/v8/V8WorkerContextEventListener.cpp:
3392         (WebCore::V8WorkerContextEventListener::callListenerFunction): TrackEvent() renamed trackEvent()
3393
3394 2009-03-20  Stephen White  <senorblanco@chromium.org>
3395
3396         Reviewed by Eric Seidel.
3397
3398         Fix for LayoutTests/fast/canvas/canvas-text-alignment.html
3399         on chromium/skia.  The problem was that the gradient matrix
3400         for text was being applied twice.  Fixed by reverting some of
3401         https://bugs.webkit.org/show_bug.cgi?id=23957, so that skiaDrawText
3402         is no longer responsible for measuring the text and scaling up
3403         the gradient matrix.  Instead, the text bounding box is passed
3404         in from SVGPaintServerGradient.  I didn't make this change for CG,
3405         since it uses a different method (the gradient is drawn using the
3406         text as a pre-rendered mask).
3407         https://bugs.webkit.org/show_bug.cgi?id=24687
3408
3409         * platform/graphics/skia/SkiaFontWin.cpp:
3410         (WebCore::skiaDrawText):
3411         * svg/graphics/SVGPaintServerGradient.cpp:
3412         (WebCore::SVGPaintServerGradient::setup):
3413
3414 2009-03-20  Xan Lopez  <xlopez@igalia.com>
3415
3416         Rubber-stamped by Holger Freyther.
3417
3418         There seems to be some rounding error in cairo (or in how we use
3419         cairo) with some fonts, like DejaVu Sans Mono, which makes cairo
3420         report a height smaller than ascent + descent, which is wrong and
3421         confuses WebCore's layout system. Workaround this while we figure
3422         out what's going on.
3423
3424         * platform/graphics/gtk/SimpleFontDataGtk.cpp:
3425         (WebCore::SimpleFontData::platformInit):
3426         * platform/graphics/gtk/SimpleFontDataPango.cpp:
3427         (WebCore::SimpleFontData::platformInit):
3428
3429 2009-03-19  Alexey Proskuryakov  <ap@webkit.org>
3430
3431         Reviewed by Darin Adler.
3432
3433         https://bugs.webkit.org/show_bug.cgi?id=24122
3434         <rdar://problem/6674179>
3435         REGRESSION: DOM Range extractContents/deleteContents failures seen on Moxiecode tests
3436
3437         Test: fast/dom/Range/deleted-range-endpoints.html
3438
3439         * dom/Range.cpp: (WebCore::Range::processContents): Set the final range in accordance
3440         to the specification.
3441
3442 2009-03-19  Anders Carlsson  <andersca@apple.com>
3443
3444         Reviewed by Dan Bernstein.
3445
3446         <rdar://problem/6682554> Flash content not being rendered (Shockwave Flash 10.0 r22)
3447         
3448         If calling updateWidget for some reason resulted in another widget being added to m_widgetUpdateSet, then
3449         that object would never be updated.
3450         
3451         * page/FrameView.cpp:
3452         (WebCore::FrameView::updateWidgets):
3453         Factor the widget updating code out into this method. Return true if the update set is empty.
3454         
3455         (WebCore::FrameView::performPostLayoutTasks):
3456         Loop over the update set multiple times until all widgets have been updated or until we reach the cap.
3457         
3458         * page/FrameView.h:
3459
3460 2009-03-18  Timothy Hatcher  <timothy@apple.com>
3461
3462         Make the defered data loading timer honor the Page's scheduled runloop pairs.
3463         Introduces a new RunLoopTimer class that has an API mimicking Timer but
3464         allows it to be scheduled with one or more SchedulePairs.
3465
3466         <rdar://problem/6687342> -[WebView scheduleInRunLoop:forMode:] has no affect on timers
3467
3468         Reviewed by Darin Adler.
3469
3470         * WebCore.xcodeproj/project.pbxproj: Adds the new RunLoopTimer.{cpp,h} files.
3471         * loader/MainResourceLoader.cpp:
3472         (WebCore::MainResourceLoader::handleDataLoadNow): Use the MainResourceLoaderTimer typedef.
3473         (WebCore::MainResourceLoader::startDataLoadTimer): Added. Start the timer and on
3474         Mac platforms also schedule with the Page's SchedulePairs.
3475         (WebCore::MainResourceLoader::handleDataLoadSoon): Call startDataLoadTimer().
3476         (WebCore::MainResourceLoader::setDefersLoading): Ditto.
3477         * loader/MainResourceLoader.h:
3478         * platform/cf/RunLoopTimerCF.cpp: Added.
3479         (WebCore::RunLoopTimerBase::~RunLoopTimerBase):
3480         (WebCore::timerFired):
3481         (WebCore::RunLoopTimerBase::start):
3482         (WebCore::RunLoopTimerBase::schedule):
3483         (WebCore::RunLoopTimerBase::stop):
3484         (WebCore::RunLoopTimerBase::isActive):
3485         * platform/RunLoopTimer.h: Added.
3486         (WebCore::RunLoopTimerBase::RunLoopTimerBase):
3487         (WebCore::RunLoopTimerBase::startRepeating):
3488         (WebCore::RunLoopTimerBase::startOneShot):
3489         (WebCore::RunLoopTimer::RunLoopTimer):
3490         (WebCore::RunLoopTimer::fired):
3491
3492 2009-03-19  Dimitri Glazkov  <dglazkov@chromium.org>
3493
3494         Reviewed by Darin Fisher.
3495
3496         https://bugs.webkit.org/show_bug.cgi?id=24702
3497         Upstream miscellaneous bindings changes.
3498
3499         * bindings/v8/ScheduledAction.cpp:
3500         (WebCore::ScheduledAction::execute): Changed to call lower-case evaluate.
3501         * bindings/v8/ScriptCallStack.h: Added an extra include.
3502
3503 2009-03-19  Simon Fraser  <simon.fraser@apple.com>
3504
3505         Reviewed by Dave Hyatt
3506
3507         https://bugs.webkit.org/show_bug.cgi?id=24686
3508         
3509         When hit testing a RenderLayer whose parent lives in a preserves-3D hierarchy,
3510         we need to compare the computed z-offset with the depth-test z-offset before
3511         deciding that such a RenderLayer was hit. This fixes an issue, tested by the
3512         3d-point-mapping-overlapping.html test, where the child of a transformed element
3513         is found by hit testing, even when some other element with greater Z overlaps
3514         them both.
3515         
3516         Improved the code by adding a utility method, isHitCandidate(), which computes and tests
3517         z-depth when necessary.
3518
3519         Tests: transforms/3d/point-mapping/3d-point-mapping-coplanar.html
3520                transforms/3d/point-mapping/3d-point-mapping-overlapping.html
3521
3522         * rendering/RenderLayer.cpp:
3523         (WebCore::isHitCandidate):
3524         (WebCore::RenderLayer::hitTestLayer):
3525
3526 2009-03-19  Jeremy Moskovich  <jeremy@chromium.org>
3527
3528         Reviewed by Dimitri Glazkov.
3529
3530         https://bugs.webkit.org/show_bug.cgi?id=24456
3531         Split ColorChromium.cpp into Mac & Windows variants.
3532         Remove Chromium Dependency on platform/graphics/mac/ColorMac.mm since we
3533         ultimately need to take a different approach.  For now, createCGColor()
3534         is copied from ColorMac.mm.
3535
3536         No observable change in behavior, so no test.
3537
3538         * platform/graphics/chromium/ColorChromium.cpp:
3539         (WebCore::focusRingColor):
3540         * platform/graphics/chromium/ColorChromiumMac.mm: Added.
3541
3542 2009-03-19  Pavel Feldman  <pfeldman@chromium.org>
3543
3544         Reviewed by Dimitri Glazkov.
3545
3546         https://bugs.webkit.org/show_bug.cgi?id=24675
3547         Unforking frontend: add custom InspectorController methods
3548         implementation.
3549
3550         * bindings/v8/custom/V8InspectorControllerCustom.cpp: Added.
3551
3552 2009-03-19  Jay Campan  <jcampan@google.com>
3553
3554         Reviewed by Dimitri Glazkov.
3555
3556         https://bugs.webkit.org/show_bug.cgi?id=24625
3557         Adding an accessor to the currently selected index in the PopupMenuChromium.
3558         This is required for implementing the deletion of an autocomplete entry in Chromium.
3559
3560         * platform/chromium/PopupMenuChromium.cpp:
3561         (WebCore::PopupContainer::selectedIndex):
3562         * platform/chromium/PopupMenuChromium.h:
3563
3564 2009-03-19  Evan Stade  <estade@chromium.org>
3565
3566         Reviewed by Dimitri Glazkov.
3567
3568         https://bugs.webkit.org/show_bug.cgi?id=24526
3569         Improve windows skia text stroking.
3570
3571         Test: LayoutTests/svg/custom/struct-use-09-b.svg
3572
3573         * platform/graphics/skia/SkiaFontWin.cpp: Close the path representing
3574         each font glyph polygon, rather than only closing the path once per
3575         letter. This fixes stroking for letters with multiple polygons, such
3576         as 'A' or 'D'.
3577         (WebCore::getPathForGlyph):
3578         (WebCore::skiaDrawText):
3579
3580 2009-03-19  Simon Hausmann  <simon.hausmann@nokia.com>
3581
3582         Reviewed by Tor Arne Vestbø.
3583
3584         Fixed support for doing calls from JavaScript into NPAPI Plugins for the Qt port on Windows.
3585
3586         Removed dead code for distinguishing between Widget and PluginView in the Qt port.
3587
3588         * bindings/js/ScriptControllerQt.cpp:
3589         (WebCore::ScriptController::createScriptInstanceForWidget): Removed incorrect isNPAPI check.
3590         * plugins/PluginView.cpp:
3591         (WebCore::PluginView::PluginView): Removed m_isNPAPIPlugin variable.
3592         * plugins/PluginView.h: Removed setter/getter.
3593         * plugins/mac/PluginViewMac.cpp:
3594         (WebCore::PluginView::init): Removed call to setIsNPAPIPlugin.
3595         * plugins/qt/PluginViewQt.cpp:
3596         (WebCore::PluginView::init): Ditto.
3597
3598 2009-03-19  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
3599
3600         Reviewed by Oliver Hunt.
3601
3602         Bug 24596: ASSERT in JSC::PropertySlot::slotBase @ iGoogle homepage
3603         <https://bugs.webkit.org/show_bug.cgi?id=24596>
3604         <rdar://problem/6686493>
3605
3606         JSDOMWindow::customGetOwnPropertySlot() does an access check after calling
3607         JSGlobalObject::getOwnPropertySlot(). This causes the PropertySlot to be
3608         set twice, once to the value that is illegal to access, and then to undefined
3609         This causes an assertion failure in property access caching code.
3610
3611         The fix is to do the access check before calling JSGlobalObject::getOwnPropertySlot().
3612
3613         * bindings/js/JSDOMWindowCustom.h:
3614         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
3615
3616 2009-03-18  Alexey Proskuryakov  <ap@webkit.org>
3617
3618         Reviewed by Sam Weinig.
3619
3620         https://bugs.webkit.org/show_bug.cgi?id=24676
3621         Simple cross-origin requests shouldn't dispatch upload progress events
3622
3623         Test: http/tests/xmlhttprequest/simple-cross-origin-progress-events.html
3624
3625         * loader/CrossOriginAccessControl.cpp: (WebCore::passesAccessControlCheck): Added a comment
3626         explaining the somewhat unexpected behavior of this function.
3627
3628         * xml/XMLHttpRequestUpload.cpp: (WebCore::XMLHttpRequestUpload::hasListeners):
3629         * xml/XMLHttpRequestUpload.h:
3630         Report whether there are any event listeners registered.
3631
3632         * xml/XMLHttpRequest.h: Added m_uploadEventsAllowed.
3633
3634         * xml/XMLHttpRequest.cpp:
3635         (WebCore::XMLHttpRequest::createRequest): Set m_uploadEventsAllowed flag.
3636         (WebCore::XMLHttpRequest::makeSameOriginRequest): Ditto.
3637         (WebCore::XMLHttpRequest::makeCrossOriginAccessRequest): Ditto.
3638         (WebCore::XMLHttpRequest::makeSimpleCrossOriginAccessRequest): Set request body - it can be
3639         non-empty for POST requests.
3640         (WebCore::XMLHttpRequest::makeCrossOriginAccessRequestWithPreflight): Set m_uploadEventsAllowed flag.
3641         (WebCore::XMLHttpRequest::handleAsynchronousPreflightResult): Ditto.
3642         (WebCore::XMLHttpRequest::abort): Only dispatch upload progress events if allowed.
3643         (WebCore::XMLHttpRequest::networkError): Ditto.
3644         (WebCore::XMLHttpRequest::abortError): Ditto.
3645         (WebCore::XMLHttpRequest::didSendData): Ditto.
3646
3647 2009-03-18  Marc-Antoine Ruel  <maruel@chromium.org>
3648
3649         Reviewed by Darin Fisher.
3650
3651         https://bugs.webkit.org/show_bug.cgi?id=24398
3652         Fix a crash when loading a svg file in Chromium's test_shell and
3653         then reloading the page.
3654
3655         * history/BackForwardListChromium.cpp:
3656         (WebCore::BackForwardList::BackForwardList):
3657         (WebCore::BackForwardList::close):
3658
3659 2009-03-18  Eric Carlson  <eric.carlson@apple.com>
3660
3661         Reviewed by Simon Fraser.
3662
3663         Fix for <rdar://problem/6685235>
3664         <video> element poster cannot be set dynamically if not originally set up in HTML
3665         
3666         Allocate the media engine immediately so the plug-in proxy is available for
3667         scripting right away.
3668
3669         * platform/graphics/MediaPlayer.cpp:
3670         (WebCore::MediaPlayer::MediaPlayer):
3671
3672 2009-03-18  Beth Dakin  <bdakin@apple.com>
3673
3674         Reviewed by Dave Hyatt.
3675
3676         Fix for <rdar://problem/6636747> REGRESSION (Safari 4 PB-r41326): 
3677         Popup menu appears at the wrong location on page at http://
3678         www.signonsandiego.com/
3679
3680         This was a regression from http://trac.webkit.org/changeset/40769, 
3681         which changed the base class of RenderInline to 
3682         RenderBoxModelObject rather than RenderBox.
3683
3684         * rendering/RenderObject.cpp:
3685         (WebCore::RenderObject::offsetParent): offsetParent should return a 
3686         RenderBoxModelObject rather than just a RenderBox, which is more 
3687         restrictive. 
3688
3689 2009-03-18  Anders Carlsson  <andersca@apple.com>
3690
3691         Reviewed by Darin Adler.
3692
3693         <rdar://problem/6504776> 
3694         CrashTracer: [USER] 188 crashes in Safari at com.apple.WebCore • WTF::HashTableIterator<WTF::RefPtr<WebCore::ResourceLoader>, ...
3695
3696         Return early in case calling the client ends up spinning the run loop and completing/cancelling the load.
3697         
3698         * loader/NetscapePlugInStreamLoader.cpp:
3699         (WebCore::NetscapePlugInStreamLoader::didCancel):
3700
3701 2009-03-18  David Levin  <levin@chromium.org>
3702
3703         Reviewed by Dimitri Glazkov.
3704
3705         https://bugs.webkit.org/show_bug.cgi?id=24664
3706         Upstreaming v8 collection.h
3707
3708         No change in behavior, so no test.
3709
3710         * bindings/v8/V8Collection.h: Added.
3711
3712 2009-03-18  Sam Weinig  <sam@webkit.org>
3713
3714         Reviewed by Simon Fraser.
3715
3716         Fix for https://bugs.webkit.org/show_bug.cgi?id=23966
3717         REGRESSION: Custom arrow navigation functionality doesn't work at dropular.net
3718         <rdar://problem/6589657>
3719
3720         Match the CSSOM spec for getClientRects and getBoundingClientRect by
3721         returning a 0x0 rect at the correct top/left position for empty inline
3722         boxes.
3723
3724         * rendering/RenderInline.cpp:
3725         (WebCore::RenderInline::absoluteRects):
3726         (WebCore::RenderInline::absoluteQuads):
3727
3728 2009-03-18  David Levin  <levin@chromium.org>
3729
3730         Reviewed by Eric Seidel.
3731
3732         Match the changes done for windows in the bug
3733         https://bugs.webkit.org/show_bug.cgi?id=24530.
3734
3735         No change in behavior, so no test.
3736
3737         * rendering/RenderThemeChromiumLinux.cpp:
3738         (WebCore::RenderThemeChromiumLinux::extraDefaultStyleSheet):
3739
3740 2009-03-18  Dirk Schulze  <krit@webkit.org>
3741
3742         Reviewed by Holger Freyther.
3743
3744         Added support for SVG's stroked texts to Qt.
3745
3746         [Qt] SVGs stroked text support missing
3747         https://bugs.webkit.org/show_bug.cgi?id=24262
3748
3749         * platform/graphics/qt/FontQt.cpp:
3750         (WebCore::Font::drawComplexText):
3751
3752 2009-03-18  Mark Rowe  <mrowe@apple.com>
3753
3754         Reviewed by Alexey Proskuryakov.
3755
3756         Fix fast/encoding/char-decoding.html with recent ICU.
3757
3758         * platform/text/TextCodecICU.cpp:
3759         (WebCore::TextCodecICU::decode): Look for gb18030 case-insensitively,
3760         as newer versions of ICU use GB18030 as the canonical name.
3761
3762 2009-03-17  David Levin  <levin@chromium.org>
3763
3764         Reviewed by Dimitri Glazkov.
3765
3766         https://bugs.webkit.org/show_bug.cgi?id=24662
3767         Chromium build fixes.
3768
3769         Bug https://bugs.webkit.org/show_bug.cgi?id=24663 tracks
3770         the invalid implementation of ScriptCallStack.
3771
3772         No change in behavior, so no test.
3773
3774         * bindings/v8/ScriptCallStack.h:
3775         (WebCore::ScriptCallStack::state):
3776         * platform/graphics/skia/PlatformContextSkia.cpp:
3777         (PlatformContextSkia::drawRect):
3778
3779 2009-03-17  David Carson  <dacarson@apple.com>
3780
3781         Reviewed by David Hyatt.
3782
3783         Add anchor elements to the simple style sheet so that applications that 
3784         are using WebKit just for simple text and links will also take advantage
3785         of the fast path.
3786
3787         * css/CSSStyleSelector.cpp:
3788         (WebCore::elementCanUseSimpleDefaultStyle):
3789
3790 2009-03-17  Darin Adler  <darin@apple.com>
3791
3792         Reviewed by Adele Peterson.
3793
3794         <rdar://problem/6687005> Need support for new move-left/right selectors.
3795
3796         * editing/EditorCommand.cpp:
3797         (WebCore::executeMoveToLeftEndOfLine): Added.
3798         (WebCore::executeMoveToLeftEndOfLineAndModifySelection): Added.
3799         (WebCore::executeMoveToRightEndOfLine): Added.
3800         (WebCore::executeMoveToRightEndOfLineAndModifySelection): Added.
3801         Added command entries for the functions above.
3802
3803 2009-03-17  Ojan Vafai  <ojan@chromium.org>
3804
3805         Reviewed by Adele Peterson.
3806
3807         Put the padding inside scrollbars on textareas.
3808         https://bugs.webkit.org/show_bug.cgi?id=24370
3809         
3810         Put the padding inside the scrollbars on textareas. This is done by moving the
3811         overflow from the shadowNode to the RenderTextControlMultiline. As a result,
3812         all of the scroll handing methods that RenderTextControl overrides can be moved
3813         down into RenderTextControlSingleLine since RenderTextControlMultiline can now
3814         just use RenderBlock's versions. This also allows RenderTextControlMultiLine to
3815         no longer need a custom layout method since the shadowNode can now just size
3816         like a regular DIV.
3817
3818         * css/CSSStyleSelector.cpp:
3819         (WebCore::CSSStyleSelector::adjustRenderStyle):
3820         * rendering/RenderTextControl.cpp:
3821         (WebCore::RenderTextControl::styleDidChange):
3822         (WebCore::RenderTextControl::selection):
3823         (WebCore::RenderTextControl::calcHeight):
3824         (WebCore::RenderTextControl::hitInnerTextElement):
3825         * rendering/RenderTextControl.h:
3826         * rendering/RenderTextControlMultiLine.cpp:
3827         (WebCore::RenderTextControlMultiLine::nodeAtPoint):
3828         (WebCore::RenderTextControlMultiLine::createInnerTextStyle):
3829         * rendering/RenderTextControlMultiLine.h:
3830         * rendering/RenderTextControlSingleLine.cpp:
3831         (WebCore::RenderTextControlSingleLine::styleDidChange):
3832         (WebCore::RenderTextControlSingleLine::autoscroll):
3833         (WebCore::RenderTextControlSingleLine::scrollWidth):
3834         (WebCore::RenderTextControlSingleLine::scrollHeight):
3835         (WebCore::RenderTextControlSingleLine::scrollLeft):
3836         (WebCore::RenderTextControlSingleLine::scrollTop):
3837         (WebCore::RenderTextControlSingleLine::setScrollLeft):
3838         (WebCore::RenderTextControlSingleLine::setScrollTop):
3839         (WebCore::RenderTextControlSingleLine::scroll):
3840         * rendering/RenderTextControlSingleLine.h:
3841         * rendering/TextControlInnerElements.cpp:
3842         (WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock):
3843         (WebCore::RenderTextControlInnerBlock::positionForPoint):
3844         (WebCore::TextControlInnerTextElement::createRenderer):
3845
3846 2009-03-17  Darin Adler  <darin@apple.com>
3847
3848         Reviewed by David Hyatt.
3849
3850         Bug 24517: REGRESSION (r41552): innerHTML does an updateLayout -- unneeded and can be slow
3851         https://bugs.webkit.org/show_bug.cgi?id=24517
3852
3853         * editing/DeleteButtonController.cpp:
3854         (WebCore::DeleteButtonController::enable): Added a call to updateRendering, since
3855         determining whether to display the delete button involves style and updateRendering
3856         also updates style (should probably be named updateStyle, in fact). Not needed to fix
3857         this bug, but would have prevented the crash that led to this bug in the first place.
3858
3859         * editing/EditCommand.cpp:
3860         (WebCore::EditCommand::EditCommand): Get rid of unneeded null check. All frames have
3861         delete button controllers.
3862         * editing/Editor.cpp:
3863         (WebCore::Editor::rangeForPoint): Ditto.
3864
3865         * editing/markup.cpp:
3866         (WebCore::appendStartMarkup): Changed a "&" to a "&&" so that generating markup
3867         doesn't depend on renderers at all when the convertBlocksToInlines boolean is false.
3868         This allows us to omit the call to updateLayoutIgnorePendingStylesheets in the
3869         createMarkup function that's called by innerHTML.
3870         (WebCore::MarkupAccumulator::appendMarkup): Turned this into a class with a member
3871         function. Added a feature where the accumulator will skip a node. Moved arguments
3872         that don't change during recursion into an object. This function still is a bit
3873         inefficient, since it creates a new HashMap at every level as it recurses, but for now
3874         I did not tackle that. Also replaced the onlyIncludeChildren boolean with EChildrenOnly
3875         for consistency and clarity.
3876         (WebCore::createMarkup): Removed the call to updateLayoutIgnorePendingStylesheets.
3877         Instead of calling disable/enable on the delete button controller's container element,
3878         pass it in to the markup accumulator as a node to skip.
3879
3880 2009-03-17  Scott Violet  <sky@google.com>
3881
3882         Reviewed by Eric Seidel.
3883
3884         https://bugs.webkit.org/show_bug.cgi?id=24651
3885         Skia does not always render text fill/stroke pattern/gradient/color correctly
3886
3887         Changes Skia's font rendering to only render gradient/pattern if current
3888         color space indicates the gradient/pattern should be used.
3889         This is covered by LayoutTests/fast/canvas/canvas-text-alignment.html .
3890     
3891         * platform/graphics/GraphicsContext.cpp:
3892         (WebCore::GraphicsContext::strokeColorSpace):
3893         (WebCore::GraphicsContext::fillColorSpace):
3894         * platform/graphics/GraphicsContext.h:
3895         (WebCore::):
3896         * platform/graphics/GraphicsContextPrivate.h:
3897         * platform/graphics/skia/SkiaFontWin.cpp:
3898         (WebCore::paintSkiaText):
3899
3900 2009-03-17  Adele Peterson  <adele@apple.com>
3901
3902         Reviewed by Darin Adler.
3903
3904         Fix for https://bugs.webkit.org/show_bug.cgi?id=24655
3905         <rdar://problem/6633727> Hitting return at the end of a line with an anchor jumps me to the bottom of the message
3906
3907         Test: editing/inserting/6633727.html
3908
3909         This changes does a few things:
3910         1) Renames pos to insertionPosition.
3911         2) Eliminates "startNode".  It doesn't work well to consider the node separately from the insertionPosition.  
3912            The insertionPosition gets updated at various times, and it seems likely that startNode can get out of sync.
3913         3) Before building up a list of ancestors to move around when we insert the new block, make sure to use the deepest
3914            representation of the insertionPosition, so all ancestor nodes are correctly included.
3915
3916         * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply):
3917
3918 2009-03-17  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3919
3920         Reviewed by Kevin Ollivier.
3921
3922         https://bugs.webkit.org/show_bug.cgi?id=24115
3923         Introduce platform independent stubs for plugins.
3924
3925         * plugins/PluginDataNone.cpp: Copied from WebCore/plugins/wx/PluginDataWx.cpp.
3926         * plugins/PluginPackageNone.cpp: Copied from WebCore/plugins/wx/PluginPackageWx.cpp.
3927         * plugins/PluginViewNone.cpp: Copied from WebCore/plugins/wx/PluginViewWx.cpp.
3928         * plugins/wx/PluginDataWx.cpp: Removed.
3929         * plugins/wx/PluginPackageWx.cpp: Removed.
3930         * plugins/wx/PluginViewWx.cpp: Removed.
3931         * webcore-wx.bkl:
3932
3933 2009-03-17  Darin Adler  <darin@apple.com>
3934
3935         Earlier version reviewed by Adele Peterson.
3936
3937         Bug 24304: REGRESSION (r39864): Hitting the space bar to select an <input type=radio>
3938         or push an <input type=button> or <button> causes the page to scroll down.
3939
3940         Would be best to add a regression test for Windows eventually; tested that this has
3941         no effect on the Mac OS X platform.
3942
3943         * html/HTMLInputElement.cpp:
3944         (WebCore::HTMLInputElement::defaultEventHandler): Added FIXMEs and tweaked formatting.
3945         Use the code that calls the base class's defaultEventHandler early only in the cases
3946         where it's needed: keydown and keypress events in text fields. In other cases, do the
3947         more typical thing and call the default handler only at the end of the function.
3948         This function already had code to make sure the keypress event for space never gets
3949         through, but it was running too late since the scrolling code was moved into the
3950         base class default event handler.
3951
3952 2009-03-17  Simon Fraser  <simon.fraser@apple.com>
3953
3954         Reviewed by Dave Hyatt
3955
3956         https://bugs.webkit.org/show_bug.cgi?id=24632
3957
3958         Fix repaint issues when composited layers come and go (only applies
3959         when ACCELERATED_COMPOSITING is turned on).
3960         
3961         * rendering/RenderLayer.cpp:
3962         (WebCore::RenderLayer::RenderLayer):
3963         * rendering/RenderLayer.h:
3964         (WebCore::RenderLayer::mustOverlayCompositedLayers):
3965         (WebCore::RenderLayer::setMustOverlayCompositedLayers):
3966         * rendering/RenderLayerBacking.cpp:
3967         (WebCore::RenderLayerBacking::RenderLayerBacking):
3968         * rendering/RenderLayerBacking.h:
3969
3970         Move what used to be the 'forceCompositingLayer' flag from RenderLayerBacking
3971         to RenderLayer, because we don't want the side-effects of creating RenderLayerBacking
3972         when setting this flag.
3973         
3974         * rendering/RenderLayerCompositor.cpp:
3975         (WebCore::RenderLayerCompositor::updateLayerCompositingState):
3976         When a RenderLayer flips into or out of compositing mode, compute a repaint
3977         rect relative to the containerForRepaint, and repaint it.
3978         
3979         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3980         Call layer->setMustOverlayCompositedLayers() rather than setForcedCompositingLayer().
3981         
3982         (WebCore::RenderLayerCompositor::needsToBeComposited):
3983         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
3984         (WebCore::RenderLayerCompositor::requiresCompositingForTransform):
3985         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
3986         * rendering/RenderLayerCompositor.h:
3987         
3988         Rename requiresCompositingLayerForTransform() to requiresCompositingForTransform()
3989         and make it a class static method to match requiresCompositingForAnimation(). Both
3990         now take RenderObjects, rathern than RenderLayers.
3991         
3992         * rendering/style/RenderStyle.h:
3993         (WebCore::InheritedFlags::hasTransformRelatedProperty):
3994         Minor tidyup using convenience methods added in an earlier commit.
3995
3996 2009-03-17  Simon Fraser  <simon.fraser@apple.com>
3997
3998         Reviewed by Darin Adler
3999
4000         https://bugs.webkit.org/show_bug.cgi?id=24396
4001
4002         * config.h:
4003         Add WTF_USE_ACCELERATED_COMPOSITING, defined to 0 for now, and add some
4004         comments to make the #ifdefs more readable.
4005
4006         * css/CSSComputedStyleDeclaration.cpp:
4007         (WebCore::computedTransform):
4008         Add a comment to mention that we don't flatten the matrix.
4009         
4010         * css/MediaQueryEvaluator.cpp:
4011         (WebCore::transform_3dMediaFeatureEval):
4012         Have the 'transform-3d' media query evaluate to 'true' if 3d-rendering
4013         is supported.
4014         
4015         * platform/graphics/mac/GraphicsLayerCA.mm:
4016         (WebCore::GraphicsLayerCA::animateTransform):
4017         No need for the #ifdef here. If we don't support 3d, we will have already flattened
4018         the matrix.
4019         
4020         * platform/graphics/transforms/TransformationMatrix.cpp:
4021         (WebCore::TransformationMatrix::makeAffine):
4022         * platform/graphics/transforms/TransformationMatrix.h:
4023         New method to convert the matrix to an affine matrix by throwing a way the non-affine
4024         parts.
4025         
4026         * rendering/RenderLayer.cpp:
4027         (WebCore::RenderLayer::updateTransform):
4028         (WebCore::RenderLayer::currentTransform):
4029         * rendering/RenderLayerBacking.cpp:
4030         (WebCore::RenderLayerBacking::updateLayerTransform):
4031         If 3d rendering is not supported, convert the matrix to an affine matrix
4032         which can be rendered, and used for hit testing.
4033         
4034         * rendering/RenderLayerCompositor.cpp:
4035         Change the name of the exported symbol that webkitdirs.pm uses to know if
4036         3d rendering is supported. There is no other 3d-rendering-specific symbol we can sniff.
4037         
4038         * rendering/RenderObject.cpp:
4039         (WebCore::RenderObject::transformFromContainer):
4040         Only take perspective into account if 3d rendering is supported.
4041
4042         * rendering/RenderObject.h:
4043         (WebCore::makeMatrixRenderable):
4044         Utility method that flattens a matrix if 3d rendering is not supported.
4045
4046 2009-03-17  Kevin Ollivier  <kevino@theolliviers.com>
4047
4048         wx build fix. Fix typo after mouse wheel changes.
4049
4050         * platform/wx/MouseWheelEventWx.cpp:
4051         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
4052
4053 2009-03-17  Darin Adler  <darin@apple.com>
4054
4055         * inspector/ConsoleMessage.cpp:
4056         (WebCore::ConsoleMessage::isEqual): Fix build, remove stray parenthesis.
4057
4058 2009-03-17  Darin Adler  <darin@apple.com>
4059
4060         Fix crash seen right away when running run-webkit-tests.
4061
4062         * inspector/ConsoleMessage.cpp:
4063         (WebCore::ConsoleMessage::isEqual): Restore assertion to its behavior pre-refactoring.
4064         Also tweaked formatting a bit.
4065
4066 2009-03-17  Alexey Proskuryakov  <ap@webkit.org>
4067
4068         Reviewed by Darin Adler.
4069
4070         HTMLSelectElement::add() doesn't look at exception code returned from insertBefore(), so 
4071         it doesn't need to zero it out before calling.
4072
4073         * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::add): Removed "ec = 0" line.
4074
4075 2009-03-17  Dan Bernstein  <mitz@apple.com>
4076
4077         Reviewed by Adam Roben.
4078
4079         - WebCore part of adding a mechanism for controlling the caching of
4080           responses through WebFrameLoaderClient
4081
4082         Mac already has such a mechanism, and this adds one for CFNetwork ports.
4083
4084         * WebCore.vcproj/WebCore.vcproj: Added EmptyClients.h
4085         and ResourceLoaderCFNet.cpp.
4086
4087         * loader/EmptyClients.h:
4088         (WebCore::EmptyFrameLoaderClient::shouldCacheResponse): Added an
4089         implementation that always returns true.
4090
4091         * loader/FrameLoaderClient.h: Declared shouldCacheResponse().
4092
4093         * loader/ResourceLoader.h: Ditto.
4094
4095         * loader/cf/ResourceLoaderCFNet.cpp: Added.
4096         (WebCore::ResourceLoader::shouldCacheResponse): Added. Calls through to
4097         FrameLoaderClient::shouldCacheResponse().
4098
4099         * platform/network/ResourceHandleClient.h:
4100         (WebCore::ResourceHandleClient::shouldCacheResponse): Added an
4101         implementation that always returns true.
4102
4103         * platform/network/cf/ResourceHandleCFNet.cpp:
4104         (WebCore::willCacheResponse): Added a call to
4105         ResourceHandleClient::shouldCacheResponse(). If the client returns
4106         false, return 0, which will prevent CFNetwork from caching the response.
4107
4108 2009-03-17  Alexey Proskuryakov  <ap@webkit.org>
4109
4110         Reviewed by Darin Adler.
4111
4112         https://bugs.webkit.org/show_bug.cgi?id=13287
4113         Cannot change SELECT to a dynamically created option
4114
4115         Tests: fast/forms/add-and-remove-option.html
4116                fast/forms/add-remove-option-modification-event.html
4117                fast/forms/add-selected-option.html
4118                fast/forms/select-cache-desynchronization.html
4119
4120         * dom/ContainerNode.cpp:
4121         (WebCore::dispatchChildInsertionEvents): Increment DOM tree version. This will happen when
4122         dispatching DOMSubtreeModified again, but the version should be incremented for event
4123         listeners to have an up to date view of the DOM.
4124         (WebCore::dispatchChildRemovalEvents): Ditto.
4125
4126         * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::insertedIntoTree):
4127         Make sure that the select element knows about its new selected option.
4128
4129         * html/HTMLOptionElement.h: Use insertedIntoTree() instead of insertedIntoDocument(),
4130         because DOM also needs to be updated for forms that are not in document yet. Similar
4131         problems exist for node removing, but removedFromTree() is called at a wrong time, so
4132         those problems cannot be fixed without deeper refactoring.
4133
4134         * html/HTMLSelectElement.cpp:
4135         (WebCore::HTMLSelectElement::setRecalcListItems): Reset m_activeSelectionAnchorIndex - it
4136         doesn't make sense to keep the anchor after programmatically changing the selection, and
4137         keeping it was causing a failure in fast/forms/listbox-selection.html.
4138
4139         * html/HTMLSelectElement.h: Removed overrides for ContainerNode methods that only called
4140         base class versions.
4141
4142 2009-03-17  Steve Falkenburg  <sfalken@apple.com>
4143
4144         <rdar://problem/6690324> Accessing FTP sites reads unallocated memory, can result in garbled entries or crashes
4145         
4146         Reviewed by Darin Adler.
4147
4148         * loader/FTPDirectoryDocument.cpp:
4149         (WebCore::FTPDirectoryTokenizer::parseAndAppendOneLine): Assign CString to a local while we hold pointers into it.
4150
4151 2009-03-16  David Hyatt  <hyatt@apple.com>
4152
4153         <rdar://problem/6648411> REGRESSION: Layout of page is wrong at http://www.popcap.com/
4154
4155         Make sure that the initial shouldPaint check that looks at enclosingLayers properly skips over
4156         layers that don't paint themselves.  This is done by adding a new enclosingSelfPaintingLayer method
4157         so that RenderObjects can walk up the enclosing layer chain and skip any layers that don't paint
4158         themselves.
4159
4160         Reviewed by Darin Adler.
4161
4162         Added fast/block/float/overlapping-floats-with-overflow-hidden.html