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