f5f017f9e7e67f973697f85e16ae40bbfd87ba8f
[WebKit-https.git] / WebCore / ChangeLog
1 2009-07-13  Drew Wilson  <atwilson@google.com>
2
3         Reviewed by David Levin.
4
5         Add ENABLE(SHARED_WORKERS) flag and define SharedWorker APIs
6         https://bugs.webkit.org/show_bug.cgi?id=26932
7
8         Initial IDL definition and bindings for SharedWorkers.
9
10         * Configurations/FeatureDefines.xcconfig:
11         Added new files for SharedWorker support.
12         * DerivedSources.make:
13         Added new files for SharedWorker support.
14         * GNUmakefile.am:
15         Added new files for SharedWorker support.
16         * WebCore.gypi:
17         Added new files for SharedWorker support.
18         * WebCore.pro:
19         Added new files for SharedWorker support.
20         * WebCore.xcodeproj/project.pbxproj:
21         Added new files for SharedWorker support.
22         * bindings/js/JSAbstractWorkerCustom.cpp: Added.
23         (WebCore::JSAbstractWorker::mark):
24         Custom mark handler that marks the event listeners.
25         (WebCore::JSAbstractWorker::addEventListener):
26         (WebCore::JSAbstractWorker::removeEventListener):
27         (WebCore::JSAbstractWorker::toJS):
28         Custom toJS handler which differentiates between various subclasses.
29         * bindings/js/JSDOMWindowCustom.cpp:
30         (WebCore::JSDOMWindow::sharedWorker):
31         SharedWorker constructor (only enabled when SHARED_WORKERS is
32         enabled).
33         * bindings/js/JSEventTarget.cpp:
34         (WebCore::toJS):
35         (WebCore::toEventTarget):
36         Added support for converting to/from SharedWorkers.
37         * bindings/js/JSSharedWorkerConstructor.cpp: Added.
38         (WebCore::JSSharedWorkerConstructor::JSSharedWorkerConstructor):
39         (WebCore::constructSharedWorker):
40         (WebCore::JSSharedWorkerConstructor::getConstructData):
41         * bindings/js/JSSharedWorkerConstructor.h: Added.
42         (WebCore::JSSharedWorkerConstructor::classInfo):
43         * bindings/js/JSSharedWorkerCustom.cpp: Added.
44         (WebCore::JSSharedWorker::mark):
45         Custom mark function that marks the internal MessagePort.
46         * bindings/v8/DOMObjectsInclude.h:
47         Updated to include new header files.
48         * bindings/v8/V8Index.cpp:
49         * bindings/v8/V8Index.h:
50         * bindings/v8/custom/V8AbstractWorkerCustom.cpp: Added.
51         (WebCore::getEventListener):
52         (WebCore::ACCESSOR_GETTER):
53         (WebCore::ACCESSOR_SETTER):
54         (WebCore::CALLBACK_FUNC_DECL):
55         V8 handlers for add/removeEventListener().
56         * bindings/v8/custom/V8CustomBinding.h:
57         * bindings/v8/custom/V8SharedWorkerCustom.cpp: Added.
58         (WebCore::CALLBACK_FUNC_DECL):
59         Custom constructor for SharedWorker.
60         * dom/EventTarget.cpp:
61         (WebCore::EventTarget::toSharedWorker):
62         * dom/EventTarget.h:
63         * page/DOMWindow.idl:
64         * workers/AbstractWorker.cpp: Added.
65         (WebCore::AbstractWorker::AbstractWorker):
66         Common base class for SharedWorker and (soon) Worker. The functions below were copied from Worker.cpp.
67         This is the first step in refactoring Worker to derive from AbstractWorker to enable code sharing.
68         (WebCore::AbstractWorker::~AbstractWorker):
69         (WebCore::AbstractWorker::addEventListener):
70         (WebCore::AbstractWorker::removeEventListener):
71         (WebCore::AbstractWorker::dispatchEvent):
72         (WebCore::AbstractWorker::dispatchLoadErrorEvent):
73         (WebCore::AbstractWorker::dispatchScriptErrorEvent):
74         * workers/AbstractWorker.h: Added.
75         Definitions of functionality shared by Worker.h and SharedWorker.h. In a future patch, Worker will derive from AbstractWorker.
76         (WebCore::AbstractWorker::scriptExecutionContext):
77         (WebCore::AbstractWorker::setOnerror):
78         (WebCore::AbstractWorker::onerror):
79         (WebCore::AbstractWorker::eventListeners):
80         (WebCore::AbstractWorker::refEventTarget):
81         (WebCore::AbstractWorker::derefEventTarget):
82         * workers/AbstractWorker.idl: Added.
83         * workers/SharedWorker.cpp: Added.
84         (WebCore::SharedWorker::SharedWorker):
85         (WebCore::SharedWorker::~SharedWorker):
86         * workers/SharedWorker.h: Added.
87         (WebCore::SharedWorker::create):
88         (WebCore::SharedWorker::port):
89         (WebCore::SharedWorker::toSharedWorker):
90         * workers/SharedWorker.idl: Added.
91
92 2009-07-13  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
93
94         Reviewed by Simon Hausmann.
95
96         [Qt] Cleanup - Remove prf install target
97         https://bugs.webkit.org/show_bug.cgi?id=27191
98
99         qtwebkit.prf has been removed; this cleans up the related
100         install target as well.
101
102         * WebCore.pro: Remove prf install target
103
104 2009-07-12  Adam Barth  <abarth@webkit.org>
105
106         Reviewed by Oliver Hunt.
107
108         Facebook Chat is broken due to XSS auditor
109         https://bugs.webkit.org/show_bug.cgi?id=27179
110
111         Instead of just using the script's URL as to detect an XSS attack, we
112         now use a bit of context before the URL.  In particular, we use the
113         bytes from the beginning of the attribute name to the end of the
114         attribute value.  In virtually all injection attacks, the attacker
115         would need to supply the attribute name as well as the attribute value.
116         However, in the Facebook false positive, the attribute name is not
117         present in the URL.
118
119         Tests: http/tests/security/xssAuditor/script-tag-src-redirect-safe.html
120                http/tests/security/xssAuditor/script-tag-with-source-double-quote.html
121                http/tests/security/xssAuditor/script-tag-with-source-no-quote.html
122
123         * html/HTMLTokenizer.cpp:
124         (WebCore::HTMLTokenizer::parseTag):
125         * html/HTMLTokenizer.h:
126         * page/XSSAuditor.cpp:
127         (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
128         * page/XSSAuditor.h:
129
130 2009-07-12  Keishi Hattori  <casey.hattori@gmail.com>
131
132         Reviewed by Timothy Hatcher.
133
134         Refactor ConsoleMessage to add MessageType attribute.
135         https://bugs.webkit.org/show_bug.cgi?id=20625
136
137         * bindings/js/JSCustomXPathNSResolver.cpp:
138         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
139         * bindings/js/JSDOMWindowBase.cpp:
140         (WebCore::JSDOMWindowBase::printErrorMessage):
141         * dom/Document.cpp:
142         (WebCore::Document::reportException):
143         (WebCore::Document::addMessage):
144         * dom/Document.h:
145         * dom/ScriptExecutionContext.h:
146         * html/HTMLParser.cpp:
147         (WebCore::HTMLParser::reportErrorToConsole):
148         * inspector/ConsoleMessage.cpp:
149         (WebCore::ConsoleMessage::ConsoleMessage):
150         (WebCore::ConsoleMessage::addToConsole):
151         (WebCore::ConsoleMessage::isEqual):
152         * inspector/ConsoleMessage.h:
153         * inspector/InspectorController.cpp:
154         (WebCore::InspectorController::addMessageToConsole):
155         (WebCore::InspectorController::startGroup):
156         (WebCore::InspectorController::endGroup):
157         (WebCore::InspectorController::addProfileFinishedMessageToConsole):
158         (WebCore::InspectorController::addStartProfilingMessageToConsole):
159         (WebCore::InspectorController::count):
160         * inspector/InspectorController.h:
161         * inspector/front-end/Console.js:
162         (WebInspector.Console.prototype.addMessage):
163         (WebInspector.ConsoleMessage): Added type property.
164         (WebInspector.ConsoleMessage.prototype.toMessageElement):
165         (WebInspector.ConsoleMessage.prototype.toString):
166         (WebInspector.ConsoleMessage.prototype.isEqual):
167         (WebInspector.ConsoleCommandResult):
168         (WebInspector.ConsoleGroup.prototype.addMessage):
169         (WebInspector.ConsoleGroup.prototype._titleClicked):
170         * inspector/front-end/Resource.js:
171         (WebInspector.Resource.prototype._addTip):
172         (WebInspector.Resource.prototype._checkWarning):
173         * inspector/front-end/inspector.css: Changed ".console-group-title-level" to ".console-group-title"
174         * inspector/front-end/inspector.js:
175         (WebInspector.addMessageToConsole):
176         * loader/DocLoader.cpp:
177         (WebCore::DocLoader::printAccessDeniedMessage):
178         * loader/EmptyClients.h:
179         (WebCore::EmptyChromeClient::addMessageToConsole):
180         * loader/FrameLoader.cpp:
181         (WebCore::FrameLoader::reportLocalLoadFailed):
182         (WebCore::FrameLoader::shouldAllowNavigation):
183         * page/ChromeClient.h:
184         * page/Console.cpp:
185         (WebCore::printMessageSourceAndLevelPrefix):
186         (WebCore::Console::addMessage):
187         (WebCore::Console::error):
188         (WebCore::Console::log):
189         (WebCore::Console::dir):
190         (WebCore::Console::trace):
191         (WebCore::Console::assertCondition):
192         (WebCore::Console::timeEnd):
193         (WebCore::Console::warn):
194         * page/Console.h: Added MessageType enum.
195         (WebCore::):
196         * page/DOMWindow.cpp:
197         (WebCore::DOMWindow::postMessageTimerFired):
198         * page/XSSAuditor.cpp:
199         (WebCore::XSSAuditor::canEvaluate):
200         (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
201         (WebCore::XSSAuditor::canLoadObject):
202         * svg/SVGDocumentExtensions.cpp:
203         (WebCore::SVGDocumentExtensions::reportWarning):
204         (WebCore::SVGDocumentExtensions::reportError):
205         * wml/WMLErrorHandling.cpp:
206         (WebCore::reportWMLError):
207         * workers/GenericWorkerTask.h: Added GenericWorkerTask8 for the extra argument.
208         (WebCore::GenericWorkerTask8::create):
209         (WebCore::GenericWorkerTask8::GenericWorkerTask8):
210         (WebCore::GenericWorkerTask8::performTask):
211         (WebCore::createCallbackTask):
212         * workers/WorkerContext.cpp:
213         (WebCore::WorkerContext::addMessage):
214         (WebCore::WorkerContext::importScripts):
215         * workers/WorkerContext.h:
216         * workers/WorkerMessagingProxy.cpp:
217         (WebCore::postConsoleMessageTask):
218         (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
219         * workers/WorkerMessagingProxy.h:
220         * workers/WorkerObjectProxy.h:
221         * xml/XMLHttpRequest.cpp:
222         (WebCore::reportUnsafeUsage):
223         (WebCore::XMLHttpRequest::didFinishLoading):
224         * xml/XSLTProcessor.cpp:
225         (WebCore::XSLTProcessor::parseErrorFunc):
226
227 2009-07-12  Nate Chapin  <japhet@chromium.org>
228
229         Reviewed by Dimitri Glazkov.
230
231         Upstream UndetectableHTMLCollection.idl as HTMLAllCollection.idl.
232
233         https://bugs.webkit.org/show_bug.cgi?id=27132
234
235         * bindings/scripts/CodeGeneratorV8.pm:
236         * bindings/v8/DOMObjectsInclude.h:
237         * bindings/v8/DerivedSourcesAllInOne.cpp:
238         * bindings/v8/V8DOMWrapper.cpp:
239         (WebCore::V8DOMWrapper::getTemplate):
240         (WebCore::V8DOMWrapper::instantiateV8Object):
241         * bindings/v8/V8Index.cpp:
242         * bindings/v8/V8Index.h:
243         * dom/HTMLAllCollection.idl: Added.
244
245 2009-07-12  Joseph Pecoraro  <joepeck02@gmail.com>
246
247         Reviewed by Maciej Stachowiak.
248
249         Inspector: Duplicate Computation in Autocompletion
250         https://bugs.webkit.org/show_bug.cgi?id=26778
251
252         * inspector/front-end/TextPrompt.js:
253         (WebInspector.TextPrompt.prototype._completionsReady):
254
255 2009-07-12  Dan Bernstein  <mitz@apple.com>
256
257         Reviewed by Maciej Stachowiak.
258
259         https://bugs.webkit.org/show_bug.cgi?id=27196
260         Rename bidi.cpp to RenderBlockLineLayout.cpp and remove bidi.h
261
262         * GNUmakefile.am: Updated.
263         * WebCore.gypi: Updated.
264         * WebCore.pro: Updated.
265         * WebCore.vcproj/WebCore.vcproj: Updated.
266         * WebCore.xcodeproj/project.pbxproj: Updated.
267         * WebCoreSources.bkl: Updated.
268         * rendering/RenderBlock.h: Removed unnecessary forward declaration and
269             updated comments.
270         * rendering/RenderBlockLineLayout.cpp: Copied from WebCore/rendering/bidi.cpp.
271             Removed unnecessary #include statements.
272         (WebCore::BidiRun::BidiRun): Moved here from bidi.h.
273         (WebCore::RenderBlock::layoutInlineChildren): Removed outdated comment.
274         * rendering/bidi.cpp: Removed.
275         * rendering/bidi.h: Removed.
276
277 2009-07-12  Dan Bernstein  <mitz@apple.com>
278
279         - Windows build fix
280
281         * platform/graphics/cg/PDFDocumentImage.cpp:
282         (WebCore::PDFDocumentImage::dataChanged):
283
284 2009-07-12  Dan Bernstein  <mitz@apple.com>
285
286         Reviewed by Sam Weinig.
287
288         - Image cleanup
289
290         * platform/graphics/BitmapImage.cpp:
291         (WebCore::BitmapImage::destroyDecodedData): Use the data() accessor
292         instead of the m_data member.
293         (WebCore::BitmapImage::dataChanged): Ditto.
294         * platform/graphics/Image.h: Re-ordered #includes and class
295         declarations. Removed the drawPatternCallback() declaration. Made member
296         variables private.
297         * platform/graphics/cg/ImageCG.cpp:
298         (WebCore::drawPatternCallback): Changed this from a member function to a
299         static function.
300         * platform/graphics/cg/PDFDocumentImage.cpp:
301         (WebCore::PDFDocumentImage::dataChanged): Use the data() accessor
302         instead of the m_data member.
303         * svg/graphics/SVGImage.cpp:
304         (WebCore::SVGImage::dataChanged): Ditto.
305
306 2009-07-12  Daniel Bates  <dbates@intudata.com>
307
308         Reviewed by Darin Adler.
309
310         https://bugs.webkit.org/show_bug.cgi?id=27189
311         
312         Fixes insufficient check in XSSAuditor::canSetBaseElementURL that caused 
313         XSSAuditor to incorrectly block HTML Base elements whose base path coincided 
314         with the URL of the page.
315
316         Test: http/tests/security/xssAuditor/base-href-safe3.html
317
318         * page/XSSAuditor.cpp:
319         (WebCore::XSSAuditor::canSetBaseElementURL): Changed conditional to only call 
320         XSSAuditor::findInRequest() if the host in the page URL disagrees with the host 
321         in the base element URL.
322
323 2009-07-12  Darin Adler  <darin@apple.com>
324
325         Reviewed by Dan Bernstein.
326
327         Text searching with ICU should take the user's default locale into account
328         https://bugs.webkit.org/show_bug.cgi?id=27184
329         rdar://problem/6812121
330
331         No simple way to test this since it's dependent on user locale.
332         After this, the user's default locale is used only on Mac.
333
334         * editing/TextIterator.cpp:
335         (WebCore::createSearcher): Pass result of the currentSearchLocaleID
336         function as the locale.
337
338         * platform/text/TextBreakIteratorInternalICU.h: Added declaration of
339         currentSearchLocaleID function.
340
341         * platform/text/android/TextBreakIteratorInternalICU.cpp:
342         (WebCore::currentSearchLocaleID): Added. Returns the empty string.
343         * platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp:
344         (WebCore::currentSearchLocaleID): Ditto.
345         * platform/text/gtk/TextBreakIteratorInternalICUGtk.cpp:
346         (WebCore::currentSearchLocaleID): Ditto.
347
348         * platform/text/mac/TextBreakIteratorInternalICUMac.mm:
349         (WebCore::textBreakLocalePreference): Added. Returns the value of
350         the AppleTextBreakLocale preference.
351         (WebCore::topLanguagePreference): Added. Returns the value of the
352         first item in the AppleLanguages preference.
353         (WebCore::canonicalLanguageIdentifier): Added. Cover for the
354         CFLocaleCreateCanonicalLanguageIdentifierFromString function.
355         (WebCore::getLocale): Added. Transfers the locale from a CFStringRef
356         into a buffer.
357         (WebCore::getSearchLocale): Added. Calls topLanguagePreference,
358         canonicalLanguageIdentifier, and getLocale.
359         (WebCore::currentSearchLocaleID): Added. Calls getSearchLocale once.
360         (WebCore::getTextBreakLocale): Changed to call
361         textBreakLocalePreference, topLanguagePreference,
362         canonicalLanguageIdentifier, and getLocale.
363
364         * platform/text/win/TextBreakIteratorInternalICUWin.cpp:
365         (WebCore::currentSearchLocaleID): Added. Returns the empty string.
366         * platform/wx/TemporaryLinkStubs.cpp:
367         (WebCore::currentSearchLocaleID): Ditto.
368
369 2009-07-12  Xan Lopez  <xlopez@igalia.com>
370
371         Reviewed by Gustavo Noronha.
372
373         https://bugs.webkit.org/show_bug.cgi?id=25415
374         [GTK][ATK] Please implement support for get_text_at_offset
375
376         Create a PangoLayout that properly represents the visual
377         appearance of the text in the web page so that the line boundary
378         modes of getText{At,Before,After}Offset work correctly.
379
380         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
381         (UTF16ToUTF8):
382         (g_substr):
383         (convertUniCharToUTF8):
384         (getPangoLayoutForAtk):
385
386 2009-07-11  Oliver Hunt  <oliver@apple.com>
387
388         Reviewed by Simon Fraser.
389
390         Bug 27187 - Match Gecko behaviour for canvas path mutation APIs on an empty path
391         <https://bugs.webkit.org/show_bug.cgi?id=27187>
392
393         Simple API change, check for the empty path and add appropriate point if necessary.
394
395         Test: fast/canvas/canvas-modify-emptyPath.html
396
397         * Info.plist:
398         * WebCore.xcodeproj/project.pbxproj:
399         * html/CanvasRenderingContext2D.cpp:
400         (WebCore::CanvasRenderingContext2D::lineTo):
401         (WebCore::CanvasRenderingContext2D::quadraticCurveTo):
402         (WebCore::CanvasRenderingContext2D::bezierCurveTo):
403
404 2009-07-11  Eric Carlson  <eric.carlson@apple.com>
405
406         Reviewed by Antti Koivisto.
407
408         HTMLMediaElement.canPlayType "maybe" and "probably" reversed
409         https://bugs.webkit.org/show_bug.cgi?id=27186
410
411         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
412         (WebCore::MediaPlayerPrivate::supportsType):
413             Return "probably" if type has codecs parameter.
414
415         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
416         (WebCore::MediaPlayerPrivate::supportsType):
417             Ditto.
418
419         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
420         (WebCore::MediaPlayerPrivate::supportsType):
421             Ditto.
422
423 2009-07-11  Brady Eidson  <beidson@apple.com>
424
425         Reviewed by Mark Rowe.
426
427         A worker-thread inspired follow-up for:
428         https://bugs.webkit.org/show_bug.cgi?id=26496 and <rdar://problem/7046520>
429         REGRESSION: XHR stream connection blocks iFrame loading and resource downloading
430
431         * xml/XMLHttpRequest.cpp:
432         (WebCore::XMLHttpRequest::loadRequestAsynchronously): Don't perform the XHR compensation when the XHR
433           is running on a worker thread. Accessing the global Cache data structures from a non-main thread is
434           not currently supported.
435
436 2009-07-11  Simon Fraser  <simon.fraser@apple.com>
437
438         Enable support for accelerated compositing and 3d transforms on Leopard.
439         <https://bugs.webkit.org/show_bug.cgi?id=20166>
440         <rdar://problem/6120614>
441
442         Reviewed by Oliver Hunt.
443
444         * Configurations/FeatureDefines.xcconfig:
445
446 2009-07-11  Simon Hausmann  <hausmann@webkit.org>
447
448         Fix the Qt build after r45724.
449
450         * bridge/qt/qt_instance.cpp:
451         (JSC::Bindings::QtRuntimeObjectImp::QtRuntimeObjectImp):
452         * bridge/qt/qt_runtime.cpp:
453         (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
454
455 2009-07-10  Daniel Bates  <dbates@intudata.com>
456
457         Reviewed by Adam Barth.
458
459         https://bugs.webkit.org/show_bug.cgi?id=26921
460
461         Implements support for HTML entities, so XSSAuditor can protect against attacks
462         encoded with HTML entities.
463
464         Tests: http/tests/security/xssAuditor/inline-event-HTML-entities.html
465                http/tests/security/xssAuditor/javascript-link-HTML-entities-control-char.html
466                http/tests/security/xssAuditor/javascript-link-HTML-entities-named.html
467                http/tests/security/xssAuditor/javascript-link-HTML-entities-null-char.html
468                http/tests/security/xssAuditor/javascript-link-HTML-entities.html
469                http/tests/security/xssAuditor/link-onclick-entities.html
470                http/tests/security/xssAuditor/script-tag-entities.html
471                http/tests/security/xssAuditor/script-tag-with-source-entities.html
472
473         * page/XSSAuditor.cpp:
474         (WebCore::XSSAuditor::canEvaluate):
475         (WebCore::XSSAuditor::canEvaluateJavaScriptURL):
476         (WebCore::XSSAuditor::decodeURL): Modified to call WebCore::XSSAuditor::decodeHTMLEntities
477         to decode HTML entities.
478         (WebCore::XSSAuditor::decodeHTMLEntities): Added method to decode HTML entities.
479         (WebCore::XSSAuditor::findInRequest):
480         * page/XSSAuditor.h:
481
482 2009-07-10  David Kilzer  <ddkilzer@apple.com>
483
484         Bug 27007: Build fixes when ICONDATABASE is disabled
485
486         <https://bugs.webkit.org/show_bug.cgi?id=27007>
487
488         Reviewed by Sam Weinig.
489
490         * WebCore.xcodeproj/project.pbxproj: Added IconDatabaseNone.cpp
491         to the project.
492         * loader/icon/IconDatabase.cpp: Added
493         #if ENABLE(ICONDATABASE)/#endif macro guard.
494         * loader/icon/IconDatabase.h: Removed three public methods from
495         #if ENABLE(ICONDATABASE)/#endif macro so that they may be
496         stubbed out in IconDatabaseNone.cpp.
497         * loader/icon/IconDatabaseNone.cpp: Added
498         #if !ENABLE(ICONDATABASE)/#endif macro guard.
499         (WebCore::IconDatabase::importIconURLForPageURL): Added.
500         (WebCore::IconDatabase::importIconDataForIconURL): Added.
501         (WebCore::IconDatabase::shouldStopThreadActivity): Added.
502
503 2009-07-10  Daniel Bates  <dbates@intudata.com>
504
505         Reviewed by Adam Barth.
506
507         https://bugs.webkit.org/show_bug.cgi?id=27151
508
509         Fixes issue where JavaScript URLs that contain null- and non-null control characters can
510         bypass XSSAuditor.
511
512         Tests: http/tests/security/xssAuditor/javascript-link-control-char.html
513                http/tests/security/xssAuditor/javascript-link-null-char.html
514                http/tests/security/xssAuditor/javascript-link.html
515
516         * bindings/js/ScriptController.cpp:
517         (WebCore::ScriptController::evaluate): Separated out logic for JavaScript URLs from 
518         inline scripts. For JavaScript URLs, calls XSSAuditor::canEvaluateJavaScriptURL.
519         * bindings/v8/ScriptController.cpp:
520         (WebCore::ScriptController::evaluate): Made similar changes to evaluate() as in
521         bindings/js/ScriptController.cpp.
522         * page/XSSAuditor.cpp:
523         (WebCore::XSSAuditor::canEvaluateJavaScriptURL): Separated out logic for JavaScript URLs
524         into its own method.
525         * page/XSSAuditor.h:
526
527 2009-07-10  Shinichiro Hamaji  <hamaji@chromium.org>
528
529         Reviewed by David Kilzer.
530
531         WebKit needs a style linting tool
532         https://bugs.webkit.org/show_bug.cgi?id=25884
533
534         Fix bunch of style issues by autofix of cpplint.
535         This patch is created to demonstrate the autofix of cpplint.py.
536
537         No new testcases because it's a style fix
538
539         * css/CSSParser.cpp:
540         (WebCore::CSSParser::parseMediaQuery):
541         (WebCore::CSSParser::validUnit):
542         (WebCore::CSSParser::parseValue):
543         (WebCore::skipCommaInDashboardRegion):
544         (WebCore::CSSParser::parseDashboardRegions):
545         (WebCore::ShadowParseContext::commitValue):
546         (WebCore::ShadowParseContext::commitLength):
547         (WebCore::ShadowParseContext::commitColor):
548         (WebCore::BorderImageParseContext::commitNumber):
549         (WebCore::BorderImageParseContext::commitWidth):
550         (WebCore::BorderImageParseContext::commitRule):
551         (WebCore::BorderImageParseContext::commitBorderImage):
552         (WebCore::CSSParser::lex):
553         (WebCore::CSSParser::text):
554         * css/CSSStyleSelector.cpp:
555         (WebCore::CSSStyleSelector::applyProperty):
556         * css/MediaList.cpp:
557         (WebCore::MediaList::deleteMedium):
558         * css/MediaQuery.h:
559         * css/MediaQueryEvaluator.cpp:
560         (WebCore::parseAspectRatio):
561         * css/MediaQueryEvaluator.h:
562         * css/MediaQueryExp.h:
563         (WebCore::MediaQueryExp::operator==):
564         * css/WebKitCSSMatrix.h:
565         * dom/Comment.h:
566         * dom/Document.cpp:
567         (WebCore::Document::setFocusedNode):
568         * dom/Document.h:
569         (WebCore::Document::setHasDashboardRegions):
570         * dom/DocumentFragment.cpp:
571         (WebCore::DocumentFragment::nodeName):
572         * dom/DocumentFragment.h:
573         * dom/DynamicNodeList.h:
574         * dom/EditingText.h:
575         * dom/Element.cpp:
576         (WebCore::Element::dispatchAttrAdditionEvent):
577         * dom/NamedAttrMap.cpp:
578         (WebCore::NamedNodeMap::item):
579         * dom/Node.cpp:
580         (WebCore::Node::nodeValue):
581         (WebCore::Node::nodeIndex):
582         * dom/NodeRareData.h:
583         (WebCore::NodeListsNodeData::create):
584         * dom/Notation.h:
585         * dom/ProcessingInstruction.h:
586         * dom/Range.cpp:
587         (WebCore::Range::processContents):
588         * dom/StyledElement.cpp:
589         (WebCore::toHex):
590         * dom/XMLTokenizerLibxml2.cpp:
591         (WebCore::PendingCallbacks::PendingStartElementNSCallback::~PendingStartElementNSCallback):
592         (WebCore::PendingCallbacks::PendingStartElementNSCallback::call):
593         (WebCore::PendingCallbacks::):
594         (WebCore::OffsetBuffer::readOutBytes):
595         (WebCore::handleElementNamespaces):
596         (WebCore::handleElementAttributes):
597         (WebCore::attributesStartElementNsHandler):
598         * dom/XMLTokenizerQt.cpp:
599         (WebCore::attributesStartElementNsHandler):
600         (WebCore::XMLTokenizer::parseStartElement):
601         * editing/ApplyStyleCommand.cpp:
602         (WebCore::ApplyStyleCommand::applyInlineStyle):
603         * editing/DeleteSelectionCommand.cpp:
604         (WebCore::DeleteSelectionCommand::removeNode):
605         * editing/Editor.cpp:
606         (WebCore::Editor::pasteAsPlainText):
607         * editing/SelectionController.cpp:
608         (WebCore::SelectionController::directionOfEnclosingBlock):
609         * editing/SmartReplaceICU.cpp:
610         (WebCore::addAllCodePoints):
611         * history/HistoryItem.cpp:
612         (WebCore::HistoryItem::icon):
613         (WebCore::HistoryItem::adoptVisitCounts):
614         * html/CanvasStyle.cpp:
615         (WebCore::CanvasStyle::applyFillColor):
616         * html/HTMLAnchorElement.cpp:
617         (WebCore::HTMLAnchorElement::setActive):
618         (WebCore::HTMLAnchorElement::isLiveLink):
619         * html/HTMLAppletElement.h:
620         * html/HTMLAudioElement.h:
621         * html/HTMLBRElement.h:
622         * html/HTMLBaseElement.h:
623         * html/HTMLBaseFontElement.h:
624         * html/HTMLDListElement.h:
625         * html/HTMLDirectoryElement.h:
626         * html/HTMLFieldSetElement.cpp:
627         (WebCore::HTMLFieldSetElement::HTMLFieldSetElement):
628         * html/HTMLFormElement.cpp:
629         (WebCore::HTMLFormElement::reset):
630         * html/HTMLHRElement.cpp:
631         (WebCore::HTMLHRElement::parseMappedAttribute):
632         * html/HTMLHeadElement.h:
633         * html/HTMLHtmlElement.h:
634         * html/HTMLImageElement.h:
635         (WebCore::HTMLImageElement::setLoadManually):
636         * html/HTMLInputElement.cpp:
637         (WebCore::HTMLInputElement::selection):
638         * html/HTMLIsIndexElement.h:
639         * html/HTMLMarqueeElement.cpp:
640         * html/HTMLMediaElement.h:
641         (WebCore::HTMLMediaElement::):
642         * html/HTMLMenuElement.h:
643         * html/HTMLMetaElement.h:
644         * html/HTMLModElement.h:
645         * html/HTMLOListElement.h:
646         * html/HTMLOptionElement.cpp:
647         (WebCore::HTMLOptionElement::childrenChanged):
648         * html/HTMLParamElement.h:
649         * html/HTMLQuoteElement.h:
650         * html/HTMLStyleElement.h:
651         * html/HTMLTableCaptionElement.h:
652         * html/HTMLTableCellElement.h:
653         * html/HTMLTableColElement.h:
654         * html/HTMLTableSectionElement.cpp:
655         (WebCore::HTMLTableSectionElement::deleteRow):
656         * html/HTMLTitleElement.h:
657         * html/HTMLTokenizer.cpp:
658         (WebCore::HTMLTokenizer::parseNonHTMLText):
659         (WebCore::HTMLTokenizer::parseEntity):
660         (WebCore::HTMLTokenizer::parseTag):
661         (WebCore::HTMLTokenizer::write):
662         * html/HTMLUListElement.h:
663         * html/HTMLVideoElement.h:
664         * html/TimeRanges.h:
665         (WebCore::TimeRanges::Range::Range):
666         * inspector/InspectorController.cpp:
667         (WebCore::InspectorController::enableResourceTracking):
668         (WebCore::InspectorController::disableResourceTracking):
669         * inspector/InspectorFrontend.cpp:
670         (WebCore::InspectorFrontend::newInspectorJSONObject):
671         * page/Console.cpp:
672         (WebCore::Console::addMessage):
673         * page/EventHandler.cpp:
674         (WebCore::EventHandler::handleMousePressEvent):
675         (WebCore::EventHandler::selectCursor):
676         (WebCore::EventHandler::defaultKeyboardEventHandler):
677         * page/Frame.cpp:
678         (WebCore::Frame::jsDefaultStatusBarText):
679         * page/android/DragControllerAndroid.cpp:
680         (WebCore::DragController::dragOperation):
681         * page/android/EventHandlerAndroid.cpp:
682         (WebCore::EventHandler::tabsToAllControls):
683         (WebCore::EventHandler::eventActivatedView):
684         * page/animation/AnimationController.cpp:
685         (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
686         * page/gtk/DragControllerGtk.cpp:
687         (WebCore::DragController::dragOperation):
688         * page/qt/DragControllerQt.cpp:
689         * page/win/DragControllerWin.cpp:
690         (WebCore::DragController::isCopyKeyDown):
691         * page/win/FrameWin.h:
692         * rendering/RenderSlider.cpp:
693         (WebCore::RenderSlider::mouseEventOffsetToThumb):
694         * rendering/style/RenderStyle.h:
695         (WebCore::InheritedFlags::setVerticalAlignLength):
696         (WebCore::InheritedFlags::setUnicodeBidi):
697         (WebCore::InheritedFlags::setCursor):
698         * rendering/style/RenderStyleConstants.h:
699         (WebCore::):
700         * rendering/style/SVGRenderStyleDefs.h:
701         * rendering/style/StyleInheritedData.h:
702         (WebCore::StyleInheritedData::operator!=):
703         * storage/DatabaseTask.h:
704         * svg/GradientAttributes.h:
705         * svg/LinearGradientAttributes.h:
706         * svg/PatternAttributes.h:
707         * svg/RadialGradientAttributes.h:
708         * svg/SVGAnimatedPathData.h:
709         * svg/SVGAnimatedPoints.h:
710         * svg/SVGAnimationElement.h:
711         * svg/SVGClipPathElement.h:
712         * svg/SVGElementInstance.h:
713         * svg/SVGFEBlendElement.cpp:
714         (WebCore::SVGFEBlendElement::build):
715         * svg/SVGFEBlendElement.h:
716         * svg/SVGFEColorMatrixElement.cpp:
717         (WebCore::SVGFEColorMatrixElement::build):
718         * svg/SVGFEComponentTransferElement.cpp:
719         (WebCore::SVGFEComponentTransferElement::build):
720         * svg/SVGFECompositeElement.cpp:
721         (WebCore::SVGFECompositeElement::build):
722         * svg/SVGFEDiffuseLightingElement.cpp:
723         (WebCore::SVGFEDiffuseLightingElement::build):
724         * svg/SVGFEDisplacementMapElement.cpp:
725         (WebCore::SVGFEDisplacementMapElement::build):
726         * svg/SVGFEDistantLightElement.h:
727         * svg/SVGFEFloodElement.cpp:
728         (WebCore::SVGFEFloodElement::build):
729         * svg/SVGFEFloodElement.h:
730         * svg/SVGFEFuncAElement.h:
731         * svg/SVGFEFuncBElement.h:
732         * svg/SVGFEFuncGElement.h:
733         * svg/SVGFEFuncRElement.h:
734         * svg/SVGFEGaussianBlurElement.cpp:
735         (WebCore::SVGFEGaussianBlurElement::build):
736         * svg/SVGFEImageElement.cpp:
737         (WebCore::SVGFEImageElement::build):
738         * svg/SVGFEMergeElement.cpp:
739         (WebCore::SVGFEMergeElement::build):
740         * svg/SVGFEOffsetElement.cpp:
741         (WebCore::SVGFEOffsetElement::build):
742         * svg/SVGFEPointLightElement.h:
743         * svg/SVGFESpecularLightingElement.cpp:
744         (WebCore::SVGFESpecularLightingElement::build):
745         * svg/SVGFESpotLightElement.h:
746         * svg/SVGFETileElement.cpp:
747         (WebCore::SVGFETileElement::build):
748         * svg/SVGLineElement.cpp:
749         (WebCore::SVGLineElement::parseMappedAttribute):
750         * svg/SVGList.h:
751         * svg/SVGListTraits.h:
752         (WebCore::):
753         * svg/SVGMPathElement.h:
754         * svg/SVGMetadataElement.h:
755         * svg/SVGParserUtilities.cpp:
756         (WebCore::SVGPathParser::parseSVG):
757         (WebCore::SVGPathParser::calculateArc):
758         * svg/SVGPathElement.h:
759         * svg/SVGPathSegClosePath.h:
760         * svg/SVGSVGElement.h:
761         * svg/SVGSetElement.h:
762         * svg/SVGSwitchElement.h:
763         * svg/SVGTextPathElement.cpp:
764         (WebCore::SVGTextPathElement::parseMappedAttribute):
765         * svg/SVGTextPathElement.h:
766         * svg/SVGTitleElement.h:
767         * svg/SVGTransformable.cpp:
768         (WebCore::):
769         * svg/SVGViewSpec.cpp:
770         (WebCore::):
771         * svg/animation/SMILTime.cpp:
772         (WebCore::operator+):
773         (WebCore::operator-):
774         (WebCore::operator*):
775         * svg/animation/SVGSMILElement.h:
776         * svg/graphics/SVGResource.cpp:
777         (WebCore::clientMap):
778         * wml/WMLPostfieldElement.cpp:
779         (WebCore::WMLPostfieldElement::value):
780         * wml/WMLSetvarElement.cpp:
781         (WebCore::WMLSetvarElement::value):
782         * workers/WorkerRunLoop.cpp:
783         * xml/XMLHttpRequest.cpp:
784         (WebCore::XMLHttpRequest::dropProtection):
785         * xml/XPathPath.h:
786
787 2009-07-10  Eric Carlson  <eric.carlson@apple.com>
788
789         Reviewed by Simon Fraser.
790
791         <rdar://problem/7049066>.
792         Update SnowLeopard media controller layout.
793
794         * css/mediaControlsQT.css:
795             Update for new layout.
796         * html/HTMLMediaElement.cpp:
797         (WebCore::HTMLMediaElement::movieLoadType):
798             Added to replace isStreaming.
799         * html/HTMLMediaElement.h:
800             Declare movieLoadType, remove isStreaming.
801
802         * rendering/MediaControlElements.cpp:
803         (WebCore::MediaControlStatusDisplayElement::update):
804             Use movieLoadType instead of isStreaming.
805         (WebCore::MediaControlTimelineContainerElement::rendererIsNeeded):
806             MediaControlElement is the base class, not HTMLInputElement.
807         (WebCore::MediaControlStatusDisplayElement::rendererIsNeeded):
808             Ditto.
809         (WebCore::MediaControlRewindButtonElement::rendererIsNeeded):
810             Don't display rewind button for live streams.
811         (WebCore::MediaControlReturnToRealtimeButtonElement::rendererIsNeeded):
812             MediaControlInputElement is the base class, not HTMLInputElement.
813         * rendering/MediaControlElements.h:
814
815         * rendering/RenderThemeMac.h:
816         * rendering/RenderThemeMac.mm:
817         (WebCore::getMediaUIPartStateFlags):
818             New, return wkDrawMediaUIPart flags.
819         (WebCore::RenderThemeMac::paintMediaFullscreenButton):
820         (WebCore::RenderThemeMac::paintMediaMuteButton):
821         (WebCore::RenderThemeMac::paintMediaPlayButton):
822         (WebCore::RenderThemeMac::paintMediaSeekBackButton):
823         (WebCore::RenderThemeMac::paintMediaSeekForwardButton):
824         (WebCore::RenderThemeMac::paintMediaSliderTrack):
825         (WebCore::RenderThemeMac::paintMediaSliderThumb):
826         (WebCore::RenderThemeMac::paintMediaRewindButton):
827         (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton):
828         (WebCore::RenderThemeMac::paintMediaControlsBackground):
829         (WebCore::RenderThemeMac::paintMediaCurrentTime):
830         (WebCore::RenderThemeMac::paintMediaTimeRemaining):
831             Use getMediaUIPartStateFlags.
832
833 2009-07-10  Michelangelo De Simone  <micdesim@gmail.com>
834
835         Reviewed by Adele Peterson.
836
837         https://bugs.webkit.org/show_bug.cgi?id=19562
838         Added build stuff and stub for the ValidityState class, part of HTML5
839         section Forms:
840         http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#validitystate
841
842         Test: fast/forms/ValidityState-001.html
843
844         * DerivedSources.cpp: Fix aimed to include ValidityState files
845         * DerivedSources.make: ditto
846         * GNUmakefile.am: ditto
847         * WebCore.gypi: ditto
848         * WebCore.pro: ditto
849         * WebCore.vcproj/WebCore.vcproj: ditto
850         * WebCore.xcodeproj/project.pbxproj: ditto
851         * WebCoreSources.bkl: ditto
852         * html/HTMLButtonElement.idl: "validity" attribute
853         * html/HTMLFieldSetElement.idl: ditto
854         * html/HTMLFormControlElement.cpp: object getter
855         (WebCore::HTMLFormControlElement::validity):
856         * html/HTMLFormControlElement.h: ditto
857         * html/HTMLInputElement.idl: "validity" attribute
858         * html/HTMLSelectElement.idl: ditto
859         * html/HTMLTextAreaElement.idl: ditto
860         * html/ValidityState.cpp: Added.
861         (WebCore::ValidityState::ValidityState):
862         (WebCore::ValidityState::valid): validation flag
863         * html/ValidityState.h: Added.
864         (WebCore::ValidityState::create): creation routine
865         (WebCore::ValidityState::control): ValidityState's parent getter
866         (WebCore::ValidityState::valueMissing): validation flag
867         (WebCore::ValidityState::typeMismatch): ditto
868         (WebCore::ValidityState::patternMismatch): ditto
869         (WebCore::ValidityState::tooLong): ditto
870         (WebCore::ValidityState::rangeUnderflow): ditto
871         (WebCore::ValidityState::rangeOverflow): ditto
872         (WebCore::ValidityState::stepMismatch): ditto
873         (WebCore::ValidityState::customError): ditto
874         * html/ValidityState.idl: Added.
875
876 2009-07-10  Brady Eidson  <beidson@apple.com>
877
878         Style cleanup over my last patch.
879
880         * xml/XMLHttpRequest.cpp:
881         (WebCore::XMLHttpRequest::~XMLHttpRequest):
882
883 2009-07-10  Kevin McCullough  <kmccullough@apple.com>
884
885         Reviewed by Geoffrey Garen.
886
887         * inspector/JavaScriptCallFrame.cpp:
888         (WebCore::JavaScriptCallFrame::dynamicGlobalObject):
889         * inspector/JavaScriptCallFrame.h: New helper method, used below.
890
891         * inspector/JavaScriptDebugServer.cpp:
892         (WebCore::JavaScriptDebugServer::detach): In the special case
893         where we detach from a window currently executing JavaScript,
894         manually tear down our representation of the JavaScript
895         call stack, since we won't get any more callbacks from JavaScriptCore
896         to automatically tear it down. It's too bad that WebCore is
897         responsible for this kind of tracking -- in the future, it would
898         be nice if more of the breakpoint handling was inside of JavaScriptCore.
899
900 2009-07-10  Brady Eidson  <beidson@apple.com>
901
902         Reviewed by Antti Koivisto.
903
904         https://bugs.webkit.org/show_bug.cgi?id=26496 and <rdar://problem/7046520>
905         REGRESSION: XHR stream connection blocks iFrame loading and resource downloading
906
907         With this test we ended up going over the maximum-connections-per-host limit that CFNetwork expected.
908         When that happened, the first request that was over the limit ended up in a bizarre state where it 
909         wasn't fully serviced until after the long running XHR was complete.
910
911         Loader and Loader::Host work together to try to not exceed the max-connection limit but non-cache
912         resources - such as XHR - could still end up causing this limit to be exceeded.
913
914         This fix adds a workaround specifically for XHR while we hash out a more thorough solution that will
915         handle this at the resource handle level.
916
917         * loader/loader.cpp:
918         (WebCore::Loader::nonCacheRequestInFlight):
919         (WebCore::Loader::nonCacheRequestComplete):
920         (WebCore::Loader::Host::Host):
921         (WebCore::Loader::Host::nonCacheRequestInFlight):
922         (WebCore::Loader::Host::nonCacheRequestComplete):
923         (WebCore::Loader::Host::servePendingRequests): Take nonCacheRequestsInFlight into account.
924         * loader/loader.h:
925         (WebCore::Loader::Host::processingResource): Take nonCacheRequestsInFlight into account.
926
927         * xml/XMLHttpRequest.cpp:
928         (WebCore::XMLHttpRequest::XMLHttpRequest):
929         (WebCore::XMLHttpRequest::~XMLHttpRequest): 
930         (WebCore::XMLHttpRequest::loadRequestAsynchronously): Bump the nonCacheRequestInFlight count.
931         (WebCore::XMLHttpRequest::didFail): Decrement that count if the Loader was notified.
932         (WebCore::XMLHttpRequest::didFinishLoading): Ditto.
933
934 2009-07-10  Antti Koivisto  <antti@apple.com>
935
936         Try to unbreak non-Mac build.
937
938         * page/ChromeClient.h:
939         (WebCore::ChromeClient::formDidFocus):
940         (WebCore::ChromeClient::formDidBlur):
941
942 2009-07-10  Beth Dakin  <bdakin@apple.com>
943
944         Reviewed by Anders Carlsson.
945
946         The rest of the fix for <rdar://problem/7038831> REGRESSION (TOT): 
947         In Mail, a crash occurs at WebCore::Widget::afterMouseDown() after 
948         clicking To Do's close box
949
950         Make the Widget* in passMouseDownEventToWidget() a RefPtr.
951
952         * page/mac/EventHandlerMac.mm:
953         (WebCore::EventHandler::passMouseDownEventToWidget):
954
955 2009-07-10  Eric Seidel  <eric@webkit.org>
956
957         Reviewed by Adam Barth.
958
959         rename getDOMStructure calls w/o JSGlobalObject* to deprecatedGetDOMStructure
960         https://bugs.webkit.org/show_bug.cgi?id=27157
961
962         This is the first step to fixing
963         https://bugs.webkit.org/show_bug.cgi?id=27088
964
965         * WebCore.xcodeproj/project.pbxproj:
966         * bindings/js/JSDOMBinding.h:
967         (WebCore::deprecatedGetDOMStructure):
968         (WebCore::createDOMObjectWrapper):
969         (WebCore::createDOMNodeWrapper):
970         * bindings/js/JSNamedNodesCollection.cpp:
971         (WebCore::JSNamedNodesCollection::JSNamedNodesCollection):
972         * bindings/js/JSRGBColor.cpp:
973         (WebCore::JSRGBColor::JSRGBColor):
974         * bridge/objc/objc_runtime.mm:
975         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
976         * bridge/runtime_array.cpp:
977         (JSC::RuntimeArray::RuntimeArray):
978         * bridge/runtime_method.cpp:
979         (JSC::RuntimeMethod::RuntimeMethod):
980         * bridge/runtime_object.cpp:
981         (JSC::RuntimeObjectImp::RuntimeObjectImp):
982
983 2009-07-10  Greg Bolsinga  <bolsinga@apple.com>
984
985         Reviewed by Antti Koivisto.
986
987         Add delegate methods about focus and blur and state change
988         https://bugs.webkit.org/show_bug.cgi?id=27153
989
990         Call the appropriate new ChromeClient methods for focus and blur.
991
992         * html/HTMLFormControlElement.cpp:
993         (WebCore::HTMLFormControlElement::dispatchFocusEvent):
994         (WebCore::HTMLFormControlElement::dispatchBlurEvent):
995         * html/HTMLFormControlElement.h:
996         * loader/EmptyClients.h:
997         (WebCore::EmptyChromeClient::formDidFocus):
998         (WebCore::EmptyChromeClient::formDidBlur):
999         * page/ChromeClient.h:
1000
1001 2009-07-10  Steve Falkenburg  <sfalken@apple.com>
1002
1003         <rdar://problem/7048741> REGRESSION: Error about missing SwMenuX.dll opening pages with Shockwave
1004         
1005         Use altered search path while loading plug-ins. This modifies the DLL search order
1006         to look in the directory containing the plug-in even if a call to SetDllDirectory
1007         was previously made. Use of SetDllDirectory removes the current directory from the search path,
1008         breaking the previous strategy for locating any dependent DLLs of the plug-in.
1009         
1010         Reviewed by Jon Honeycutt.
1011
1012         * plugins/win/PluginPackageWin.cpp:
1013         (WebCore::PluginPackage::load): Use LoadLibraryEx with LOAD_WITH_ALTERED_SEARCH_PATH
1014
1015 2009-07-10  Adam Roben  <aroben@apple.com>
1016
1017         Sort all our Xcode projects
1018
1019         Accomplished using sort-Xcode-project-file.
1020
1021         Requested by Dave Kilzer.
1022
1023         * WebCore.xcodeproj/project.pbxproj:
1024
1025 2009-07-10  Adam Langley  <agl@google.com>
1026
1027         Reviewed by Darin Fisher.
1028
1029         Chromium Linux: use disabled images for disabled widgets.
1030
1031         https://bugs.webkit.org/show_bug.cgi?id=27106
1032
1033         Previously, checkboxes and radio controls rendered the same even if disabled.
1034         The Chromium side of this change is r20224.
1035
1036         * rendering/RenderThemeChromiumSkia.cpp:
1037         (WebCore::RenderThemeChromiumSkia::paintCheckbox):
1038         (WebCore::RenderThemeChromiumSkia::paintRadio):
1039
1040 2009-07-10  Simon Fraser  <simon.fraser@apple.com>
1041
1042         Reviewed by John Sullivan.
1043
1044         Fix crash when changing the zoom level in http://iphone.akamai.com/
1045         <rdar://problem/7029077>
1046
1047         RenderLayerBacking's paintIntoLayer() method called updateLayerListsIfNeeded(),
1048         which could potentially destroy that compositing layer, causing a crash.
1049         Prevent this from happening by not doing a compositing update from paintIntoLayer().
1050
1051         The existing updateLayerListsIfNeeded() was renamed to updateCompositingAndLayerListsIfNeeded(),
1052         and still does the compositing update. The new updateLayerListsIfNeeded() does not touch
1053         compositing layers, and is still called from paintIntoLayer().
1054         
1055         * rendering/RenderLayer.cpp:
1056         (WebCore::RenderLayer::paintLayer):
1057         (WebCore::RenderLayer::hitTestLayer):
1058         (WebCore::RenderLayer::updateLayerListsIfNeeded):
1059         (WebCore::RenderLayer::updateCompositingAndLayerListsIfNeeded):
1060         * rendering/RenderLayer.h:
1061
1062 2009-07-10  Drew Wilson  <atwilson@google.com>
1063
1064         Reviewed by Darin Adler.
1065
1066         Need to remove UsesManualToJSImplementation() in favor of CustomToJS.
1067         https://bugs.webkit.org/show_bug.cgi?id=27010
1068
1069         Added support for CustomToJS IDL attribute to replace the hard-coded class list in UsesManualToJSImplementation().
1070
1071         This is just a cleanup of existing functionality, so existing LayoutTests adequately cover this patch.
1072
1073         * bindings/scripts/CodeGeneratorJS.pm:
1074         Removed UsesManualToJSImplementation(), added support for CustomToJS attribute.
1075         * css/CSSRule.idl:
1076         * css/CSSValue.idl:
1077         * css/StyleSheet.idl:
1078         * dom/Document.idl:
1079         * dom/Event.idl:
1080         * dom/Node.idl:
1081         * html/ImageData.idl:
1082         * svg/SVGElementInstance.idl:
1083         * svg/SVGPathSeg.idl:
1084         Added CustomToJS attribute to all the above IDL files.
1085
1086 2009-07-10  Dan Bernstein  <mitz@apple.com>
1087
1088         - fix the build by reverting the ill-advised r45711
1089
1090         * page/FrameView.cpp:
1091         (WebCore::FrameView::scrollToAnchor):
1092
1093 2009-07-09  Brian Weinstein  <bweinstein@apple.com>
1094
1095         Reviewed by Tim Hatcher.
1096
1097         Updated WebCore.base.exp to add some needed functions.
1098
1099         * WebCore.base.exp:
1100
1101 2009-07-10  Dan Bernstein  <mitz@apple.com>
1102
1103         - address a review comment from Simon Fraser which I forgot to include
1104           in the last check-in
1105
1106         * page/FrameView.cpp:
1107         (WebCore::FrameView::scrollToAnchor): Pass true to getRect() for
1108         maximum transform friendliness!
1109
1110 2009-07-10  Dan Bernstein  <mitz@apple.com>
1111
1112         Reviewed by Simon Fraser.
1113
1114         - fix https://bugs.webkit.org/show_bug.cgi?id=27137
1115           <rdar://problem/7043124> REGRESSION (r44311): Reproducible crash due
1116           to infinite recursion into FrameLoader::gotoAnchor() ->
1117           FrameView::layout()
1118
1119         Test: fast/loader/goto-anchor-infinite-layout.html
1120
1121         * loader/FrameLoader.cpp:
1122         (WebCore::FrameLoader::gotoAnchor): Moved the code to update layout,
1123         find the renderer to scroll to, and scroll from here to methods on
1124         FrameView, and replaced it with a call to
1125         FrameView::maintainScrollPositionAtAnchor().
1126         (WebCore::FrameLoader::completed): Call maintainScrollPositionAtAnchor()
1127         instead of setLockedToAnchor().
1128
1129         * page/FrameView.cpp:
1130         (WebCore::FrameView::FrameView): Removed initialization of
1131         m_lockedToAnchor.
1132         (WebCore::FrameView::reset): Reset m_maintainScrollPositionAnchor instead
1133         of m_lockedToAnchor.
1134         (WebCore::FrameView::layout): Removed the code related to scrolling to
1135         the anchor from here, because scrolling can trigger events which
1136         invalidate the layout, and as such, belongs with the post-layout tasks.
1137         (WebCore::FrameView::maintainScrollPositionAtAnchor): Added. When called
1138         with a node scrolls the view to the top of that node and maintains it
1139         scrolled to the top of the node during subsequent layouts, until
1140         this function is called with 0 or other things trigger scrolling.
1141         (WebCore::FrameView::scrollRectIntoViewRecursively): Reset
1142         m_maintainScrollPositionAnchor.
1143         (WebCore::FrameView::setScrollPosition): Ditto.
1144         (WebCore::FrameView::scrollToAnchor): Added. Scrolls to the top of
1145         m_maintainScrollPositionAnchor, if it is set.
1146         (WebCore::FrameView::performPostLayoutTasks): Call scrollToAnchor().
1147         (WebCore::FrameView::setWasScrolledByUser): Reset
1148         m_maintainScrollPositionAnchor.
1149
1150         * page/FrameView.h: Removed lockedToAnchor(), setLockedToAnchor(),
1151         and m_lockedToAnchor. Added maintainScrollPositionAtAnchor() and
1152         m_maintainScrollPositionAnchor.
1153
1154 2009-07-04  Sriram Yadavalli  <sriram.yadavalli@nokia.com>
1155
1156         Reviewed by Simon Hausmann.
1157
1158         https://bugs.webkit.org/show_bug.cgi?id=26439
1159
1160         QtWebKit fails in loading www.nytimes.com in Windows/Linux
1161
1162         QNetworkReplyHandler is ignoring content associated with 401 error.
1163         This causes the XHR response handling to fail.
1164
1165         Simon: Added also ProxyAuthenticationRequiredError, to handle the same
1166         case when going through proxies, as suggested by Prasanth.
1167
1168         * platform/network/qt/QNetworkReplyHandler.cpp:
1169         (WebCore::QNetworkReplyHandler::finish):
1170
1171 2009-07-10  Simon Hausmann  <simon.hausmann@nokia.com>
1172
1173         Reviewed by Holger Freyther.
1174
1175         Enable HTML 5 Messaging to fix message channel Qt DRT failures in
1176         fast/events.
1177
1178         * WebCore.pro:
1179
1180 2009-07-09  Roland Steiner  <rolandsteiner@google.com>
1181
1182         Reviewed by Maciej Stachowiak.
1183
1184         added InlineBox::isLeaf()
1185         firstLeafChild()/lastLeafChild() not virtual and not callable on InlineBox anymore.
1186         firstLeafChild()/lastLeafChild() will no longer return a node outside of the given subtree.   
1187         Removed firstLeafChildAfterBox()/lastLeafChildBeforeBox()
1188         Removed potentially quadratic behavior if all nodes before/after a given box are empty InlineFlowBoxes
1189
1190         Currently, these methods are called on RootInlineBox objects only, so above changes should not have
1191         any observable effect (only the removal of the square performance behavior could apply, 
1192         but the conditions for that are probably of a rather theoretical nature).
1193
1194         * rendering/InlineBox.cpp:
1195         (WebCore::InlineBox::nextLeafChild):
1196         (WebCore::InlineBox::prevLeafChild):
1197         * rendering/InlineBox.h:
1198         (WebCore::InlineBox::isLeaf):
1199         * rendering/InlineFlowBox.cpp:
1200         (WebCore::InlineFlowBox::firstLeafChild):
1201         (WebCore::InlineFlowBox::lastLeafChild):
1202         * rendering/InlineFlowBox.h:
1203         (WebCore::InlineFlowBox::firstChild):
1204         (WebCore::InlineFlowBox::lastChild):
1205         (WebCore::InlineFlowBox::isLeaf):
1206         * rendering/RootInlineBox.cpp:
1207         (WebCore::RootInlineBox::closestLeafChildForXPos):
1208
1209 2009-07-09  Roland Steiner  <rolandsteiner@google.com>
1210
1211         Reviewed by Maciej Stachowiak.
1212
1213         Added InlineBox::baselinePosition() and lineHeight() methods
1214         (adapted remaining code accordingly to use those methods)
1215
1216         No change in functionality.
1217
1218         * rendering/InlineBox.h:
1219         (WebCore::InlineBox::baselinePosition):
1220         (WebCore::InlineBox::lineHeight):
1221         * rendering/InlineFlowBox.cpp:
1222         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
1223         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
1224         (WebCore::InlineFlowBox::placeBoxesVertically):
1225
1226 2009-07-09  Oliver Hunt  <oliver@apple.com>
1227
1228         Reviewed by Maciej Stachowiak.
1229
1230         Bug 27142 - canPlayType() should return empty string for unsupported content
1231         <https://bugs.webkit.org/show_bug.cgi?id=27142>
1232
1233         Return "" instead of "no" for unsupport media types. 
1234
1235         * html/HTMLMediaElement.cpp:
1236         (WebCore::HTMLMediaElement::canPlayType):
1237
1238 2009-07-09  Roland Steiner  <rolandsteiner@google.com>
1239
1240         Reviewed by Maciej Stachowiak.
1241
1242         Implement the part of HTML5 spec that deals with parsing of <rp> and <rt> tags
1243         in that their end tags are optional if followed by <rp>/<rt>.
1244
1245         Also specify a new accessibility role "annotation" for <rp> and <rt>.
1246
1247         Affected code parts are not enclosed in #IF ENABLE(RUBY), since the parsing
1248         is not affected by whether ruby is rendered properly or not (in fact, it may 
1249         be more profound without ruby layouting, since the contents of <rp> are not hidden).
1250
1251         Test: fast/ruby/parse-rp.html
1252
1253         * accessibility/AccessibilityObject.h:
1254         (WebCore::):
1255         * accessibility/AccessibilityRenderObject.cpp:
1256         (WebCore::AccessibilityRenderObject::roleValue):
1257         * html/HTMLElement.cpp:
1258         (WebCore::HTMLElement::endTagRequirement):
1259         (WebCore::HTMLElement::tagPriority):
1260         (WebCore::inlineTagList):
1261         * html/HTMLParser.cpp:
1262         (WebCore::HTMLParser::rpCreateErrorCheck):
1263         (WebCore::HTMLParser::rtCreateErrorCheck):
1264         (WebCore::HTMLParser::getNode):
1265         * html/HTMLParser.h:
1266         * html/HTMLTagNames.in:
1267
1268 2009-07-09  Dmitry Titov  <dimich@chromium.org>
1269
1270         Not reviewed, fix for previous commit.
1271
1272         The change http://trac.webkit.org/changeset/45695 did not correctly
1273         enabled GTL and QT build flags. This caused layout tests failure.
1274         This is speculative fix for those failures.
1275
1276         * GNUmakefile.am: added ENABLE_CHANNEL_MESSAGING flag.
1277         * WebCore.pro: ditto.
1278         * page/DOMWindow.idl: touched to cause recompile.
1279         * workers/WorkerContext.idl: ditto.
1280
1281 2009-07-09  Drew Wilson  <atwilson@google.com>
1282
1283         Reviewed by Alexey Proskuryakov.
1284
1285         https://bugs.webkit.org/show_bug.cgi?id=26903
1286
1287         Turned on CHANNEL_MESSAGING by default because the MessageChannel API
1288         is now implemented for Web Workers and is reasonably stable.
1289
1290         Tests: fast/events/message-channel-gc-2.html
1291                fast/events/message-channel-gc-3.html
1292                fast/events/message-channel-gc-4.html
1293                fast/events/message-channel-gc.html
1294                fast/events/message-channel-listener-circular-ownership.html
1295                fast/events/message-port-clone.html
1296                fast/events/message-port-constructor-for-deleted-document.html
1297                fast/events/message-port-deleted-document.html
1298                fast/events/message-port-deleted-frame.html
1299                fast/events/message-port-inactive-document.html
1300                fast/events/message-port-no-wrapper.html
1301                fast/events/message-port.html
1302                fast/workers/worker-cloneport.html
1303                fast/workers/worker-messageport-gc.html
1304                fast/workers/worker-messageport.html
1305
1306         * Configurations/FeatureDefines.xcconfig: Turned on ENABLE_CHANNEL_MESSAGING.
1307         * WebCore/WebCore.vcproj/WebCoreCommon.vsprops: ditto.
1308         * WebCore/WebCore.vcproj/build-generated-files.sh: ditto.
1309         * WebCore/page/DOMWindow.idl: touch the file to cause re-generation of headers.
1310         * WebCore/workers/WorkerContext.idl: ditto.
1311
1312
1313 2009-07-09  Pierre d'Herbemont  <pdherbemont@apple.com>
1314
1315         Reviewed by Simon Fraser.
1316
1317         Full page zoom breaks remaining and elapsed time display in the <video> controller.
1318         https://bugs.webkit.org/show_bug.cgi?id=27123
1319
1320         We are changing the size of the time remaining and time elapsed field, to
1321         automatically hide them, when the controller is too short.
1322
1323         Because we toggle the size between 0 and the previous value of the
1324         controller, we miss any width change that may occur during full page zoom,
1325         and we fail to restore a correct width.
1326
1327         This change fixes that problem by using a cloned style on which we
1328         set the width to 0, and restoring the previous style when going back to
1329         the normal width.
1330
1331         We take care about properly using the cloned style or the pseudo style,
1332         by overriding styleForElement().
1333
1334         * rendering/MediaControlElements.cpp:
1335         (WebCore::MediaControlElement::styleForElement):
1336         (WebCore::MediaControlElement::attach):
1337         (WebCore::MediaControlElement::updateStyle):
1338         (WebCore::MediaControlInputElement::styleForElement):
1339         (WebCore::MediaControlInputElement::attach):
1340         (WebCore::MediaControlInputElement::updateStyle):
1341         (WebCore::MediaControlTimeDisplayElement::MediaControlTimeDisplayElement):
1342         (WebCore::MediaControlTimeDisplayElement::styleForElement):
1343         (WebCore::MediaControlTimeDisplayElement::setVisible):
1344         * rendering/MediaControlElements.h:
1345         * rendering/RenderMedia.cpp:
1346         (WebCore::RenderMedia::shouldShowTimeDisplayControls): Make sure
1347         we take in account the zoom level when deciding if we should hide the 
1348         ellapsed and remaining time.
1349
1350 2009-07-09  Michael Nordman  <michaeln@google.com>
1351
1352         Reviewed by Darin Adler.
1353
1354         Fix chromium build bustage due to Widget being a RefCounted class.
1355         https://bugs.webkit.org/show_bug.cgi?id=27139
1356
1357         * platform/chromium/PopupMenuChromium.cpp:
1358         * platform/chromium/PopupMenuChromium.h:
1359
1360 2009-07-09  Chris Fleizach  <cfleizach@apple.com>
1361
1362         Reviewed by Darin Adler.
1363
1364         Bug 27130 - Need to implement ARIA role="toolbar"
1365         https://bugs.webkit.org/show_bug.cgi?id=27130
1366
1367         Test: platform/mac/accessibility/aria-toolbar.html
1368
1369         * accessibility/AccessibilityRenderObject.cpp:
1370         (WebCore::RoleEntry::):
1371         * accessibility/mac/AccessibilityObjectWrapper.mm:
1372         (-[AccessibilityObjectWrapper roleDescription]):
1373
1374 2009-07-09  Dimitri Glazkov  <dglazkov@chromium.org>
1375
1376         Reviewed by Darin Fisher.
1377
1378         [Chromium] Upstream WebCore.gypi, the project file for Chromium build.
1379         https://bugs.webkit.org/show_bug.cgi?id=27135
1380
1381         * WebCore.gypi: Added.
1382
1383 2009-07-09  Jon Honeycutt  <jhoneycutt@apple.com>
1384
1385         A more robust fix for <rdar://problem/6930280> Reproducible crash at
1386         USA Today photo gallery
1387
1388         Reviewed by Steve Falkenburg.
1389
1390         * plugins/win/PluginMessageThrottlerWin.cpp:
1391         (WebCore::PluginMessageThrottlerWin::messageThrottleTimerFired):
1392         Protect the PluginView from destruction before calling its window proc.
1393
1394 2009-07-09  Jon Honeycutt  <jhoneycutt@apple.com>
1395
1396         <rdar://problem/6978804> WER #16: Repro Access Violation in
1397         WebCore::PluginView::bindingInstance (1310178023)
1398
1399         Reviewed by Darin Adler.
1400
1401         * plugins/PluginView.cpp:
1402         (WebCore::PluginView::bindingInstance):
1403         Protect the PluginView from destruction before calling NPN_GetValue. If
1404         the renderer for the PluginView was destroyed during the call, and the
1405         PluginView's ref count is now 1, return null.
1406
1407 2009-07-09  Jon Honeycutt  <jhoneycutt@apple.com>
1408
1409         Speculative fix for <rdar://problem/6991251> WER #13: Crash in
1410         WebKit!WebCore::PluginView::performRequest+203 (1311461169)
1411
1412         Reviewed by Darin Adler.
1413
1414         * plugins/PluginView.cpp:
1415         (WebCore::PluginView::performRequest):
1416         Protect the PluginView from destruction before performing a load.
1417         Removed some trailing whitespace.
1418
1419 2009-07-09  Jon Honeycutt  <jhoneycutt@apple.com>
1420
1421         Build fix.
1422
1423         * inspector/JavaScriptDebugServer.cpp:
1424         (WebCore::JavaScriptDebugServer::setJavaScriptPaused):
1425
1426 2009-07-09  Beth Dakin and Jon Honeycutt <bdakin@apple.com>
1427
1428         Reviewed by Dave Hyatt.
1429
1430         Make Widget RefCounted to fix or make fixable:
1431
1432         <rdar://problem/7038831> REGRESSION (TOT): In Mail, a crash occurs 
1433         at WebCore::Widget::afterMouseDown() after clicking To Do's close 
1434         box
1435         <rdar://problem/6978804> WER #16: Repro Access Violation in 
1436         WebCore::PluginView::bindingInstance (1310178023)
1437         -and-
1438         <rdar://problem/6991251> WER #13: Crash in WebKit!
1439         WebCore::PluginView::performRequest+203 (1311461169) 
1440
1441         * loader/EmptyClients.h:
1442         (WebCore::EmptyFrameLoaderClient::createPlugin):
1443         Changed to return PassRefPtr
1444         (WebCore::EmptyFrameLoaderClient::createJavaAppletWidget):
1445         Ditto.
1446
1447         * loader/FrameLoader.cpp:
1448         (WebCore::FrameLoader::loadSubframe):
1449         (WebCore::FrameLoader::loadPlugin):
1450         Make the widget variable a RefPtr. Use .get() when passing it to
1451         RenderPart::setWidget().
1452         (WebCore::FrameLoader::createJavaAppletWidget):
1453         Make the widget variable a RefPtr.
1454
1455         * loader/FrameLoader.h:
1456         Changed the return type of createJavaAppletWidget().
1457
1458         * loader/FrameLoaderClient.h:
1459         Change the return types of createPlugin() and 
1460         createJavaAppletWidget().
1461
1462         * page/Frame.cpp:
1463         (WebCore::Frame::createView):
1464         No need to call .get() since setWidget() takes a RefPtr.
1465
1466         * page/FrameView.cpp:
1467         (WebCore::FrameView::layoutIfNeededRecursive):
1468         children() now returns a HashSet of RefPtrs.
1469
1470         * page/FrameView.h:
1471         Remove inheritance from RefCounted; we pick this up from ScrollView
1472         through Widget.
1473
1474         * platform/ScrollView.cpp:
1475         (WebCore::ScrollView::addChild):
1476         addChild() now takes a PassRefPtr and m_children now keeps a 
1477         HashSet of RefPtrs.
1478
1479         * platform/ScrollView.h:
1480         ScrollView constructor is now protected.
1481         (WebCore::ScrollView::children):
1482         m_children is now a HashSet of RefPtrs.
1483
1484         * platform/Scrollbar.h:
1485         Remove inheritance from RefCounted; we pick this up from ScrollView
1486         through Widget.
1487
1488         * platform/Widget.h:
1489         Inherit from RefCounted. Cleaned up some whitespace. Make m_widget 
1490         a RefPtr.
1491
1492         * plugins/PluginView.cpp:
1493         (WebCore::PluginView::create):
1494         Adopt the PluginView when returning it.
1495
1496         * plugins/PluginView.h:
1497         Changed create() to return a PassRefPtr.
1498
1499         * rendering/RenderApplet.cpp:
1500         Receive result in a RefPtr when calling createJavaAppletWidget().
1501
1502         * rendering/RenderPart.cpp:
1503         (WebCore::RenderPart::setWidget): 
1504         setWidget() now takes a PassRefPtr. Also removed the manual ref of 
1505         FrameViews. This is handled by having m_widget be a RefPtr. Removed 
1506         deleteWidget().
1507
1508         * rendering/RenderPart.h:
1509         Removed override of deleteWidget().
1510
1511         * rendering/RenderWidget.cpp:
1512         (WebCore::RenderWidget::destroy):
1513         (WebCore::RenderWidget::setWidget):
1514         (WebCore::RenderWidget::paint):
1515         (WebCore::RenderWidget::setOverlapTestResult):
1516         (WebCore::RenderWidget::updateWidgetPosition):
1517         Use .get().
1518         (WebCore::RenderWidget::clearWidget):
1519         Don't call deleteWidget(). It was removed. 
1520
1521         * rendering/RenderWidget.h:
1522         Removed deleteWidget(). Made m_widget a RefPtr.
1523         (WebCore::RenderWidget::widget):
1524         Use .get().
1525
1526 2009-07-09  Chris Fleizach  <cfleizach@apple.com>
1527
1528         Reviewed by Darin Adler.
1529
1530         Bug 27129 - AX: possible assertion for a non-native image in accessibility
1531         https://bugs.webkit.org/show_bug.cgi?id=27129 
1532
1533         It's possible for an image that is not really an image to assert, because its renderer
1534         is turned into a RenderImage.
1535
1536         Test: accessibility/non-native-image-crash.html
1537
1538         * accessibility/AccessibilityRenderObject.cpp:
1539         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
1540         (WebCore::RoleEntry::):
1541         * accessibility/mac/AccessibilityObjectWrapper.mm:
1542         (-[AccessibilityObjectWrapper roleDescription]):
1543
1544 2009-07-09  Simon Fraser  <simon.fraser@apple.com>
1545
1546         Build fix for SnowLeopard.
1547         
1548         Avoid using the contentsTransform methods if not on Leopard, because
1549         we don't need to call them.
1550
1551         * platform/graphics/mac/GraphicsLayerCA.mm:
1552         (WebCore::GraphicsLayerCA::updateContentsTransform):
1553         * platform/graphics/mac/WebLayer.mm:
1554         (-[WebLayer setNeedsDisplayInRect:]):
1555         * platform/graphics/mac/WebTiledLayer.mm:
1556         (-[WebTiledLayer setNeedsDisplayInRect:]):
1557
1558 2009-07-09  Simon Fraser  <simon.fraser@apple.com>
1559
1560         Reviewed by Dave Hyatt
1561
1562         Improve the appearance of text in compositing layers when -[CALayer geometryFlipped]
1563         is not available.
1564         <rdar://problem/6120614>
1565
1566         * platform/graphics/GraphicsLayer.h:
1567         (WebCore::GraphicsLayer::setContentsOrientation):
1568         (WebCore::GraphicsLayer::contentsOrientation):
1569         * platform/graphics/GraphicsLayer.cpp:
1570         (WebCore::GraphicsLayer::GraphicsLayer):
1571         Add a m_contentsOrientation member and getter/setter to control whether
1572         the contents of this layer have a transform applied to them before display.
1573
1574         * platform/graphics/mac/GraphicsLayerCA.h:
1575         New method to return the default contents orientation.
1576
1577         * platform/graphics/mac/GraphicsLayerCA.mm:
1578         (WebCore::flipTransform):
1579         Convenience method to return a transform with a Y flip.
1580
1581         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
1582         (WebCore::GraphicsLayerCA::setSize):
1583         After the size changes we have to update the contentsTransform.
1584
1585         (WebCore::GraphicsLayerCA::setGeometryOrientation):
1586         (WebCore::GraphicsLayerCA::geometryOrientation):
1587         If -setGeometryFlipped: is not available, use a children transform.
1588         
1589         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
1590         Tiled layers have issues with flipped contentsTransform, so just use
1591         top-down drawing for them. Call updateContentsTransform() to set the
1592         new contents transform after swapping layers.
1593         
1594         (WebCore::GraphicsLayerCA::defaultContentsOrientation):
1595         Use bottom-up when -geometryFlipped is not available, otherwise top-down.
1596         
1597         (WebCore::GraphicsLayerCA::updateContentsTransform):
1598         Set the layer contents transform based on contentsOrientation().
1599
1600         (WebCore::GraphicsLayerCA::setContentsLayer):
1601         We have to manually flip contents layers if we're not using -geometryFlipped.
1602         
1603         * platform/graphics/mac/WebLayer.h:
1604         * platform/graphics/mac/WebLayer.mm:
1605         Do early return if layerContents is nil. Flip the CTM if the layer has
1606         bottom-up coordinates, so that CG sees a CTM with no flip.
1607         Do the CGContextRestoreGState() after drawing the debug indicator.
1608         
1609         (-[WebLayer setNeedsDisplayInRect:]):
1610         * platform/graphics/mac/WebTiledLayer.mm:
1611         (-[WebTiledLayer setNeedsDisplayInRect:]):
1612         Need to map the dirty rect through the contentsTransform.
1613
1614 2009-07-09  Alexey Proskuryakov  <ap@webkit.org>
1615
1616         Reviewed by Geoff Garen.
1617
1618         <rdar://problem/6921671> Visit counter shouldn't be incremented by redirects.
1619
1620         Can't test this functionality with layout tests.
1621
1622         * WebCore.base.exp:
1623         * history/HistoryItem.cpp:
1624         (WebCore::HistoryItem::recordVisitAtTime):
1625         (WebCore::HistoryItem::visited):
1626         * history/HistoryItem.h:
1627         Only increase visit count if explicitly told to. Now, some visits change last access time,
1628         but do not increase visit count.
1629
1630 2009-07-09  Eric Carlson  <eric.carlson@apple.com>
1631
1632         Reviewed by Simon Fraser.
1633
1634         <rdar://problem/7046098> MediaControllerThemeQT requires QuickTime 7.6.3
1635
1636         Require QuickTime 7.6.3 or higher to enable the new media controller UI.
1637
1638         * rendering/RenderThemeMac.mm:
1639         (WebCore::mediaControllerTheme):
1640
1641 2009-07-09  Sam Weinig  <sam@webkit.org>
1642
1643         Reviewed by Beth Dakin.
1644
1645         Remove incorrect comment.
1646
1647         * page/MouseEventWithHitTestResults.h:
1648
1649 2009-07-09  Mads Ager  <ager@chromium.org>
1650
1651         Reviewed by Dimitri Glazkov.
1652
1653         Update the V8 bindings codegenerator to use the RGBColor::create
1654         method to handle refcounts for RGBColor objects correctly.
1655         
1656        * bindings/scripts/CodeGeneratorV8.pm: Use RGBColor::create to create RGBColor objects.
1657
1658 2009-07-09  Eric Carlson  <eric.carlson@apple.com>
1659
1660         Reviewed by Adele Peterson.
1661
1662         Crash in RenderMedia::styleDidChange.
1663         <rdar://problem/7044313> CrashTracer: quicklook crashed generating thumbnail for page with 
1664         media element (RenderMedia::styleDidChange + 115)
1665
1666         Speculative fix for crash in styleDidChange. Null check controller elements before tell
1667         them to update style.
1668
1669         * rendering/RenderMedia.cpp:
1670         (WebCore::RenderMedia::styleDidChange):
1671
1672 2009-07-09  Adam Barth  <abarth@webkit.org>
1673
1674         Reviewed by Dimitri Glazkov.
1675
1676         [V8] Move V8DOMWrapper to its own file
1677         https://bugs.webkit.org/show_bug.cgi?id=27121
1678
1679         * bindings/v8/V8DOMWrapper.cpp: Added.
1680         (WebCore::GetToStringName):
1681         (WebCore::ConstructorToString):
1682         (WebCore::V8DOMWrapper::convertSVGElementInstanceToV8Object):
1683         (WebCore::V8DOMWrapper::convertSVGObjectWithContextToV8Object):
1684         (WebCore::V8DOMWrapper::domObjectHasJSWrapper):
1685         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
1686         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject):
1687         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode):
1688         (WebCore::V8DOMWrapper::getTemplate):
1689         (WebCore::V8DOMWrapper::convertToV8Object):
1690         (WebCore::V8DOMWrapper::setHiddenWindowReference):
1691         (WebCore::V8DOMWrapper::domWrapperType):
1692         (WebCore::V8DOMWrapper::convertToNativeObjectImpl):
1693         (WebCore::V8DOMWrapper::convertToSVGPODTypeImpl):
1694         (WebCore::V8DOMWrapper::lookupDOMWrapper):
1695         (WebCore::V8DOMWrapper::convertDOMWrapperToNodeHelper):
1696         (WebCore::V8DOMWrapper::wrapNativeNodeFilter):
1697         (WebCore::V8DOMWrapper::instantiateV8Object):
1698         (WebCore::V8DOMWrapper::setDOMWrapper):
1699         (WebCore::V8DOMWrapper::maybeDOMWrapper):
1700         (WebCore::V8DOMWrapper::isDOMEventWrapper):
1701         (WebCore::V8DOMWrapper::isWrapperOfType):
1702         (WebCore::V8DOMWrapper::htmlElementType):
1703         (WebCore::V8DOMWrapper::svgElementType):
1704         (WebCore::V8DOMWrapper::convertEventToV8Object):
1705         (WebCore::):
1706         (WebCore::V8DOMWrapper::convertNodeToV8Object):
1707         (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
1708         (WebCore::V8DOMWrapper::convertEventListenerToV8Object):
1709         (WebCore::V8DOMWrapper::convertDOMImplementationToV8Object):
1710         (WebCore::V8DOMWrapper::convertStyleSheetToV8Object):
1711         (WebCore::V8DOMWrapper::convertCSSValueToV8Object):
1712         (WebCore::V8DOMWrapper::convertCSSRuleToV8Object):
1713         (WebCore::V8DOMWrapper::convertWindowToV8Object):
1714         * bindings/v8/V8DOMWrapper.h: Added.
1715         (WebCore::V8DOMWrapper::convertDOMWrapperToNative):
1716         (WebCore::V8DOMWrapper::wrapCPointer):
1717         (WebCore::V8DOMWrapper::extractCPointer):
1718         (WebCore::V8DOMWrapper::convertDOMWrapperToNode):
1719         (WebCore::V8DOMWrapper::convertToV8Object):
1720         (WebCore::V8DOMWrapper::convertToNativeObject):
1721         (WebCore::V8DOMWrapper::convertToNativeEvent):
1722         (WebCore::V8DOMWrapper::extractCPointerImpl):
1723         (WebCore::V8DOMWrapper::instantiateV8Object):
1724         * bindings/v8/V8Proxy.cpp:
1725         * bindings/v8/V8Proxy.h:
1726
1727 2009-07-09  David Hyatt  <hyatt@apple.com>
1728
1729         Reviewed by Adele Peterson.
1730
1731         Crash in setFocusedFrame.
1732         <rdar://7032869> Crashing in setFocusedFrame on blogger.com.
1733
1734         Speculative fix for crasher in setFocusedFrame.  Make sure to ref both frames and fire
1735         the events only after the local member has been updated.
1736
1737         * page/FocusController.cpp:
1738         (WebCore::FocusController::setFocusedFrame):
1739
1740 2009-07-09  Eric Carlson  <eric.carlson@apple.com>
1741
1742         Reviewed by Adele Peterson.
1743
1744         Possible crashes when mouse clicks not dispatched because range input destroyed while 
1745         thumb is being dragged (e.g. scrub to end of movie)
1746         <rdar://problem/7037494> 
1747         https://bugs.webkit.org/show_bug.cgi?id=27101
1748
1749         Some shadow nodes "capture" all mouse events from mouseDown to mouseUp so they continue to 
1750         get mouse events even when the mouse is moved outside of the node. This is done by putting
1751         EventHandler into a mode where it sends all mouse events to the node regardless of the
1752         actual mouse position. The mode is set on mouseDown and cleared on mouseUp but if the
1753         node is deleted while in this mode, the mouseUp is never sent and EventHandler continues
1754         to try to send events to the deleted node. This sometimes results in a crash, and sometimes
1755         in a page that doesn't respond to click events.
1756
1757         Tests: fast/forms/search-delete-while-cancel-button-clicked.html
1758                fast/forms/slider-delete-while-dragging-thumb.html
1759                media/audio-delete-while-slider-thumb-clicked.html
1760                media/audio-delete-while-step-button-clicked.html
1761
1762         * rendering/MediaControlElements.cpp:
1763         (WebCore::MediaControlSeekButtonElement::detach):
1764             New, call setCapturingMouseEventsNode if capturing mouse events.
1765         * rendering/MediaControlElements.h:
1766             Declare detach().
1767
1768         * rendering/RenderSlider.cpp:
1769         (WebCore::SliderThumbElement::detach):
1770             New, call setCapturingMouseEventsNode if capturing mouse events.
1771
1772         * rendering/TextControlInnerElements.cpp:
1773         (WebCore::SearchFieldCancelButtonElement::detach):
1774             New, call setCapturingMouseEventsNode if capturing mouse events.
1775         * rendering/TextControlInnerElements.h:
1776             Declare detach().
1777
1778 2009-07-09  Yury Semikhatsky  <yurys@chromium.org>
1779
1780         Reviewed by Dimitri Glazkov.
1781
1782         Enter the Frame's context before creating new objects in setContextDebugId.
1783
1784         https://bugs.webkit.org/show_bug.cgi?id=27112
1785
1786         * bindings/v8/V8Proxy.cpp:
1787         (WebCore::V8Proxy::setContextDebugId):
1788
1789 2009-07-09  Simon Hausmann  <hausmann@webkit.org>
1790
1791         Fix the Qt build.
1792
1793         * WebCore.pro: Add new storage impl files to the build.
1794
1795 2009-07-08  Adam Barth  <abarth@webkit.org>
1796
1797         Rubber stamped by Eric Seidel.
1798
1799         [V8] Move DOM wrapper functions in V8Proxy to V8DOMWrapper
1800         https://bugs.webkit.org/show_bug.cgi?id=27107
1801
1802         This patch is just renaming.  Code motion will occur next.
1803
1804         * bindings/scripts/CodeGeneratorV8.pm:
1805         * bindings/v8/ScriptController.cpp:
1806         (WebCore::ScriptController::processingUserGesture):
1807         (WebCore::createScriptObject):
1808         (WebCore::ScriptController::createScriptObjectForPluginElement):
1809         * bindings/v8/ScriptObject.cpp:
1810         (WebCore::ScriptGlobalObject::set):
1811         * bindings/v8/ScriptObjectQuarantine.cpp:
1812         (WebCore::getQuarantinedScriptObject):
1813         * bindings/v8/V8AbstractEventListener.cpp:
1814         (WebCore::V8AbstractEventListener::handleEvent):
1815         (WebCore::V8AbstractEventListener::getReceiverObject):
1816         * bindings/v8/V8Collection.cpp:
1817         (WebCore::toOptionsCollectionSetter):
1818         * bindings/v8/V8Collection.h:
1819         (WebCore::getV8Object):
1820         (WebCore::getNamedPropertyOfCollection):
1821         (WebCore::nodeCollectionNamedPropertyGetter):
1822         (WebCore::getIndexedPropertyOfCollection):
1823         (WebCore::nodeCollectionIndexedPropertyGetter):
1824         (WebCore::nodeCollectionIndexedPropertyEnumerator):
1825         (WebCore::collectionIndexedPropertyEnumerator):
1826         (WebCore::collectionStringOrNullIndexedPropertyGetter):
1827         * bindings/v8/V8DOMMap.cpp:
1828         (WebCore::DOMData::handleWeakObject):
1829         (WebCore::DOMData::removeObjectsFromWrapperMap):
1830         * bindings/v8/V8GCController.cpp:
1831         (WebCore::enumerateDOMObjectMap):
1832         (WebCore::DOMObjectVisitor::visitDOMWrapper):
1833         (WebCore::GCPrologueVisitor::visitDOMWrapper):
1834         (WebCore::GCEpilogueVisitor::visitDOMWrapper):
1835         * bindings/v8/V8Helpers.cpp:
1836         (WebCore::wrapNPObject):
1837         * bindings/v8/V8NodeFilterCondition.cpp:
1838         (WebCore::V8NodeFilterCondition::acceptNode):
1839         * bindings/v8/V8Proxy.cpp:
1840         (WebCore::V8DOMWrapper::convertSVGElementInstanceToV8Object):
1841         (WebCore::V8DOMWrapper::convertSVGObjectWithContextToV8Object):
1842         (WebCore::V8DOMWrapper::domObjectHasJSWrapper):
1843         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
1844         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject):
1845         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode):
1846         (WebCore::V8Proxy::evaluateInNewContext):
1847         (WebCore::V8Proxy::getConstructor):
1848         (WebCore::V8DOMWrapper::getTemplate):
1849         (WebCore::V8Proxy::retrieveWindow):
1850         (WebCore::V8Proxy::updateDocumentWrapperCache):
1851         (WebCore::V8Proxy::clearForNavigation):
1852         (WebCore::V8Proxy::installDOMWindow):
1853         (WebCore::setDOMExceptionHelper):
1854         (WebCore::V8DOMWrapper::convertToV8Object):
1855         (WebCore::V8DOMWrapper::setHiddenWindowReference):
1856         (WebCore::V8DOMWrapper::domWrapperType):
1857         (WebCore::V8DOMWrapper::convertToNativeObjectImpl):
1858         (WebCore::V8DOMWrapper::convertToSVGPODTypeImpl):
1859         (WebCore::V8DOMWrapper::lookupDOMWrapper):
1860         (WebCore::V8DOMWrapper::convertDOMWrapperToNodeHelper):
1861         (WebCore::V8DOMWrapper::wrapNativeNodeFilter):
1862         (WebCore::V8DOMWrapper::instantiateV8Object):
1863         (WebCore::V8DOMWrapper::setDOMWrapper):
1864         (WebCore::V8DOMWrapper::maybeDOMWrapper):
1865         (WebCore::V8DOMWrapper::isDOMEventWrapper):
1866         (WebCore::V8DOMWrapper::isWrapperOfType):
1867         (WebCore::V8DOMWrapper::htmlElementType):
1868         (WebCore::V8DOMWrapper::svgElementType):
1869         (WebCore::V8DOMWrapper::convertEventToV8Object):
1870         (WebCore::V8DOMWrapper::convertNodeToV8Object):
1871         (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
1872         (WebCore::V8DOMWrapper::convertEventListenerToV8Object):
1873         (WebCore::V8DOMWrapper::convertDOMImplementationToV8Object):
1874         (WebCore::V8DOMWrapper::convertStyleSheetToV8Object):
1875         (WebCore::V8DOMWrapper::convertCSSValueToV8Object):
1876         (WebCore::V8DOMWrapper::convertCSSRuleToV8Object):
1877         (WebCore::V8DOMWrapper::convertWindowToV8Object):
1878         (WebCore::V8Proxy::bindJsObjectToWindow):
1879         * bindings/v8/V8Proxy.h:
1880         (WebCore::V8DOMWrapper::convertDOMWrapperToNative):
1881         (WebCore::V8DOMWrapper::wrapCPointer):
1882         (WebCore::V8DOMWrapper::extractCPointer):
1883         (WebCore::V8DOMWrapper::convertDOMWrapperToNode):
1884         (WebCore::V8DOMWrapper::convertToV8Object):
1885         (WebCore::V8DOMWrapper::convertToNativeObject):
1886         (WebCore::V8DOMWrapper::convertToNativeEvent):
1887         (WebCore::V8DOMWrapper::extractCPointerImpl):
1888         (WebCore::V8DOMWrapper::instantiateV8Object):
1889         (WebCore::V8Proxy::constructDOMObject):
1890         (WebCore::toV8):
1891         * bindings/v8/V8SVGPODTypeWrapper.h:
1892         (WebCore::V8SVGPODTypeUtil::toSVGPODType):
1893         * bindings/v8/WorkerContextExecutionProxy.cpp:
1894         (WebCore::WorkerContextExecutionProxy::retrieve):
1895         (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
1896         (WebCore::WorkerContextExecutionProxy::GetConstructor):
1897         (WebCore::WorkerContextExecutionProxy::ToV8Object):
1898         (WebCore::WorkerContextExecutionProxy::EventToV8Object):
1899         (WebCore::WorkerContextExecutionProxy::toV8):
1900         * bindings/v8/custom/V8AttrCustom.cpp:
1901         (WebCore::ACCESSOR_SETTER):
1902         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
1903         (WebCore::NAMED_PROPERTY_GETTER):
1904         (WebCore::NAMED_PROPERTY_SETTER):
1905         * bindings/v8/custom/V8CanvasPixelArrayCustom.cpp:
1906         (WebCore::INDEXED_PROPERTY_GETTER):
1907         (WebCore::INDEXED_PROPERTY_SETTER):
1908         * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
1909         (WebCore::toV8):
1910         (WebCore::toCanvasStyle):
1911         (WebCore::ACCESSOR_GETTER):
1912         (WebCore::ACCESSOR_SETTER):
1913         (WebCore::CALLBACK_FUNC_DECL):
1914         * bindings/v8/custom/V8ClientRectListCustom.cpp:
1915         (WebCore::INDEXED_PROPERTY_GETTER):
1916         * bindings/v8/custom/V8ClipboardCustom.cpp:
1917         (WebCore::ACCESSOR_GETTER):
1918         (WebCore::CALLBACK_FUNC_DECL):
1919         * bindings/v8/custom/V8CustomBinding.cpp:
1920         (WebCore::ACCESSOR_GETTER):
1921         (WebCore::INDEXED_ACCESS_CHECK):
1922         (WebCore::NAMED_ACCESS_CHECK):
1923         (WebCore::V8Custom::GetTargetFrame):
1924         * bindings/v8/custom/V8CustomSQLStatementCallback.cpp:
1925         (WebCore::V8CustomSQLStatementCallback::handleEvent):
1926         * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:
1927         (WebCore::V8CustomSQLStatementErrorCallback::handleEvent):
1928         * bindings/v8/custom/V8CustomSQLTransactionCallback.cpp:
1929         (WebCore::V8CustomSQLTransactionCallback::handleEvent):
1930         * bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp:
1931         (WebCore::V8CustomSQLTransactionErrorCallback::handleEvent):
1932         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1933         (WebCore::V8Custom::WindowSetTimeoutImpl):
1934         (WebCore::ACCESSOR_SETTER):
1935         (WebCore::CALLBACK_FUNC_DECL):
1936         (WebCore::ACCESSOR_GETTER):
1937         (WebCore::INDEXED_PROPERTY_GETTER):
1938         (WebCore::NAMED_PROPERTY_GETTER):
1939         (WebCore::V8Custom::ClearTimeoutImpl):
1940         (WebCore::NAMED_ACCESS_CHECK):
1941         (WebCore::INDEXED_ACCESS_CHECK):
1942         * bindings/v8/custom/V8DatabaseCustom.cpp:
1943         (WebCore::CALLBACK_FUNC_DECL):
1944         * bindings/v8/custom/V8DocumentCustom.cpp:
1945         (WebCore::CALLBACK_FUNC_DECL):
1946         * bindings/v8/custom/V8DocumentLocationCustom.cpp:
1947         (WebCore::ACCESSOR_GETTER):
1948         (WebCore::ACCESSOR_SETTER):
1949         * bindings/v8/custom/V8ElementCustom.cpp:
1950         (WebCore::CALLBACK_FUNC_DECL):
1951         (WebCore::ACCESSOR_SETTER):
1952         (WebCore::ACCESSOR_GETTER):
1953         * bindings/v8/custom/V8EventCustom.cpp:
1954         (WebCore::ACCESSOR_SETTER):
1955         (WebCore::ACCESSOR_GETTER):
1956         * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp:
1957         (WebCore::CALLBACK_FUNC_DECL):
1958         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1959         (WebCore::CALLBACK_FUNC_DECL):
1960         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
1961         (WebCore::getNamedItems):
1962         (WebCore::getItem):
1963         (WebCore::NAMED_PROPERTY_GETTER):
1964         (WebCore::CALLBACK_FUNC_DECL):
1965         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
1966         (WebCore::NAMED_PROPERTY_GETTER):
1967         (WebCore::CALLBACK_FUNC_DECL):
1968         (WebCore::ACCESSOR_GETTER):
1969         * bindings/v8/custom/V8HTMLFormElementCustom.cpp:
1970         (WebCore::INDEXED_PROPERTY_GETTER):
1971         (WebCore::NAMED_PROPERTY_GETTER):
1972         (WebCore::CALLBACK_FUNC_DECL):
1973         * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
1974         (WebCore::ACCESSOR_SETTER):
1975         * bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp:
1976         (WebCore::NAMED_PROPERTY_GETTER):
1977         * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
1978         (WebCore::ACCESSOR_SETTER):
1979         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
1980         (WebCore::CALLBACK_FUNC_DECL):
1981         * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
1982         (WebCore::ACCESSOR_GETTER):
1983         (WebCore::ACCESSOR_SETTER):
1984         (WebCore::CALLBACK_FUNC_DECL):
1985         * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp:
1986         (WebCore::CALLBACK_FUNC_DECL):
1987         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
1988         (WebCore::CALLBACK_FUNC_DECL):
1989         (WebCore::ACCESSOR_GETTER):
1990         (WebCore::ACCESSOR_SETTER):
1991         (WebCore::INDEXED_PROPERTY_GETTER):
1992         (WebCore::INDEXED_PROPERTY_SETTER):
1993         * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
1994         (WebCore::NAMED_PROPERTY_GETTER):
1995         (WebCore::NAMED_PROPERTY_SETTER):
1996         (WebCore::INDEXED_PROPERTY_GETTER):
1997         (WebCore::INDEXED_PROPERTY_SETTER):
1998         * bindings/v8/custom/V8HTMLSelectElementCollectionCustom.cpp:
1999         (WebCore::NAMED_PROPERTY_GETTER):
2000         (WebCore::INDEXED_PROPERTY_SETTER):
2001         * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
2002         (WebCore::CALLBACK_FUNC_DECL):
2003         (WebCore::removeElement):
2004         * bindings/v8/custom/V8InspectorControllerCustom.cpp:
2005         (WebCore::CALLBACK_FUNC_DECL):
2006         * bindings/v8/custom/V8LocationCustom.cpp:
2007         (WebCore::ACCESSOR_SETTER):
2008         (WebCore::ACCESSOR_GETTER):
2009         (WebCore::CALLBACK_FUNC_DECL):
2010         (WebCore::INDEXED_ACCESS_CHECK):
2011         (WebCore::NAMED_ACCESS_CHECK):
2012         * bindings/v8/custom/V8MessageChannelConstructor.cpp:
2013         (WebCore::CALLBACK_FUNC_DECL):
2014         * bindings/v8/custom/V8MessagePortCustom.cpp:
2015         (WebCore::ACCESSOR_GETTER):
2016         (WebCore::ACCESSOR_SETTER):
2017         (WebCore::CALLBACK_FUNC_DECL):
2018         * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
2019         (WebCore::INDEXED_PROPERTY_GETTER):
2020         (WebCore::NAMED_PROPERTY_GETTER):
2021         * bindings/v8/custom/V8NavigatorCustom.cpp:
2022         (WebCore::ACCESSOR_GETTER):
2023         * bindings/v8/custom/V8NodeCustom.cpp:
2024         (WebCore::CALLBACK_FUNC_DECL):
2025         * bindings/v8/custom/V8NodeIteratorCustom.cpp:
2026         (WebCore::toV8):
2027         (WebCore::CALLBACK_FUNC_DECL):
2028         * bindings/v8/custom/V8NodeListCustom.cpp:
2029         (WebCore::NAMED_PROPERTY_GETTER):
2030         * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
2031         (WebCore::CALLBACK_FUNC_DECL):
2032         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
2033         (WebCore::CALLBACK_FUNC_DECL):
2034         * bindings/v8/custom/V8SVGElementInstanceCustom.cpp:
2035         (WebCore::CALLBACK_FUNC_DECL):
2036         * bindings/v8/custom/V8SVGLengthCustom.cpp:
2037         (WebCore::ACCESSOR_GETTER):
2038         (WebCore::CALLBACK_FUNC_DECL):
2039         * bindings/v8/custom/V8SVGMatrixCustom.cpp:
2040         (WebCore::CALLBACK_FUNC_DECL):
2041         * bindings/v8/custom/V8StorageCustom.cpp:
2042         (WebCore::V8Custom::v8StorageNamedPropertyEnumerator):
2043         (WebCore::storageGetter):
2044         (WebCore::storageSetter):
2045         (WebCore::storageDeleter):
2046         * bindings/v8/custom/V8StyleSheetListCustom.cpp:
2047         (WebCore::NAMED_PROPERTY_GETTER):
2048         * bindings/v8/custom/V8TreeWalkerCustom.cpp:
2049         (WebCore::toV8):
2050         (WebCore::CALLBACK_FUNC_DECL):
2051         * bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp:
2052         (WebCore::CALLBACK_FUNC_DECL):
2053         * bindings/v8/custom/V8WorkerContextCustom.cpp:
2054         (WebCore::ACCESSOR_GETTER):
2055         (WebCore::ACCESSOR_SETTER):
2056         (WebCore::SetTimeoutOrInterval):
2057         (WebCore::CALLBACK_FUNC_DECL):
2058         * bindings/v8/custom/V8WorkerCustom.cpp:
2059         (WebCore::CALLBACK_FUNC_DECL):
2060         (WebCore::ACCESSOR_GETTER):
2061         (WebCore::ACCESSOR_SETTER):
2062         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
2063         (WebCore::CALLBACK_FUNC_DECL):
2064         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
2065         (WebCore::ACCESSOR_GETTER):
2066         (WebCore::ACCESSOR_SETTER):
2067         (WebCore::CALLBACK_FUNC_DECL):
2068         * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp:
2069         (WebCore::ACCESSOR_GETTER):
2070         (WebCore::ACCESSOR_SETTER):
2071         (WebCore::CALLBACK_FUNC_DECL):
2072         * bindings/v8/custom/V8XSLTProcessorCustom.cpp:
2073         (WebCore::CALLBACK_FUNC_DECL):
2074
2075 2009-07-08  Pierre d'Herbemont  <pdherbemont@apple.com>
2076
2077         Reviewed by Simon Fraser.
2078
2079         Make sure we can click outside the slider thumb and start dragging.
2080         https://bugs.webkit.org/show_bug.cgi?id=26229
2081
2082         Previously we were assuming that if the thumb hasn't been clicked, we
2083         wouldn't issue any value change upon dragging.
2084
2085         We need to handle the two different cases:
2086         - Clicked in the thumb, we need to make sure the cursor is always pointing
2087         the same slider thumb point.
2088         - Clicked outside, the cursor should always be pointing to the center of
2089         the thumb.
2090
2091         For simplicity, we don't remember the original point of the mouse down,
2092         but a vector between that point and the thumb.
2093
2094         * rendering/RenderSlider.cpp:
2095         (WebCore::SliderThumbElement::SliderThumbElement):
2096         (WebCore::SliderThumbElement::defaultEventHandler):
2097         (WebCore::RenderSlider::mouseEventVectorToThumb): Utility function.
2098         * rendering/RenderSlider.h:
2099
2100 2009-07-08  Pierre d'Herbemont  <pdherbemont@apple.com>
2101
2102         Reviewed by Simon Fraser.
2103
2104         https://bugs.webkit.org/show_bug.cgi?id=27100
2105         <rdar://problem/7042621>
2106
2107         Don't display "loading" in the <video> controller when
2108         there is no src specified.
2109
2110         * rendering/MediaControlElements.cpp:
2111         (WebCore::MediaControlStatusDisplayElement::update): The only
2112         way to find out if we have an element is currentSrc(). networkState()
2113         will always report LOADING according to the spec.
2114
2115 2009-07-08  Adam Barth  <abarth@webkit.org>
2116
2117         Reviewed by Eric Seidel.
2118
2119         [V8] Move V8GCController functions to their own file
2120         https://bugs.webkit.org/show_bug.cgi?id=27102
2121
2122         * bindings/v8/V8GCController.cpp: Added.
2123         * bindings/v8/V8GCController.h: Added.
2124         * bindings/v8/V8Proxy.cpp:
2125         * bindings/v8/V8Proxy.h:
2126
2127 2009-07-08  Jeremy Orlow  <jorlow@chromium.org>
2128
2129         Reviewed by Darin Fisher.
2130
2131         Split StorageArea and StorageNamespace into an interface and implementation.
2132         https://bugs.webkit.org/show_bug.cgi?id=27072
2133
2134         I need to split StorageNamespace and StorageArea into an interface and
2135         implementation.  In a later patch, I'll implement a proxy interface
2136         that'll run inside the Chromium renderer process.
2137
2138         Additionally, fix the alphabetical ordering of files I recently added
2139         in the project files.
2140
2141         This is a continuation of other refactoring work:
2142         https://bugs.webkit.org/show_bug.cgi?id=25376
2143
2144         * GNUmakefile.am:
2145         * WebCore.vcproj/WebCore.vcproj:
2146         * WebCore.xcodeproj/project.pbxproj:
2147         * WebCoreSources.bkl:
2148         * storage/StorageArea.cpp:
2149         (WebCore::StorageArea::create):
2150         * storage/StorageArea.h:
2151         (WebCore::StorageArea::~StorageArea):
2152         * storage/StorageAreaImpl.cpp: Copied from WebCore/storage/StorageArea.cpp.
2153         (WebCore::StorageAreaImpl::create):
2154         (WebCore::StorageAreaImpl::~StorageAreaImpl):
2155         (WebCore::StorageAreaImpl::StorageAreaImpl):
2156         (WebCore::StorageAreaImpl::copy):
2157         (WebCore::StorageAreaImpl::length):
2158         (WebCore::StorageAreaImpl::key):
2159         (WebCore::StorageAreaImpl::getItem):
2160         (WebCore::StorageAreaImpl::setItem):
2161         (WebCore::StorageAreaImpl::removeItem):
2162         (WebCore::StorageAreaImpl::clear):
2163         (WebCore::StorageAreaImpl::contains):
2164         (WebCore::StorageAreaImpl::importItem):
2165         (WebCore::StorageAreaImpl::securityOrigin):
2166         (WebCore::StorageAreaImpl::close):
2167         (WebCore::StorageAreaImpl::blockUntilImportComplete):
2168         (WebCore::StorageAreaImpl::dispatchStorageEvent):
2169         * storage/StorageAreaImpl.h: Copied from WebCore/storage/StorageArea.h.
2170         * storage/StorageAreaSync.h:
2171         * storage/StorageNamespace.cpp:
2172         (WebCore::StorageNamespace::localStorageNamespace):
2173         (WebCore::StorageNamespace::sessionStorageNamespace):
2174         * storage/StorageNamespace.h:
2175         (WebCore::StorageNamespace::~StorageNamespace):
2176         * storage/StorageNamespaceImpl.cpp: Copied from WebCore/storage/StorageNamespace.cpp.
2177         (WebCore::StorageNamespaceImpl::localStorageNamespace):
2178         (WebCore::StorageNamespaceImpl::sessionStorageNamespace):
2179         (WebCore::StorageNamespaceImpl::StorageNamespaceImpl):
2180         (WebCore::StorageNamespaceImpl::~StorageNamespaceImpl):
2181         (WebCore::StorageNamespaceImpl::copy):
2182         (WebCore::StorageNamespaceImpl::storageArea):
2183         (WebCore::StorageNamespaceImpl::close):
2184         * storage/StorageNamespaceImpl.h: Copied from WebCore/storage/StorageNamespace.h.
2185
2186 2009-07-08  Adam Barth  <abarth@webkit.org>
2187
2188         Reviewed by Eric Seidel.
2189
2190         [V8] Move garbage collector related functions from V8Proxy to V8GCController
2191         https://bugs.webkit.org/show_bug.cgi?id=26967
2192
2193         This patch just moves the functions around in V8Proxy.  We'll actually
2194         move them to a separate file in another patch.
2195
2196         * bindings/v8/NPV8Object.cpp:
2197         (freeV8NPObject):
2198         * bindings/v8/ScheduledAction.cpp:
2199         (WebCore::ScheduledAction::ScheduledAction):
2200         (WebCore::ScheduledAction::~ScheduledAction):
2201         * bindings/v8/ScriptController.cpp:
2202         (WebCore::ScriptController::gcProtectJSWrapper):
2203         (WebCore::ScriptController::gcUnprotectJSWrapper):
2204         * bindings/v8/ScriptInstance.cpp:
2205         (WebCore::V8ScriptInstance::clear):
2206         (WebCore::V8ScriptInstance::set):
2207         * bindings/v8/ScriptValue.h:
2208         (WebCore::ScriptValue::ScriptValue):
2209         (WebCore::ScriptValue::operator=):
2210         (WebCore::ScriptValue::clear):
2211         * bindings/v8/V8AbstractEventListener.cpp:
2212         (WebCore::V8AbstractEventListener::disposeListenerObject):
2213         * bindings/v8/V8LazyEventListener.cpp:
2214         (WebCore::V8LazyEventListener::~V8LazyEventListener):
2215         (WebCore::V8LazyEventListener::getListenerFunction):
2216         (WebCore::V8LazyEventListener::getWrappedListenerFunction):
2217         * bindings/v8/V8NodeFilterCondition.cpp:
2218         (WebCore::V8NodeFilterCondition::V8NodeFilterCondition):
2219         (WebCore::V8NodeFilterCondition::~V8NodeFilterCondition):
2220         * bindings/v8/V8Proxy.cpp:
2221         (WebCore::V8GCController::registerGlobalHandle):
2222         (WebCore::V8GCController::unregisterGlobalHandle):
2223         (WebCore::V8GCController::gcProtect):
2224         (WebCore::V8GCController::gcUnprotect):
2225         (WebCore::V8Proxy::destroyGlobal):
2226         (WebCore::V8Proxy::updateDocumentWrapper):
2227         (WebCore::V8Proxy::clearDocumentWrapper):
2228         (WebCore::V8Proxy::disposeContextHandles):
2229         (WebCore::V8Proxy::initContextIfNeeded):
2230         * bindings/v8/V8Proxy.h:
2231         (WebCore::):
2232         (WebCore::GlobalHandleInfo::GlobalHandleInfo):
2233         * bindings/v8/custom/V8CustomEventListener.cpp:
2234         (WebCore::V8EventListener::V8EventListener):
2235
2236 2009-07-08  Daniel Bates  <dbates@intudata.com>
2237
2238         Reviewed by Adam Barth.
2239         
2240         https://bugs.webkit.org/show_bug.cgi?id=26918
2241         
2242         Prevents injection of HTML Base tag.
2243
2244         Tests: http/tests/security/xssAuditor/base-href-control-char.html
2245                http/tests/security/xssAuditor/base-href-null-char.html
2246                http/tests/security/xssAuditor/base-href-safe.html
2247                http/tests/security/xssAuditor/base-href-safe2.html
2248                http/tests/security/xssAuditor/base-href-scheme-relative.html
2249                http/tests/security/xssAuditor/base-href.html
2250
2251         * html/HTMLBaseElement.cpp:
2252         (WebCore::HTMLBaseElement::parseMappedAttribute):
2253         (WebCore::HTMLBaseElement::process): Modified to call XSSAuditor::canSetBaseElementURL
2254         to determine if it is safe to use base element URL.
2255         * html/HTMLBaseElement.h: Added field m_hrefAttrValue to store unparsed base element URL.
2256         * page/XSSAuditor.cpp:
2257         (WebCore::XSSAuditor::canSetBaseElementURL):
2258         * page/XSSAuditor.h:
2259
2260 2009-07-08  Nate Chapin  <japhet@chromium.org>
2261
2262         Reviewed by Dimitri Glazkov.
2263
2264         Upstream V8 npruntime bindings.
2265
2266         https://bugs.webkit.org/show_bug.cgi?id=27094
2267
2268         * bindings/v8/npruntime.cpp: Upstreamed from src.chromium.org.
2269         (StringKey::operator==):
2270         (StringKey::StringKeyHash::hash):
2271         (StringKey::StringKeyHash::equal):
2272         (StringKeyHashTraits::constructDeletedValue):
2273         (StringKeyHashTraits::isDeletedValue):
2274         (getStringIdentifierMap):
2275         (getIntIdentifierMap):
2276         * bindings/v8/npruntime_impl.h: Upstreamed from src.chromium.org.
2277         * bindings/v8/npruntime_internal.h: Upstreamed from src.chromium.org.
2278         * bindings/v8/npruntime_priv.h: Upstreamed from src.chromium.org.
2279
2280 2009-07-08  Dumitru Daniliuc  <dumi@chromium.org>
2281
2282         Reviewed by Darin Fisher.
2283
2284         Extending the PlatformFileHandle definition from PLATFORM(WIN) to
2285         PLATFORM(WIN_OS)
2286
2287         https://bugs.webkit.org/show_bug.cgi?id=27013
2288
2289         * platform/FileSystem.h:
2290
2291 2009-07-08  Daniel Bates  <dbates@intudata.com>
2292
2293         Reviewed by Adam Barth.
2294         
2295         https://bugs.webkit.org/show_bug.cgi?id=27071
2296         
2297         Resolves issue when HTTP parameters contain null- and  non-null-control- characters.
2298
2299         Tests: http/tests/security/xssAuditor/anchor-url-dom-write-location-inline-event-null-char.html
2300                http/tests/security/xssAuditor/embed-tag-control-char.html
2301                http/tests/security/xssAuditor/embed-tag-null-char.html
2302                http/tests/security/xssAuditor/embed-tag.html
2303                http/tests/security/xssAuditor/link-onclick-control-char.html
2304                http/tests/security/xssAuditor/link-onclick-null-char.html
2305                http/tests/security/xssAuditor/object-embed-tag-control-char.html
2306                http/tests/security/xssAuditor/object-embed-tag-null-char.html
2307                http/tests/security/xssAuditor/object-embed-tag.html
2308                http/tests/security/xssAuditor/object-tag.html
2309                http/tests/security/xssAuditor/script-tag-post-control-char.html
2310                http/tests/security/xssAuditor/script-tag-post-null-char.html
2311                http/tests/security/xssAuditor/script-tag-with-source-control-char.html
2312                http/tests/security/xssAuditor/script-tag-with-source-null-char.html
2313
2314         * page/XSSAuditor.cpp:
2315         (WebCore::isNonNullControlCharacter): Called by XSSAuditor::decodeURL.
2316         (WebCore::XSSAuditor::canEvaluate):
2317         (WebCore::XSSAuditor::canCreateInlineEventListener):
2318         (WebCore::XSSAuditor::canLoadObject):
2319         (WebCore::XSSAuditor::decodeURL): Added parameters matchNullCharacters,
2320         and matchNonNullControlCharacters.
2321         (WebCore::XSSAuditor::findInRequest): Added parameters matchNullCharacters,
2322         and matchNonNullControlCharacters.
2323         * page/XSSAuditor.h:
2324
2325 2009-07-08  Marc-Antoine Ruel  <maruel@chromium.org>
2326
2327         Reviewed by Dimitri Glazkov.
2328
2329         Add DerivesSourcesAllInOne.cpp to help with release windows compilation.
2330         https://bugs.webkit.org/show_bug.cgi?id=27093
2331
2332         This is specific for v8, no change in behavior.
2333
2334         * bindings/v8/DerivedSourcesAllInOne.cpp: Added.
2335
2336 2009-07-08  Pierre d'Herbemont  <pdherbemont@apple.com>
2337
2338         Reviewed by Simon Fraser.
2339
2340         https://bugs.webkit.org/show_bug.cgi?id=27086
2341
2342         Make sure the Media controller doesn't fade in for no reason.
2343         This is happening because a update() call to the controller
2344         panel may reset the opacity to 1.0, given that it reloads the
2345         style.
2346
2347         We also add a different fade in and fade out time to soften
2348         the fade out effect.
2349
2350         No test case because this depends on how the movie is loaded.
2351
2352         * rendering/RenderMedia.cpp:
2353         (WebCore::RenderMedia::RenderMedia):
2354         (WebCore::RenderMedia::updateControls):
2355         (WebCore::RenderMedia::updateControlVisibility): Simplify
2356         , and make sure we stop the timer if there is no animation
2357         to do.
2358         (WebCore::RenderMedia::opacityAnimationTimerFired): 
2359         * rendering/RenderMedia.h:
2360
2361 2009-07-08  David Kilzer  <ddkilzer@apple.com>
2362
2363         Bug 27081: Wrap RunLoopTimerCF.cpp in PLATFORM(MAC) && HAVE(RUNLOOP_TIMER)
2364
2365         <https://bugs.webkit.org/show_bug.cgi?id=27081>
2366
2367         Reviewed by Timothy Hatcher.
2368
2369         * platform/cf/RunLoopTimerCF.cpp: This code is only used on
2370         Mac OS X when HAVE(RUNLOOP_TIMER) is enabled, so wrap the code
2371         in that macro as well.
2372
2373 2009-07-08  Greg Bolsinga  <bolsinga@apple.com>
2374
2375         Reviewed by Darin Adler.
2376
2377         Add -[WebView _isProcessingUserGesture]
2378         https://bugs.webkit.org/show_bug.cgi?id=27084
2379
2380         Rename FrameLoader::userGestureHint() to FrameLoader::isProcessingUserGesture()
2381         for clarity.
2382
2383         * WebCore.base.exp: Add WebCore::FrameLoader::isProcessingUserGesture()
2384         * html/HTMLMediaElement.cpp:
2385         (WebCore::HTMLMediaElement::processingUserGesture):
2386         * loader/FrameLoader.cpp: 
2387         (WebCore::FrameLoader::requestFrame):
2388         (WebCore::FrameLoader::isProcessingUserGesture):
2389         * loader/FrameLoader.h:
2390
2391 2009-07-08  Alexey Proskuryakov  <ap@webkit.org>
2392
2393         Reviewed (an earlier version) by Geoff Garen.
2394
2395         https://bugs.webkit.org/show_bug.cgi?id=27090
2396         Remove lockBackForwardList argument from HTMLFormElement::submit()
2397
2398         No change in behavior, so no tests.
2399
2400         * bindings/js/JSHTMLFormElementCustom.cpp:
2401         (WebCore::JSHTMLFormElement::submit):
2402         * html/HTMLFormElement.cpp:
2403         (WebCore::HTMLFormElement::submit):
2404         * html/HTMLFormElement.h:
2405         * loader/FrameLoader.cpp:
2406         (WebCore::FrameLoader::submitForm):
2407         (WebCore::FrameLoader::scheduleFormSubmission):
2408         * loader/FrameLoader.h:
2409         Don't pass lockBackForwardList around when it's known to be false.
2410
2411 2009-07-08  Marc-Antoine Ruel  <maruel@chromium.org>
2412
2413         Reviewed by Adam Barth.
2414
2415         Fix V8 idl codegen to use unique constant names
2416         <https://bugs.webkit.org/show_bug.cgi?id=27089>
2417
2418         Embed the interface name in the global constant names so coagulating all
2419         the .cc files into one compile unit works with V8 bindings.
2420
2421         Nothing added; Still compiles and pass tests.
2422
2423         * bindings/scripts/CodeGeneratorV8.pm:
2424
2425 2009-07-08  Brent Fulgham  <bfulgham@webkit.org>
2426
2427         Build fix: Add missing #includes for Windows (cURL) build.
2428         The <winsock2.h> and <windows.h> headers were not being
2429         included in Windows cURL builds.
2430
2431         * platform/network/ResourceHandleInternal.h:
2432         * platform/network/curl/ResourceHandleManager.h:
2433
2434 2009-07-08  Shinichiro Hamaji  <hamaji@chromium.org>
2435
2436         Reviewed by David Kilzer.
2437
2438         WebKit needs a style linting tool
2439         https://bugs.webkit.org/show_bug.cgi?id=25884
2440
2441         Fix bunch of style issues in WebCore/rendering.
2442         This patch is created to demonstrate cpplint.py.
2443
2444         No testcase because it's just a style fixes.
2445
2446         * rendering/AutoTableLayout.cpp:
2447         (WebCore::AutoTableLayout::recalcColumn):
2448         (WebCore::AutoTableLayout::layout):
2449         * rendering/InlineFlowBox.cpp:
2450         (WebCore::InlineFlowBox::placeEllipsisBox):
2451         * rendering/InlineTextBox.cpp:
2452         (WebCore::InlineTextBox::paintTextMatchMarker):
2453         * rendering/MediaControlElements.cpp:
2454         (WebCore::MediaControlTimelineElement::defaultEventHandler):
2455         * rendering/MediaControlElements.h:
2456         * rendering/RenderArena.cpp:
2457         * rendering/RenderBlock.cpp:
2458         (WebCore::RenderBlock::startDelayUpdateScrollInfo):
2459         (WebCore::RenderBlock::finishDelayUpdateScrollInfo):
2460         (WebCore::RenderBlock::updateScrollInfoAfterLayout):
2461         (WebCore::RenderBlock::positionNewFloats):
2462         (WebCore::RenderBlock::newLine):
2463         (WebCore::RenderBlock::floatBottom):
2464         (WebCore::RenderBlock::leftBottom):
2465         (WebCore::RenderBlock::rightBottom):
2466         * rendering/RenderBox.cpp:
2467         (WebCore::RenderBox::calcReplacedWidthUsing):
2468         * rendering/RenderFieldset.cpp:
2469         (WebCore::RenderFieldset::layoutLegend):
2470         * rendering/RenderFlexibleBox.cpp:
2471         (WebCore::FlexBoxIterator::FlexBoxIterator):
2472         (WebCore::FlexBoxIterator::reset):
2473         (WebCore::FlexBoxIterator::first):
2474         (WebCore::FlexBoxIterator::next):
2475         (WebCore::RenderFlexibleBox::layoutVerticalBox):
2476         * rendering/RenderFrameSet.cpp:
2477         (WebCore::borderStartEdgeColor):
2478         * rendering/RenderFrameSet.h:
2479         * rendering/RenderImage.cpp:
2480         * rendering/RenderLayer.cpp:
2481         (WebCore::RenderLayer::updateVisibilityStatus):
2482         (WebCore::RenderLayer::calculateClipRects):
2483         (WebCore::RenderLayer::calculateRects):
2484         * rendering/RenderListBox.cpp:
2485         (WebCore::RenderListBox::panScroll):
2486         * rendering/RenderMarquee.cpp:
2487         (WebCore::RenderMarquee::updateMarqueeStyle):
2488         * rendering/RenderMedia.cpp:
2489         (WebCore::RenderMedia::updateControls):
2490         * rendering/RenderObject.cpp:
2491         (WebCore::RenderObject::drawLineForBoxSide):
2492         (WebCore::RenderObject::localCaretRect):
2493         * rendering/RenderSVGImage.cpp:
2494         (WebCore::RenderSVGImage::adjustRectsForAspectRatio):
2495         * rendering/RenderSlider.h:
2496         * rendering/RenderTable.cpp:
2497         (WebCore::RenderTable::outerBorderBottom):
2498         * rendering/RenderTableCol.h:
2499         * rendering/RenderTextControlSingleLine.cpp:
2500         (WebCore::RenderTextControlSingleLine::itemIsSeparator):
2501         * rendering/RenderThemeChromiumSkia.cpp:
2502         (WebCore::RenderThemeChromiumSkia::supportsHover):
2503         * rendering/RenderThemeChromiumWin.cpp:
2504         (WebCore::RenderThemeChromiumWin::supportsFocusRing):
2505         * rendering/SVGCharacterLayoutInfo.cpp:
2506         (WebCore::SVGCharacterLayoutInfo::addStackContent):
2507         * rendering/SVGCharacterLayoutInfo.h:
2508         * rendering/TextControlInnerElements.h:
2509         * rendering/bidi.cpp:
2510         (WebCore::RenderBlock::computeHorizontalPositionsForLine):
2511
2512 2009-07-07  Oliver Hunt  <oliver@apple.com>
2513
2514         Reviewed by Maciej Stachowiak.
2515
2516         Reduce complexity of lifetime management in DynamicNodeList caches
2517         <https://bugs.webkit.org/show_bug.cgi?id=27068>
2518
2519         Switch the Cache object used by DynamicNodeList into a normal
2520         refcounted object rather than having a weird flag controlled
2521         refcounting system, where positive refcount did not automatically
2522         imply the cache object would actually still be live.
2523
2524         * dom/DynamicNodeList.cpp:
2525         (WebCore::DynamicNodeList::DynamicNodeList):
2526         (WebCore::DynamicNodeList::~DynamicNodeList):
2527         (WebCore::DynamicNodeList::Caches::Caches):
2528         (WebCore::DynamicNodeList::Caches::create):
2529         * dom/DynamicNodeList.h:
2530         * dom/Node.cpp:
2531         (WebCore::Node::childNodes):
2532         (WebCore::Node::getElementsByTagNameNS):
2533         (WebCore::Node::getElementsByName):
2534         (WebCore::Node::getElementsByClassName):
2535         (WebCore::NodeListsNodeData::invalidateCaches):
2536         (WebCore::NodeListsNodeData::isEmpty):
2537         * dom/NodeRareData.h:
2538         (WebCore::NodeListsNodeData::NodeListsNodeData):
2539
2540 2009-07-07  Simon Fraser  <simon.fraser@apple.com>
2541
2542         Reviewed by Dan Bernstein.
2543         
2544         -webkit-perspective should be a Length
2545         https://bugs.webkit.org/show_bug.cgi?id=27066
2546         
2547         -webkit-perspective should not take a magic valueless number, but should
2548         be a normal Length value which responds to zooming. Treat valueless numbers
2549         as pixels for backward compatibility.
2550         
2551         Test: transforms/3d/general/perspective-units.html
2552
2553         * css/CSSParser.cpp:
2554         (WebCore::CSSParser::parseValue):
2555         * css/CSSStyleSelector.cpp:
2556         (WebCore::CSSStyleSelector::applyProperty):
2557
2558 2009-07-07  Pierre d'Herbemont  <pdherbemont@apple.com>
2559
2560         Reviewed by Simon Fraser.
2561
2562         https://bugs.webkit.org/show_bug.cgi?id=27047
2563
2564         We need to make sure that when we reattach, we also reattach
2565         the children in every MediaControlElement. Else we may end up
2566         having no remaining or elapsed time.
2567
2568         We have to handle that, because we are using a special shadow
2569         tree in the DOM, and that we are ourselves handling
2570         attaching/detaching the renderer.
2571
2572         The strategy here is to try to implement ::attach(), and try
2573         to reuse as much code as we can from the super class, including
2574         children attachement.
2575
2576         Test: media/controls-after-reload.html
2577
2578         * rendering/MediaControlElements.cpp:
2579         (WebCore::MediaControlElement::styleForElement): Code factoring.
2580         (WebCore::MediaControlElement::rendererIsNeeded): Code factoring.
2581         (WebCore::MediaControlElement::attach): Implement attach
2582         and call super class so that children are also attached.
2583         (WebCore::MediaControlElement::updateStyle): Use attach()
2584         (WebCore::MediaControlInputElement::styleForElement): Code factoring.
2585         (WebCore::MediaControlInputElement::rendererIsNeeded): Code factoring.
2586         (WebCore::MediaControlInputElement::attach): See above.
2587         (WebCore::MediaControlInputElement::updateStyle): Use attach()
2588         * rendering/MediaControlElements.h:
2589         * rendering/RenderMedia.cpp:
2590         (WebCore::RenderMedia::updateControls): Directly run attach() on
2591         the m_panel, which is a root node for our shadow tree.
2592
2593 2009-07-07  Simon Fraser  <simon.fraser@apple.com>
2594
2595         Reviewed by Dan Bernstein.
2596
2597         Repaint issue after layer drops out of composited mode.
2598         <https://bugs.webkit.org/show_bug.cgi?id=27022>
2599
2600         RenderLayers cache repaint rects in the form of m_repaintRect and m_outlineBox,
2601         and expect these to stay valid from one style change to the next. These rects
2602         are relative to the repaint container, so if a layer stops being composited,
2603         we need to recompute them.
2604         
2605         Test: compositing/repaint/layer-repaint-rects.html
2606
2607         * rendering/RenderLayer.cpp:
2608         (WebCore::RenderLayer::computeRepaintRects):
2609         * rendering/RenderLayer.h:
2610         * rendering/RenderLayerCompositor.cpp:
2611         (WebCore::RenderLayerCompositor::updateBacking):
2612
2613 2009-07-07  Dan Bernstein  <mitz@apple.com>
2614
2615         Reviewed by Dave Hyatt and Darin Adler.
2616
2617         - fix https://bugs.webkit.org/show_bug.cgi?id=26963
2618           <rdar://problem/7030998> Reproducible crash at
2619           FontCache::getFontData() when a custom font is used in a pseudo-style
2620
2621         Test: fast/css/pseudo-cache-stale.html
2622
2623         * dom/Element.cpp:
2624         (WebCore::Element::pseudoStyleCacheIsInvalid): Added. Given the old
2625         style and the new style, goes over cached pseudo-styles in the old
2626         style and re-resolves the same style types off the new style. If any of
2627         the new pseudo-styles is different from the currently cached
2628         corresponding style, returns true. Otherwise, returns false.
2629         (WebCore::Element::recalcStyle): Validate the pseudo-style cache before
2630         deciding to keep the existing style.
2631         * dom/Element.h:
2632         * rendering/RenderObject.cpp:
2633         (WebCore::RenderObject::uncachedFirstLineStyle): Added this version that
2634         returns an uncached first-line style based off the given style.
2635         (WebCore::RenderObject::getUncachedPseudoStyle): Added the 'ownStyle'
2636         parameter.
2637         * rendering/RenderObject.h:
2638         * rendering/style/RenderStyle.cpp:
2639         (WebCore::RenderStyle::getPseudoStyleCache): Added. Returns the cached
2640         pseudo-styles in the passed-in vector.
2641         * rendering/style/RenderStyle.h:
2642
2643 2009-07-07  Dan Bernstein  <mitz@apple.com>
2644
2645         Reviewed by Simon Fraser.
2646
2647         - fix https://bugs.webkit.org/show_bug.cgi?id=27042
2648           <rdar://problem/7010981> Incomplete painting of newly created floats
2649
2650         Tests: fast/repaint/float-in-new-block-with-layout-delta.html
2651                fast/repaint/float-new-in-block.html
2652
2653         * rendering/RenderBlock.cpp:
2654         (WebCore::RenderBlock::layoutBlockChildren): If the child has never been
2655         laid out before, paint its overhanging floats in addition to itself.
2656         * rendering/RenderBlock.h:
2657         (WebCore::RenderBlock::FloatWithRect::FloatWithRect): Added and
2658         initialized a boolean everHadLayout member.
2659         * rendering/bidi.cpp:
2660         (WebCore::RenderBlock::layoutInlineChildren): Paint floats that have
2661         never been laid out before and did not move from (0, 0).
2662
2663 2009-07-07  Brady Eidson  <beidson@apple.com>
2664
2665         Contributions from both Darin Adler and Brady Eidson.
2666         Reviewed by Darin Adler.
2667
2668         <rdar://problem/7024039> REGRESSION (r42158): Back-forward navigation does not work correctly on nytimes.com
2669
2670         In r42158 we lost some exclusions to making back/forward items for subframe navigations when a main frame
2671         navigation was still in progress.
2672
2673         This patch makes things even better than it used to be by:
2674         - Locking back/forward history at the time the navigation is scheduled, not after the load has committed.
2675         - Locking back/forward history if *any* ancestor frame is still loading instead of just the main frame.
2676
2677         Test: fast/loader/subframe-navigate-during-main-frame-load.html
2678
2679         * loader/FrameLoader.cpp:
2680         (WebCore::FrameLoader::submitForm): Move out the history locking logic into a standalone function so it can be
2681           used from multiple sites.
2682         (WebCore::mustLockBackForwardList): Returns true if any ancestor frame is still loading.
2683         (WebCore::FrameLoader::scheduleLocationChange): Respect mustLockBackForwardList() in addition to the passed in
2684           lockBackForwardList flag.
2685         (WebCore::FrameLoader::scheduleFormSubmission): Ditto.
2686
2687 2009-07-07  Nate Chapin  <japhet@chromium.org>
2688
2689         Reviewed by Darin Fisher.
2690
2691         Upstream DOMObjectsInclude.h from src.chromium.org.
2692
2693         https://bugs.webkit.org/show_bug.cgi?id=27035
2694
2695         * bindings/v8/DOMObjectsInclude.h: Added.
2696
2697 2009-07-07  Nate Chapin  <japhet@chromium.org>
2698
2699         Reviewed by David Levin.
2700
2701         Relanding r45559, which was rolled back at r45574.
2702
2703         https://bugs.webkit.org/show_bug.cgi?id=26857
2704
2705         * bindings/scripts/CodeGeneratorV8.pm: Updated a function name in auto-generated bindings.
2706         * bindings/v8/V8Binding.cpp: Moved from src.chromium.org.
2707         * bindings/v8/V8Binding.h: Contents moved from src.chromium.org.
2708         * bindings/v8/V8LazyEventListener.cpp:
2709         (WebCore::V8LazyEventListener::getListenerFunction):
2710         * bindings/v8/V8Proxy.cpp:
2711         (WebCore::handleConsoleMessage):
2712         (WebCore::V8Proxy::compileScript):
2713         (WebCore::V8Proxy::sourceName):
2714         * bindings/v8/WorkerContextExecutionProxy.cpp:
2715         (WebCore::handleConsoleMessage):
2716         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
2717         (WebCore::NAMED_PROPERTY_SETTER):
2718         * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
2719         (WebCore::CALLBACK_FUNC_DECL):
2720         * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
2721         (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
2722         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2723         (WebCore::CALLBACK_FUNC_DECL):
2724         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
2725         (WebCore::CALLBACK_FUNC_DECL):
2726         * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
2727         (WebCore::ACCESSOR_SETTER):
2728         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
2729         (WebCore::CALLBACK_FUNC_DECL):
2730         * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
2731         (WebCore::removeElement):
2732         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
2733         (WebCore::CALLBACK_FUNC_DECL):
2734         * bindings/v8/custom/V8WorkerContextCustom.cpp:
2735         (WebCore::SetTimeoutOrInterval):
2736         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
2737         (WebCore::CALLBACK_FUNC_DECL):
2738
2739 2009-07-07  Gregory Hughes  <gfhughesVO+webkit@gmail.com>
2740
2741         Reviewed by Darin Adler.
2742
2743         AX: Some webpages do not send AXLoadComplete
2744         https://bugs.webkit.org/show_bug.cgi?id=26995
2745
2746         When sending the AXLayoutComplete notification it is possible
2747         that the AXObjectCache was cleared, resulting in no valid
2748         object to send the notification to. This fix ensures that an
2749         AX object is created and cached if one does not already exist.
2750
2751         Not able to add a test because notifications get sent after the layout test is completed.
2752
2753         * dom/Document.cpp:
2754         (WebCore::Document::implicitClose):
2755
2756 2009-07-06  Pierre d'Herbemont  <pdherbemont@apple.com>
2757
2758         Reviewed by Simon Fraser.
2759
2760         https://bugs.webkit.org/show_bug.cgi?id=27015
2761
2762         Make sure that the CSS properties letter-spacing, word-spacing,
2763         line-height, text-transform, text-indent, text-shadow,
2764         text-decoration and color do not affect the media element controls,
2765         that display text.
2766
2767         Controls that display text are only present in when the theme
2768         MediaControllerThemeQT is being used.
2769
2770         Test: media/controls-styling.html
2771
2772         * css/mediaControlsQT.css:
2773         * rendering/MediaControlElements.cpp:
2774         (WebCore::MediaControlElement::updateStyle): Special case for
2775         text-decoration. text-decoration can't be overriden from CSS, because
2776         text-decoration is additive for historical reasons.
2777
2778 2009-07-07  Albert Wong  <ajwong@chromium.org>
2779
2780         Not reviewed, Chromium build fix.
2781
2782         Add in missing header + fix syntax issue that crept into last patch.
2783         https://bugs.webkit.org/show_bug.cgi?id=27027
2784
2785         * rendering/RenderThemeChromiumMac.mm:
2786         (WebCore::RenderThemeChromiumMac::paintMediaFullscreenButton):
2787
2788 2009-07-07  Simon Fraser  <simon.fraser@apple.com>
2789
2790         Reviewed by Dave Hyatt.
2791
2792         Make use of geometry information to decide which layers become composited.
2793
2794         <rdar://problem/7011947>
2795         <https://bugs.webkit.org/show_bug.cgi?id=27021>
2796         
2797         In addition to looking at painting order, also, optionally, take layer
2798         overlap into account when deciding which RenderLayers need to be composited.
2799
2800         No testcase because DRT doesn't dump which layers are composited.
2801         
2802         * page/FrameView.h:
2803         * page/FrameView.cpp:
2804         (WebCore::FrameView::updateCompositingLayers):
2805         Removed the unused CompositingUpdate parameter, and just do an early return
2806         when there is no view.
2807         
2808         * rendering/RenderLayer.h:
2809         * rendering/RenderLayer.cpp:
2810         (WebCore::RenderLayer::rendererContentChanged):
2811         (WebCore::RenderLayer::dirtyZOrderLists):
2812         (WebCore::RenderLayer::dirtyNormalFlowList):
2813         (WebCore::RenderLayer::styleChanged):
2814         (WebCore::RenderLayer::mustOverlapCompositedLayers):
2815         (WebCore::RenderLayer::setMustOverlapCompositedLayers):
2816         Change "overlay" to "overlap" for consistency with the use of "overlap"
2817         elsewhere.
2818
2819         * rendering/RenderLayerBacking.cpp:
2820         (WebCore::RenderLayerBacking::updateAfterLayout):
2821         compositingLayersNeedUpdate() renamed to compositingLayersNeedRebuild().
2822         
2823         (WebCore::RenderLayerBacking::startAnimation):
2824         (WebCore::RenderLayerBacking::startTransition):
2825         Tell the compositor that we started an accelerated animation or transition.
2826         
2827         * rendering/RenderLayerCompositor.h:
2828         (WebCore::RenderLayerCompositor::compositingLayersNeedRebuild):
2829         Renamed, since it's explicitly about changes in hierarchy now.
2830         
2831         (WebCore::RenderLayerCompositor::setCompositingConsultsOverlap):
2832         (WebCore::RenderLayerCompositor::compositingConsultsOverlap):
2833         New getter and setter for whether compositing should take overlap into account.
2834
2835         * rendering/RenderLayerCompositor.cpp:
2836         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
2837         Add m_compositingConsultsOverlap, re-order some member variables.
2838         
2839         (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingEnabledFlag):
2840         Whitespace cleanup and method rename.
2841         
2842         (WebCore::RenderLayerCompositor::setCompositingLayersNeedRebuild):
2843         Method and variable renaming.
2844         
2845         (WebCore::RenderLayerCompositor::updateCompositingLayers):
2846         Now we have to run through the layer hierarchy every time if looking
2847         at overlap, because changes in layout can now alter compositing behavior.
2848         We minimize work by tracking whether we actually need to change the layer
2849         hierarchy via needLayerRebuild.
2850         
2851         (WebCore::RenderLayerCompositor::updateBacking):
2852         3D transforms turn off overlap mode.
2853         
2854         (WebCore::RenderLayerCompositor::layerWasAdded):
2855         (WebCore::RenderLayerCompositor::layerWillBeRemoved):
2856         Method rename.
2857         
2858         (WebCore::RenderLayerCompositor::addToOverlapMap):
2859         (WebCore::RenderLayerCompositor::overlapsCompositedLayers):
2860         Utility methods to add a layer to the overlapMap (computing the absolute
2861         bounding box only if we haven't already done so), and testing the map
2862         entries.
2863         
2864         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2865         If a layer would composite only because it comes after other compositing
2866         layers in the painting order, then consult the overlap map to determine whether
2867         it overlaps, and thus actually needs to composite.
2868         
2869         Add layers to the map when they must be composited.
2870         
2871         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
2872         Only do re-parenting work if the updateHierarchy flag is set.
2873         
2874         (WebCore::RenderLayerCompositor::didStartAcceleratedAnimation):
2875         When we start an accelerated transition or animation, we stop looking at
2876         overlap because we can no longer guarantee correct front-to-back ordering while the
2877         accelerated animation is running.
2878
2879         (WebCore::RenderLayerCompositor::needsToBeComposited):
2880         Method renames.
2881         
2882         * rendering/RenderView.cpp:
2883         (WebCore::RenderView::setMaximalOutlineSize):
2884         Add comment indicating that this could be optimized.
2885
2886 2009-07-07  Anton Muhin  <antonm@chromium.org>
2887
2888         Reviewed by Darin Fisher.
2889
2890         Speed up creation of V8 wrappers for DOM nodes.
2891
2892         https://bugs.webkit.org/show_bug.cgi?id=26882
2893
2894         This patch doesn't require new tests as it a set of refactorings
2895         to speed up wrapper creation.  
2896
2897         * bindings/v8/V8Proxy.cpp:
2898         * bindings/v8/V8Proxy.h:
2899
2900 2009-07-07  Jan Michael Alonzo  <jmalonzo@webkit.org>
2901
2902         Reviewed by Gustavo Noronha.
2903
2904         [GTK] textarea height property works only if other property are defined
2905         https://bugs.webkit.org/show_bug.cgi?id=18984
2906
2907         Let WebCore handle textarea's metrics instead of readjusting it RenderthemeGtk.
2908
2909         Test: fast/forms/textarea-metrics.html
2910
2911         * platform/gtk/RenderThemeGtk.cpp:
2912         * platform/gtk/RenderThemeGtk.h:
2913
2914 2009-07-07  Ben Murdoch  <benm@google.com>
2915
2916         Reviewed by Antti Koivisto.
2917
2918         HTML5 Database becomes locked if a transaction is in progress when the page is refreshed.
2919         https://bugs.webkit.org/show_bug.cgi?id=25711
2920
2921         Fix for https://bugs.webkit.org/show_bug.cgi?id=25711 where web
2922         storage databases could become locked until the browser is shut
2923         down if the page is refreshed whilst a transaction is in progress.
2924
2925         Test: storage/database-lock-after-reload.html
2926
2927         * storage/Database.cpp:
2928         (WebCore::Database::Database):
2929         (WebCore::Database::close): add code to inform the database thread we've closed the database.
2930         (WebCore::Database::performOpenAndVerify): add code to inform the database thread we've opened a database.
2931         * storage/Database.h:
2932         (WebCore::Database::opened): return true iff the underlying sqlite database has been opened but not closed.
2933         * storage/DatabaseThread.cpp:
2934         (WebCore::DatabaseThread::databaseThread): Before the database thread terminates, close any databases that ran transactions in this thread.
2935         (WebCore::DatabaseThread::recordDatabaseOpen): Records a database that executed a transaction in this thread.
2936         (WebCore::DatabaseThread::recordDatabaseClosed): Removes a database from the set of open databases.
2937         * storage/DatabaseThread.h:
2938         (WebCore::DatabaseThread::getThreadID): return the thread id for the database thread.
2939
2940 2009-07-07  Jiahua Huang  <jhuangjiahua@gmail.com>
2941
2942         Reviewed by Jan Alonzo.
2943
2944         [Gtk] Paste of rich text from firefox results garbled markup
2945         https://bugs.webkit.org/show_bug.cgi?id=26791
2946
2947         Fix problem with UTF-16 clipboard pasted.
2948
2949         * manual-tests/gtk/paste-richtext-from-firefox.html: Added.
2950         * platform/gtk/PasteboardGtk.cpp:
2951         (WebCore::Pasteboard::documentFragment):
2952
2953 2009-07-07  Yury Semikhatsky  <yurys@chromium.org>
2954
2955         Reviewed by Timothy Hatcher.
2956
2957         Change 'Continue debug' shortcut from F5 to F8 for consistency with Firebug.
2958
2959         https://bugs.webkit.org/show_bug.cgi?id=23849
2960
2961         * inspector/front-end/ScriptsPanel.js:
2962         (WebInspector.ScriptsPanel):
2963
2964 2009-07-06  Albert J. Wong  <ajwong@chromium.org>
2965
2966         Reviewed by Maciej Stachowiak.
2967
2968         Update RenderThemeChromiumMac for wkDrawMediaUIPart and wkDrawMediaSlider API
2969         change.
2970
2971         Fix compile RenderThemeChromiumMac.mm due to API changes from r45572
2972         https://bugs.webkit.org/show_bug.cgi?id=27018
2973
2974         This is mainly an API change update to fix the chromium compile.  It
2975         also has a small fix of a typo in RenderThemeMac.mm.
2976
2977         Compilation against the head of chromium trunk passed.  Since this is
2978         a compile fix, that should be sufficient.
2979
2980         * rendering/RenderThemeChromiumMac.mm:
2981         (WebCore::):
2982         (WebCore::RenderThemeChromiumMac::paintMediaFullscreenButton):
2983         (WebCore::RenderThemeChromiumMac::paintMediaMuteButton):
2984         (WebCore::RenderThemeChromiumMac::paintMediaPlayButton):
2985         (WebCore::RenderThemeChromiumMac::paintMediaSeekBackButton):
2986         (WebCore::RenderThemeChromiumMac::paintMediaSeekForwardButton):
2987         (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack):
2988         (WebCore::RenderThemeChromiumMac::paintMediaSliderThumb):
2989         * rendering/RenderThemeMac.mm:
2990         (WebCore::):
2991
2992 2009-07-06  David Kilzer  <ddkilzer@apple.com>
2993
2994         Bug 27002: Build fix when DASHBOARD_SUPPORT is disabled with -Wunused-parameter
2995
2996         <https://bugs.webkit.org/show_bug.cgi?id=27002>
2997
2998         Reviewed by Geoff Garen.
2999
3000         * html/CanvasRenderingContext2D.cpp:
3001         (WebCore::CanvasRenderingContext2D::prepareGradientForDashboard):
3002         Mark gradient as an unused parameter when DASHBOARD_SUPPORT is
3003         disabled.
3004
3005 2009-07-06  David Kilzer  <ddkilzer@apple.com>
3006
3007         Bug 27001: Fix improper use of PassRefPtr<Node> to RefPtr<Node>
3008
3009         <https://bugs.webkit.org/show_bug.cgi?id=27001>
3010
3011         Reviewed by Geoff Garen.
3012
3013         PassRefPtr<> should only be used for arguments to functions that
3014         take ownership of the object, or as return values from functions
3015         that relinquish ownership of the object.
3016
3017         * editing/Editor.cpp:
3018         (WebCore::Editor::increaseSelectionListLevelOrdered): Changed
3019         stack-allocated PassRefPtr<Node> to RefPtr<Node> and call
3020         release() on returned object.
3021         (WebCore::Editor::increaseSelectionListLevelUnordered): Ditto.
3022
3023 2009-07-06  Eric Carlson  <eric.carlson@apple.com>
3024
3025         Reviewed by Simon Fraser.
3026
3027         <rdar://problem/7035474> Make new media controller UI default on SnowLeopard
3028
3029         * rendering/RenderThemeMac.mm:
3030         (WebCore::mediaControllerTheme):
3031             New media controller UI is enabled by default on SnowLeopard.
3032
3033 2009-07-06  Nate Chapin  <japhet@chromium.org>
3034
3035         Unreviewed, build fix.
3036
3037         Roll out r45559 to fix Chromium canary.
3038
3039         https://bugs.webkit.org/show_bug.cgi?id=26857
3040
3041         * bindings/scripts/CodeGeneratorV8.pm:
3042         * bindings/v8/V8Binding.cpp: Removed.
3043         * bindings/v8/V8Binding.h:
3044         (WebCore::toInt32):
3045         (WebCore::toWebCoreString):
3046         (WebCore::fromWebCoreString):
3047         (WebCore::toWebCoreStringWithNullCheck):
3048         (WebCore::isUndefinedOrNull):
3049         (WebCore::v8Boolean):
3050         * bindings/v8/V8LazyEventListener.cpp:
3051         (WebCore::V8LazyEventListener::getListenerFunction):
3052         * bindings/v8/V8Proxy.cpp:
3053         (WebCore::handleConsoleMessage):
3054         (WebCore::V8Proxy::compileScript):
3055         (WebCore::V8Proxy::sourceName):
3056         * bindings/v8/WorkerContextExecutionProxy.cpp:
3057         (WebCore::handleConsoleMessage):
3058         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
3059         (WebCore::NAMED_PROPERTY_SETTER):
3060         * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
3061         (WebCore::CALLBACK_FUNC_DECL):
3062         * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
3063         (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
3064         * bindings/v8/custom/V8DOMWindowCustom.cpp:
3065         (WebCore::CALLBACK_FUNC_DECL):
3066         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
3067         (WebCore::CALLBACK_FUNC_DECL):
3068         * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
3069         (WebCore::ACCESSOR_SETTER):
3070         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
3071         (WebCore::CALLBACK_FUNC_DECL):
3072         * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
3073         (WebCore::removeElement):
3074         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
3075         (WebCore::CALLBACK_FUNC_DECL):
3076         * bindings/v8/custom/V8WorkerContextCustom.cpp:
3077         (WebCore::SetTimeoutOrInterval):
3078         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
3079         (WebCore::CALLBACK_FUNC_DECL):
3080
3081 2009-07-06  Eric Carlson  <eric.carlson@apple.com>
3082
3083         Reviewed by Darin Adler.
3084
3085         <rdar://problem/7008093> Media controller can’t be used to scrub when movie is 
3086         narrow — track is too narrow
3087
3088         Do not show media controller time display elements when the a movie is too narrow.
3089
3090         * platform/mac/WebCoreSystemInterface.h:
3091         * platform/mac/WebCoreSystemInterface.mm:
3092             The 'state' parameter to wkDrawMediaUIPart is now an unsigned bitfield.
3093
3094         * rendering/MediaControlElements.cpp:
3095         (WebCore::MediaControlTimeDisplayElement::MediaControlTimeDisplayElement):
3096             Give current time and time remaining controls a common base class.
3097         (WebCore::MediaControlTimeDisplayElement::setVisible):
3098             New method, hide and show the element.
3099         * rendering/MediaControlElements.h:
3100
3101         * rendering/RenderMedia.cpp:
3102         (WebCore::RenderMedia::RenderMedia):
3103             Initialize m_previousVisible.
3104         (WebCore::RenderMedia::layout):
3105             Show/hide the time display elements as the movie width changes.
3106         (WebCore::RenderMedia::createCurrentTimeDisplay):
3107         (WebCore::RenderMedia::createTimeRemainingDisplay):
3108             Base class is now MediaControlTimeDisplayElement, not MediaControlElement.
3109         (WebCore::RenderMedia::shouldShowTimeDisplayControls):
3110             New, decide if time display elements should be visible or not.
3111         * rendering/RenderMedia.h:
3112
3113         * rendering/RenderThemeMac.mm:
3114         (WebCore::):
3115         (WebCore::RenderThemeMac::paintMediaFullscreenButton):
3116         (WebCore::RenderThemeMac::paintMediaMuteButton):
3117         (WebCore::RenderThemeMac::paintMediaPlayButton):
3118         (WebCore::RenderThemeMac::paintMediaSeekBackButton):
3119         (WebCore::RenderThemeMac::paintMediaSeekForwardButton):
3120         (WebCore::RenderThemeMac::paintMediaSliderTrack):
3121         (WebCore::RenderThemeMac::paintMediaSliderThumb):
3122         (WebCore::RenderThemeMac::paintMediaRewindButton):
3123         (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton):
3124         (WebCore::RenderThemeMac::paintMediaControlsBackground):
3125         (WebCore::RenderThemeMac::paintMediaCurrentTime):
3126         (WebCore::RenderThemeMac::paintMediaTimeRemaining):
3127             The 'state' parameter to wkDrawMediaUIPart is now an unsigned bitfield.
3128
3129 2009-07-06  David Kilzer  <ddkilzer@apple.com>
3130
3131         Bug 27000: Minor clean up to runtime_root.{cpp|h}
3132
3133         <https://bugs.webkit.org/show_bug.cgi?id=27000>
3134
3135         Reviewed by Geoff Garen.
3136
3137         * bridge/runtime_root.cpp: Added blank line between license and
3138         the first #include statement.
3139         * bridge/runtime_root.h: Added comment to #endif.
3140
3141 2009-07-06  Roland Steiner  <rolandsteiner@google.com>
3142
3143         Reviewed by Maciej Stachowiak.
3144
3145         generalize the special height treatment for SVG (to be re-used for ruby):
3146             renamed InlineBox::m_isSVG to m_hasVirtualHeight
3147             renamed InlineBox::isSVG() to hasVirtualHeight()
3148             renamed InlineBox::setIsSVG() to setHasVirtualHeight()
3149
3150         * rendering/InlineBox.cpp:
3151         (WebCore::InlineBox::height):
3152         * rendering/InlineBox.h:
3153         (WebCore::InlineBox::InlineBox):
3154         (WebCore::InlineBox::isText):
3155         (WebCore::InlineBox::setIsText):
3156         (WebCore::InlineBox::isSVGRootInlineBox):
3157         (WebCore::InlineBox::hasVirtualHeight):
3158         (WebCore::InlineBox::setHasVirtualHeight):
3159         (WebCore::InlineBox::virtualHeight):
3160         * rendering/RenderSVGInline.cpp:
3161         (WebCore::RenderSVGInline::createFlowBox):
3162         * rendering/RenderSVGInlineText.cpp:
3163         (WebCore::RenderSVGInlineText::createTextBox):
3164         * rendering/RenderSVGText.cpp:
3165         (WebCore::RenderSVGText::createRootBox):
3166         * rendering/SVGInlineFlowBox.h:
3167         (WebCore::SVGInlineFlowBox::virtualHeight):
3168         * rendering/SVGInlineTextBox.h:
3169         (WebCore::SVGInlineTextBox::virtualHeight):
3170         * rendering/SVGRootInlineBox.h:
3171         (WebCore::SVGRootInlineBox::virtualHeight):
3172
3173 2009-07-06  Alice Liu  <alice.liu@apple.com>
3174
3175         Reviewed by Darin Adler.
3176
3177         REGRESSION(r45285): focus rings are black on windows safari
3178         https://bugs.webkit.org/show_bug.cgi?id=26821
3179         <rdar://problem/7018252>
3180
3181         Add a mechanism for setting a custom focus ring color, and relocate the 
3182         determination of focus ring color to base class RenderTheme.
3183
3184         No new tests.  Already-existing tests run in pixel mode would have caught this regression
3185
3186         * css/CSSStyleSelector.cpp:
3187         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Move the responsibility
3188         of determining focus color to base class RenderTheme.
3189         * rendering/RenderTheme.cpp:
3190         (WebCore::customFocusRingColor): Added static local.
3191         (WebCore::RenderTheme::setCustomFocusRingColor): Added
3192         (WebCore::RenderTheme::focusRingColor): Use custom color over platform color.
3193         * rendering/RenderTheme.h:
3194         (WebCore::RenderTheme::platformFocusRingColor): default implementation, black color
3195         * rendering/RenderThemeSafari.cpp:
3196         (WebCore::RenderTheme::themeForPage): Circumstances that lead to returning the RenderThemeWin
3197         are the same under which we want to use the focus ring color from SafariTheme.
3198         (WebCore::RenderThemeSafari::platformFocusRingColor): Renamed from focusRingColor
3199         * rendering/RenderThemeSafari.h:
3200
3201         Renaming focusRingColor to platformFocusRingColor in these files:
3202         * rendering/RenderThemeChromiumMac.h:
3203         * rendering/RenderThemeChromiumMac.mm:
3204         (WebCore::RenderThemeChromiumMac::platformFocusRingColor):
3205         * rendering/RenderThemeChromiumSkia.cpp:
3206         (WebCore::RenderThemeChromiumSkia::platformFocusRingColor):
3207         * rendering/RenderThemeChromiumSkia.h:
3208         * rendering/RenderThemeMac.h:
3209         * rendering/RenderThemeMac.mm:
3210         (WebCore::RenderThemeMac::platformFocusRingColor):
3211
3212         Cleanup leftover from removal of WebCore::Color in r45285 in these files:
3213         * WebCore.order:
3214         * platform/graphics/Color.h:
3215
3216 2009-07-06  Shinichiro Hamaji  <hamaji@chromium.org>
3217
3218         Reviewed by David Hyatt.
3219
3220         Bug 15135: REGRESSION (r19843-r19850): Changing a flexbox's
3221         contents makes its container scroll to the top
3222         https://bugs.webkit.org/show_bug.cgi?id=15135
3223
3224         Delay updateing scroll bar of descendants of flexbox until their
3225         positions are determined.  In this way we can prevent descendants
3226         of flexible boxes from changing positions of their scrollbars
3227         using tentative positions.
3228
3229         Test: fast/flexbox/repaint-scrollbar.html
3230
3231         * rendering/RenderBlock.cpp:
3232         (WebCore::RenderBlock::startDelayUpdateScrollInfo):
3233         (WebCore::RenderBlock::finishDelayUpdateScrollInfo):
3234         (WebCore::RenderBlock::updateScrollInfoAfterLayout):
3235         (WebCore::RenderBlock::layoutBlock):
3236         (WebCore::RenderBlock::layoutOnlyPositionedObjects):
3237         * rendering/RenderBlock.h:
3238         * rendering/RenderFlexibleBox.cpp:
3239         (WebCore::RenderFlexibleBox::layoutHorizontalBox):
3240         (WebCore::RenderFlexibleBox::layoutVerticalBox):
3241
3242 2009-07-06  Hironori Bono  <hbono@chromium.org>
3243
3244         Reviewed by Maciej Stachowiak.
3245
3246         Make unconfirmed IME text affect textarea's value.
3247         This matches input and contentEditable elements as well
3248         IE and Firefox.
3249
3250         This fixes https://bugs.webkit.org/show_bug.cgi?id=25061.
3251
3252         Input elements would go down this code path because it
3253         would always get a null compositionNode from frame->editor().
3254         Special casing compositionNodes is wrong because we explicitly
3255         want unconfirmed IME input in the textarea's value (assuming we
3256         want to match IE and Firefox here).
3257
3258         This change is originally created by Ojan Vafai <ojan@chromium.org> and
3259         I just changed its manual tests with an automated test on his behalf.
3260
3261         Test: platform/mac/editing/input/text-control-ime-input.html
3262
3263         * rendering/RenderTextControl.cpp:
3264         (WebCore::RenderTextControl::text):
3265         (WebCore::RenderTextControl::textWithHardLineBreaks):
3266
3267 2009-07-06  Anders Carlsson  <andersca@apple.com>
3268
3269         Reviewed by Adele Peterson.
3270
3271         Add the ability for wheel events to latch to a node.
3272         
3273         * WebCore.base.exp:
3274         * page/EventHandler.cpp:
3275         (WebCore::EventHandler::EventHandler):
3276         (WebCore::EventHandler::clear):
3277         (WebCore::EventHandler::handleWheelEvent):
3278         * page/EventHandler.h:
3279         * page/mac/EventHandlerMac.mm:
3280         (WebCore::EventHandler::wheelEvent):
3281         * platform/mac/WebCoreSystemInterface.h:
3282         * platform/mac/WebCoreSystemInterface.mm:
3283
3284 2009-07-06  Nate Chapin  <japhet@chromium.org>
3285
3286         Reviewed by Dimitri Glazkov.
3287
3288         Fix a bunch of layout test crahses in Chromium caused by a bad usage of DEFINE_STATIC_LOCAL.
3289
3290         https://bugs.webkit.org/show_bug.cgi?id=26997
3291
3292         * bindings/v8/V8Binding.cpp:
3293         (WebCore::v8ValueToWebCoreString): Use a regular static declaration instead of DEFINE_STATIC_LOCAL.
3294
3295 2009-07-06  Pavel Feldman  <pfeldman@chromium.org>
3296
3297         Reviewed by Timothy Hatcher.
3298
3299         WebInspector: suggest global properties based on async evaluation.
3300
3301         https://bugs.webkit.org/show_bug.cgi?id=26976
3302
3303         Before this change, empty string was evaluated to the global object
3304         (or scope chain object) synchronously. This is now fixed and global
3305         object is evaluated using the same control flow.
3306
3307         * inspector/front-end/Console.js:
3308         (WebInspector.Console.prototype.completions):
3309         (WebInspector.Console.prototype._evalInInspectedWindow):
3310         * inspector/front-end/ScriptsPanel.js:
3311         (WebInspector.ScriptsPanel.prototype._variablesInScope):
3312
3313 2009-07-06  Ojan Vafai  <ojan@chromium.org>
3314
3315         Reviewed by Eric Seidel.
3316
3317         Fix crash when indenting in an empty table cell.
3318         https://bugs.webkit.org/show_bug.cgi?id=26872
3319
3320         The crash is that we would call splitTreeToNode where the node
3321         and the nodeToSplitTo were the same node.
3322
3323         Test: editing/execCommand/indent-empty-table-cell.html
3324
3325         * editing/CompositeEditCommand.cpp:
3326         (WebCore::CompositeEditCommand::splitTreeToNode):
3327         Added an assert in that node and nodeToSplitTo
3328         are different nodes to make this assumption explicit.
3329
3330         * editing/IndentOutdentCommand.cpp:
3331         (WebCore::IndentOutdentCommand::isAtUnsplittableElement):
3332         (WebCore::IndentOutdentCommand::indentRegion):
3333         * editing/IndentOutdentCommand.h:
3334
3335 2009-07-06  Nate Chapin  <japhet@chromium.org>
3336
3337         Reviewed by David Levin.
3338
3339         Upstream V8Binding and update some function names.
3340
3341         https://bugs.webkit.org/show_bug.cgi?id=26857
3342
3343         * bindings/scripts/CodeGeneratorV8.pm: Update function names in auto-generated files.
3344         * bindings/v8/V8Binding.cpp: Upstreamed from src.chromium.org.
3345         * bindings/v8/V8Binding.h: Upstreamed from src.chromium.org.
3346         * bindings/v8/V8LazyEventListener.cpp:
3347         (WebCore::V8LazyEventListener::getListenerFunction):
3348         * bindings/v8/V8Proxy.cpp:
3349         (WebCore::handleConsoleMessage):
3350         (WebCore::V8Proxy::compileScript):
3351         (WebCore::V8Proxy::sourceName):
3352         * bindings/v8/WorkerContextExecutionProxy.cpp:
3353         (WebCore::handleConsoleMessage):
3354         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
3355         (WebCore::NAMED_PROPERTY_SETTER):
3356         * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
3357         (WebCore::CALLBACK_FUNC_DECL):
3358         * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
3359         (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
3360         * bindings/v8/custom/V8DOMWindowCustom.cpp:
3361         (WebCore::CALLBACK_FUNC_DECL):
3362         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
3363         (WebCore::CALLBACK_FUNC_DECL):
3364         * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
3365         (WebCore::ACCESSOR_SETTER):
3366         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
3367         (WebCore::CALLBACK_FUNC_DECL):
3368         * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
3369         (WebCore::removeElement):
3370         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
3371         (WebCore::CALLBACK_FUNC_DECL):
3372         * bindings/v8/custom/V8WorkerContextCustom.cpp:
3373         (WebCore::SetTimeoutOrInterval):
3374         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
3375         (WebCore::CALLBACK_FUNC_DECL):
3376
3377 2009-07-06  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
3378
3379         Reviewed by Jan Alonzo.
3380
3381         Use soup's content sniffing
3382         https://bugs.webkit.org/show_bug.cgi?id=26982
3383
3384         Drop our hackish content sniffing code, and use the new libsoup
3385         feature to do that job for us.
3386
3387         Testing this is in a cross-platform way is not obvious or possible
3388         while we are using platform-specific code for sniffing.
3389
3390         * platform/network/ResourceHandleInternal.h:
3391         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
3392         * platform/network/soup/ResourceHandleSoup.cpp:
3393         (WebCore::gotHeadersCallback):
3394         (WebCore::contentSniffedCallback):
3395         (WebCore::gotChunkCallback):
3396         (WebCore::ResourceHandle::startHttp):
3397
3398 2009-07-05  Antonio Gomes  <antonio.gomes@openbossa.org>
3399
3400         Reviewed by Darin Adler.
3401
3402         REGRESSION (r40499): fast/dom/cssTarget-crash.html fails
3403         https://bugs.webkit.org/show_bug.cgi?id=20342
3404
3405         Re-added code removed by commit r40499.
3406         Without this, both Qt and Mac were crashing while running the test.
3407
3408         Note that this does not entirely fix the bug. It fixes the WebCore
3409         crash, but the test no longer seems to work due to loader changes.
3410         So this patch does not reenable the test. The test probably has to
3411         be rewritten.
3412
3413         * dom/ContainerNode.cpp:
3414         (WebCore::ContainerNode::removedFromDocument): Re-added code to
3415         set the CSS target of the document to 0.
3416
3417 2009-07-05  Chris Marrin  <cmarrin@apple.com>
3418
3419         Reviewed by Simon Fraser.
3420
3421         https://bugs.webkit.org/show_bug.cgi?id=26943
3422
3423         When one transition finishes slightly before another the longer
3424         one will fire a second time. This is because the second
3425         ImplicitAnmation object is culled too early, before its final
3426         RenderStyle is in place. This is done by cleanupFinishedAnimations()
3427         so I got rid of that method completely and now cleanup each
3428         transition or animation at the point where I am setting the final
3429         style, or when I detect that the transition or animation has been
3430         terminated early (which happens when you remove it from the style).
3431
3432         Test: transitions/extra-transition.html
3433
3434         * page/animation/AnimationController.cpp:
3435         (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
3436         * page/animation/CompositeAnimation.cpp:
3437         (WebCore::CompositeAnimation::updateTransitions):
3438         (WebCore::CompositeAnimation::updateKeyframeAnimations):
3439         (WebCore::CompositeAnimation::animate):
3440         * page/animation/CompositeAnimation.h:
3441
3442         * page/animation/AnimationBase.cpp:
3443         (WebCore::AnimationBase::getTimeToNextEvent):
3444         Avoid a divide by zero if m_animation->duration() is zero, which can happen
3445         if the duration is changed to zero while the animation is running.
3446
3447 2009-07-05  Simon Fraser  <simon.fraser@apple.com>
3448
3449         Revert the previous commit because it broke the
3450         animations/transition-and-animation-1.html
3451         testcase.
3452
3453         * page/animation/AnimationBase.cpp:
3454         (WebCore::AnimationBase::getTimeToNextEvent):
3455         * page/animation/AnimationController.cpp:
3456         (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
3457         * page/animation/CompositeAnimation.cpp:
3458         (WebCore::CompositeAnimation::updateTransitions):
3459         (WebCore::CompositeAnimation::updateKeyframeAnimations):
3460         (WebCore::CompositeAnimation::animate):
3461         (WebCore::CompositeAnimation::cleanupFinishedAnimations):
3462         * page/animation/CompositeAnimation.h:
3463
3464 2009-07-05  Chris Marrin  <cmarrin@apple.com>
3465
3466         Reviewed by Simon Fraser.
3467
3468         https://bugs.webkit.org/show_bug.cgi?id=26943
3469
3470         When one transition finishes slightly before another the longer
3471         one will fire a second time. This is because the second 
3472         ImplicitAnmation object is culled too early, before its final
3473         RenderStyle is in place. This is done by cleanupFinishedAnimations()
3474         so I got rid of that method completely and now cleanup each 
3475         transition or animation at the point where I am setting the final
3476         style, or when I detect that the transition or animation has been
3477         terminated early (which happens when you remove it from the style).
3478
3479         Test: transitions/extra-transition.html
3480
3481         * page/animation/AnimationController.cpp:
3482         (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
3483         * page/animation/CompositeAnimation.cpp:
3484         (WebCore::CompositeAnimation::updateTransitions):
3485         (WebCore::CompositeAnimation::updateKeyframeAnimations):
3486         (WebCore::CompositeAnimation::animate):
3487         * page/animation/CompositeAnimation.h:
3488
3489         * page/animation/AnimationBase.cpp:
3490         (WebCore::AnimationBase::getTimeToNextEvent):
3491         Avoid a divide by zero if m_animation->duration() is zero, which can happen
3492         if the duration is changed to zero while the animation is running.
3493
3494 2009-07-05  Lars Knoll  <lars.knoll@nokia.com>
3495
3496         Reviewed by Maciej Stachowiak.
3497
3498         https://bugs.webkit.org/show_bug.cgi?id=26843
3499
3500         Fix run-time crashes in JavaScriptCore with the Metrowerks compiler on Symbian.
3501
3502         The Metrowerks compiler on the Symbian platform moves the globally
3503         defined Hashtables into read-only memory, despite one of the members
3504         being mutable. This causes crashes at run-time due to write access to
3505         read-only memory.
3506
3507         Avoid the use of const with this compiler by introducing the
3508         JSC_CONST_HASHTABLE macro.
3509
3510         Based on idea by Norbert Leser.
3511
3512         * bindings/scripts/CodeGeneratorJS.pm: Use JSC_CONST_HASHTABLE for hash tables
3513         define in the bindings.
3514
3515 2009-07-05  Rob Buis  <rwlbuis@gmail.com>
3516
3517         Reviewed by Maciej Stachowiak.
3518
3519         Bug 26897 - Dynamic SVG images do not display correctly
3520         https://bugs.webkit.org/show_bug.cgi?id=26897
3521
3522         Use repaint() to fix a rendering problem with a SVG image embedded in xhtml.
3523
3524         Test: svg/custom/createImageElement2.xhtml
3525
3526         * rendering/RenderSVGImage.cpp:
3527         (WebCore::RenderSVGImage::imageChanged):
3528
3529 2009-07-05  Xan Lopez  <xlopez@igalia.com>
3530
3531         Reviewed by Jan Alonzo.
3532
3533         https://bugs.webkit.org/show_bug.cgi?id=26960
3534         [Gtk] caret offset not updated when selecting text
3535
3536         Report the caret offset from the end of the selection so it works
3537         correctly for multi-char selections too (ie, anything that is not
3538         the zero width caret).
3539
3540         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
3541         (webkit_accessible_text_get_caret_offset):
3542
3543 2009-07-05  Holger Hans Peter Freyther  <zecke@selfish.org>
3544
3545         Unreviewed link fix for Qt.
3546
3547         Fix Qt link error by adding two new localized strings
3548
3549         In r45474 two new strings got added to LocalizedStrings.h add
3550         the definition of them to Qt.
3551
3552         * platform/qt/Localizations.cpp:
3553         (WebCore::mediaElementLoadingStateText):
3554         (WebCore::mediaElementLiveBroadcastStateText):
3555
3556 2009-07-03  Darin Adler  <darin@apple.com>
3557
3558         Reviewed by Adele Peterson.
3559
3560         REGRESSION (r44670-r44680): Typing is suprisingly slow in password field on reddit.com
3561         https://bugs.webkit.org/show_bug.cgi?id=26959
3562         rdar://problem/7029882
3563
3564         The code to handle iteration boundaries was malfunctioning when the boundary was
3565         at the edge of a shadow tree. This happens all the time with <input> elements.
3566
3567         It's not immediately obvious how to make a regression test for this since the
3568         symptom was a performance problem, not incorrect behavior. I'll add a test if I
3569         figure out a way to make one.
3570
3571         * editing/TextIterator.cpp:
3572         (WebCore::parentCrossingShadowBoundaries): Renamed from parentOrShadowParent.
3573         (WebCore::depthCrossingShadowBoundaries): Updated for name change.
3574         (WebCore::nextInPreOrderCrossingShadowBoundaries): Added.
3575         (WebCore::previousInPostOrderCrossingShadowBoundaries): Added.
3576         (WebCore::setUpFullyClippedStack): Updated for name change.
3577         (WebCore::TextIterator::TextIterator): Updated for name change. Use
3578         nextInPreOrderCrossingShadowBoundaries instead of Range::pastLastNode to fix the bug.
3579         (WebCore::TextIterator::advance): Updated for name change.
3580         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
3581         Tweaked formatting.
3582         (WebCore::SimplifiedBackwardsTextIterator::advance): Ditto. Changed code that
3583         initializes m_pastStartNode to use previousInPostOrderCrossingShadowBoundaries.
3584         (WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode): Tweaked formatting.
3585         (WebCore::SimplifiedBackwardsTextIterator::exitNode): Ditto.
3586
3587 2009-07-03  Simon Fraser  <simon.fraser@apple.com>
3588
3589         Reviewed by Sam Weinig.
3590
3591         Background audio stops playing when JS GC runs
3592         https://bugs.webkit.org/show_bug.cgi?id=26956
3593         
3594         Ensure we keep the Audio object around while it is playing, so that it
3595         doesn't get collected.
3596         
3597         Not testable because there's no way to know whether the audio keeps
3598         playing without holding a reference to it.
3599
3600         * bindings/js/JSDOMBinding.cpp:
3601         (WebCore::isObservableThroughDOM):
3602
3603 2009-07-02  Xan Lopez  <xlopez@igalia.com>
3604
3605         Reviewed by Jan Alonzo.
3606
3607         https://bugs.webkit.org/show_bug.cgi?id=26814
3608         [Gtk] Caret-moved events are not issued for the correct offset
3609         when text is selected forward
3610
3611         Report the caret offset from the end of the selection, otherwise
3612         we'll report the same offset when moving the caret while
3613         modififying the selection (eg, with Shift + Right).
3614
3615         * editing/gtk/SelectionControllerGtk.cpp:
3616         (WebCore::SelectionController::notifyAccessibilityForSelectionChange):
3617
3618 2009-07-02  Xan Lopez  <xlopez@igalia.com>
3619
3620         Reviewed by Jan Alonzo.
3621
3622         https://bugs.webkit.org/show_bug.cgi?id=26815
3623         [Gtk] text-selection-changed events are not issued for the correct
3624         object when the selection spans multiple objects
3625
3626         Get the focused node from the end of the selection, not the start,
3627         so we can detect when we cross object boundaries.
3628
3629         * editing/gtk/SelectionControllerGtk.cpp:
3630         (WebCore::SelectionController::notifyAccessibilityForSelectionChange):
3631
3632 2009-07-02  Pierre d'Herbemont  <pdherbemont@apple.com>
3633
3634         Reviewed by Simon Fraser.
3635
3636         https://bugs.webkit.org/show_bug.cgi?id=26947
3637
3638         Fix the media controls hit tests. They may lose click events.
3639
3640         Test cases already covered in the video-controls-zoomed tests.
3641
3642         Don't trust wkHitTestMediaUIPart for the tests. We are accurate enough.
3643
3644         * rendering/RenderThemeMac.h: Remove hitTestMediaControlPart.
3645         * rendering/RenderThemeMac.mm: Remove hitTestMediaControlPart.
3646
3647 2009-07-02  Roland Steiner  <rolandsteiner@google.com>
3648
3649         Reviewed by Eric Seidel.
3650
3651         RenderBlock and RenderInline have confusingly named object creation methods:
3652         RenderBlock::createRootBox/createRootInlineBox
3653         RenderInline::createFlowBox/createInlineFlowBox
3654         where the 2nd method in both cases just calls the first and then appends the created object.
3655         I therefore renamed those methods to something IMHO more informative:
3656         
3657         createRootBox()         -> createRootInlineBox()
3658         createRootInlineBox()   -> createAndAppendRootInlineBox();
3659         createFlowBox()         -> createInlineFlowBox();
3660         createInlineFlowBox()   -> createAndAppendInlineFlowBox();
3661
3662         https://bugs.webkit.org/show_bug.cgi?id=26828
3663
3664         * rendering/RenderBlock.cpp:
3665         (WebCore::RenderBlock::createRootInlineBox):
3666         (WebCore::RenderBlock::createAndAppendRootInlineBox):
3667         * rendering/RenderBlock.h:
3668         * rendering/RenderInline.cpp:
3669         (WebCore::RenderInline::createInlineFlowBox):
3670         (WebCore::RenderInline::createAndAppendInlineFlowBox):
3671         * rendering/RenderInline.h:
3672         * rendering/RenderSVGInline.cpp:
3673         (WebCore::RenderSVGInline::createInlineFlowBox):
3674         * rendering/RenderSVGInline.h:
3675         * rendering/RenderSVGText.cpp:
3676         (WebCore::RenderSVGText::createRootInlineBox):
3677         * rendering/RenderSVGText.h:
3678         * rendering/bidi.cpp:
3679         (WebCore::createInlineBoxForRenderer):
3680
3681 2009-07-02  Pavel Feldman  <pfeldman@chromium.org>
3682
3683         Reviewed by Timothy Hatcher.
3684
3685         WebInspector: Fix typo in the resource panel enabler caption.
3686
3687         https://bugs.webkit.org/show_bug.cgi?id=26753
3688
3689         * English.lproj/localizedStrings.js:
3690         * inspector/front-end/ResourcesPanel.js:
3691         (WebInspector.ResourcesPanel):
3692
3693 2009-07-02  Erik Arvidsson  <arv@chromium.org>
3694
3695         Reviewed by Adam Roben.
3696
3697         [Win] HTML5 Drag and drop, dragend is not fired when pressing Esc
3698         https://bugs.webkit.org/show_bug.cgi?id=26699
3699
3700         * manual-tests/drag-escape.html: Added.
3701         * page/EventHandler.cpp:
3702         (WebCore::EventHandler::dragSourceEndedAt):
3703
3704 2009-07-02  Pierre d'Herbemont  <pdherbemont@apple.com>
3705
3706         Reviewed by Simon Fraser. 
3707         
3708         https://bugs.webkit.org/show_bug.cgi?id=26944
3709
3710         Make sure we support full page zoom in video controls.
3711
3712         This is tracked by a the video-controls-zoom test case.
3713
3714         * css/mediaControlsQT.css: Make sure we don't have any inherited margin.
3715         * rendering/MediaControlElements.cpp:
3716         (WebCore::MediaControlElement::updateStyle): Propagate the style to the innertext.
3717         * rendering/RenderThemeMac.mm: Adjust the painting rect.
3718         (WebCore::getUnzoomedRectAndAdjustCurrentContext):
3719         (WebCore::RenderThemeMac::paintMediaSliderTrack):
3720         (WebCore::RenderThemeMac::paintMediaCurrentTime):
3721         (WebCore::RenderThemeMac::paintMediaTimeRemaining):
3722
3723 2009-07-02  Pierre d'Herbemont  <pdherbemont@apple.com>
3724
3725         Fix the Gtk build after r45474. The localized strings should
3726         have been added there.
3727
3728         * platform/gtk/LocalizedStringsGtk.cpp:
3729         (WebCore::mediaElementLoadingStateText):
3730         (WebCore::mediaElementLiveBroadcastStateText):
3731
3732 2009-07-02  Pierre d'Herbemont  <pdherbemont@apple.com>
3733
3734         Reviewed by Simon Fraser.
3735
3736         https://bugs.webkit.org/show_bug.cgi?id=26939
3737
3738         Media controller is rendered badly at http://www.mozilla.com/en-US/firefox/video/firefox-3.5.html
3739
3740         We fix two things:
3741         - We use px instead of em, because px is used everywhere else
3742         and because 0.09em hit the font size limit.
3743         - We use -webkit-box instead of inline-block because in strict mode
3744         inline-block has a different behavior.
3745
3746         Test: media/controls-strict.html
3747
3748         * css/mediaControlsQT.css:
3749
3750 2009-07-02  David Hyatt  <hyatt@apple.com>
3751
3752         Reviewed by Dan Bernstein.
3753
3754         TextIterator should use hasOverflowClip when checking for overflow instead of looking at the style.
3755         https://bugs.webkit.org/show_bug.cgi?id=26942
3756
3757         * editing/TextIterator.cpp:
3758         (WebCore::fullyClipsContents):
3759
3760 2009-07-02  Sam Weinig  <sam@webkit.org>
3761
3762         Reviewed by Dave Hyatt.
3763
3764         Fix for <rdar://problem/5230700>
3765         Remove local .xhtml file workaround
3766
3767         * platform/network/mac/ResourceResponseMac.mm:
3768         (WebCore::ResourceResponse::platformLazyInit): Work around is no longer necessary.
3769
3770 2009-07-02  Anders Carlsson  <andersca@apple.com>
3771
3772         Reviewed by Dan Bernstein.
3773
3774         Sort, add functions used by WebKit.
3775         
3776         * WebCore.base.exp:
3777
3778 2009-07-02  Brady Eidson  <beidson@apple.com>
3779
3780         Rubberstamped by Sam Weinig.
3781
3782         More of <rdar://problem/6969425> Safari 4.0 doesn't recognize text/plain files if their extension is unknown.
3783
3784         * platform/network/mac/WebCoreURLResponse.mm:
3785         (webNSURLResponseMIMEType): Give Tiger a chance to query the UTI machinery.
3786
3787 2009-07-02  Adam Langley  <agl@google.com>
3788
3789         Reviewed by Eric Seidel.
3790
3791         Chromium Linux: fix complex text rendering with line break characters.
3792
3793         https://bugs.webkit.org/show_bug.cgi?id=26935
3794
3795         If the CSS white-space property is inhibiting line breaking, we might
3796         find end-of-line characters rendered via the complex text path. Fonts
3797         don't provide glyphs for these code points so, if we find one, we
3798         simulate the space glyph being interposed in this case.  Because the
3799         input is variable-length per code point, we walk the input in step
3800         with the output.
3801
3802         Covered by:
3803             LayoutTests/fast/text/international/bidi-linebreak-002.html
3804             LayoutTests/fast/text/international/bidi-linebreak-003.html
3805             LayoutTests/fast/text/international/hindi-whitespace.html
3806
3807         * platform/graphics/chromium/HarfbuzzSkia.cpp:
3808         (WebCore::stringToGlyphs):
3809
3810 2009-07-02  Victor Wang  <victorw@chromium.org>
3811
3812         Reviewed by Darin Fisher.
3813
3814         https://bugs.webkit.org/show_bug.cgi?id=26521
3815         Expose file size to chromium.
3816
3817         Implement getFileSize() for Chromium.
3818
3819         * platform/chromium/ChromiumBridge.h:
3820         * platform/chromium/FileSystemChromium.cpp:
3821         (WebCore::getFileSize):
3822
3823 2009-07-02  Nate Chapin  <japhet@chromium.org>
3824
3825         Unreviewed, build fix.
3826
3827         * bindings/v8/V8SVGPODTypeWrapper.h: Lost a space in nested template argument list.
3828
3829 2009-07-02  Simon Fraser  <simon.fraser@apple.com>
3830
3831         Build fix: add missing #include.
3832
3833         * platform/mac/ThemeMac.mm:
3834
3835 2009-07-02  Simon Fraser  <simon.fraser@apple.com>
3836
3837         Reviewed by Dave Hyatt.
3838
3839         <rdar://problem/7028682> ThemeMac::paintRadio() throws Obj-C exceptions when zoomed
3840
3841         Add BEGIN_BLOCK_OBJC_EXCEPTIONS/END_BLOCK_OBJC_EXCEPTIONS guards around code
3842         that can possibly throw Objective-C exceptions when drawing Mac form controls.
3843
3844         * platform/mac/ThemeMac.mm:
3845         (WebCore::paintCheckbox):
3846         (WebCore::paintRadio):
3847         (WebCore::paintButton):
3848         (WebCore::ThemeMac::inflateControlPaintRect):
3849
3850 2009-07-02  Nate Chapin  <japhet@chromium.org>
3851
3852         Reviewed by David Levin.
3853
3854         Upstream V8SVGPODTypeWrapper.
3855
3856         https://bugs.webkit.org/show_bug.cgi?id=26907
3857
3858         * bindings/scripts/CodeGeneratorV8.pm: Update function being renamed in V8SVGPODTypeWrapper.h.
3859         * bindings/v8/V8SVGPODTypeWrapper.h: Upstreamed from src.chromium.org.
3860
3861 2009-07-02  Dumitru Daniliuc  <dumi@chromium.org>
3862
3863         Reviewed by Dimitri Glazkov.
3864
3865         Adds an abstraction layer between the DB classes and the file
3866         system, which allows us to add our own logic for storing, opening,
3867         deleting, etc. databases.
3868
3869         The patch was tested using the tests in WebCore/storage.
3870
3871         https://bugs.webkit.org/show_bug.cgi?id=26054
3872
3873         * GNUmakefile.am:
3874         * WebCore.pro:
3875         * WebCore.vcproj/WebCore.vcproj:
3876         * WebCore.xcodeproj/project.pbxproj:
3877         * platform/sql/SQLiteDatabase.cpp:
3878         (WebCore::SQLiteDatabase::open): Delegating the job of opening DB files to SQLiteFileSystem to allow use of custom VFSs.
3879         * platform/sql/SQLiteFileSystem.cpp: Added.
3880         * platform/sql/SQLiteFileSystem.h: Added.
3881         * platform/win/FileSystemWin.cpp:
3882         (WebCore::directoryName): Implemented.
3883         * storage/Database.cpp:
3884         (WebCore::Database::databaseSize): The code that returns the size of a DB file moved to SQLiteFileSystem.
3885         * storage/DatabaseTracker.cpp:
3886         (WebCore::DatabaseTracker::DatabaseTracker): Added the ability to register a custom SQLite VFS.
3887         (WebCore::DatabaseTracker::trackerDatabasePath): DB file-related operations moved to SQLiteFileSystem.
3888         (WebCore::DatabaseTracker::openTrackerDatabase): DB file-related operations moved to SQLiteFileSystem.
3889         (WebCore::DatabaseTracker::originPath): DB file-related operations moved to SQLiteFileSystem.
3890         (WebCore::DatabaseTracker::fullPathForDatabase): DB file-related operations moved to SQLiteFileSystem.
3891         (WebCore::DatabaseTracker::usageForDatabase): DB file-related operations moved to SQLiteFileSystem.
3892         (WebCore::DatabaseTracker::deleteOrigin): DB file-related operations moved to SQLiteFileSystem.
3893         (WebCore::DatabaseTracker::deleteDatabaseFile): DB file-related operations moved to SQLiteFileSystem.
3894         * storage/OriginUsageRecord.cpp:
3895         (WebCore::OriginUsageRecord::diskUsage): DB file-related operations moved to SQLiteFileSystem.
3896
3897 2009-07-02  David Hyatt  <hyatt@apple.com>
3898
3899         Reviewed by Simon Fraser.
3900
3901         Always clip replaced elements to border radii.
3902         https://bugs.webkit.org/show_bug.cgi?id=26933
3903
3904         Make sure to always clip replaced elements to border radii, even when overflow is visible.
3905         Stop defaulting those elements to overflow:hidden in the UA sheet, since it is now no longer
3906         necessary.
3907
3908         Covered by existing tests (since the UA default changing keeps the behavior exactly the same).
3909
3910         * css/html.css:
3911         * rendering/RenderReplaced.cpp:
3912         (WebCore::RenderReplaced::paint):
3913         * rendering/RenderWidget.cpp:
3914         (WebCore::RenderWidget::paint):
3915
3916 2009-07-02  Jeremy Orlow  <jorlow@chromium.org>
3917
3918         Reviewed by Simon Fraser.
3919
3920         convertFromScrollbarToContainingView and friends should be in ScrollView
3921         https://bugs.webkit.org/show_bug.cgi?id=26929
3922
3923         This is breaking Chromium's build because PopupMenuChromium inherits
3924         from ScrollView, but these functions are pure virtual in it.  I could
3925         put it directly in PopupMenuChromium, but that seems a bit silly since
3926         the functions are fairly generic.
3927
3928         Passes existing layout tests.
3929
3930         * page/FrameView.cpp:  Remove the 4 functions Hyatt just added
3931         (IntRect WebCore::FrameView::convertFromScrollbarToContainingView):
3932         (IntRect WebCore::FrameView::convertFromContainingViewToScrollBar):
3933         (IntPoint WebCore::FrameView::convertFromScrollbarToContainingView):
3934         (IntPoint WebCore::FrameView::convertFromContainingViewToScrollBar):
3935         * page/FrameView.h: ditto
3936         * platform/ScrollView.cpp:  Move the 4 functions from FrameView here
3937         (IntRect WebCore::ScrollView::convertFromScrollbarToContainingView):
3938         (IntRect WebCore::ScrollView::convertFromContainingViewToScrollBar):
3939         (IntPoint WebCore::ScrollView::convertFromScrollbarToContainingView):
3940         (IntPoint WebCore::ScrollView::convertFromContainingViewToScrollBar):
3941         * platform/ScrollView.h: ditto
3942
3943 2009-07-02  Dirk Pranke  <dpranke@chromium.org>
3944
3945         Reviewed by Darin Fisher.
3946
3947         Fix https://bugs.webkit.org/show_bug.cgi?id=26088 - TransparencyWin 
3948         doesn't handle errors well at all; revise it to fail silently 
3949         (drawing nothing), and bulletproof FontChromiumWin to handle the
3950         failure accordingly.
3951
3952         Tests: fast/text/text-large-negative-letter-spacing-with-opacity.html
3953                fast/text/text-letter-spacing.html
3954
3955         * platform/graphics/chromium/FontChromiumWin.cpp:
3956         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI):
3957         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter):
3958         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::TransparencyAwareGlyphPainter):
3959         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::~TransparencyAwareGlyphPainter):
3960         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
3961         (WebCore::Font::drawGlyphs):
3962         (WebCore::Font::drawComplexText):
3963         * platform/graphics/chromium/TransparencyWin.cpp:
3964         (WebCore::TransparencyWin::TransparencyWin):
3965         (WebCore::TransparencyWin::setupLayerForNoLayer):
3966         (WebCore::TransparencyWin::setupLayerForOpaqueCompositeLayer):
3967         (WebCore::TransparencyWin::setupLayerForWhiteLayer):
3968         (WebCore::TransparencyWin::setupTransformForKeepTransform):
3969         (WebCore::TransparencyWin::setupTransformForScaleTransform):
3970         (WebCore::TransparencyWin::initializeNewContext):
3971         (WebCore::TransparencyWin::compositeOpaqueComposite):
3972         (WebCore::TransparencyWin::compositeTextComposite):
3973         (WebCore::TransparencyWin::makeLayerOpaque):
3974         * platform/graphics/chromium/TransparencyWin.h:
3975         (WebCore::TransparencyWin::platformContext):
3976
3977 2009-07-02  Eric Carlson  <eric.carlson@apple.com>
3978
3979         Change #import to #include to fix non-ObjC builds.
3980
3981         * rendering/MediaControlElements.cpp:
3982
3983 2009-07-02  Anders Carlsson  <andersca@apple.com>
3984
3985         Build fix.
3986         
3987         * platform/network/mac/WebCoreURLResponse.mm:
3988         (mimeTypeFromUTITree):
3989
3990 2009-07-02  David Hyatt  <hyatt@apple.com>
3991
3992         Reviewed by Simon Fraser.
3993
3994         Fix for bug 22119, clicks in the scrollbars of transformed content don't work.  Add new
3995         conversion methods for going across parent/child widget boundaries that can be implemented
3996         by the FrameView and ScrollbarClient to be transform-aware.
3997
3998         Test cases added in platform/mac/fast/forms and platform/mac/fast/overflow.
3999
4000         * WebCore.base.exp:
4001         * page/EventHandler.cpp:
4002         (WebCore::EventHandler::handleMouseMoveEvent):
4003         * page/FrameView.cpp:
4004         (WebCore::FrameView::convertFromScrollbarToContainingView):
4005         (WebCore::FrameView::convertFromContainingViewToScrollbar):
4006         (WebCore::FrameView::convertFromRenderer):
4007         (WebCore::FrameView::convertToRenderer):
4008         (WebCore::FrameView::convertToContainingView):
4009         (WebCore::FrameView::convertFromContainingView):
4010         * page/FrameView.h:
4011         * platform/ScrollView.h:
4012         * platform/Scrollbar.cpp:
4013         (WebCore::Scrollbar::convertToContainingView):
4014         (WebCore::Scrollbar::convertFromContainingView):
4015         * platform/Scrollbar.h:
4016         * platform/ScrollbarClient.h:
4017         (WebCore::ScrollbarClient::convertFromScrollbarToContainingView):
4018         (WebCore::ScrollbarClient::convertFromContainingViewToScrollbar):
4019         * platform/Widget.cpp:
4020         (WebCore::Widget::convertFromContainingWindow):
4021         (WebCore::Widget::convertToContainingWindow):
4022         (WebCore::Widget::convertFromRootToContainingWindow):
4023         (WebCore::Widget::convertFromContainingWindowToRoot):
4024         (WebCore::Widget::convertToContainingView):
4025         (WebCore::Widget::convertFromContainingView):
4026         * platform/Widget.h:
4027         * platform/graphics/IntPoint.h:
4028         (WebCore::IntPoint::move):
4029         * platform/mac/WidgetMac.mm:
4030         (WebCore::Widget::convertFromRootToContainingWindow):
4031         (WebCore::Widget::convertFromContainingWindowToRoot):
4032         * rendering/RenderBlock.cpp:
4033         (WebCore::RenderBlock::isPointInOverflowControl):
4034         * rendering/RenderDataGrid.cpp:
4035         (WebCore::RenderDataGrid::convertFromScrollbarToContainingView):
4036         (WebCore::RenderDataGrid::convertFromContainingViewToScrollbar):
4037         * rendering/RenderDataGrid.h:
4038         * rendering/RenderLayer.cpp:
4039         (WebCore::RenderLayer::convertFromScrollbarToContainingView):
4040         (WebCore::RenderLayer::convertFromContainingViewToScrollbar):
4041         (WebCore::RenderLayer::scrollbarOffset):
4042         (WebCore::RenderLayer::hitTestOverflowControls):
4043         * rendering/RenderLayer.h:
4044         * rendering/RenderListBox.cpp:
4045         (WebCore::RenderListBox::isPointInOverflowControl):
4046         (WebCore::RenderListBox::convertFromScrollbarToContainingView):
4047         (WebCore::RenderListBox::convertFromContainingViewToScrollbar):
4048         * rendering/RenderListBox.h:
4049
4050 2009-07-02  Dan Bernstein  <mitz@apple.com>
4051
4052         Reviewed by Dave Hyatt and Simon Fraser.
4053
4054         - fix <rdar://problem/6933052> SPOD playing video in a div with a box
4055           shadow
4056
4057         Test: fast/box-shadow/transform-fringing.html
4058
4059         * rendering/RenderBoxModelObject.cpp:
4060         (WebCore::RenderBoxModelObject::paintBoxShadow): Clip out the
4061         box even if it has an opaque background, but in that case, inset the
4062         clip path by 1 pixel, to avoid antialiasing artifacts.
4063         Do not inset the clip rect by 1 pixel if the CTM is purely a
4064         translation.
4065         Move the shadow-casting path away in the non-rounded-rect case (it
4066         was already being done in the rounded-rect case), to avoid a black
4067         fringe when the CTM is not purely a translation.
4068
4069 2009-07-02  Brady Eidson  <beidson@apple.com>
4070
4071         Reviewed by Sam Weinig.
4072
4073         <rdar://problem/6969425> Safari 4.0 doesn't recognize text/plain files if their extension is unknown.
4074
4075         Walk the CoreTypes UTI tree for extensions with unknown MIME types, using the first MIME type found.
4076
4077         For many types of text files (such as source code files) this ends up being text/plain.
4078
4079         * platform/network/mac/ResourceHandleMac.mm:
4080         (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]): Tweak the logging output.
4081
4082         * platform/network/mac/WebCoreURLResponse.h:
4083         * platform/network/mac/WebCoreURLResponse.mm:
4084         (mimeTypeFromUTITree): 
4085         (webNSURLResponseMIMEType): Use mimeTypeFromUTITree() to find a UTI-based MIME type for this file's extension.
4086         (-[NSURLResponse _webcore_reportedMIMEType]): Return the actual MIME type that CFNetwork gave us.
4087
4088 2009-07-02  Pierre d'Herbemont  <pdherbemont@apple.com>
4089
4090         Reviewed by Simon Fraser.
4091
4092         <rdar://problem/6518119>
4093
4094         Add a rewind button and hide the timeline for live broadcasts when
4095         in MediaUI mode.
4096
4097         * css/CSSPrimitiveValueMappings.h: 
4098         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Add the new pseudo element.
4099
4100         * css/CSSSelector.cpp:
4101         (WebCore::CSSSelector::extractPseudoType): Ditto.
4102         * css/CSSSelector.h: 
4103
4104         * css/CSSStyleSelector.cpp:
4105         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Ditto.
4106
4107         * css/CSSValueKeywords.in: Ditto.
4108         * css/mediaControls.css: Ditto.
4109         * css/mediaControlsQT.css: Ditto.
4110
4111         * html/HTMLMediaElement.cpp:
4112         (WebCore::HTMLMediaElement::rewind): New.
4113         (WebCore::HTMLMediaElement::returnToRealTime): New.
4114         (WebCore::HTMLMediaElement::isStreaming): New.
4115         * html/HTMLMediaElement.h:
4116
4117         * page/mac/WebCoreViewFactory.h: Declare mediaElementLoadingStateText and mediaElementLiveBroadcastStateText.
4118
4119         * platform/LocalizedStrings.h: Add localized media state messages.
4120
4121         * platform/ThemeTypes.h: Add the new pseudo element.
4122
4123         * platform/mac/LocalizedStringsMac.mm: 
4124         (WebCore::mediaElementLoadingStateText): Add localized media state.
4125         (WebCore::mediaElementLiveBroadcastStateText): Ditto.
4126
4127         * platform/mac/WebCoreSystemInterface.h: Change BOOL param wkDrawMediaUIPart to an int to support
4128            multiple states.
4129         * platform/mac/WebCoreSystemInterface.mm: Ditto.
4130
4131         * rendering/MediaControlElements.cpp: 
4132         (WebCore::MediaControlElement::MediaControlElement): Deal with new elements.
4133         (WebCore::MediaControlElement::attachToParent): Ditto.
4134         (WebCore::MediaControlElement::update): Ditto.
4135         (WebCore::MediaControlElement::updateStyle): Ditto.
4136         (WebCore::MediaControlTimelineContainerElement::MediaControlTimelineContainerElement): Ditto.
4137         (WebCore::MediaControlTimelineContainerElement::rendererIsNeeded): Ditto.
4138         (WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement): Ditto.
4139         (WebCore::MediaControlStatusDisplayElement::update): Ditto.
4140         (WebCore::MediaControlStatusDisplayElement::rendererIsNeeded): Ditto.
4141         (WebCore::MediaControlInputElement::MediaControlInputElement): Ditto.
4142         (WebCore::MediaControlInputElement::attachToParent): Ditto.
4143         (WebCore::MediaControlInputElement::updateStyle): Ditto.
4144         (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): Ditto.
4145         (WebCore::MediaControlRewindButtonElement::defaultEventHandler): Ditto.
4146         (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): Ditto.
4147         (WebCore::MediaControlReturnToRealtimeButtonElement::defaultEventHandler): Ditto.
4148         (WebCore::MediaControlReturnToRealtimeButtonElement::rendererIsNeeded): Ditto.
4149         (WebCore::MediaControlTimelineElement::defaultEventHandler): Ditto.
4150         (WebCore::MediaControlTimelineElement::update): Ditto.
4151         (WebCore::MediaControlFullscreenButtonElement::rendererIsNeeded): Ditto.
4152         * rendering/MediaControlElements.h: Ditto.
4153
4154         * rendering/RenderMedia.cpp: 
4155         (WebCore::RenderMedia::styleDidChange): Deal with the new elements.
4156         (WebCore::RenderMedia::createPanel): Ditto.
4157         (WebCore::RenderMedia::createRewindButton): Ditto.
4158         (WebCore::RenderMedia::createReturnToRealtimeButton): Ditto.
4159         (WebCore::RenderMedia::createStatusDisplay): Ditto.
4160         (WebCore::RenderMedia::createTimelineContainer): Ditto.
4161         (WebCore::RenderMedia::createCurrentTimeDisplay): Ditto.
4162         (WebCore::RenderMedia::createTimeRemainingDisplay): Ditto.
4163         (WebCore::RenderMedia::updateControls): Ditto.
4164         (WebCore::RenderMedia::forwardEvent): Ditto.
4165         * rendering/RenderMedia.h:
4166
4167         * rendering/RenderTheme.cpp:
4168         (WebCore::RenderTheme::paint): Deal with the new elements.
4169
4170         * rendering/RenderTheme.h:
4171         (WebCore::RenderTheme::paintMediaRewindButton): Deal with the new elements.
4172         (WebCore::RenderTheme::paintMediaReturnToRealtimeButton): Ditto.
4173         (WebCore::RenderTheme::paintMediaControlsBackground): Ditto.
4174
4175         * rendering/RenderThemeMac.h:
4176         * rendering/RenderThemeMac.mm:
4177         (WebCore::RenderThemeMac::paintMediaRewindButton): Deal with the new elements.
4178         (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton): Ditto.
4179         (WebCore::RenderThemeMac::paintMediaControlsBackground): Ditto.
4180
4181         * rendering/style/RenderStyleConstants.h: Add constants for the new elements.
4182
4183 2009-07-01  John Abd-El-Malek  <jam@chromium.org>
4184
4185         Reviewed by Darin Fisher.
4186
4187         Small refactoring of MessagePortChannel so that PlatformMessagePortChannel
4188         may be defined at the WebKit layer.
4189
4190         https://bugs.webkit.org/show_bug.cgi?id=26905
4191
4192         * dom/MessageChannel.cpp:
4193         (WebCore::MessageChannel::MessageChannel):
4194         * dom/MessagePortChannel.cpp:
4195         * dom/MessagePortChannel.h:
4196         * dom/default/PlatformMessagePortChannel.cpp:
4197         (WebCore::MessagePortChannel::createChannel):
4198         (WebCore::MessagePortChannel::create):
4199         (WebCore::MessagePortChannel::MessagePortChannel):
4200         (WebCore::MessagePortChannel::~MessagePortChannel):
4201
4202 2009-07-01  Simon Fraser  <simon.fraser@apple.com>
4203
4204         Reviewed by Dan Bernstein.
4205
4206         <video> fails to show on http://camendesign.com/code/video_for_everybody
4207         <rdar://problem/7026010>
4208         https://bugs.webkit.org/show_bug.cgi?id=26919
4209
4210         Fix an issue introduced in r44961. In that revision we changed to only update
4211         compositing layer geometry when all siblings had been laid out (i.e. we pushed
4212         the updates one level down). However, that left out the root layer, so this
4213         fix ensures that the root layer geometry gets updated at the end.