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