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