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