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