2009-07-15 Dumitru Daniliuc <dumi@chromium.org>
[WebKit-https.git] / WebCore / ChangeLog
1 2009-07-15  Dumitru Daniliuc  <dumi@chromium.org>
2
3         Reviewed by Dimitri Glazkov.
4
5         Adding the Win SQLite VFS implementation for Chromium.
6
7         https://bugs.webkit.org/show_bug.cgi?id=26940
8
9         * platform/chromium/ChromiumBridge.h:
10         * platform/sql/chromium: Added.
11         * platform/sql/chromium/SQLiteFileSystemChromium.cpp: Added.
12         * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp: Added.
13
14 2009-07-15  Jian Li  <jianli@chromium.org>
15
16         Reviewed by David Levin.
17
18         Bug 25151 - workers that fail to load scripts not firing error event.
19         https://bugs.webkit.org/show_bug.cgi?id=25151
20
21         This fixes the problem that an error event is not fired when the worker
22         script fails to load. Some reasons this may occur are an invalid URL for
23         the worker script or a cross-origin redirect.
24
25         We also moves the code to complete the URL and check its origin from
26         Worker constructor to WorkerScriptLoader loading functions in order to
27         move the exception throwing logic out of the scope of Worker constructor.
28         Due to this change, we also remove the output ExceptionCode parameter
29         in the worker constructor. Corresponding JS/V8 binding codes have been
30         updated to reflect this change.
31
32         * bindings/js/JSWorkerConstructor.cpp:
33         (WebCore::constructWorker):
34         * bindings/v8/custom/V8WorkerCustom.cpp:
35         (WebCore::CALLBACK_FUNC_DECL):
36         * workers/Worker.cpp:
37         (WebCore::Worker::Worker):
38         (WebCore::Worker::notifyFinished):
39         * workers/Worker.h:
40         (WebCore::Worker::create):
41         * workers/WorkerContext.cpp:
42         (WebCore::WorkerContext::importScripts):
43         * workers/WorkerScriptLoader.cpp:
44         (WebCore::toCrossOriginRedirectPolicy):
45         (WebCore::WorkerScriptLoader::loadSynchronously):
46         (WebCore::WorkerScriptLoader::loadAsynchronously):
47         (WebCore::notifyLoadErrorTask):
48         (WebCore::WorkerScriptLoader::createResourceRequest):
49         (WebCore::WorkerScriptLoader::didFail):
50         (WebCore::WorkerScriptLoader::didFailRedirectCheck):
51         (WebCore::WorkerScriptLoader::didReceiveAuthenticationCancellation):
52         (WebCore::WorkerScriptLoader::notifyError):
53         * workers/WorkerScriptLoader.h:
54         (WebCore::):
55         (WebCore::WorkerScriptLoader::url):
56
57 2009-07-15  Dan Bernstein  <mitz@apple.com>
58
59         Reviewed by Dave Hyatt.
60
61         text-shadow is not drawn for text with transparent colour
62         https://bugs.webkit.org/show_bug.cgi?id=21374
63
64         Test: fast/text/shadow-translucent-fill.html
65
66         * rendering/InlineTextBox.cpp:
67         (WebCore::paintTextWithShadows): If the text fill color is not opaque,
68         paint all shadows separately from the text, by casting them from
69         clipped-out opaque text.
70
71 2009-07-15  Adam Treat  <adam.treat@torchmobile.com>
72
73         Fix the Qt build.
74
75         * html/HTMLAreaElement.cpp:
76
77 2009-07-15  Jeremy Orlow  <jorlow@chromium.org>
78
79         Reviewed by Darin Fisher.
80
81         Cleanup DOM Storage dependencies.
82         https://bugs.webkit.org/show_bug.cgi?id=27180
83
84         DOM Storage had several unnecessary (and probably unintended)
85         dependencies.  This patch replaces many includes of header files with
86         forward declaration of classes, making some destructors explicit, and
87         taking some factories out of the header files.
88
89         This will allow things like StorageAreaSync to take a StorageAreaImpl*
90         (as it should) rather than a StorageArea* which previously weren't
91         possible because the dependencies were such a tangled mess.
92
93         * storage/LocalStorageTask.cpp:
94         (WebCore::LocalStorageTask::~LocalStorageTask):
95         * storage/LocalStorageTask.h:
96         * storage/Storage.cpp:
97         (WebCore::Storage::~Storage):
98         * storage/Storage.h:
99         * storage/StorageArea.cpp:
100         * storage/StorageArea.h:
101         * storage/StorageAreaImpl.cpp:
102         * storage/StorageAreaImpl.h:
103         * storage/StorageAreaSync.cpp:
104         (WebCore::StorageAreaSync::~StorageAreaSync):
105         * storage/StorageAreaSync.h:
106         * storage/StorageEvent.cpp:
107         (WebCore::StorageEvent::create):
108         (WebCore::StorageEvent::StorageEvent):
109         * storage/StorageEvent.h:
110         * storage/StorageNamespace.h:
111         * storage/StorageNamespaceImpl.cpp:
112         * storage/StorageNamespaceImpl.h:
113         * storage/StorageSyncManager.cpp:
114         (WebCore::StorageSyncManager::~StorageSyncManager):
115         * storage/StorageSyncManager.h:
116
117 2009-07-15  Chris Marrin  <cmarrin@apple.com>
118
119         Reviewed by Simon Fraser.
120
121         Incorrect animation when trying to duplicate effect of transform-origin
122         https://bugs.webkit.org/show_bug.cgi?id=27310
123
124         The bug is that matrix animation is being used when animating
125         a list of transform functions that match in the from and to states.
126         This sometimes works. But because of the way CA does matrix animation
127         function lists like the one shown in the testcase animate incorrectly.
128
129         This fixes the bug by always doing component animation
130         as long as the function lists match. This allows CA
131         to animate the components and then recompose the result
132         into the correct matrix.
133
134         Test: animations/transform-origin-vs-functions.html
135
136         * platform/graphics/mac/GraphicsLayerCA.mm:
137         (WebCore::GraphicsLayerCA::animateTransform):
138
139 2009-07-15  Albert J. Wong  <ajwong@chromium.org>
140
141         Reviewed by David Levin.
142
143         Upstream the V8NPObject and NPV8Object build changes for WebCore.gypi.
144
145         Add upstreamed V8 bindings files into WebCore.gypi so they can be seen
146         downstream
147         https://bugs.webkit.org/show_bug.cgi?id=27274
148
149         Changes the build file for chromium.  Test built the chromium tree
150         to verify.
151
152         * WebCore.gypi:
153
154 2009-07-15  Mark Rowe  <mrowe@apple.com>
155
156         I like it when the code compiles.
157
158         * WebCore.base.exp:
159
160 2009-07-15  Darin Adler  <darin@apple.com>
161
162         Reviewed by Sam Weinig.
163
164         Renamed parseURL to deprecatedParseURL.
165
166         * bindings/js/JSAttrCustom.cpp:
167         (WebCore::JSAttr::setValue): Renamed.
168         * bindings/js/JSElementCustom.cpp:
169         (WebCore::allowSettingSrcToJavascriptURL): Renamed.
170         * bindings/js/JSHTMLFrameElementCustom.cpp:
171         (WebCore::allowSettingJavascriptURL): Renamed.
172         * bindings/js/JSHTMLIFrameElementCustom.cpp:
173         (WebCore::JSHTMLIFrameElement::setSrc): Renamed.
174         * bindings/objc/DOM.mm:
175         (-[DOMElement _getURLAttribute:]): Renamed.
176         * bindings/objc/DOMHTML.mm:
177         (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:]): Renamed.
178         * bindings/v8/custom/V8CustomBinding.cpp:
179         (WebCore::allowSettingFrameSrcToJavascriptUrl): Renamed.
180         * css/CSSHelper.cpp:
181         (WebCore::deprecatedParseURL): Renamed.
182         * css/CSSHelper.h: Renamed and updated comment.
183         * html/HTMLAnchorElement.cpp:
184         (WebCore::HTMLAnchorElement::defaultEventHandler): Renamed.
185         (WebCore::HTMLAnchorElement::parseMappedAttribute): Renamed.
186         * html/HTMLBaseElement.cpp:
187         (WebCore::HTMLBaseElement::parseMappedAttribute): Renamed.
188         * html/HTMLBodyElement.cpp:
189         (WebCore::HTMLBodyElement::parseMappedAttribute): Renamed.
190         * html/HTMLEmbedElement.cpp:
191         (WebCore::HTMLEmbedElement::parseMappedAttribute): Renamed.
192         * html/HTMLFormElement.cpp:
193         (WebCore::HTMLFormElement::parseMappedAttribute): Renamed.
194         * html/HTMLFrameElementBase.cpp:
195         (WebCore::HTMLFrameElementBase::parseMappedAttribute): Renamed.
196         * html/HTMLImageElement.cpp:
197         (WebCore::HTMLImageElement::parseMappedAttribute): Renamed.
198         * html/HTMLImageLoader.cpp:
199         (WebCore::HTMLImageLoader::sourceURI): Renamed.
200         * html/HTMLLinkElement.cpp:
201         (WebCore::HTMLLinkElement::parseMappedAttribute): Renamed.
202         * html/HTMLObjectElement.cpp:
203         (WebCore::HTMLObjectElement::parseMappedAttribute): Renamed.
204         * html/HTMLTableElement.cpp:
205         (WebCore::HTMLTableElement::parseMappedAttribute): Renamed.
206         * html/HTMLTablePartElement.cpp:
207         (WebCore::HTMLTablePartElement::parseMappedAttribute): Renamed.
208         * html/HTMLTokenizer.cpp:
209         (WebCore::HTMLTokenizer::parseTag): Renamed.
210         * html/PreloadScanner.cpp:
211         (WebCore::PreloadScanner::processAttribute): Renamed.
212         (WebCore::PreloadScanner::emitCSSRule): Renamed.
213         * platform/chromium/ClipboardChromium.cpp:
214         (WebCore::ClipboardChromium::declareAndWriteDragImage): Renamed.
215         * platform/chromium/PasteboardChromium.cpp:
216         (WebCore::Pasteboard::writeImage): Renamed.
217         * platform/qt/ClipboardQt.cpp:
218         (WebCore::ClipboardQt::declareAndWriteDragImage): Renamed.
219         * platform/win/ClipboardWin.cpp:
220         (WebCore::ClipboardWin::declareAndWriteDragImage): Renamed.
221         * rendering/HitTestResult.cpp:
222         (WebCore::HitTestResult::absoluteImageURL): Renamed.
223         (WebCore::HitTestResult::absoluteMediaURL): Renamed.
224         (WebCore::HitTestResult::absoluteLinkURL): Renamed.
225         * svg/SVGAElement.cpp:
226         (WebCore::SVGAElement::defaultEventHandler): Renamed.
227         * svg/SVGImageLoader.cpp:
228         (WebCore::SVGImageLoader::sourceURI): Renamed.
229         * wml/WMLAElement.cpp:
230         (WebCore::WMLAElement::defaultEventHandler): Renamed.
231         * wml/WMLImageLoader.cpp:
232         (WebCore::WMLImageLoader::sourceURI): Renamed.
233
234 2009-07-15  Darin Adler  <darin@apple.com>
235
236         Reviewed by Dan Bernstein.
237
238         CSSHelper.h's parseURL is a function that no one should ever call
239         Part 1: Eliminate callers in the CSS parser.
240         https://bugs.webkit.org/show_bug.cgi?id=26599
241
242         Test: fast/css/uri-token-parsing.html
243
244         * css/CSSHelper.h: Added a comment explaining why nobody should ever call this
245         function. A FIXME suggests a next step, which would be to rename it deprecatedParseURL.
246
247         * css/CSSParser.cpp:
248         (WebCore::CSSParser::parseValue): Removed unneeded call to parseURL;
249         CSSParser::text already takes care of parsing the URI token syntax, and the
250         parseURL function does no good.
251         (WebCore::CSSParser::parseContent): Ditto.
252         (WebCore::CSSParser::parseFillImage): Ditto.
253         (WebCore::CSSParser::parseFontFaceSrc): Ditto.
254         (WebCore::CSSParser::parseBorderImage): Ditto.
255         (WebCore::isCSSWhitespace): Added. Helper function that makes the text function
256         easier to read.
257         (WebCore::CSSParser::text): Tweak logic so that leading and trailing whitespace
258         are both trimmed before removing the quote marks. Changed to use the
259         isCSSWhitespace, isASCIIHexDigit, and toASCIIHexValue functions for clarity.
260
261         * css/CSSParser.h: Removed stray "public:" in this header.
262
263         * platform/text/StringImpl.cpp:
264         (WebCore::StringImpl::substring): Optimized the case where the substring covers
265         the entire string, so we just share the StringImpl instead of making a new one.
266         This case came up in earlier versions of the CSS parser changes above.
267         (WebCore::StringImpl::substringCopy): Streamlined the logic here and made it
268         not call substring any more. Before, this was relying on the substring function
269         always making a copy of any non-empty substring.
270
271 2009-07-15  Darin Adler  <darin@apple.com>
272
273         Reviewed by John Sullivan.
274
275         After double-clicking a word, using Shift-arrow to select behaves unpredictably
276         https://bugs.webkit.org/show_bug.cgi?id=27177
277         rdar://problem/7034324
278
279         Test: editing/selection/extend-selection-after-double-click.html
280
281         The bug was due to the m_lastChangeWasHorizontalExtension flag, which was not
282         being cleared in many cases where it should have been.
283
284         * editing/SelectionController.cpp:
285         (WebCore::SelectionController::setSelection): Set m_lastChangeWasHorizontalExtension
286         to false. This catches all sorts of cases that don't flow through the modify function.
287         Before, the flag would reflect the last call to the modify function, which was not
288         necessarily the last selection change.
289         (WebCore::SelectionController::willBeModified): Rearrange function for clarity.
290         Remove code that sets m_lastChangeWasHorizontalExtension; that is now handled elsewhere. 
291         (WebCore::SelectionController::modify): Call setLastChangeWasHorizontalExtension after
292         setSelection when setting up a trial selection controller, since setSelection now
293         clears that flag. Also changed both trial selection controller cases to set the flag,
294         although it's not strictly necessary in both cases. Added code to set
295         m_lastChangeWasHorizontalExtension when extending the selection, which used to be
296         handled in willBeModified. Now we need to do it after the selection change.
297
298 2009-07-15  Jeremy Orlow  <jorlow@chromium.org>
299
300         Reviewed by Dimitri Glazkov.
301
302         Need to update DOM Storage files in GYPI file.
303         https://bugs.webkit.org/show_bug.cgi?id=27317
304
305         Need to update DOM Storage files in the GYPI file.  They're pretty out
306         of date and we're on the path towards enabling them for everyone!
307
308         * WebCore.gypi:
309
310 2009-07-15  Kwang Yul Seo  <skyul@company100.net>
311
312         Reviewed by Eric Seidel.
313
314         https://bugs.webkit.org/show_bug.cgi?id=26794
315         Make Yacc-generated parsers to use fastMalloc/fastFree.
316         
317         Define YYMALLOC and YYFREE to fastMalloc and fastFree
318         respectively.
319
320         * css/CSSGrammar.y:
321         * xml/XPathGrammar.y:
322
323 2009-07-15  David Hyatt  <hyatt@apple.com>
324
325         Reviewed by Adam Roben.
326
327         https://bugs.webkit.org/show_bug.cgi?id=27193
328         Don't run in to anonymous blocks.  No other browsers do this, and our implementation of run-in
329         is effectively broken as a result.
330
331         No new tests. Changed fast/runin/001.html and fast/runin/generated.html to match new behavior.
332
333         * rendering/RenderBlock.cpp:
334         (WebCore::RenderBlock::handleRunInChild):
335
336 2009-07-15  Yuzo Fujishima  <yuzo@google.com>
337
338         Reviewed by Darin Adler.
339
340         Test: fast/js/instanceof-operator.html
341
342         Fix for: Bug 25205 -  XMLHttpRequest instance is not an instanceof XMLHttpRequest
343         https://bugs.webkit.org/show_bug.cgi?id=25205
344
345         In addition to for XMLHttpRequest, this also fixes for:
346         - Audio
347         - Image
348         - MessageChannel
349         - Option
350         - WebKitCSSMatrix
351         - WebKitPoint
352         - Worker
353         - XSLTProcessor
354
355         * bindings/js/JSAudioConstructor.cpp:
356         (WebCore::JSAudioConstructor::JSAudioConstructor):
357         * bindings/js/JSAudioConstructor.h:
358         * bindings/js/JSDOMBinding.h:
359         (WebCore::DOMConstructorObject::createStructure):
360         (WebCore::DOMConstructorObject::DOMConstructorObject):
361         * bindings/js/JSImageConstructor.cpp:
362         (WebCore::JSImageConstructor::JSImageConstructor):
363         * bindings/js/JSImageConstructor.h:
364         * bindings/js/JSMessageChannelConstructor.cpp:
365         (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor):
366         * bindings/js/JSMessageChannelConstructor.h:
367         * bindings/js/JSOptionConstructor.cpp:
368         (WebCore::JSOptionConstructor::JSOptionConstructor):
369         * bindings/js/JSOptionConstructor.h:
370         * bindings/js/JSWebKitCSSMatrixConstructor.cpp:
371         (WebCore::JSWebKitCSSMatrixConstructor::JSWebKitCSSMatrixConstructor):
372         * bindings/js/JSWebKitCSSMatrixConstructor.h:
373         * bindings/js/JSWebKitPointConstructor.cpp:
374         (WebCore::JSWebKitPointConstructor::JSWebKitPointConstructor):
375         * bindings/js/JSWebKitPointConstructor.h:
376         * bindings/js/JSWorkerConstructor.cpp:
377         (WebCore::JSWorkerConstructor::JSWorkerConstructor):
378         * bindings/js/JSWorkerConstructor.h:
379         * bindings/js/JSXMLHttpRequestConstructor.cpp:
380         (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
381         * bindings/js/JSXMLHttpRequestConstructor.h:
382         * bindings/js/JSXSLTProcessorConstructor.cpp:
383         (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor):
384         * bindings/js/JSXSLTProcessorConstructor.h:
385
386 2009-07-15  Kai Br�ning  <kai@granus.net>
387
388         Reviewed by Dave Hyatt.
389
390         CSS21 attribute selectors not dynamic for xml.
391         https://bugs.webkit.org/show_bug.cgi?id=25072
392
393         Moved the relevant test in StyledElement::attributeChanged()
394         to a new function Element::recalcStyleIfNeededAfterAttributeChanged()
395         so it can be called from both StyledElement::attributeChanged()
396         and Element::attributeChanged().
397         Refactored Element::attributeChanged() into
398         Element::updateAfterAttributeChanged() and
399         Element::recalcStyleIfNeededAfterAttributeChanged(), which are called
400         separately from StyledElement::attributeChanged().
401
402         Test: fast/css/attribute-selector-dynamic.xml
403
404         * dom/Element.cpp:
405         (WebCore::Element::attributeChanged):
406         (WebCore::Element::updateAfterAttributeChanged):
407         (WebCore::Element::recalcStyleIfNeededAfterAttributeChanged):
408         * dom/Element.h:
409         * dom/StyledElement.cpp:
410         (WebCore::StyledElement::attributeChanged):
411
412 2009-07-15  Alpha Lam  <hclam@chromium.org>
413
414         Reviewed by David Levin.
415
416         [V8] Layout test failures for drawImage in Canvas
417         https://bugs.webkit.org/show_bug.cgi?id=27311
418
419         Fixing several canvas layout tests failures due to a
420         missing return statement in CanvasRenderingContext2DDrawImage() which
421         was accidentally removed in r45929.
422
423         * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
424
425 2009-07-15  Robert Hogan  <robert@roberthogan.net>
426
427         Reviewed by Eric Seidel.
428
429         https://bugs.webkit.org/show_bug.cgi?id=26969
430
431         If the httpMethod() of the request passed to SubresourceLoader::create is not
432         supported by the client we must expect to call didFail() while m_loader is still null.
433
434         * loader/DocumentThreadableLoader.cpp:
435         (DocumentThreadableLoader::didFail):Changed.
436
437 2009-07-15  Mark Rowe  <mrowe@apple.com>
438
439         Fix the Mac build.
440
441         * WebCore.base.exp:
442         * css/MediaQueryEvaluator.cpp:
443         * rendering/SVGRenderTreeAsText.cpp:
444         * rendering/style/SVGRenderStyle.cpp:
445         * svg/graphics/SVGPaintServer.cpp:
446
447 2009-07-07  Alpha Lam  <hclam@chromium.org>
448
449         Reviewed by Dimitri Glazkov.
450
451         [V8] drawImage method of HTMLCanvasElement to accept HTMLVideoElement as argument
452         https://bugs.webkit.org/show_bug.cgi?id=27170
453
454         Changed CanvasRenderingContext2DDrawImage() to accept HTMLVideoElement
455         as a parameter of drawImage() for HTMLCanvasElement.
456
457         * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
458
459 2009-07-15  Adam Barth  <abarth@webkit.org>
460
461         Reviewed by Dimitri Glazkov.
462
463         [V8] Fix isolated world constructors
464         https://bugs.webkit.org/show_bug.cgi?id=27287
465
466         Don't enter V8Proxy::m_context before creating DOM constructors.
467         Instead, use getWrapperContext to get the right context.
468
469         After this patch, all my tests pass.  I'll enable the feature
470         downstream and land the tests.
471
472         * bindings/scripts/CodeGeneratorV8.pm:
473         * bindings/v8/V8DOMWrapper.cpp:
474         (WebCore::V8DOMWrapper::getConstructor):
475         (WebCore::V8DOMWrapper::lookupDOMWrapper):
476         * bindings/v8/V8DOMWrapper.h:
477         * bindings/v8/V8IsolatedWorld.cpp:
478         (WebCore::V8IsolatedWorld::evaluate):
479         * bindings/v8/V8Proxy.cpp:
480         (WebCore::V8Proxy::createWrapperFromCache):
481         (WebCore::V8Proxy::isContextInitialized):
482         (WebCore::V8Proxy::disposeContextHandles):
483         (WebCore::V8Proxy::installDOMWindow):
484         (WebCore::V8Proxy::initContextIfNeeded):
485         (WebCore::V8Proxy::getHiddenObjectPrototype):
486         (WebCore::V8Proxy::installHiddenObjectPrototype):
487         * bindings/v8/V8Proxy.h:
488
489 2009-07-15  Antonio Gomes   <antonio.gomes@openbossa.org>
490
491         Reviewed by Darin Adler.
492
493         useless null-check statement in visible_units.cpp@logicalStartOfLine
494         https://bugs.webkit.org/show_bug.cgi?id=27154
495
496         Simple fix.
497
498         * editing/visible_units.cpp:
499         (WebCore::logicalStartOfLine): Doubled honorEditableBoundaryAtOrAfter() call removed.
500
501 2009-07-15  Brady Eidson  <beidson@apple.com>
502
503         Reviewed by Dan Bernstein.
504
505         https://bugs.webkit.org/show_bug.cgi?id=27304
506         WebKit should provide usage and eligibility information about the page cache.
507
508         * WebCore.base.exp:
509
510         * history/CachedFrame.cpp:
511         (WebCore::CachedFrame::childFrameCount):
512         * history/CachedFrame.h:
513
514         * history/PageCache.cpp:
515         (WebCore::PageCache::frameCount):
516         (WebCore::PageCache::autoreleasedPageCount):
517         * history/PageCache.h:
518         (WebCore::PageCache::pageCount):
519
520 2009-07-15  Shinichiro Hamaji  <hamaji@chromium.org>
521
522         Reviewed by David Levin.
523
524         Chromium's canvas forgets its context after fillText again
525         https://bugs.webkit.org/show_bug.cgi?id=27293
526
527         No new tests because the test for this was already added in
528         https://bugs.webkit.org/show_bug.cgi?id=26436
529
530         * platform/graphics/chromium/TransparencyWin.cpp:
531         (WebCore::TransparencyWin::compositeTextComposite):
532
533 2009-07-14  David Hyatt  <hyatt@apple.com>
534
535         Reviewed by Simon Fraser.
536
537         https://bugs.webkit.org/show_bug.cgi?id=27283
538
539         Implement the new 'rem' unit from CSS3.
540
541         Added some rem-* tests in fast/css.
542
543         * css/CSSGrammar.y:
544         * css/CSSParser.cpp:
545         (WebCore::CSSParser::validUnit):
546         (WebCore::unitFromString):
547         (WebCore::CSSParser::parseValue):
548         (WebCore::CSSParser::lex):
549         * css/CSSParserValues.cpp:
550         (WebCore::CSSParserValue::createCSSValue):
551         * css/CSSPrimitiveValue.cpp:
552         (WebCore::CSSPrimitiveValue::computeLengthInt):
553         (WebCore::CSSPrimitiveValue::computeLengthIntForLength):
554         (WebCore::CSSPrimitiveValue::computeLengthShort):
555         (WebCore::CSSPrimitiveValue::computeLengthFloat):
556         (WebCore::CSSPrimitiveValue::computeLengthDouble):
557         (WebCore::CSSPrimitiveValue::cssText):
558         (WebCore::CSSPrimitiveValue::parserValue):
559         * css/CSSPrimitiveValue.h:
560         (WebCore::CSSPrimitiveValue::):
561         (WebCore::CSSPrimitiveValue::isUnitTypeLength):
562         * css/CSSStyleSelector.cpp:
563         (WebCore::CSSStyleSelector::initForStyleResolve):
564         (WebCore::convertToLength):
565         (WebCore::CSSStyleSelector::applyProperty):
566         (WebCore::CSSStyleSelector::mapFillSize):
567         (WebCore::CSSStyleSelector::mapFillXPosition):
568         (WebCore::CSSStyleSelector::mapFillYPosition):
569         (WebCore::CSSStyleSelector::createTransformOperations):
570         * css/CSSStyleSelector.h:
571         * css/MediaQueryEvaluator.cpp:
572         (WebCore::device_heightMediaFeatureEval):
573         (WebCore::device_widthMediaFeatureEval):
574         (WebCore::heightMediaFeatureEval):
575         (WebCore::widthMediaFeatureEval):
576         * css/WebKitCSSMatrix.cpp:
577         (WebCore::WebKitCSSMatrix::setMatrixValue):
578         * css/tokenizer.flex:
579         * dom/Document.cpp:
580         (WebCore::Document::Document):
581         * dom/Document.h:
582         (WebCore::Document::usesRemUnits):
583         (WebCore::Document::setUsesRemUnits):
584         * dom/Element.cpp:
585         (WebCore::Element::recalcStyle):
586         * rendering/SVGRenderTreeAsText.cpp:
587         (WebCore::writeStyle):
588         * rendering/style/SVGRenderStyle.cpp:
589         (WebCore::SVGRenderStyle::cssPrimitiveToLength):
590         * svg/graphics/SVGPaintServer.cpp:
591         (WebCore::applyStrokeStyleToContext):
592         (WebCore::dashArrayFromRenderingStyle):
593         * svg/graphics/SVGPaintServer.h:
594
595 2009-07-15  Dimitri Glazkov  <dglazkov@chromium.org>
596
597         Unreviewed, build fix.
598
599         Remove extraneous qualifier, accidentally added in http://trac.webkit.org/changeset/45884.
600
601         * bindings/v8/V8DOMWrapper.h: Removed extraneous qualifier.
602
603 2009-07-15  Dimitri Glazkov  <dglazkov@chromium.org>
604
605         Reviewed by Darin Fisher.
606
607         [V8] Update bindings for ValiditeState patch.
608         https://bugs.webkit.org/show_bug.cgi?id=19562
609
610         * bindings/v8/DOMObjectsInclude.h:
611         * bindings/v8/DerivedSourcesAllInOne.cpp:
612         * bindings/v8/V8Index.cpp:
613         * bindings/v8/V8Index.h:
614
615 2009-07-15  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
616
617         Reviewed by Simon Hausmann.
618
619         [Qt] Cleanup - Remove obsolete code from the make system
620         https://bugs.webkit.org/show_bug.cgi?id=27299
621
622         * WebCore.pro:
623
624 2009-07-15  Simon Hausmann  <simon.hausmann@nokia.com>
625
626         Reviewed by Ariya Hidayat.
627
628         Fix the build without media elements.
629
630         * rendering/HitTestResult.cpp:
631         (WebCore::HitTestResult::absoluteMediaURL): Add #if ENABLE(VIDEO)
632         markers around the body of the method.
633
634 2009-07-14  Pavel Feldman  <pfeldman@chromium.org>
635
636         Reviewed by Timothy Hatcher.
637
638         WebInspector: Move storeLastActivePanel out of the
639         ifdef ENABLE_JAVASCRIPT_DEBUGGER section in IDL;
640         Add default panel for the first opening of the
641         WebInspector.
642
643         https://bugs.webkit.org/show_bug.cgi?id=27263
644
645         * inspector/InspectorController.cpp:
646         (InspectorController::setWindowVisible):
647         * inspector/InspectorController.idl:
648
649 2009-07-14  Darin Adler  <darin@apple.com>
650
651         Try to fix Windows build.
652
653         * bindings/scripts/CodeGeneratorCOM.pm: Add Reflect and ReflectURL support.
654
655 2009-07-14  Pierre d'Herbemont  <pdherbemont@apple.com>
656
657         Reviewed by Oliver Hunt.
658
659         HTMLMediaElement::supportsFullscreen() should return false
660         https://bugs.webkit.org/show_bug.cgi?id=27284
661
662         (Reverting a part of 45875)
663
664         HTMLVideoElement::supportsFullscreen() will properly do the
665         job, and check if the backend supports fullscreen.
666
667         HTMLVideoElement is the only subclass to support fullscreen
668         (conditionnaly). HTMLAudioElement fullscreen is not supported
669         and is a different kind of fullscreen, if it comes to be wanted.
670
671         No test can be done currently given that none of the media
672         backends support fullscreen.
673
674         * html/HTMLMediaElement.cpp:
675         * html/HTMLMediaElement.h:
676         (WebCore::HTMLMediaElement::supportsFullscreen):
677
678 2009-07-14  Darin Adler  <darin@apple.com>
679
680         Reviewed by Dimitri Glazkov.
681
682         Next step in making DOM attribute getter/setters consistently use AtomicString
683         https://bugs.webkit.org/show_bug.cgi?id=25425
684
685         This covers eight DOM classes, and for each one of the classes:
686
687         - Changes the IDL to use the Reflect syntax for all simple cases.
688         - Removes unused functions in the classes, mainly newly unused ones that were
689           used for reflection before.
690         - Removes unneeded explicitly defined destructors.
691         - Explicitly declares destructors as virtual.
692         - Removes unneeded includes.
693         - Makes members protected or private rather than public where possible.
694         - Renames "doc" to "document".
695         - Tweaks formatting to match our latest style in a few places.
696         - Improves some FIXME comments.
697
698         Over time we'll want to do this for all HTML DOM classes.
699
700         * html/HTMLAnchorElement.cpp:
701         (WebCore::HTMLAnchorElement::HTMLAnchorElement):
702         * html/HTMLAnchorElement.h:
703         (WebCore::HTMLAnchorElement::endTagRequirement):
704         (WebCore::HTMLAnchorElement::tagPriority):
705         * html/HTMLAnchorElement.idl:
706         * html/HTMLAppletElement.cpp:
707         * html/HTMLAppletElement.h:
708         * html/HTMLAppletElement.idl:
709         * html/HTMLAreaElement.cpp:
710         (WebCore::HTMLAreaElement::parseMappedAttribute):
711         * html/HTMLAreaElement.h:
712         (WebCore::HTMLAreaElement::endTagRequirement):
713         (WebCore::HTMLAreaElement::tagPriority):
714         * html/HTMLAreaElement.idl:
715         * html/HTMLBRElement.cpp:
716         (WebCore::HTMLBRElement::parseMappedAttribute):
717         * html/HTMLBRElement.h:
718         * html/HTMLBRElement.idl:
719         * html/HTMLBaseElement.cpp:
720         (WebCore::HTMLBaseElement::HTMLBaseElement):
721         (WebCore::HTMLBaseElement::removedFromDocument):
722         (WebCore::HTMLBaseElement::process):
723         * html/HTMLBaseElement.h:
724         * html/HTMLBaseElement.idl:
725         * html/HTMLBaseFontElement.cpp:
726         (WebCore::HTMLBaseFontElement::HTMLBaseFontElement):
727         * html/HTMLBaseFontElement.h:
728         (WebCore::HTMLBaseFontElement::endTagRequirement):
729         (WebCore::HTMLBaseFontElement::tagPriority):
730         * html/HTMLBaseFontElement.idl:
731         * html/HTMLBlockquoteElement.cpp:
732         (WebCore::HTMLBlockquoteElement::HTMLBlockquoteElement):
733         * html/HTMLBlockquoteElement.h:
734         (WebCore::HTMLBlockquoteElement::tagPriority):
735         * html/HTMLBlockquoteElement.idl:
736         * html/HTMLBodyElement.cpp:
737         (WebCore::HTMLBodyElement::HTMLBodyElement):
738         (WebCore::HTMLBodyElement::addSubresourceAttributeURLs):
739         * html/HTMLBodyElement.h:
740         (WebCore::HTMLBodyElement::endTagRequirement):
741         (WebCore::HTMLBodyElement::tagPriority):
742         * html/HTMLBodyElement.idl:
743         Made changes as described above.
744
745         * loader/FrameLoader.cpp: Removed unneeded include of HTMLAnchorElement.h.
746
747 2009-07-14  Steve Falkenburg  <sfalken@apple.com>
748
749         Reorganize JavaScriptCore headers into:
750         API: include/JavaScriptCore/
751         Private: include/private/JavaScriptCore/
752
753         Reviewed by Darin Adler.
754
755         * WebCore.vcproj/QTMovieWin.vcproj:
756         * WebCore.vcproj/WebCoreCommon.vsprops:
757         * WebCore.vcproj/build-generated-files.sh:
758
759 2009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
760
761         Reviewed by Darin Adler.
762
763         Change all Noncopyable inheriting visibility to public.
764         https://bugs.webkit.org/show_bug.cgi?id=27225
765
766         Change all Noncopyable inheriting visibility to public because
767         it is needed to the custom allocation framework (bug #20422).
768
769         * bindings/js/GCController.h:
770         * bindings/js/WorkerScriptController.h:
771         * bindings/v8/V8DOMMap.cpp:
772         (WebCore::):
773         * bridge/runtime.h:
774         * css/CSSSelector.h:
775         * css/CSSSelectorList.h:
776         * css/CSSStyleSelector.h:
777         * dom/ClassNames.h:
778         * dom/MessagePortChannel.h:
779         * dom/XMLTokenizerLibxml2.cpp:
780         * dom/XMLTokenizerScope.h:
781         * editing/ReplaceSelectionCommand.cpp:
782         * editing/SelectionController.h:
783         * editing/TextIterator.cpp:
784         * history/PageCache.h:
785         * html/CanvasRenderingContext2D.h:
786         * html/HTMLParser.h:
787         * html/HTMLParserQuirks.h:
788         * html/PreloadScanner.h:
789         * loader/Cache.h:
790         * loader/CrossOriginPreflightResultCache.h:
791         * loader/FrameLoader.h:
792         * loader/ProgressTracker.h:
793         * loader/ThreadableLoader.h:
794         * loader/appcache/ApplicationCacheGroup.h:
795         * loader/archive/ArchiveResourceCollection.h:
796         * loader/icon/IconDatabase.h:
797         * loader/icon/IconLoader.h:
798         * loader/icon/PageURLRecord.h:
799         * loader/loader.h:
800         * page/ContextMenuController.h:
801         * page/EventHandler.h:
802         * page/FrameTree.h:
803         * page/Page.h:
804         * page/PageGroup.h:
805         * page/PageGroupLoadDeferrer.h:
806         * page/mac/EventHandlerMac.mm:
807         * platform/AutodrainedPool.h:
808         * platform/ContextMenu.h:
809         * platform/EventLoop.h:
810         * platform/HostWindow.h:
811         * platform/Pasteboard.h:
812         * platform/PurgeableBuffer.h:
813         * platform/RunLoopTimer.h:
814         * platform/ThreadGlobalData.h:
815         * platform/ThreadTimers.h:
816         * platform/Timer.h:
817         * platform/TreeShared.h:
818         * platform/graphics/FontData.h:
819         * platform/graphics/GlyphWidthMap.h:
820         * platform/graphics/GraphicsContext.h:
821         * platform/graphics/ImageBuffer.h:
822         * platform/graphics/ImageSource.h:
823         * platform/graphics/MediaPlayer.h:
824         * platform/graphics/skia/GraphicsContextPlatformPrivate.h:
825         * platform/graphics/skia/PlatformContextSkia.h:
826         * platform/graphics/win/QTMovieWin.cpp:
827         * platform/mac/LocalCurrentGraphicsContext.h:
828         * platform/network/FormDataBuilder.h:
829         * platform/network/ResourceHandleInternal.h:
830         * platform/network/soup/ResourceHandleSoup.cpp:
831         * platform/text/StringBuffer.h:
832         * platform/text/TextCodec.h:
833         * platform/win/WindowMessageBroadcaster.h:
834         * rendering/CounterNode.h:
835         * rendering/LayoutState.h:
836         * rendering/RenderFrameSet.h:
837         * rendering/RenderView.h:
838         * rendering/TransformState.h:
839         * svg/SVGAnimatedProperty.h:
840         * svg/SynchronizableTypeWrapper.h:
841         * workers/WorkerMessagingProxy.h:
842         * workers/WorkerRunLoop.cpp:
843         * xml/XPathExpressionNode.h:
844         * xml/XPathParser.h:
845         * xml/XPathPredicate.h:
846         * xml/XPathStep.h:
847
848 2009-07-14  Darin Fisher  <darin@chromium.org>
849
850         Reviewed by Darin Adler.
851
852         Fails to save document state when navigating away from a page with a
853         reference fragment.
854         https://bugs.webkit.org/show_bug.cgi?id=27281
855
856         Test: fast/history/saves-state-after-fragment-nav.html
857
858         * history/HistoryItem.cpp:
859         (WebCore::HistoryItem::isCurrentDocument): Use equalIgnoringRef
860         to compare URLs.
861
862 2009-07-14  Joseph Pecoraro  <joepeck02@gmail.com>
863
864         Reviewed by Sam Weinig.
865
866         Inspector: Remove Unintended Global Variables
867         https://bugs.webkit.org/show_bug.cgi?id=27203
868
869         * inspector/front-end/Console.js:
870         (WebInspector.Console.prototype._ensureCommandLineAPIInstalled):
871         * inspector/front-end/DatabasesPanel.js:
872         (WebInspector.DatabasesPanel.prototype.dataGridForDOMStorage):
873         * inspector/front-end/ObjectPropertiesSection.js:
874         (WebInspector.ObjectPropertyTreeElement.prototype.update):
875         * inspector/front-end/inspector.js:
876         (WebInspector.animateStyle):
877
878 2009-07-14  Michelangelo De Simone  <micdesim@gmail.com>
879
880         Reviewed by Adele Peterson.
881
882         https://bugs.webkit.org/show_bug.cgi?id=19562
883         Added build stuff and stub for the ValidityState class, part of HTML5
884         section Forms:
885         http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#validitystate
886
887         Test: fast/forms/ValidityState-001.html
888
889         * DerivedSources.cpp: Inclusion of ValidityState files
890         * DerivedSources.make: ditto
891         * GNUmakefile.am: ditto
892         * WebCore.gypi: ditto
893         * WebCore.pro: ditto
894         * WebCore.vcproj/WebCore.vcproj: ditto
895         * WebCore.xcodeproj/project.pbxproj: ditto
896         * WebCoreSources.bkl: ditto
897         * html/HTMLButtonElement.idl: validity attribute
898         * html/HTMLFieldSetElement.idl: ditto
899         * html/HTMLFormControlElement.cpp:
900         (WebCore::HTMLFormControlElement::validity): ValidityState getter
901         * html/HTMLFormControlElement.h: ditto
902         * html/HTMLInputElement.idl: validity attribute
903         * html/HTMLSelectElement.idl: ditto
904         * html/HTMLTextAreaElement.idl: ditto
905         * html/ValidityState.cpp: Added.
906         (WebCore::ValidityState::ValidityState):
907         (WebCore::ValidityState::valid): validation flag
908         * html/ValidityState.h: Added.
909         (WebCore::ValidityState::create): validation flag
910         (WebCore::ValidityState::control): ditto
911         (WebCore::ValidityState::valueMissing): ditto
912         (WebCore::ValidityState::typeMismatch): ditto
913         (WebCore::ValidityState::patternMismatch): ditto
914         (WebCore::ValidityState::tooLong): ditto
915         (WebCore::ValidityState::rangeUnderflow): ditto
916         (WebCore::ValidityState::rangeOverflow): ditto
917         (WebCore::ValidityState::stepMismatch): ditto
918         (WebCore::ValidityState::customError): ditto
919         * html/ValidityState.idl: Added.
920
921 2009-07-14  Ryosuke Niwa  <rniwa@google.com>
922
923         Reviewed by Eric Seidel.
924
925         Outdenting a line inside a blockquote tag does nothing
926         https://bugs.webkit.org/show_bug.cgi?id=25316
927
928         The bug was caused by the code checking whether the blockquote is created by WebKit or not.
929         We simply remove this code to be consistent with Firefox and Internet Explorer.
930         Also, enclosingBlockFlow == enclosingNode in outdentParagraph isn't a sufficient condition to insert
931         the placeholder before the enclosingNode because there could be contents before the current paragraph.
932         Instead, we should split the enclosingNode (which is a blockquote) at the starting position of outdentation.
933         It turned out that this solves the bug 25315 also: https://bugs.webkit.org/show_bug.cgi?id=25315
934
935         Test: editing/execCommand/outdent-regular-blockquote.html
936
937         * editing/IndentOutdentCommand.cpp:
938         (WebCore::isIndentBlockquote): no longer checks whether a blockquote is created by WebKit or not.
939         (WebCore::IndentOutdentCommand::outdentParagraph): takes care of the case enclosingBlockFlow == enclosingNode
940
941 2009-07-14  Adam Barth  <abarth@webkit.org>
942
943         Reviewed by Dimitri Glazkov.
944
945         [V8] Fix isolated world wrappers for Node prototypes
946         https://bugs.webkit.org/show_bug.cgi?id=27277
947
948         This change does two things:
949
950         1) We bypass the wrapper cache in the isolated world.  This is because
951            the wrapper template cache has prototypes that lead to the main
952            world.  We can add a template cache for the isolated world if
953            performance warrants.
954
955         2) We introduce a smarter way to grab the wrapper context for a frame
956            that is aware that proxy <-> context do not stand in one-to-one
957            correspondence.  This generalizes our solution for the node wrapper
958            case to prototypes.
959
960         The net result is that Node wrappers get the right prototypes.  As
961         before, tests to follow.
962
963         * bindings/v8/V8DOMWrapper.cpp:
964         (WebCore::V8DOMWrapper::setHiddenWindowReference):
965         (WebCore::V8DOMWrapper::instantiateV8Object):
966         (WebCore::V8DOMWrapper::convertNodeToV8Object):
967         (WebCore::V8DOMWrapper::convertWindowToV8Object):
968         (WebCore::V8DOMWrapper::getWrapperContext):
969         * bindings/v8/V8DOMWrapper.h:
970
971 2009-07-14  Adam Barth  <abarth@webkit.org>
972
973         Reviewed by Dimitri Glazkov.
974
975         [V8] Fix isolated world wrappers for Nodes
976         https://bugs.webkit.org/show_bug.cgi?id=27271
977
978         Previously, we keepy a pointer to the DOMMap on V8Proxy, but this
979         caused us to miss the branch in V8DOMMap.cpp for isolated worlds.
980
981         I have tests, but I can't land them until I get this feature under
982         control.
983
984         * bindings/v8/V8DOMWrapper.cpp:
985         (WebCore::V8DOMWrapper::convertNodeToV8Object):
986         * bindings/v8/V8Proxy.h:
987         (WebCore::V8Proxy::V8Proxy):
988
989 2009-07-14  Adam Barth  <abarth@webkit.org>
990
991         Reviewed by Dimitri Glazkov.
992
993         [V8] Fix isolated world crash on getting window.location
994         https://bugs.webkit.org/show_bug.cgi?id=27268
995
996         I have a test for this locally, but it requires a compile-time hack to
997         run.  Once I get the feature's stability under control, we can turn the
998         feature on and add the tests.
999
1000         * bindings/v8/V8DOMWrapper.cpp:
1001         (WebCore::V8DOMWrapper::setHiddenWindowReference):
1002         * bindings/v8/V8IsolatedWorld.h:
1003         (WebCore::V8IsolatedWorld::context):
1004
1005 2009-07-14  Brent Fulgham  <bfulgham@webkit.org>
1006
1007         Correct failing tests after r45875.  The original patch did not
1008         test the m_player member for null, causing crashes.  This will
1009         happen fairly frequently in real use.  Was this original patch
1010         ever tested?
1011         https://bugs.webkit.org/show_bug.cgi?id=27246
1012
1013         Test via existing media tests.
1014
1015         * html/HTMLMediaElement.cpp:
1016         (WebCore::HTMLMediaElement::supportsFullscreen): Check for null pointer.
1017         (WebCore::HTMLMediaElement::supportsSave): Check for null pointer.
1018
1019 2009-07-14  Avi Drissman  <avi@chromium.org>
1020
1021         Reviewed by Darin Fisher.
1022
1023         Explicitly mark the HTML generated for the Mac as being UTF-8 encoded.
1024         The Windows clipboard format is explicitly documented as being UTF-8,
1025         and all Linux apps assume UTF-8. On the Mac, though, unless otherwise
1026         indicated, Windows-1252 is assumed, which is wrong.
1027
1028         Bug: https://bugs.webkit.org/show_bug.cgi?id=27262
1029
1030         No new tests.
1031
1032         * platform/chromium/ClipboardChromium.cpp:
1033         (WebCore::ClipboardChromium::writeRange):
1034         * platform/chromium/PasteboardChromium.cpp:
1035         (WebCore::Pasteboard::writeSelection):
1036
1037 2009-07-14  Albert J. Wong  <ajwong@chromium.org>
1038
1039         Reviewed by Dimitri Glazkov.
1040
1041         Upstream V8NPObject.h and V8NPObject.cpp.
1042         https://bugs.webkit.org/show_bug.cgi?id=27103
1043
1044         This just upstreams the files from the chromium code base. Only
1045         minor changes to formatting and similar were done, so no testing
1046         is required because nothing really changed.  Code verified to compile.
1047
1048         * bindings/v8/ScriptController.cpp:
1049         (WebCore::ScriptController::bindToWindowObject):
1050         (WebCore::ScriptController::createScriptInstanceForWidget):
1051         * bindings/v8/V8NPObject.cpp: Added.
1052         (npObjectInvokeImpl):
1053         (npObjectMethodHandler):
1054         (npObjectInvokeDefaultHandler):
1055         (weakTemplateCallback):
1056         (npObjectGetProperty):
1057         (npObjectNamedPropertyGetter):
1058         (npObjectIndexedPropertyGetter):
1059         (npObjectGetNamedProperty):
1060         (npObjectGetIndexedProperty):
1061         (npObjectSetProperty):
1062         (npObjectNamedPropertySetter):
1063         (npObjectIndexedPropertySetter):
1064         (npObjectSetNamedProperty):
1065         (npObjectSetIndexedProperty):
1066         (weakNPObjectCallback):
1067         (createV8ObjectForNPObject):
1068         (forgetV8ObjectForNPObject):
1069         * bindings/v8/V8NPObject.h: Added.
1070         * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
1071         (WebCore::NAMED_PROPERTY_GETTER):
1072         (WebCore::NAMED_PROPERTY_SETTER):
1073         (WebCore::CALLBACK_FUNC_DECL):
1074         (WebCore::INDEXED_PROPERTY_GETTER):
1075         (WebCore::INDEXED_PROPERTY_SETTER):
1076
1077
1078 2009-07-14  Albert J. Wong  <ajwong@chromium.org>
1079
1080         Reviewed by Darin Adler.
1081
1082         Add HTMLMediaElement::supportSave() and a
1083         HitTestResult::absoluteMediaURL() functions
1084         https://bugs.webkit.org/show_bug.cgi?id=27246
1085
1086         Added an implementation of supportsSave() into HTMLMediaElement
1087         that delegates to MediaPlayerPrivateImpl so that the media engine
1088         is able to signal whether or not a media source supports saving.
1089
1090         Also added a function to HitTestResult that allows for retrieval
1091         of the currentSrc associated with the "hit" media element. 
1092         
1093         These functions are just pipeing with no visible UI change so there
1094         are no related layout test changes.
1095
1096         * html/HTMLMediaElement.cpp:
1097         (WebCore::HTMLMediaElement::supportsFullscreen): 
1098         (WebCore::HTMLMediaElement::supportsSave):
1099         * html/HTMLMediaElement.h:
1100         * platform/graphics/MediaPlayer.cpp:
1101         (WebCore::MediaPlayer::supportsSave):
1102         * platform/graphics/MediaPlayer.h:
1103         * platform/graphics/MediaPlayerPrivate.h:
1104         (WebCore::MediaPlayerPrivateInterface::supportsFullscreen):
1105         (WebCore::MediaPlayerPrivateInterface::supportsSave):
1106         * rendering/HitTestResult.cpp:
1107         (WebCore::HitTestResult::altDisplayString):
1108         (WebCore::HitTestResult::absoluteMediaURL):
1109         * rendering/HitTestResult.h:
1110
1111 2009-07-14  Dimitri Glazkov  <dglazkov@chromium.org>
1112
1113         Reviewed by Adam Barth.
1114
1115         [V8] Implement Reflect and ReflectURL attribute support.
1116         https://bugs.webkit.org/show_bug.cgi?id=27273
1117
1118         * bindings/scripts/CodeGeneratorV8.pm: Added support for Reflect and ReflectURL attributes.
1119
1120 2009-07-14  Dmitry Titov  <dimich@chromium.org>
1121
1122         Reviewed by Darin Adler.
1123
1124         https://bugs.webkit.org/show_bug.cgi?id=27266
1125         Add hasCurrentPoint() to WebCore::Path.
1126         This fixes Skia-based Chromium regression caused by the fix for
1127         https://bugs.webkit.org/show_bug.cgi?id=27187.
1128         For Skia, the new method always returns 'true', pending actual implementation.
1129         This means Chromium still will differ from Gecko behavior, but at least its Canvas
1130         will not be completely broken.
1131
1132         Existing Canvas Layout Tests should pass in Chromium after this change.
1133
1134         * html/CanvasRenderingContext2D.cpp:
1135         (WebCore::CanvasRenderingContext2D::lineTo): insteand of Path::isEmpty() test for hasCurrentPoint().
1136         (WebCore::CanvasRenderingContext2D::quadraticCurveTo): ditto.
1137         (WebCore::CanvasRenderingContext2D::bezierCurveTo): ditto.
1138
1139         * platform/graphics/Path.h:
1140         * platform/graphics/cairo/PathCairo.cpp:
1141         (WebCore::Path::hasCurrentPoint):
1142         * platform/graphics/cg/PathCG.cpp:
1143         (WebCore::Path::isEmpty):
1144         (WebCore::Path::hasCurrentPoint):
1145         * platform/graphics/qt/PathQt.cpp:
1146         (WebCore::Path::hasCurrentPoint):
1147         * platform/graphics/skia/PathSkia.cpp:
1148         (WebCore::Path::hasCurrentPoint):
1149         * platform/graphics/wx/PathWx.cpp:
1150         (WebCore::Path::hasCurrentPoint):
1151         All these files add a Path::hasCurrentPoint() for various platforms.
1152
1153 2009-07-14  Nate Chapin  <japhet@chromium.org>
1154
1155         Reviewed by Sam Weinig.
1156
1157         Upstream RGBColor from src.chromium.org.
1158
1159         https://bugs.webkit.org/show_bug.cgi?id=27133
1160
1161         * WebCore.gypi: Add RGBColor
1162         * css/RGBColor.cpp: Added.
1163         (WebCore::RGBColor::create):
1164         (WebCore::RGBColor::red):
1165         (WebCore::RGBColor::green):
1166         (WebCore::RGBColor::blue):
1167         * css/RGBColor.h: Added.
1168         (WebCore::RGBColor::RGBColor):
1169
1170 2009-07-10  Matt Perry  <mpcomplete@chromium.org>
1171
1172         Reviewed by Darin Fisher.
1173
1174         [V8] Rename the didCreate/DestroyScriptContext calls to make it
1175         clear that that those refer to the frame's contxt.  Add another
1176         similar call for when creating contexts via evaluateInNewContext.
1177         https://bugs.webkit.org/show_bug.cgi?id=27104
1178
1179         * bindings/v8/V8Proxy.cpp:
1180         (WebCore::V8Proxy::evaluateInNewContext):
1181         (WebCore::V8Proxy::disposeContextHandles):
1182         (WebCore::V8Proxy::initContextIfNeeded):
1183         * loader/EmptyClients.h:
1184         (WebCore::EmptyFrameLoaderClient::didCreateScriptContextForFrame):
1185         (WebCore::EmptyFrameLoaderClient::didDestroyScriptContextForFrame):
1186         (WebCore::EmptyFrameLoaderClient::didCreateIsolatedScriptContext):
1187         * loader/FrameLoaderClient.h:
1188
1189 2009-07-14  Brent Fulgham  <bfulgham@webkit.org>
1190
1191         Revert http://trac.webkit.org/changeset/45864 after
1192         breaking of Windows build.
1193
1194         * storage/LocalStorageTask.cpp:
1195         * storage/LocalStorageTask.h:
1196         * storage/Storage.cpp:
1197         * storage/Storage.h:
1198         * storage/StorageArea.cpp:
1199         * storage/StorageArea.h:
1200         * storage/StorageAreaImpl.cpp:
1201         * storage/StorageAreaImpl.h:
1202         * storage/StorageAreaSync.cpp:
1203         * storage/StorageAreaSync.h:
1204         * storage/StorageEvent.cpp:
1205         * storage/StorageEvent.h:
1206         (WebCore::StorageEvent::create):
1207         (WebCore::StorageEvent::StorageEvent):
1208         * storage/StorageNamespace.h:
1209         * storage/StorageNamespaceImpl.cpp:
1210         * storage/StorageNamespaceImpl.h:
1211         * storage/StorageSyncManager.cpp:
1212         * storage/StorageSyncManager.h:
1213
1214 2009-07-11  Jeremy Orlow  <jorlow@chromium.org>
1215
1216         Reviewed by Darin Adler.
1217
1218         Cleanup DOM Storage dependencies.
1219         https://bugs.webkit.org/show_bug.cgi?id=27180
1220
1221         DOM Storage had several unnecessary (and probably unintended)
1222         dependencies.  This patch replaces many includes of header files with
1223         forward declaration of classes, making some destructors explicit, and
1224         taking some factories out of the header files.
1225
1226         This will allow things like StorageAreaSync to take a StorageAreaImpl*
1227         (as it should) rather than a StorageArea* which previously weren't
1228         possible because the dependencies were such a tangled mess.
1229
1230         * storage/LocalStorageTask.cpp:
1231         (WebCore::LocalStorageTask::~LocalStorageTask):
1232         * storage/LocalStorageTask.h:
1233         * storage/Storage.cpp:
1234         (WebCore::Storage::~Storage):
1235         * storage/Storage.h:
1236         * storage/StorageArea.cpp:
1237         * storage/StorageArea.h:
1238         * storage/StorageAreaImpl.cpp:
1239         * storage/StorageAreaImpl.h:
1240         * storage/StorageAreaSync.cpp:
1241         (WebCore::StorageAreaSync::~StorageAreaSync):
1242         * storage/StorageAreaSync.h:
1243         * storage/StorageEvent.cpp:
1244         (WebCore::StorageEvent::create):
1245         (WebCore::StorageEvent::StorageEvent):
1246         * storage/StorageEvent.h:
1247         * storage/StorageNamespace.h:
1248         * storage/StorageNamespaceImpl.cpp:
1249         * storage/StorageNamespaceImpl.h:
1250         * storage/StorageSyncManager.cpp:
1251         (WebCore::StorageSyncManager::~StorageSyncManager):
1252         * storage/StorageSyncManager.h:
1253
1254
1255 2009-07-14  Adam Treat  <adam.treat@torchmobile.com>
1256
1257         Reviewed by David Hyatt.
1258
1259         https://bugs.webkit.org/show_bug.cgi?id=26983
1260
1261         Check to make sure the view is attached to a frame() in the visibleContentsResized()
1262         method as it can be triggered before the view is attached by Frame::createView(...)
1263         setting various values such as setScrollBarModes(...) for example.  An ASSERT is
1264         triggered when a view is layout before being attached to a frame().
1265
1266         * page/FrameView.cpp:
1267         (WebCore::FrameView::visibleContentsResized):
1268         * page/FrameView.h:
1269
1270 2009-07-14  Pavel Feldman  <pfeldman@chromium.org>
1271
1272         Reviewed by Timothy Hatcher.
1273
1274         WebInspector: show last opened panel when invoking inspector.
1275
1276         https://bugs.webkit.org/show_bug.cgi?id=27263
1277
1278         * inspector/InspectorController.cpp:
1279         (WebCore::InspectorController::InspectorController):
1280         (WebCore::InspectorController::setWindowVisible):
1281         (WebCore::InspectorController::storeLastActivePanel):
1282         (WebCore::InspectorController::specialPanelForJSName):
1283         * inspector/InspectorController.h:
1284         (WebCore::InspectorController::Setting::Setting):
1285         * inspector/InspectorController.idl:
1286         * inspector/front-end/inspector.js:
1287         (WebInspector.set currentPanel):
1288         (WebInspector.loaded):
1289
1290 2009-07-14  Anton Muhin  <antonm@chromium.org>
1291
1292         Reviewed by Dimitri Glazkov.
1293
1294         Speed up access to NodeList length.
1295         https://bugs.webkit.org/show_bug.cgi?id=27264
1296
1297         That's a minimal alternation of the code.
1298
1299         * bindings/v8/custom/V8NodeListCustom.cpp:
1300         (WebCore::NAMED_PROPERTY_GETTER): 1) use AtomicString for comparison, 2) use
1301         v8::Integer::New instead of v8::Number::New.
1302
1303 2009-07-14  Anton Muhin  <antonm@chromium.org>
1304
1305         Reviewed by Dimitri Glazkov.
1306
1307         Do not do unnecessary conversions from v8::Handle<v8::Value> to
1308         v8::Handle<v8::Object> and accompanying changes.
1309         https://bugs.webkit.org/show_bug.cgi?id=26953
1310
1311         Three things:
1312
1313         1) do not cast from v8::Value to v8::Object if unnecessary---casts are cheap,
1314         but are not free (they check for emptiness of handle);
1315         2) inline conversion from wrapper to node;
1316         3) simplify case to an ASSERT.
1317
1318         This is just a refactoring, so no new tests are needed.
1319
1320         * bindings/scripts/CodeGeneratorV8.pm:
1321         * bindings/v8/V8Proxy.cpp:
1322         (WebCore::V8Proxy::evaluateInNewContext):
1323         (WebCore::V8Proxy::convertToSVGPODTypeImpl):
1324         * bindings/v8/V8Proxy.h:
1325         (WebCore::V8Proxy::convertDOMWrapperToNative):
1326         (WebCore::V8Proxy::convertToNativeObject):
1327         (WebCore::V8Proxy::convertToNativeEvent):
1328         * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
1329         (WebCore::toCanvasStyle):
1330         (WebCore::CALLBACK_FUNC_DECL):
1331         * bindings/v8/custom/V8CustomBinding.cpp:
1332         (WebCore::V8Custom::GetTargetFrame):
1333         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1334         (WebCore::CALLBACK_FUNC_DECL):
1335         (WebCore::V8Custom::ClearTimeoutImpl):
1336         (WebCore::NAMED_ACCESS_CHECK):
1337         (WebCore::INDEXED_ACCESS_CHECK):
1338         * bindings/v8/custom/V8DocumentCustom.cpp:
1339         (WebCore::CALLBACK_FUNC_DECL):
1340         * bindings/v8/custom/V8LocationCustom.cpp:
1341         (WebCore::CALLBACK_FUNC_DECL):
1342
1343 2009-07-14  Darin Adler  <darin@apple.com>
1344
1345         Reviewed by Dan Bernstein.
1346
1347         Straight quotes should match fancy quotes in in-page search
1348         https://bugs.webkit.org/show_bug.cgi?id=27217
1349
1350         Tests: fast/text/find-quotes.html
1351
1352         * editing/TextIterator.cpp:
1353         (WebCore::foldQuoteMark): Added.
1354         (WebCore::foldQuoteMarks): Added.
1355         (WebCore::SearchBuffer::SearchBuffer): Call foldQuoteMarks on the target string.
1356         (WebCore::SearchBuffer::append): Call foldQuoteMarks on characters as they are
1357         added to the search buffer.
1358
1359         * platform/text/CharacterNames.h: Added more quotation mark character names.
1360         Sorted character names with the sort tool.
1361
1362 2009-07-13  Pavel Feldman  <pfeldman@chromium.org>
1363
1364         Reviewed by Timothy Hatcher.
1365
1366         WebInspector: handle debugger shortcuts while on source frame or on
1367         script file selector.
1368
1369         https://bugs.webkit.org/show_bug.cgi?id=27224
1370
1371         * inspector/front-end/ScriptsPanel.js:
1372         (WebInspector.ScriptsPanel):
1373         * inspector/front-end/SourceFrame.js:
1374         (WebInspector.SourceFrame.prototype._loaded):
1375
1376 2009-07-13  Sam Weinig  <sam@webkit.org>
1377
1378         Reviewed by Darin Adler.
1379
1380         Use standard HashCountedSet instead of a hand rolled one
1381         in HTMLDocument.
1382
1383         * html/HTMLDocument.cpp:
1384         (WebCore::addItemToMap):
1385         (WebCore::removeItemFromMap):
1386         * html/HTMLDocument.h:
1387
1388 2009-07-13  Erik Arvidsson  <arv@chromium.org>
1389
1390         Reviewed by Darin Adler and Maciej Stachowiak.
1391
1392         Implement HTML5 draggable
1393         https://bugs.webkit.org/show_bug.cgi?id=26262
1394
1395         This adds support for the HTML5 draggable attribute and its DOM binding. It maps the draggable property
1396         to the CSS properties -webkit-user-drag and -webkit-user-select respectively.
1397
1398         Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#the-draggable-attribute
1399
1400         Test: fast/html/draggable.html
1401
1402         * css/html.css:
1403         * html/HTMLAnchorElement.cpp:
1404         (WebCore::HTMLAnchorElement::draggable):
1405         * html/HTMLAnchorElement.h:
1406         * html/HTMLAttributeNames.in:
1407         * html/HTMLElement.cpp:
1408         (WebCore::HTMLElement::draggable):
1409         (WebCore::HTMLElement::setDraggable):
1410         * html/HTMLElement.h:
1411         * html/HTMLElement.idl:
1412         * html/HTMLImageElement.cpp:
1413         (WebCore::HTMLImageElement::draggable):
1414         * html/HTMLImageElement.h:
1415
1416 2009-07-13  Simon Fraser  <simon.fraser@apple.com>
1417
1418         Reviewed by Dan Bernstein.
1419
1420         Image rendered as layer contents looks different from image rendered via CG.
1421         <rdar://problem/7048830> 
1422         
1423         Fix a visible color profile difference between between images rendered via Core Graphics
1424         and those rendered via a compositing layer, by assigning the GenericRGB profile to
1425         untagged images (which come through as having the DeviceRGB profile) when they are set
1426         as layer contents.
1427
1428         Test: compositing/color-matching/image-color-matching.html
1429
1430         * platform/graphics/mac/GraphicsLayerCA.mm:
1431         (WebCore::GraphicsLayerCA::setContentsToImage):
1432
1433 2009-07-13  Darin Adler  <darin@apple.com>
1434
1435         Reviewed by Oliver Hunt.
1436
1437         https://bugs.webkit.org/show_bug.cgi?id=27220
1438         Assertion failure in createSearcher() (usearch_open() status is U_USING_DEFAULT_WARNING)
1439
1440         * editing/TextIterator.cpp:
1441         (WebCore::createSearcher): Add U_USING_DEFAULT_WARNING as a possible status code
1442         in the assertion. Affects only the assertion.
1443
1444 2009-07-13  Alexey Proskuryakov  <ap@webkit.org>
1445
1446         Reviewed by Darin Adler.
1447
1448         https://bugs.webkit.org/show_bug.cgi?id=26925
1449         <rdar://problem/7027850> URL Fragment Breaks Application Cache Loads
1450
1451         Test: http/tests/appcache/main-resource-hash.html
1452
1453         * loader/appcache/ApplicationCache.cpp:
1454         (WebCore::ApplicationCache::resourceForURL):
1455         (WebCore::ApplicationCache::resourceForRequest):
1456         * loader/appcache/ApplicationCacheGroup.cpp:
1457         (WebCore::ApplicationCacheGroup::cacheForMainRequest):
1458         (WebCore::ApplicationCacheGroup::fallbackCacheForMainRequest):
1459         (WebCore::ApplicationCacheGroup::selectCache):
1460         (WebCore::ApplicationCacheGroup::finishedLoadingMainResource):
1461         (WebCore::ApplicationCacheGroup::didReceiveResponse):
1462         (WebCore::ApplicationCacheGroup::didFail):
1463         (WebCore::ApplicationCacheGroup::addEntry):
1464         Remove URL fragment at appcache code borders.
1465
1466         * loader/appcache/ApplicationCacheResource.h:
1467         (WebCore::ApplicationCacheResource::create):
1468         * loader/appcache/ApplicationCacheStorage.cpp:
1469         (WebCore::ApplicationCacheStorage::findOrCreateCacheGroup):
1470         (WebCore::ApplicationCacheStorage::cacheGroupForURL):
1471         (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
1472         Assert that there is no URL fragment in URL at key points in appcache code.
1473
1474 2009-07-13  Darin Adler  <darin@apple.com>
1475
1476         Reviewed by Dan Bernstein.
1477
1478         https://bugs.webkit.org/show_bug.cgi?id=27166
1479         rdar://problem/7015857
1480         Find for strings composed entirely of spaces doesn't work
1481
1482         Test: fast/text/find-spaces.html
1483
1484         * editing/TextIterator.cpp:
1485         (WebCore::findPlainText): Removed unneeded special case.
1486         The empty string case already works correctly.
1487
1488 2009-07-13  Anders Carlsson  <andersca@apple.com>
1489
1490         Reviewed by Kevin Decker.
1491
1492         Remove NPPVpluginPrivateModeBool, it was removed from the spec.
1493         
1494         * bridge/npapi.h:
1495
1496 2009-07-13  Feng Qian  <feng@chromium.org>
1497
1498         Reviewed by Dimitri Glazkov.
1499
1500         Fix for https://bugs.webkit.org/show_bug.cgi?id=27237
1501
1502         Make V8DOMMap.h compiling with gcc option -Werror=non=virtual-dtor.  
1503
1504         * bindings/v8/V8DOMMap.h:
1505         (WebCore::WeakReferenceMap::WeakReferenceMap):
1506         (WebCore::WeakReferenceMap::~WeakReferenceMap):
1507
1508 2009-07-13  Dimitri Glazkov  <dglazkov@chromium.org>
1509
1510         Reviewed by Darin Fisher.
1511
1512         Remove an accidental add of bidi.(cpp|h) to WebCore.gypi.
1513
1514         * WebCore.gypi: Removed bidi.cpp and bidi.h
1515
1516 2009-07-13  Dimitri Glazkov  <dglazkov@chromium.org>
1517
1518         Reviewed by Darin Fisher.
1519
1520         Update WebCore.gyp in preparation to hooking it up.
1521
1522         * WebCore.gypi: Added files that were mid-stream while switching over.
1523
1524 2009-07-13  Dmitry Titov  <dimich@chromium.org>
1525
1526         Not reviewed, another small fix for Chromium build.
1527
1528         * bindings/v8/ScriptController.cpp:
1529         (WebCore::ScriptController::evaluate):
1530
1531 2009-07-13  Dmitry Titov  <dimich@chromium.org>
1532
1533         Not reviewed, fix Chromium build bustage.
1534
1535         * bindings/v8/ScriptController.cpp:
1536         (WebCore::ScriptController::evaluate):
1537         * bindings/v8/V8Proxy.cpp:
1538         (WebCore::JavaScriptConsoleMessage::addToPage):
1539         * bindings/v8/WorkerContextExecutionProxy.cpp:
1540         (WebCore::handleConsoleMessage):
1541
1542 2009-07-13  Sam Weinig  <sam@webkit.org>
1543
1544         Reviewed by Darin Adler.
1545
1546         Fix for https://bugs.webkit.org/show_bug.cgi?id=27234
1547         <rdar://problem/7054356>
1548
1549         Add null page check in HTMLDocument::hasFocus.
1550
1551         Test: fast/dom/HTMLDocument/hasFocus-frameless-crash.html
1552
1553         * html/HTMLDocument.cpp:
1554         (WebCore::HTMLDocument::hasFocus): Add page null check.
1555         (WebCore::HTMLDocument::createTokenizer): Cleanup page null check.
1556
1557 2009-07-13  Dan Bernstein  <mitz@apple.com>
1558
1559         Reviewed by Darin Adler.
1560
1561         Disable continuous spell checking in the inspector
1562         https://bugs.webkit.org/show_bug.cgi?id=27131
1563
1564         * inspector/front-end/inspector.html: Added spellcheck="false" to the
1565             main-panels and console-prompt containers.
1566
1567 2009-07-13  Adam Langley  <agl@google.com>
1568
1569         Reviewed by Eric Seidel.
1570
1571         Chromium Linux: fix assertion when rendering google.com.kh
1572
1573         https://bugs.webkit.org/show_bug.cgi?id=26924
1574
1575         Some shapers (i.e. Khmer) will produce cluster logs which report that
1576         /no/ code points contributed to certain glyphs. Because of this, we
1577         take any code point which contributed to the glyph in question, or any
1578         subsequent glyph.  If we run off the end, then we take the last code
1579         point.
1580
1581         Added LayoutTests/fast/text/international/khmar-selection.html
1582
1583         * platform/graphics/chromium/FontLinux.cpp:
1584         (WebCore::Font::offsetForPositionForComplexText):
1585
1586 2009-07-13  Dan Bernstein  <mitz@apple.com>
1587
1588         Reviewed by Darin Adler.
1589
1590         spellcheck="false" is ignored
1591         <rdar://problem/7054177>
1592
1593         * editing/Editor.cpp:
1594         (WebCore::markMisspellingsOrBadGrammar): Moved code to check the
1595             spellcheck attribute from here...
1596         (WebCore::Editor::spellCheckingEnabledInFocusedNode): ...to here.
1597         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Bail out
1598             if spell chcking is disabled by the spellcheck attribute.
1599         * editing/Editor.h:
1600
1601 2009-07-13  Brent Fulgham  <bfulgham@webkit.org>
1602
1603         Reviewed by Adam Roben.
1604
1605         Add new configuration flag for redistributable Windows build.
1606         https://bugs.webkit.org/show_bug.cgi=27087
1607         
1608         * WebCore.vcproj/WebCore.vcproj: Add new WinCairo.vsprops to
1609           Debug_Cairo and Release_Cairo builds.
1610         * config.h: Check for presence of WIN_CAIRO and select appropriate
1611           configuration.  Defaults to standard Apple build.
1612
1613 2009-07-13  Peter Kasting  <pkasting@google.com>
1614
1615         https://bugs.webkit.org/show_bug.cgi?id=19562
1616         Back out previous patch for this bug (too many problems).
1617
1618         * DerivedSources.cpp:
1619         * DerivedSources.make:
1620         * GNUmakefile.am:
1621         * WebCore.gypi:
1622         * WebCore.pro:
1623         * WebCore.vcproj/WebCore.vcproj:
1624         * WebCore.xcodeproj/project.pbxproj:
1625         * WebCoreSources.bkl:
1626         * html/HTMLButtonElement.idl:
1627         * html/HTMLFieldSetElement.idl:
1628         * html/HTMLFormControlElement.cpp:
1629         * html/HTMLFormControlElement.h:
1630         (WebCore::HTMLFormControlElement::form):
1631         * html/HTMLInputElement.idl:
1632         * html/HTMLSelectElement.idl:
1633         * html/HTMLTextAreaElement.idl:
1634         * html/ValidityState.cpp: Removed.
1635         * html/ValidityState.h: Removed.
1636         * html/ValidityState.idl: Removed.
1637
1638 2009-07-13  Nate Chapin  <japhet@chromium.org>
1639
1640         Reviewed by Dimitri Glazkov.
1641
1642         Add HTMLAllCollection to WebCore.gypi.
1643
1644         https://bugs.webkit.org/show_bug.cgi?id=27223
1645
1646         * WebCore.gypi: Add HTMLAllCollection.
1647
1648 2009-07-13  Dimitri Glazkov  <dglazkov@chromium.org>
1649
1650         Reviewed by Darin Fisher.
1651
1652         [V8] Add a missing check for constructor call in WebKitCSSMatrixConstructor.
1653         https://bugs.webkit.org/show_bug.cgi?id=27218
1654
1655         Test: fast/css/matrix-as-function-crash.html
1656
1657         * bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp:
1658         (WebCore::CALLBACK_FUNC_DECL): Added a check for constructor call.
1659
1660 2009-07-13  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
1661
1662         Unreviewed make dist build fix.
1663
1664         * GNUmakefile.am:
1665
1666 2009-07-13  Cédric Luthi  <cedric.luthi@gmail.com>
1667
1668         Reviewed by Tor Arne Vestbø.
1669
1670         Fix NPWindow clip rect in PluginViewMac
1671
1672         The rect should be in window-coordinates. This bug can be observed
1673         with Flash 10 here: http://www.permadi.com/tutorial/cursorTracker/
1674
1675         * plugins/mac/PluginViewMac.cpp:
1676
1677 2009-07-13  Simon Hausmann  <hausmann@webkit.org>
1678
1679         Reviewed by Ariya Hidayat.
1680
1681         Fix Qt implementation of WebCore::directoryName to return the absolute
1682         directory name instead of the base file name.
1683
1684         * platform/qt/FileSystemQt.cpp:
1685         (WebCore::directoryName):
1686
1687 2009-07-13  Simon Hausmann  <hausmann@webkit.org>
1688
1689         Reviewed by Ariya Hidayat.
1690
1691         Fix WebCore::Path::isEmpty() for the Qt port to return true
1692         if there is no element in the path.
1693
1694         QPainterPath::isEmpty() returns also true if there is one single
1695         MoveTo element inside, which makes sense but doesn't patch Webcore's
1696         is-empty definition.
1697
1698         * platform/graphics/qt/PathQt.cpp:
1699         (WebCore::Path::isEmpty): Use elementCount() == 0.
1700
1701 2009-07-13  Albert J. Wong  <ajwong@chromium.org>
1702
1703         Reviewed by Dimitri Glazkov.
1704
1705         Upstream fixes to NPV8Object.cpp that make ~30 layout tests pass.
1706         https://bugs.webkit.org/show_bug.cgi?id=27127
1707
1708         There were a number of bugs introduced during the last upstreaming
1709         effort that broke around 30 layout tests.  This fixes those bugs.
1710         It also has compile fixes to match the recent cutting apart of
1711         V8Proxy.
1712
1713         * bindings/v8/NPV8Object.cpp:
1714         (freeV8NPObject):
1715         (npCreateV8ScriptObject):
1716         (NPN_Invoke):
1717         (NPN_InvokeDefault):
1718         (NPN_EvaluateHelper):
1719         (NPN_SetException):
1720         (NPN_Construct):
1721
1722 2009-07-13  Mads Ager  <ager@chromium.org>
1723
1724         Reviewed by Adam Barth.
1725
1726         Fix memory leak in the V8 binding layer. 
1727         https://bugs.webkit.org/show_bug.cgi?id=27163
1728
1729         Reinitializing the context is not necessary when clearing the proxy for navigation
1730         and it will lead us to hold on to an empty context for each frame.
1731
1732         Test for empty context instead of empty global object handle when
1733         updating the document for a context.
1734
1735         * bindings/v8/V8Proxy.cpp:
1736         (WebCore::V8Proxy::clearForNavigation):
1737         (WebCore::V8Proxy::updateDocument):
1738
1739 2009-07-13  John Gregg  <johnnyg@google.com>
1740
1741         Reviewed by David Levin.
1742
1743         Correct the logic to determine if a V8 callback returns a value.
1744         https://bugs.webkit.org/show_bug.cgi?id=27155
1745
1746         * bindings/v8/custom/V8CustomVoidCallback.cpp:
1747         (WebCore::invokeCallback):
1748         - Don't crash if result.IsEmpty().
1749
1750 2009-07-13  Drew Wilson  <atwilson@google.com>
1751
1752         Reviewed by David Levin.
1753
1754         Add ENABLE(SHARED_WORKERS) flag and define SharedWorker APIs
1755         https://bugs.webkit.org/show_bug.cgi?id=26932
1756
1757         Initial IDL definition and bindings for SharedWorkers.
1758
1759         * Configurations/FeatureDefines.xcconfig:
1760         Added new files for SharedWorker support.
1761         * DerivedSources.make:
1762         Added new files for SharedWorker support.
1763         * GNUmakefile.am:
1764         Added new files for SharedWorker support.
1765         * WebCore.gypi:
1766         Added new files for SharedWorker support.
1767         * WebCore.pro:
1768         Added new files for SharedWorker support.
1769         * WebCore.xcodeproj/project.pbxproj:
1770         Added new files for SharedWorker support.
1771         * bindings/js/JSAbstractWorkerCustom.cpp: Added.
1772         (WebCore::JSAbstractWorker::mark):
1773         Custom mark handler that marks the event listeners.
1774         (WebCore::JSAbstractWorker::addEventListener):
1775         (WebCore::JSAbstractWorker::removeEventListener):
1776         (WebCore::JSAbstractWorker::toJS):
1777         Custom toJS handler which differentiates between various subclasses.
1778         * bindings/js/JSDOMWindowCustom.cpp:
1779         (WebCore::JSDOMWindow::sharedWorker):
1780         SharedWorker constructor (only enabled when SHARED_WORKERS is
1781         enabled).
1782         * bindings/js/JSEventTarget.cpp:
1783         (WebCore::toJS):
1784         (WebCore::toEventTarget):
1785         Added support for converting to/from SharedWorkers.
1786         * bindings/js/JSSharedWorkerConstructor.cpp: Added.
1787         (WebCore::JSSharedWorkerConstructor::JSSharedWorkerConstructor):
1788         (WebCore::constructSharedWorker):
1789         (WebCore::JSSharedWorkerConstructor::getConstructData):
1790         * bindings/js/JSSharedWorkerConstructor.h: Added.
1791         (WebCore::JSSharedWorkerConstructor::classInfo):
1792         * bindings/js/JSSharedWorkerCustom.cpp: Added.
1793         (WebCore::JSSharedWorker::mark):
1794         Custom mark function that marks the internal MessagePort.
1795         * bindings/v8/DOMObjectsInclude.h:
1796         Updated to include new header files.
1797         * bindings/v8/V8Index.cpp:
1798         * bindings/v8/V8Index.h:
1799         * bindings/v8/custom/V8AbstractWorkerCustom.cpp: Added.
1800         (WebCore::getEventListener):
1801         (WebCore::ACCESSOR_GETTER):
1802         (WebCore::ACCESSOR_SETTER):
1803         (WebCore::CALLBACK_FUNC_DECL):
1804         V8 handlers for add/removeEventListener().
1805         * bindings/v8/custom/V8CustomBinding.h:
1806         * bindings/v8/custom/V8SharedWorkerCustom.cpp: Added.
1807         (WebCore::CALLBACK_FUNC_DECL):
1808         Custom constructor for SharedWorker.
1809         * dom/EventTarget.cpp:
1810         (WebCore::EventTarget::toSharedWorker):
1811         * dom/EventTarget.h:
1812         * page/DOMWindow.idl:
1813         * workers/AbstractWorker.cpp: Added.
1814         (WebCore::AbstractWorker::AbstractWorker):
1815         Common base class for SharedWorker and (soon) Worker. The functions below were copied from Worker.cpp.
1816         This is the first step in refactoring Worker to derive from AbstractWorker to enable code sharing.
1817         (WebCore::AbstractWorker::~AbstractWorker):
1818         (WebCore::AbstractWorker::addEventListener):
1819         (WebCore::AbstractWorker::removeEventListener):
1820         (WebCore::AbstractWorker::dispatchEvent):
1821         (WebCore::AbstractWorker::dispatchLoadErrorEvent):
1822         (WebCore::AbstractWorker::dispatchScriptErrorEvent):
1823         * workers/AbstractWorker.h: Added.
1824         Definitions of functionality shared by Worker.h and SharedWorker.h. In a future patch, Worker will derive from AbstractWorker.
1825         (WebCore::AbstractWorker::scriptExecutionContext):
1826         (WebCore::AbstractWorker::setOnerror):
1827         (WebCore::AbstractWorker::onerror):
1828         (WebCore::AbstractWorker::eventListeners):
1829         (WebCore::AbstractWorker::refEventTarget):
1830         (WebCore::AbstractWorker::derefEventTarget):
1831         * workers/AbstractWorker.idl: Added.
1832         * workers/SharedWorker.cpp: Added.
1833         (WebCore::SharedWorker::SharedWorker):
1834         (WebCore::SharedWorker::~SharedWorker):
1835         * workers/SharedWorker.h: Added.
1836         (WebCore::SharedWorker::create):
1837         (WebCore::SharedWorker::port):
1838         (WebCore::SharedWorker::toSharedWorker):
1839         * workers/SharedWorker.idl: Added.
1840
1841 2009-07-13  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1842
1843         Reviewed by Simon Hausmann.
1844
1845         [Qt] Cleanup - Remove prf install target
1846         https://bugs.webkit.org/show_bug.cgi?id=27191
1847
1848         qtwebkit.prf has been removed; this cleans up the related
1849         install target as well.
1850
1851         * WebCore.pro: Remove prf install target
1852
1853 2009-07-12  Adam Barth  <abarth@webkit.org>
1854
1855         Reviewed by Oliver Hunt.
1856
1857         Facebook Chat is broken due to XSS auditor
1858         https://bugs.webkit.org/show_bug.cgi?id=27179
1859
1860         Instead of just using the script's URL as to detect an XSS attack, we
1861         now use a bit of context before the URL.  In particular, we use the
1862         bytes from the beginning of the attribute name to the end of the
1863         attribute value.  In virtually all injection attacks, the attacker
1864         would need to supply the attribute name as well as the attribute value.
1865         However, in the Facebook false positive, the attribute name is not
1866         present in the URL.
1867
1868         Tests: http/tests/security/xssAuditor/script-tag-src-redirect-safe.html
1869                http/tests/security/xssAuditor/script-tag-with-source-double-quote.html
1870                http/tests/security/xssAuditor/script-tag-with-source-no-quote.html
1871
1872         * html/HTMLTokenizer.cpp:
1873         (WebCore::HTMLTokenizer::parseTag):
1874         * html/HTMLTokenizer.h:
1875         * page/XSSAuditor.cpp:
1876         (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
1877         * page/XSSAuditor.h:
1878
1879 2009-07-12  Keishi Hattori  <casey.hattori@gmail.com>
1880
1881         Reviewed by Timothy Hatcher.
1882
1883         Refactor ConsoleMessage to add MessageType attribute.
1884         https://bugs.webkit.org/show_bug.cgi?id=20625
1885
1886         * bindings/js/JSCustomXPathNSResolver.cpp:
1887         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
1888         * bindings/js/JSDOMWindowBase.cpp:
1889         (WebCore::JSDOMWindowBase::printErrorMessage):
1890         * dom/Document.cpp:
1891         (WebCore::Document::reportException):
1892         (WebCore::Document::addMessage):
1893         * dom/Document.h:
1894         * dom/ScriptExecutionContext.h:
1895         * html/HTMLParser.cpp:
1896         (WebCore::HTMLParser::reportErrorToConsole):
1897         * inspector/ConsoleMessage.cpp:
1898         (WebCore::ConsoleMessage::ConsoleMessage):
1899         (WebCore::ConsoleMessage::addToConsole):
1900         (WebCore::ConsoleMessage::isEqual):
1901         * inspector/ConsoleMessage.h:
1902         * inspector/InspectorController.cpp:
1903         (WebCore::InspectorController::addMessageToConsole):
1904         (WebCore::InspectorController::startGroup):
1905         (WebCore::InspectorController::endGroup):
1906         (WebCore::InspectorController::addProfileFinishedMessageToConsole):
1907         (WebCore::InspectorController::addStartProfilingMessageToConsole):
1908         (WebCore::InspectorController::count):
1909         * inspector/InspectorController.h:
1910         * inspector/front-end/Console.js:
1911         (WebInspector.Console.prototype.addMessage):
1912         (WebInspector.ConsoleMessage): Added type property.
1913         (WebInspector.ConsoleMessage.prototype.toMessageElement):
1914         (WebInspector.ConsoleMessage.prototype.toString):
1915         (WebInspector.ConsoleMessage.prototype.isEqual):
1916         (WebInspector.ConsoleCommandResult):
1917         (WebInspector.ConsoleGroup.prototype.addMessage):
1918         (WebInspector.ConsoleGroup.prototype._titleClicked):
1919         * inspector/front-end/Resource.js:
1920         (WebInspector.Resource.prototype._addTip):
1921         (WebInspector.Resource.prototype._checkWarning):
1922         * inspector/front-end/inspector.css: Changed ".console-group-title-level" to ".console-group-title"
1923         * inspector/front-end/inspector.js:
1924         (WebInspector.addMessageToConsole):
1925         * loader/DocLoader.cpp:
1926         (WebCore::DocLoader::printAccessDeniedMessage):
1927         * loader/EmptyClients.h:
1928         (WebCore::EmptyChromeClient::addMessageToConsole):
1929         * loader/FrameLoader.cpp:
1930         (WebCore::FrameLoader::reportLocalLoadFailed):
1931         (WebCore::FrameLoader::shouldAllowNavigation):
1932         * page/ChromeClient.h:
1933         * page/Console.cpp:
1934         (WebCore::printMessageSourceAndLevelPrefix):
1935         (WebCore::Console::addMessage):
1936         (WebCore::Console::error):
1937         (WebCore::Console::log):
1938         (WebCore::Console::dir):
1939         (WebCore::Console::trace):
1940         (WebCore::Console::assertCondition):
1941         (WebCore::Console::timeEnd):
1942         (WebCore::Console::warn):
1943         * page/Console.h: Added MessageType enum.
1944         (WebCore::):
1945         * page/DOMWindow.cpp:
1946         (WebCore::DOMWindow::postMessageTimerFired):
1947         * page/XSSAuditor.cpp:
1948         (WebCore::XSSAuditor::canEvaluate):
1949         (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
1950         (WebCore::XSSAuditor::canLoadObject):
1951         * svg/SVGDocumentExtensions.cpp:
1952         (WebCore::SVGDocumentExtensions::reportWarning):
1953         (WebCore::SVGDocumentExtensions::reportError):
1954         * wml/WMLErrorHandling.cpp:
1955         (WebCore::reportWMLError):
1956         * workers/GenericWorkerTask.h: Added GenericWorkerTask8 for the extra argument.
1957         (WebCore::GenericWorkerTask8::create):
1958         (WebCore::GenericWorkerTask8::GenericWorkerTask8):
1959         (WebCore::GenericWorkerTask8::performTask):
1960         (WebCore::createCallbackTask):
1961         * workers/WorkerContext.cpp:
1962         (WebCore::WorkerContext::addMessage):
1963         (WebCore::WorkerContext::importScripts):
1964         * workers/WorkerContext.h:
1965         * workers/WorkerMessagingProxy.cpp:
1966         (WebCore::postConsoleMessageTask):
1967         (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
1968         * workers/WorkerMessagingProxy.h:
1969         * workers/WorkerObjectProxy.h:
1970         * xml/XMLHttpRequest.cpp:
1971         (WebCore::reportUnsafeUsage):
1972         (WebCore::XMLHttpRequest::didFinishLoading):
1973         * xml/XSLTProcessor.cpp:
1974         (WebCore::XSLTProcessor::parseErrorFunc):
1975
1976 2009-07-12  Nate Chapin  <japhet@chromium.org>
1977
1978         Reviewed by Dimitri Glazkov.
1979
1980         Upstream UndetectableHTMLCollection.idl as HTMLAllCollection.idl.
1981
1982         https://bugs.webkit.org/show_bug.cgi?id=27132
1983
1984         * bindings/scripts/CodeGeneratorV8.pm:
1985         * bindings/v8/DOMObjectsInclude.h:
1986         * bindings/v8/DerivedSourcesAllInOne.cpp:
1987         * bindings/v8/V8DOMWrapper.cpp:
1988         (WebCore::V8DOMWrapper::getTemplate):
1989         (WebCore::V8DOMWrapper::instantiateV8Object):
1990         * bindings/v8/V8Index.cpp:
1991         * bindings/v8/V8Index.h:
1992         * dom/HTMLAllCollection.idl: Added.
1993
1994 2009-07-12  Joseph Pecoraro  <joepeck02@gmail.com>
1995
1996         Reviewed by Maciej Stachowiak.
1997
1998         Inspector: Duplicate Computation in Autocompletion
1999         https://bugs.webkit.org/show_bug.cgi?id=26778
2000
2001         * inspector/front-end/TextPrompt.js:
2002         (WebInspector.TextPrompt.prototype._completionsReady):
2003
2004 2009-07-12  Dan Bernstein  <mitz@apple.com>
2005
2006         Reviewed by Maciej Stachowiak.
2007
2008         https://bugs.webkit.org/show_bug.cgi?id=27196
2009         Rename bidi.cpp to RenderBlockLineLayout.cpp and remove bidi.h
2010
2011         * GNUmakefile.am: Updated.
2012         * WebCore.gypi: Updated.
2013         * WebCore.pro: Updated.
2014         * WebCore.vcproj/WebCore.vcproj: Updated.
2015         * WebCore.xcodeproj/project.pbxproj: Updated.
2016         * WebCoreSources.bkl: Updated.
2017         * rendering/RenderBlock.h: Removed unnecessary forward declaration and
2018             updated comments.
2019         * rendering/RenderBlockLineLayout.cpp: Copied from WebCore/rendering/bidi.cpp.
2020             Removed unnecessary #include statements.
2021         (WebCore::BidiRun::BidiRun): Moved here from bidi.h.
2022         (WebCore::RenderBlock::layoutInlineChildren): Removed outdated comment.
2023         * rendering/bidi.cpp: Removed.
2024         * rendering/bidi.h: Removed.
2025
2026 2009-07-12  Dan Bernstein  <mitz@apple.com>
2027
2028         - Windows build fix
2029
2030         * platform/graphics/cg/PDFDocumentImage.cpp:
2031         (WebCore::PDFDocumentImage::dataChanged):
2032
2033 2009-07-12  Dan Bernstein  <mitz@apple.com>
2034
2035         Reviewed by Sam Weinig.
2036
2037         - Image cleanup
2038
2039         * platform/graphics/BitmapImage.cpp:
2040         (WebCore::BitmapImage::destroyDecodedData): Use the data() accessor
2041         instead of the m_data member.
2042         (WebCore::BitmapImage::dataChanged): Ditto.
2043         * platform/graphics/Image.h: Re-ordered #includes and class
2044         declarations. Removed the drawPatternCallback() declaration. Made member
2045         variables private.
2046         * platform/graphics/cg/ImageCG.cpp:
2047         (WebCore::drawPatternCallback): Changed this from a member function to a
2048         static function.
2049         * platform/graphics/cg/PDFDocumentImage.cpp:
2050         (WebCore::PDFDocumentImage::dataChanged): Use the data() accessor
2051         instead of the m_data member.
2052         * svg/graphics/SVGImage.cpp:
2053         (WebCore::SVGImage::dataChanged): Ditto.
2054
2055 2009-07-12  Daniel Bates  <dbates@intudata.com>
2056
2057         Reviewed by Darin Adler.
2058
2059         https://bugs.webkit.org/show_bug.cgi?id=27189
2060         
2061         Fixes insufficient check in XSSAuditor::canSetBaseElementURL that caused 
2062         XSSAuditor to incorrectly block HTML Base elements whose base path coincided 
2063         with the URL of the page.
2064
2065         Test: http/tests/security/xssAuditor/base-href-safe3.html
2066
2067         * page/XSSAuditor.cpp:
2068         (WebCore::XSSAuditor::canSetBaseElementURL): Changed conditional to only call 
2069         XSSAuditor::findInRequest() if the host in the page URL disagrees with the host 
2070         in the base element URL.
2071
2072 2009-07-12  Darin Adler  <darin@apple.com>
2073
2074         Reviewed by Dan Bernstein.
2075
2076         Text searching with ICU should take the user's default locale into account
2077         https://bugs.webkit.org/show_bug.cgi?id=27184
2078         rdar://problem/6812121
2079
2080         No simple way to test this since it's dependent on user locale.
2081         After this, the user's default locale is used only on Mac.
2082
2083         * editing/TextIterator.cpp:
2084         (WebCore::createSearcher): Pass result of the currentSearchLocaleID
2085         function as the locale.
2086
2087         * platform/text/TextBreakIteratorInternalICU.h: Added declaration of
2088         currentSearchLocaleID function.
2089
2090         * platform/text/android/TextBreakIteratorInternalICU.cpp:
2091         (WebCore::currentSearchLocaleID): Added. Returns the empty string.
2092         * platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp:
2093         (WebCore::currentSearchLocaleID): Ditto.
2094         * platform/text/gtk/TextBreakIteratorInternalICUGtk.cpp:
2095         (WebCore::currentSearchLocaleID): Ditto.
2096
2097         * platform/text/mac/TextBreakIteratorInternalICUMac.mm:
2098         (WebCore::textBreakLocalePreference): Added. Returns the value of
2099         the AppleTextBreakLocale preference.
2100         (WebCore::topLanguagePreference): Added. Returns the value of the
2101         first item in the AppleLanguages preference.
2102         (WebCore::canonicalLanguageIdentifier): Added. Cover for the
2103         CFLocaleCreateCanonicalLanguageIdentifierFromString function.
2104         (WebCore::getLocale): Added. Transfers the locale from a CFStringRef
2105         into a buffer.
2106         (WebCore::getSearchLocale): Added. Calls topLanguagePreference,
2107         canonicalLanguageIdentifier, and getLocale.
2108         (WebCore::currentSearchLocaleID): Added. Calls getSearchLocale once.
2109         (WebCore::getTextBreakLocale): Changed to call
2110         textBreakLocalePreference, topLanguagePreference,
2111         canonicalLanguageIdentifier, and getLocale.
2112
2113         * platform/text/win/TextBreakIteratorInternalICUWin.cpp:
2114         (WebCore::currentSearchLocaleID): Added. Returns the empty string.
2115         * platform/wx/TemporaryLinkStubs.cpp:
2116         (WebCore::currentSearchLocaleID): Ditto.
2117
2118 2009-07-12  Xan Lopez  <xlopez@igalia.com>
2119
2120         Reviewed by Gustavo Noronha.
2121
2122         https://bugs.webkit.org/show_bug.cgi?id=25415
2123         [GTK][ATK] Please implement support for get_text_at_offset
2124
2125         Create a PangoLayout that properly represents the visual
2126         appearance of the text in the web page so that the line boundary
2127         modes of getText{At,Before,After}Offset work correctly.
2128
2129         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
2130         (UTF16ToUTF8):
2131         (g_substr):
2132         (convertUniCharToUTF8):
2133         (getPangoLayoutForAtk):
2134
2135 2009-07-11  Oliver Hunt  <oliver@apple.com>
2136
2137         Reviewed by Simon Fraser.
2138
2139         Bug 27187 - Match Gecko behaviour for canvas path mutation APIs on an empty path
2140         <https://bugs.webkit.org/show_bug.cgi?id=27187>
2141
2142         Simple API change, check for the empty path and add appropriate point if necessary.
2143
2144         Test: fast/canvas/canvas-modify-emptyPath.html
2145
2146         * Info.plist:
2147         * WebCore.xcodeproj/project.pbxproj:
2148         * html/CanvasRenderingContext2D.cpp:
2149         (WebCore::CanvasRenderingContext2D::lineTo):
2150         (WebCore::CanvasRenderingContext2D::quadraticCurveTo):
2151         (WebCore::CanvasRenderingContext2D::bezierCurveTo):
2152
2153 2009-07-11  Eric Carlson  <eric.carlson@apple.com>
2154
2155         Reviewed by Antti Koivisto.
2156
2157         HTMLMediaElement.canPlayType "maybe" and "probably" reversed
2158         https://bugs.webkit.org/show_bug.cgi?id=27186
2159
2160         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
2161         (WebCore::MediaPlayerPrivate::supportsType):
2162             Return "probably" if type has codecs parameter.
2163
2164         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2165         (WebCore::MediaPlayerPrivate::supportsType):
2166             Ditto.
2167
2168         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
2169         (WebCore::MediaPlayerPrivate::supportsType):
2170             Ditto.
2171
2172 2009-07-11  Brady Eidson  <beidson@apple.com>
2173
2174         Reviewed by Mark Rowe.
2175
2176         A worker-thread inspired follow-up for:
2177         https://bugs.webkit.org/show_bug.cgi?id=26496 and <rdar://problem/7046520>
2178         REGRESSION: XHR stream connection blocks iFrame loading and resource downloading
2179
2180         * xml/XMLHttpRequest.cpp:
2181         (WebCore::XMLHttpRequest::loadRequestAsynchronously): Don't perform the XHR compensation when the XHR
2182           is running on a worker thread. Accessing the global Cache data structures from a non-main thread is
2183           not currently supported.
2184
2185 2009-07-11  Simon Fraser  <simon.fraser@apple.com>
2186
2187         Enable support for accelerated compositing and 3d transforms on Leopard.
2188         <https://bugs.webkit.org/show_bug.cgi?id=20166>
2189         <rdar://problem/6120614>
2190
2191         Reviewed by Oliver Hunt.
2192
2193         * Configurations/FeatureDefines.xcconfig:
2194
2195 2009-07-11  Simon Hausmann  <hausmann@webkit.org>
2196
2197         Fix the Qt build after r45724.
2198
2199         * bridge/qt/qt_instance.cpp:
2200         (JSC::Bindings::QtRuntimeObjectImp::QtRuntimeObjectImp):
2201         * bridge/qt/qt_runtime.cpp:
2202         (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
2203
2204 2009-07-10  Daniel Bates  <dbates@intudata.com>
2205
2206         Reviewed by Adam Barth.
2207
2208         https://bugs.webkit.org/show_bug.cgi?id=26921
2209
2210         Implements support for HTML entities, so XSSAuditor can protect against attacks
2211         encoded with HTML entities.
2212
2213         Tests: http/tests/security/xssAuditor/inline-event-HTML-entities.html
2214                http/tests/security/xssAuditor/javascript-link-HTML-entities-control-char.html
2215                http/tests/security/xssAuditor/javascript-link-HTML-entities-named.html
2216                http/tests/security/xssAuditor/javascript-link-HTML-entities-null-char.html
2217                http/tests/security/xssAuditor/javascript-link-HTML-entities.html
2218                http/tests/security/xssAuditor/link-onclick-entities.html
2219                http/tests/security/xssAuditor/script-tag-entities.html
2220                http/tests/security/xssAuditor/script-tag-with-source-entities.html
2221
2222         * page/XSSAuditor.cpp:
2223         (WebCore::XSSAuditor::canEvaluate):
2224         (WebCore::XSSAuditor::canEvaluateJavaScriptURL):
2225         (WebCore::XSSAuditor::decodeURL): Modified to call WebCore::XSSAuditor::decodeHTMLEntities
2226         to decode HTML entities.
2227         (WebCore::XSSAuditor::decodeHTMLEntities): Added method to decode HTML entities.
2228         (WebCore::XSSAuditor::findInRequest):
2229         * page/XSSAuditor.h:
2230
2231 2009-07-10  David Kilzer  <ddkilzer@apple.com>
2232
2233         Bug 27007: Build fixes when ICONDATABASE is disabled
2234
2235         <https://bugs.webkit.org/show_bug.cgi?id=27007>
2236
2237         Reviewed by Sam Weinig.
2238
2239         * WebCore.xcodeproj/project.pbxproj: Added IconDatabaseNone.cpp
2240         to the project.
2241         * loader/icon/IconDatabase.cpp: Added
2242         #if ENABLE(ICONDATABASE)/#endif macro guard.
2243         * loader/icon/IconDatabase.h: Removed three public methods from
2244         #if ENABLE(ICONDATABASE)/#endif macro so that they may be
2245         stubbed out in IconDatabaseNone.cpp.
2246         * loader/icon/IconDatabaseNone.cpp: Added
2247         #if !ENABLE(ICONDATABASE)/#endif macro guard.
2248         (WebCore::IconDatabase::importIconURLForPageURL): Added.
2249         (WebCore::IconDatabase::importIconDataForIconURL): Added.
2250         (WebCore::IconDatabase::shouldStopThreadActivity): Added.
2251
2252 2009-07-10  Daniel Bates  <dbates@intudata.com>
2253
2254         Reviewed by Adam Barth.
2255
2256         https://bugs.webkit.org/show_bug.cgi?id=27151
2257
2258         Fixes issue where JavaScript URLs that contain null- and non-null control characters can
2259         bypass XSSAuditor.
2260
2261         Tests: http/tests/security/xssAuditor/javascript-link-control-char.html
2262                http/tests/security/xssAuditor/javascript-link-null-char.html
2263                http/tests/security/xssAuditor/javascript-link.html
2264
2265         * bindings/js/ScriptController.cpp:
2266         (WebCore::ScriptController::evaluate): Separated out logic for JavaScript URLs from 
2267         inline scripts. For JavaScript URLs, calls XSSAuditor::canEvaluateJavaScriptURL.
2268         * bindings/v8/ScriptController.cpp:
2269         (WebCore::ScriptController::evaluate): Made similar changes to evaluate() as in
2270         bindings/js/ScriptController.cpp.
2271         * page/XSSAuditor.cpp:
2272         (WebCore::XSSAuditor::canEvaluateJavaScriptURL): Separated out logic for JavaScript URLs
2273         into its own method.
2274         * page/XSSAuditor.h:
2275
2276 2009-07-10  Shinichiro Hamaji  <hamaji@chromium.org>
2277
2278         Reviewed by David Kilzer.
2279
2280         WebKit needs a style linting tool
2281         https://bugs.webkit.org/show_bug.cgi?id=25884
2282
2283         Fix bunch of style issues by autofix of cpplint.
2284         This patch is created to demonstrate the autofix of cpplint.py.
2285
2286         No new testcases because it's a style fix
2287
2288         * css/CSSParser.cpp:
2289         (WebCore::CSSParser::parseMediaQuery):
2290         (WebCore::CSSParser::validUnit):
2291         (WebCore::CSSParser::parseValue):
2292         (WebCore::skipCommaInDashboardRegion):
2293         (WebCore::CSSParser::parseDashboardRegions):
2294         (WebCore::ShadowParseContext::commitValue):
2295         (WebCore::ShadowParseContext::commitLength):
2296         (WebCore::ShadowParseContext::commitColor):
2297         (WebCore::BorderImageParseContext::commitNumber):
2298         (WebCore::BorderImageParseContext::commitWidth):
2299         (WebCore::BorderImageParseContext::commitRule):
2300         (WebCore::BorderImageParseContext::commitBorderImage):
2301         (WebCore::CSSParser::lex):
2302         (WebCore::CSSParser::text):
2303         * css/CSSStyleSelector.cpp:
2304         (WebCore::CSSStyleSelector::applyProperty):
2305         * css/MediaList.cpp:
2306         (WebCore::MediaList::deleteMedium):
2307         * css/MediaQuery.h:
2308         * css/MediaQueryEvaluator.cpp:
2309         (WebCore::parseAspectRatio):
2310         * css/MediaQueryEvaluator.h:
2311         * css/MediaQueryExp.h:
2312         (WebCore::MediaQueryExp::operator==):
2313         * css/WebKitCSSMatrix.h:
2314         * dom/Comment.h:
2315         * dom/Document.cpp:
2316         (WebCore::Document::setFocusedNode):
2317         * dom/Document.h:
2318         (WebCore::Document::setHasDashboardRegions):
2319         * dom/DocumentFragment.cpp:
2320         (WebCore::DocumentFragment::nodeName):
2321         * dom/DocumentFragment.h:
2322         * dom/DynamicNodeList.h:
2323         * dom/EditingText.h:
2324         * dom/Element.cpp:
2325         (WebCore::Element::dispatchAttrAdditionEvent):
2326         * dom/NamedAttrMap.cpp:
2327         (WebCore::NamedNodeMap::item):
2328         * dom/Node.cpp:
2329         (WebCore::Node::nodeValue):
2330         (WebCore::Node::nodeIndex):
2331         * dom/NodeRareData.h:
2332         (WebCore::NodeListsNodeData::create):
2333         * dom/Notation.h:
2334         * dom/ProcessingInstruction.h:
2335         * dom/Range.cpp:
2336         (WebCore::Range::processContents):
2337         * dom/StyledElement.cpp:
2338         (WebCore::toHex):
2339         * dom/XMLTokenizerLibxml2.cpp:
2340         (WebCore::PendingCallbacks::PendingStartElementNSCallback::~PendingStartElementNSCallback):
2341         (WebCore::PendingCallbacks::PendingStartElementNSCallback::call):
2342         (WebCore::PendingCallbacks::):
2343         (WebCore::OffsetBuffer::readOutBytes):
2344         (WebCore::handleElementNamespaces):
2345         (WebCore::handleElementAttributes):
2346         (WebCore::attributesStartElementNsHandler):
2347         * dom/XMLTokenizerQt.cpp:
2348         (WebCore::attributesStartElementNsHandler):
2349         (WebCore::XMLTokenizer::parseStartElement):
2350         * editing/ApplyStyleCommand.cpp:
2351         (WebCore::ApplyStyleCommand::applyInlineStyle):
2352         * editing/DeleteSelectionCommand.cpp:
2353         (WebCore::DeleteSelectionCommand::removeNode):
2354         * editing/Editor.cpp:
2355         (WebCore::Editor::pasteAsPlainText):
2356         * editing/SelectionController.cpp:
2357         (WebCore::SelectionController::directionOfEnclosingBlock):
2358         * editing/SmartReplaceICU.cpp:
2359         (WebCore::addAllCodePoints):
2360         * history/HistoryItem.cpp:
2361         (WebCore::HistoryItem::icon):
2362         (WebCore::HistoryItem::adoptVisitCounts):
2363         * html/CanvasStyle.cpp:
2364         (WebCore::CanvasStyle::applyFillColor):
2365         * html/HTMLAnchorElement.cpp:
2366         (WebCore::HTMLAnchorElement::setActive):
2367         (WebCore::HTMLAnchorElement::isLiveLink):
2368         * html/HTMLAppletElement.h:
2369         * html/HTMLAudioElement.h:
2370         * html/HTMLBRElement.h:
2371         * html/HTMLBaseElement.h:
2372         * html/HTMLBaseFontElement.h:
2373         * html/HTMLDListElement.h:
2374         * html/HTMLDirectoryElement.h:
2375         * html/HTMLFieldSetElement.cpp:
2376         (WebCore::HTMLFieldSetElement::HTMLFieldSetElement):
2377         * html/HTMLFormElement.cpp:
2378         (WebCore::HTMLFormElement::reset):
2379         * html/HTMLHRElement.cpp:
2380         (WebCore::HTMLHRElement::parseMappedAttribute):
2381         * html/HTMLHeadElement.h:
2382         * html/HTMLHtmlElement.h:
2383         * html/HTMLImageElement.h:
2384         (WebCore::HTMLImageElement::setLoadManually):
2385         * html/HTMLInputElement.cpp:
2386         (WebCore::HTMLInputElement::selection):
2387         * html/HTMLIsIndexElement.h:
2388         * html/HTMLMarqueeElement.cpp:
2389         * html/HTMLMediaElement.h:
2390         (WebCore::HTMLMediaElement::):
2391         * html/HTMLMenuElement.h:
2392         * html/HTMLMetaElement.h:
2393         * html/HTMLModElement.h:
2394         * html/HTMLOListElement.h:
2395         * html/HTMLOptionElement.cpp:
2396         (WebCore::HTMLOptionElement::childrenChanged):
2397         * html/HTMLParamElement.h:
2398         * html/HTMLQuoteElement.h:
2399         * html/HTMLStyleElement.h:
2400         * html/HTMLTableCaptionElement.h:
2401         * html/HTMLTableCellElement.h:
2402         * html/HTMLTableColElement.h:
2403         * html/HTMLTableSectionElement.cpp:
2404         (WebCore::HTMLTableSectionElement::deleteRow):
2405         * html/HTMLTitleElement.h:
2406         * html/HTMLTokenizer.cpp:
2407         (WebCore::HTMLTokenizer::parseNonHTMLText):
2408         (WebCore::HTMLTokenizer::parseEntity):
2409         (WebCore::HTMLTokenizer::parseTag):
2410         (WebCore::HTMLTokenizer::write):
2411         * html/HTMLUListElement.h:
2412         * html/HTMLVideoElement.h:
2413         * html/TimeRanges.h:
2414         (WebCore::TimeRanges::Range::Range):
2415         * inspector/InspectorController.cpp:
2416         (WebCore::InspectorController::enableResourceTracking):
2417         (WebCore::InspectorController::disableResourceTracking):
2418         * inspector/InspectorFrontend.cpp:
2419         (WebCore::InspectorFrontend::newInspectorJSONObject):
2420         * page/Console.cpp:
2421         (WebCore::Console::addMessage):
2422         * page/EventHandler.cpp:
2423         (WebCore::EventHandler::handleMousePressEvent):
2424         (WebCore::EventHandler::selectCursor):
2425         (WebCore::EventHandler::defaultKeyboardEventHandler):
2426         * page/Frame.cpp:
2427         (WebCore::Frame::jsDefaultStatusBarText):
2428         * page/android/DragControllerAndroid.cpp:
2429         (WebCore::DragController::dragOperation):
2430         * page/android/EventHandlerAndroid.cpp:
2431         (WebCore::EventHandler::tabsToAllControls):
2432         (WebCore::EventHandler::eventActivatedView):
2433         * page/animation/AnimationController.cpp:
2434         (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
2435         * page/gtk/DragControllerGtk.cpp:
2436         (WebCore::DragController::dragOperation):
2437         * page/qt/DragControllerQt.cpp:
2438         * page/win/DragControllerWin.cpp:
2439         (WebCore::DragController::isCopyKeyDown):
2440         * page/win/FrameWin.h:
2441         * rendering/RenderSlider.cpp:
2442         (WebCore::RenderSlider::mouseEventOffsetToThumb):
2443         * rendering/style/RenderStyle.h:
2444         (WebCore::InheritedFlags::setVerticalAlignLength):
2445         (WebCore::InheritedFlags::setUnicodeBidi):
2446         (WebCore::InheritedFlags::setCursor):
2447         * rendering/style/RenderStyleConstants.h:
2448         (WebCore::):
2449         * rendering/style/SVGRenderStyleDefs.h:
2450         * rendering/style/StyleInheritedData.h:
2451         (WebCore::StyleInheritedData::operator!=):
2452         * storage/DatabaseTask.h:
2453         * svg/GradientAttributes.h:
2454         * svg/LinearGradientAttributes.h:
2455         * svg/PatternAttributes.h:
2456         * svg/RadialGradientAttributes.h:
2457         * svg/SVGAnimatedPathData.h:
2458         * svg/SVGAnimatedPoints.h:
2459         * svg/SVGAnimationElement.h:
2460         * svg/SVGClipPathElement.h:
2461         * svg/SVGElementInstance.h:
2462         * svg/SVGFEBlendElement.cpp:
2463         (WebCore::SVGFEBlendElement::build):
2464         * svg/SVGFEBlendElement.h:
2465         * svg/SVGFEColorMatrixElement.cpp:
2466         (WebCore::SVGFEColorMatrixElement::build):
2467         * svg/SVGFEComponentTransferElement.cpp:
2468         (WebCore::SVGFEComponentTransferElement::build):
2469         * svg/SVGFECompositeElement.cpp:
2470         (WebCore::SVGFECompositeElement::build):
2471         * svg/SVGFEDiffuseLightingElement.cpp:
2472         (WebCore::SVGFEDiffuseLightingElement::build):
2473         * svg/SVGFEDisplacementMapElement.cpp:
2474         (WebCore::SVGFEDisplacementMapElement::build):
2475         * svg/SVGFEDistantLightElement.h:
2476         * svg/SVGFEFloodElement.cpp:
2477         (WebCore::SVGFEFloodElement::build):
2478         * svg/SVGFEFloodElement.h:
2479         * svg/SVGFEFuncAElement.h:
2480         * svg/SVGFEFuncBElement.h:
2481         * svg/SVGFEFuncGElement.h:
2482         * svg/SVGFEFuncRElement.h:
2483         * svg/SVGFEGaussianBlurElement.cpp:
2484         (WebCore::SVGFEGaussianBlurElement::build):
2485         * svg/SVGFEImageElement.cpp:
2486         (WebCore::SVGFEImageElement::build):
2487         * svg/SVGFEMergeElement.cpp:
2488         (WebCore::SVGFEMergeElement::build):
2489         * svg/SVGFEOffsetElement.cpp:
2490         (WebCore::SVGFEOffsetElement::build):
2491         * svg/SVGFEPointLightElement.h:
2492         * svg/SVGFESpecularLightingElement.cpp:
2493         (WebCore::SVGFESpecularLightingElement::build):
2494         * svg/SVGFESpotLightElement.h:
2495         * svg/SVGFETileElement.cpp:
2496         (WebCore::SVGFETileElement::build):
2497         * svg/SVGLineElement.cpp:
2498         (WebCore::SVGLineElement::parseMappedAttribute):
2499         * svg/SVGList.h:
2500         * svg/SVGListTraits.h:
2501         (WebCore::):
2502         * svg/SVGMPathElement.h:
2503         * svg/SVGMetadataElement.h:
2504         * svg/SVGParserUtilities.cpp:
2505         (WebCore::SVGPathParser::parseSVG):
2506         (WebCore::SVGPathParser::calculateArc):
2507         * svg/SVGPathElement.h:
2508         * svg/SVGPathSegClosePath.h:
2509         * svg/SVGSVGElement.h:
2510         * svg/SVGSetElement.h:
2511         * svg/SVGSwitchElement.h:
2512         * svg/SVGTextPathElement.cpp:
2513         (WebCore::SVGTextPathElement::parseMappedAttribute):
2514         * svg/SVGTextPathElement.h:
2515         * svg/SVGTitleElement.h:
2516         * svg/SVGTransformable.cpp:
2517         (WebCore::):
2518         * svg/SVGViewSpec.cpp:
2519         (WebCore::):
2520         * svg/animation/SMILTime.cpp:
2521         (WebCore::operator+):
2522         (WebCore::operator-):
2523         (WebCore::operator*):
2524         * svg/animation/SVGSMILElement.h:
2525         * svg/graphics/SVGResource.cpp:
2526         (WebCore::clientMap):
2527         * wml/WMLPostfieldElement.cpp:
2528         (WebCore::WMLPostfieldElement::value):
2529         * wml/WMLSetvarElement.cpp:
2530         (WebCore::WMLSetvarElement::value):
2531         * workers/WorkerRunLoop.cpp:
2532         * xml/XMLHttpRequest.cpp:
2533         (WebCore::XMLHttpRequest::dropProtection):
2534         * xml/XPathPath.h:
2535
2536 2009-07-10  Eric Carlson  <eric.carlson@apple.com>
2537
2538         Reviewed by Simon Fraser.
2539
2540         <rdar://problem/7049066>.
2541         Update SnowLeopard media controller layout.
2542
2543         * css/mediaControlsQT.css:
2544             Update for new layout.
2545         * html/HTMLMediaElement.cpp:
2546         (WebCore::HTMLMediaElement::movieLoadType):
2547             Added to replace isStreaming.
2548         * html/HTMLMediaElement.h:
2549             Declare movieLoadType, remove isStreaming.
2550
2551         * rendering/MediaControlElements.cpp:
2552         (WebCore::MediaControlStatusDisplayElement::update):
2553             Use movieLoadType instead of isStreaming.
2554         (WebCore::MediaControlTimelineContainerElement::rendererIsNeeded):
2555             MediaControlElement is the base class, not HTMLInputElement.
2556         (WebCore::MediaControlStatusDisplayElement::rendererIsNeeded):
2557             Ditto.
2558         (WebCore::MediaControlRewindButtonElement::rendererIsNeeded):
2559             Don't display rewind button for live streams.
2560         (WebCore::MediaControlReturnToRealtimeButtonElement::rendererIsNeeded):
2561             MediaControlInputElement is the base class, not HTMLInputElement.
2562         * rendering/MediaControlElements.h:
2563
2564         * rendering/RenderThemeMac.h:
2565         * rendering/RenderThemeMac.mm:
2566         (WebCore::getMediaUIPartStateFlags):
2567             New, return wkDrawMediaUIPart flags.
2568         (WebCore::RenderThemeMac::paintMediaFullscreenButton):
2569         (WebCore::RenderThemeMac::paintMediaMuteButton):
2570         (WebCore::RenderThemeMac::paintMediaPlayButton):
2571         (WebCore::RenderThemeMac::paintMediaSeekBackButton):
2572         (WebCore::RenderThemeMac::paintMediaSeekForwardButton):
2573         (WebCore::RenderThemeMac::paintMediaSliderTrack):
2574         (WebCore::RenderThemeMac::paintMediaSliderThumb):
2575         (WebCore::RenderThemeMac::paintMediaRewindButton):
2576         (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton):
2577         (WebCore::RenderThemeMac::paintMediaControlsBackground):
2578         (WebCore::RenderThemeMac::paintMediaCurrentTime):
2579         (WebCore::RenderThemeMac::paintMediaTimeRemaining):
2580             Use getMediaUIPartStateFlags.
2581
2582 2009-07-10  Michelangelo De Simone  <micdesim@gmail.com>
2583
2584         Reviewed by Adele Peterson.
2585
2586         https://bugs.webkit.org/show_bug.cgi?id=19562
2587         Added build stuff and stub for the ValidityState class, part of HTML5
2588         section Forms:
2589         http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#validitystate
2590
2591         Test: fast/forms/ValidityState-001.html
2592
2593         * DerivedSources.cpp: Fix aimed to include ValidityState files
2594         * DerivedSources.make: ditto
2595         * GNUmakefile.am: ditto
2596         * WebCore.gypi: ditto
2597         * WebCore.pro: ditto
2598         * WebCore.vcproj/WebCore.vcproj: ditto
2599         * WebCore.xcodeproj/project.pbxproj: ditto
2600         * WebCoreSources.bkl: ditto
2601         * html/HTMLButtonElement.idl: "validity" attribute
2602         * html/HTMLFieldSetElement.idl: ditto
2603         * html/HTMLFormControlElement.cpp: object getter
2604         (WebCore::HTMLFormControlElement::validity):
2605         * html/HTMLFormControlElement.h: ditto
2606         * html/HTMLInputElement.idl: "validity" attribute
2607         * html/HTMLSelectElement.idl: ditto
2608         * html/HTMLTextAreaElement.idl: ditto
2609         * html/ValidityState.cpp: Added.
2610         (WebCore::ValidityState::ValidityState):
2611         (WebCore::ValidityState::valid): validation flag
2612         * html/ValidityState.h: Added.
2613         (WebCore::ValidityState::create): creation routine
2614         (WebCore::ValidityState::control): ValidityState's parent getter
2615         (WebCore::ValidityState::valueMissing): validation flag
2616         (WebCore::ValidityState::typeMismatch): ditto
2617         (WebCore::ValidityState::patternMismatch): ditto
2618         (WebCore::ValidityState::tooLong): ditto
2619         (WebCore::ValidityState::rangeUnderflow): ditto
2620         (WebCore::ValidityState::rangeOverflow): ditto
2621         (WebCore::ValidityState::stepMismatch): ditto
2622         (WebCore::ValidityState::customError): ditto
2623         * html/ValidityState.idl: Added.
2624
2625 2009-07-10  Brady Eidson  <beidson@apple.com>
2626
2627         Style cleanup over my last patch.
2628
2629         * xml/XMLHttpRequest.cpp:
2630         (WebCore::XMLHttpRequest::~XMLHttpRequest):
2631
2632 2009-07-10  Kevin McCullough  <kmccullough@apple.com>
2633
2634         Reviewed by Geoffrey Garen.
2635
2636         * inspector/JavaScriptCallFrame.cpp:
2637         (WebCore::JavaScriptCallFrame::dynamicGlobalObject):
2638         * inspector/JavaScriptCallFrame.h: New helper method, used below.
2639
2640         * inspector/JavaScriptDebugServer.cpp:
2641         (WebCore::JavaScriptDebugServer::detach): In the special case
2642         where we detach from a window currently executing JavaScript,
2643         manually tear down our representation of the JavaScript
2644         call stack, since we won't get any more callbacks from JavaScriptCore
2645         to automatically tear it down. It's too bad that WebCore is
2646         responsible for this kind of tracking -- in the future, it would
2647         be nice if more of the breakpoint handling was inside of JavaScriptCore.
2648
2649 2009-07-10  Brady Eidson  <beidson@apple.com>
2650
2651         Reviewed by Antti Koivisto.
2652
2653         https://bugs.webkit.org/show_bug.cgi?id=26496 and <rdar://problem/7046520>
2654         REGRESSION: XHR stream connection blocks iFrame loading and resource downloading
2655
2656         With this test we ended up going over the maximum-connections-per-host limit that CFNetwork expected.
2657         When that happened, the first request that was over the limit ended up in a bizarre state where it 
2658         wasn't fully serviced until after the long running XHR was complete.
2659
2660         Loader and Loader::Host work together to try to not exceed the max-connection limit but non-cache
2661         resources - such as XHR - could still end up causing this limit to be exceeded.
2662
2663         This fix adds a workaround specifically for XHR while we hash out a more thorough solution that will
2664         handle this at the resource handle level.
2665
2666         * loader/loader.cpp:
2667         (WebCore::Loader::nonCacheRequestInFlight):
2668         (WebCore::Loader::nonCacheRequestComplete):
2669         (WebCore::Loader::Host::Host):
2670         (WebCore::Loader::Host::nonCacheRequestInFlight):
2671         (WebCore::Loader::Host::nonCacheRequestComplete):
2672         (WebCore::Loader::Host::servePendingRequests): Take nonCacheRequestsInFlight into account.
2673         * loader/loader.h:
2674         (WebCore::Loader::Host::processingResource): Take nonCacheRequestsInFlight into account.
2675
2676         * xml/XMLHttpRequest.cpp:
2677         (WebCore::XMLHttpRequest::XMLHttpRequest):
2678         (WebCore::XMLHttpRequest::~XMLHttpRequest): 
2679         (WebCore::XMLHttpRequest::loadRequestAsynchronously): Bump the nonCacheRequestInFlight count.
2680         (WebCore::XMLHttpRequest::didFail): Decrement that count if the Loader was notified.
2681         (WebCore::XMLHttpRequest::didFinishLoading): Ditto.
2682
2683 2009-07-10  Antti Koivisto  <antti@apple.com>
2684
2685         Try to unbreak non-Mac build.
2686
2687         * page/ChromeClient.h:
2688         (WebCore::ChromeClient::formDidFocus):
2689         (WebCore::ChromeClient::formDidBlur):
2690
2691 2009-07-10  Beth Dakin  <bdakin@apple.com>
2692
2693         Reviewed by Anders Carlsson.
2694
2695         The rest of the fix for <rdar://problem/7038831> REGRESSION (TOT): 
2696         In Mail, a crash occurs at WebCore::Widget::afterMouseDown() after 
2697         clicking To Do's close box
2698
2699         Make the Widget* in passMouseDownEventToWidget() a RefPtr.
2700
2701         * page/mac/EventHandlerMac.mm:
2702         (WebCore::EventHandler::passMouseDownEventToWidget):
2703
2704 2009-07-10  Eric Seidel  <eric@webkit.org>
2705
2706         Reviewed by Adam Barth.
2707
2708         rename getDOMStructure calls w/o JSGlobalObject* to deprecatedGetDOMStructure
2709         https://bugs.webkit.org/show_bug.cgi?id=27157
2710
2711         This is the first step to fixing
2712         https://bugs.webkit.org/show_bug.cgi?id=27088
2713
2714         * WebCore.xcodeproj/project.pbxproj:
2715         * bindings/js/JSDOMBinding.h:
2716         (WebCore::deprecatedGetDOMStructure):
2717         (WebCore::createDOMObjectWrapper):
2718         (WebCore::createDOMNodeWrapper):
2719         * bindings/js/JSNamedNodesCollection.cpp:
2720         (WebCore::JSNamedNodesCollection::JSNamedNodesCollection):
2721         * bindings/js/JSRGBColor.cpp:
2722         (WebCore::JSRGBColor::JSRGBColor):
2723         * bridge/objc/objc_runtime.mm:
2724         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
2725         * bridge/runtime_array.cpp:
2726         (JSC::RuntimeArray::RuntimeArray):
2727         * bridge/runtime_method.cpp:
2728         (JSC::RuntimeMethod::RuntimeMethod):
2729         * bridge/runtime_object.cpp:
2730         (JSC::RuntimeObjectImp::RuntimeObjectImp):
2731
2732 2009-07-10  Greg Bolsinga  <bolsinga@apple.com>
2733
2734         Reviewed by Antti Koivisto.
2735
2736         Add delegate methods about focus and blur and state change
2737         https://bugs.webkit.org/show_bug.cgi?id=27153
2738
2739         Call the appropriate new ChromeClient methods for focus and blur.
2740
2741         * html/HTMLFormControlElement.cpp:
2742         (WebCore::HTMLFormControlElement::dispatchFocusEvent):
2743         (WebCore::HTMLFormControlElement::dispatchBlurEvent):
2744         * html/HTMLFormControlElement.h:
2745         * loader/EmptyClients.h:
2746         (WebCore::EmptyChromeClient::formDidFocus):
2747         (WebCore::EmptyChromeClient::formDidBlur):
2748         * page/ChromeClient.h:
2749
2750 2009-07-10  Steve Falkenburg  <sfalken@apple.com>
2751
2752         <rdar://problem/7048741> REGRESSION: Error about missing SwMenuX.dll opening pages with Shockwave
2753         
2754         Use altered search path while loading plug-ins. This modifies the DLL search order
2755         to look in the directory containing the plug-in even if a call to SetDllDirectory
2756         was previously made. Use of SetDllDirectory removes the current directory from the search path,
2757         breaking the previous strategy for locating any dependent DLLs of the plug-in.
2758         
2759         Reviewed by Jon Honeycutt.
2760
2761         * plugins/win/PluginPackageWin.cpp:
2762         (WebCore::PluginPackage::load): Use LoadLibraryEx with LOAD_WITH_ALTERED_SEARCH_PATH
2763
2764 2009-07-10  Adam Roben  <aroben@apple.com>
2765
2766         Sort all our Xcode projects
2767
2768         Accomplished using sort-Xcode-project-file.
2769
2770         Requested by Dave Kilzer.
2771
2772         * WebCore.xcodeproj/project.pbxproj:
2773
2774 2009-07-10  Adam Langley  <agl@google.com>
2775
2776         Reviewed by Darin Fisher.
2777
2778         Chromium Linux: use disabled images for disabled widgets.
2779
2780         https://bugs.webkit.org/show_bug.cgi?id=27106
2781
2782         Previously, checkboxes and radio controls rendered the same even if disabled.
2783         The Chromium side of this change is r20224.
2784
2785         * rendering/RenderThemeChromiumSkia.cpp:
2786         (WebCore::RenderThemeChromiumSkia::paintCheckbox):
2787         (WebCore::RenderThemeChromiumSkia::paintRadio):
2788
2789 2009-07-10  Simon Fraser  <simon.fraser@apple.com>
2790
2791         Reviewed by John Sullivan.
2792
2793         Fix crash when changing the zoom level in http://iphone.akamai.com/
2794         <rdar://problem/7029077>
2795
2796         RenderLayerBacking's paintIntoLayer() method called updateLayerListsIfNeeded(),
2797         which could potentially destroy that compositing layer, causing a crash.
2798         Prevent this from happening by not doing a compositing update from paintIntoLayer().
2799
2800         The existing updateLayerListsIfNeeded() was renamed to updateCompositingAndLayerListsIfNeeded(),
2801         and still does the compositing update. The new updateLayerListsIfNeeded() does not touch
2802         compositing layers, and is still called from paintIntoLayer().
2803         
2804         * rendering/RenderLayer.cpp:
2805         (WebCore::RenderLayer::paintLayer):
2806         (WebCore::RenderLayer::hitTestLayer):
2807         (WebCore::RenderLayer::updateLayerListsIfNeeded):
2808         (WebCore::RenderLayer::updateCompositingAndLayerListsIfNeeded):
2809         * rendering/RenderLayer.h:
2810
2811 2009-07-10  Drew Wilson  <atwilson@google.com>
2812
2813         Reviewed by Darin Adler.
2814
2815         Need to remove UsesManualToJSImplementation() in favor of CustomToJS.
2816         https://bugs.webkit.org/show_bug.cgi?id=27010
2817
2818         Added support for CustomToJS IDL attribute to replace the hard-coded class list in UsesManualToJSImplementation().
2819
2820         This is just a cleanup of existing functionality, so existing LayoutTests adequately cover this patch.
2821
2822         * bindings/scripts/CodeGeneratorJS.pm:
2823         Removed UsesManualToJSImplementation(), added support for CustomToJS attribute.
2824         * css/CSSRule.idl:
2825         * css/CSSValue.idl:
2826         * css/StyleSheet.idl:
2827         * dom/Document.idl:
2828         * dom/Event.idl:
2829         * dom/Node.idl:
2830         * html/ImageData.idl:
2831         * svg/SVGElementInstance.idl:
2832         * svg/SVGPathSeg.idl:
2833         Added CustomToJS attribute to all the above IDL files.
2834
2835 2009-07-10  Dan Bernstein  <mitz@apple.com>
2836
2837         - fix the build by reverting the ill-advised r45711
2838
2839         * page/FrameView.cpp:
2840         (WebCore::FrameView::scrollToAnchor):
2841
2842 2009-07-09  Brian Weinstein  <bweinstein@apple.com>
2843
2844         Reviewed by Tim Hatcher.
2845
2846         Updated WebCore.base.exp to add some needed functions.
2847
2848         * WebCore.base.exp:
2849
2850 2009-07-10  Dan Bernstein  <mitz@apple.com>
2851
2852         - address a review comment from Simon Fraser which I forgot to include
2853           in the last check-in
2854
2855         * page/FrameView.cpp:
2856         (WebCore::FrameView::scrollToAnchor): Pass true to getRect() for
2857         maximum transform friendliness!
2858
2859 2009-07-10  Dan Bernstein  <mitz@apple.com>
2860
2861         Reviewed by Simon Fraser.
2862
2863         - fix https://bugs.webkit.org/show_bug.cgi?id=27137
2864           <rdar://problem/7043124> REGRESSION (r44311): Reproducible crash due
2865           to infinite recursion into FrameLoader::gotoAnchor() ->
2866           FrameView::layout()
2867
2868         Test: fast/loader/goto-anchor-infinite-layout.html
2869
2870         * loader/FrameLoader.cpp:
2871         (WebCore::FrameLoader::gotoAnchor): Moved the code to update layout,
2872         find the renderer to scroll to, and scroll from here to methods on
2873         FrameView, and replaced it with a call to
2874         FrameView::maintainScrollPositionAtAnchor().
2875         (WebCore::FrameLoader::completed): Call maintainScrollPositionAtAnchor()
2876         instead of setLockedToAnchor().
2877
2878         * page/FrameView.cpp:
2879         (WebCore::FrameView::FrameView): Removed initialization of
2880         m_lockedToAnchor.
2881         (WebCore::FrameView::reset): Reset m_maintainScrollPositionAnchor instead
2882         of m_lockedToAnchor.
2883         (WebCore::FrameView::layout): Removed the code related to scrolling to
2884         the anchor from here, because scrolling can trigger events which
2885         invalidate the layout, and as such, belongs with the post-layout tasks.
2886         (WebCore::FrameView::maintainScrollPositionAtAnchor): Added. When called
2887         with a node scrolls the view to the top of that node and maintains it
2888         scrolled to the top of the node during subsequent layouts, until
2889         this function is called with 0 or other things trigger scrolling.
2890         (WebCore::FrameView::scrollRectIntoViewRecursively): Reset
2891         m_maintainScrollPositionAnchor.
2892         (WebCore::FrameView::setScrollPosition): Ditto.
2893         (WebCore::FrameView::scrollToAnchor): Added. Scrolls to the top of
2894         m_maintainScrollPositionAnchor, if it is set.
2895         (WebCore::FrameView::performPostLayoutTasks): Call scrollToAnchor().
2896         (WebCore::FrameView::setWasScrolledByUser): Reset
2897         m_maintainScrollPositionAnchor.
2898
2899         * page/FrameView.h: Removed lockedToAnchor(), setLockedToAnchor(),
2900         and m_lockedToAnchor. Added maintainScrollPositionAtAnchor() and
2901         m_maintainScrollPositionAnchor.
2902
2903 2009-07-04  Sriram Yadavalli  <sriram.yadavalli@nokia.com>
2904
2905         Reviewed by Simon Hausmann.
2906
2907         https://bugs.webkit.org/show_bug.cgi?id=26439
2908
2909         QtWebKit fails in loading www.nytimes.com in Windows/Linux
2910
2911         QNetworkReplyHandler is ignoring content associated with 401 error.
2912         This causes the XHR response handling to fail.
2913
2914         Simon: Added also ProxyAuthenticationRequiredError, to handle the same
2915         case when going through proxies, as suggested by Prasanth.
2916
2917         * platform/network/qt/QNetworkReplyHandler.cpp:
2918         (WebCore::QNetworkReplyHandler::finish):
2919
2920 2009-07-10  Simon Hausmann  <simon.hausmann@nokia.com>
2921
2922         Reviewed by Holger Freyther.
2923
2924         Enable HTML 5 Messaging to fix message channel Qt DRT failures in
2925         fast/events.
2926
2927         * WebCore.pro:
2928
2929 2009-07-09  Roland Steiner  <rolandsteiner@google.com>
2930
2931         Reviewed by Maciej Stachowiak.
2932
2933         added InlineBox::isLeaf()
2934         firstLeafChild()/lastLeafChild() not virtual and not callable on InlineBox anymore.
2935         firstLeafChild()/lastLeafChild() will no longer return a node outside of the given subtree.   
2936         Removed firstLeafChildAfterBox()/lastLeafChildBeforeBox()
2937         Removed potentially quadratic behavior if all nodes before/after a given box are empty InlineFlowBoxes
2938
2939         Currently, these methods are called on RootInlineBox objects only, so above changes should not have
2940         any observable effect (only the removal of the square performance behavior could apply, 
2941         but the conditions for that are probably of a rather theoretical nature).
2942
2943         * rendering/InlineBox.cpp:
2944         (WebCore::InlineBox::nextLeafChild):
2945         (WebCore::InlineBox::prevLeafChild):
2946         * rendering/InlineBox.h:
2947         (WebCore::InlineBox::isLeaf):
2948         * rendering/InlineFlowBox.cpp:
2949         (WebCore::InlineFlowBox::firstLeafChild):
2950         (WebCore::InlineFlowBox::lastLeafChild):
2951         * rendering/InlineFlowBox.h:
2952         (WebCore::InlineFlowBox::firstChild):
2953         (WebCore::InlineFlowBox::lastChild):
2954         (WebCore::InlineFlowBox::isLeaf):
2955         * rendering/RootInlineBox.cpp:
2956         (WebCore::RootInlineBox::closestLeafChildForXPos):
2957
2958 2009-07-09  Roland Steiner  <rolandsteiner@google.com>
2959
2960         Reviewed by Maciej Stachowiak.
2961
2962         Added InlineBox::baselinePosition() and lineHeight() methods
2963         (adapted remaining code accordingly to use those methods)
2964
2965         No change in functionality.
2966
2967         * rendering/InlineBox.h:
2968         (WebCore::InlineBox::baselinePosition):
2969         (WebCore::InlineBox::lineHeight):
2970         * rendering/InlineFlowBox.cpp:
2971         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
2972         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
2973         (WebCore::InlineFlowBox::placeBoxesVertically):
2974
2975 2009-07-09  Oliver Hunt  <oliver@apple.com>
2976
2977         Reviewed by Maciej Stachowiak.
2978
2979         Bug 27142 - canPlayType() should return empty string for unsupported content
2980         <https://bugs.webkit.org/show_bug.cgi?id=27142>
2981
2982         Return "" instead of "no" for unsupport media types. 
2983
2984         * html/HTMLMediaElement.cpp:
2985         (WebCore::HTMLMediaElement::canPlayType):
2986
2987 2009-07-09  Roland Steiner  <rolandsteiner@google.com>
2988
2989         Reviewed by Maciej Stachowiak.
2990
2991         Implement the part of HTML5 spec that deals with parsing of <rp> and <rt> tags
2992         in that their end tags are optional if followed by <rp>/<rt>.
2993
2994         Also specify a new accessibility role "annotation" for <rp> and <rt>.
2995
2996         Affected code parts are not enclosed in #IF ENABLE(RUBY), since the parsing
2997         is not affected by whether ruby is rendered properly or not (in fact, it may 
2998         be more profound without ruby layouting, since the contents of <rp> are not hidden).
2999
3000         Test: fast/ruby/parse-rp.html
3001
3002         * accessibility/AccessibilityObject.h:
3003         (WebCore::):
3004         * accessibility/AccessibilityRenderObject.cpp:
3005         (WebCore::AccessibilityRenderObject::roleValue):
3006         * html/HTMLElement.cpp:
3007         (WebCore::HTMLElement::endTagRequirement):
3008         (WebCore::HTMLElement::tagPriority):
3009         (WebCore::inlineTagList):
3010         * html/HTMLParser.cpp:
3011         (WebCore::HTMLParser::rpCreateErrorCheck):
3012         (WebCore::HTMLParser::rtCreateErrorCheck):
3013         (WebCore::HTMLParser::getNode):
3014         * html/HTMLParser.h:
3015         * html/HTMLTagNames.in:
3016
3017 2009-07-09  Dmitry Titov  <dimich@chromium.org>
3018
3019         Not reviewed, fix for previous commit.
3020
3021         The change http://trac.webkit.org/changeset/45695 did not correctly
3022         enabled GTL and QT build flags. This caused layout tests failure.
3023         This is speculative fix for those failures.
3024
3025         * GNUmakefile.am: added ENABLE_CHANNEL_MESSAGING flag.
3026         * WebCore.pro: ditto.
3027         * page/DOMWindow.idl: touched to cause recompile.
3028         * workers/WorkerContext.idl: ditto.
3029
3030 2009-07-09  Drew Wilson  <atwilson@google.com>
3031
3032         Reviewed by Alexey Proskuryakov.
3033
3034         https://bugs.webkit.org/show_bug.cgi?id=26903
3035
3036         Turned on CHANNEL_MESSAGING by default because the MessageChannel API
3037         is now implemented for Web Workers and is reasonably stable.
3038
3039         Tests: fast/events/message-channel-gc-2.html
3040                fast/events/message-channel-gc-3.html
3041                fast/events/message-channel-gc-4.html
3042                fast/events/message-channel-gc.html
3043                fast/events/message-channel-listener-circular-ownership.html
3044                fast/events/message-port-clone.html
3045                fast/events/message-port-constructor-for-deleted-document.html
3046                fast/events/message-port-deleted-document.html
3047                fast/events/message-port-deleted-frame.html
3048                fast/events/message-port-inactive-document.html
3049                fast/events/message-port-no-wrapper.html
3050                fast/events/message-port.html
3051                fast/workers/worker-cloneport.html
3052                fast/workers/worker-messageport-gc.html
3053                fast/workers/worker-messageport.html
3054
3055         * Configurations/FeatureDefines.xcconfig: Turned on ENABLE_CHANNEL_MESSAGING.
3056         * WebCore/WebCore.vcproj/WebCoreCommon.vsprops: ditto.
3057         * WebCore/WebCore.vcproj/build-generated-files.sh: ditto.
3058         * WebCore/page/DOMWindow.idl: touch the file to cause re-generation of headers.
3059         * WebCore/workers/WorkerContext.idl: ditto.
3060
3061
3062 2009-07-09  Pierre d'Herbemont  <pdherbemont@apple.com>
3063
3064         Reviewed by Simon Fraser.
3065
3066         Full page zoom breaks remaining and elapsed time display in the <video> controller.
3067         https://bugs.webkit.org/show_bug.cgi?id=27123
3068
3069         We are changing the size of the time remaining and time elapsed field, to
3070         automatically hide them, when the controller is too short.
3071
3072         Because we toggle the size between 0 and the previous value of the
3073         controller, we miss any width change that may occur during full page zoom,
3074         and we fail to restore a correct width.
3075
3076         This change fixes that problem by using a cloned style on which we
3077         set the width to 0, and restoring the previous style when going back to
3078         the normal width.
3079
3080         We take care about properly using the cloned style or the pseudo style,
3081         by overriding styleForElement().
3082
3083         * rendering/MediaControlElements.cpp:
3084         (WebCore::MediaControlElement::styleForElement):
3085         (WebCore::MediaControlElement::attach):
3086         (WebCore::MediaControlElement::updateStyle):
3087         (WebCore::MediaControlInputElement::styleForElement):
3088         (WebCore::MediaControlInputElement::attach):
3089         (WebCore::MediaControlInputElement::updateStyle):
3090         (WebCore::MediaControlTimeDisplayElement::MediaControlTimeDisplayElement):
3091         (WebCore::MediaControlTimeDisplayElement::styleForElement):
3092         (WebCore::MediaControlTimeDisplayElement::setVisible):
3093         * rendering/MediaControlElements.h:
3094         * rendering/RenderMedia.cpp:
3095         (WebCore::RenderMedia::shouldShowTimeDisplayControls): Make sure
3096         we take in account the zoom level when deciding if we should hide the 
3097         ellapsed and remaining time.
3098
3099 2009-07-09  Michael Nordman  <michaeln@google.com>
3100
3101         Reviewed by Darin Adler.
3102
3103         Fix chromium build bustage due to Widget being a RefCounted class.
3104         https://bugs.webkit.org/show_bug.cgi?id=27139
3105
3106         * platform/chromium/PopupMenuChromium.cpp:
3107         * platform/chromium/PopupMenuChromium.h:
3108
3109 2009-07-09  Chris Fleizach  <cfleizach@apple.com>
3110
3111         Reviewed by Darin Adler.
3112
3113         Bug 27130 - Need to implement ARIA role="toolbar"
3114         https://bugs.webkit.org/show_bug.cgi?id=27130
3115
3116         Test: platform/mac/accessibility/aria-toolbar.html
3117
3118         * accessibility/AccessibilityRenderObject.cpp:
3119         (WebCore::RoleEntry::):
3120         * accessibility/mac/AccessibilityObjectWrapper.mm:
3121         (-[AccessibilityObjectWrapper roleDescription]):
3122
3123 2009-07-09  Dimitri Glazkov  <dglazkov@chromium.org>
3124
3125         Reviewed by Darin Fisher.
3126
3127         [Chromium] Upstream WebCore.gypi, the project file for Chromium build.
3128         https://bugs.webkit.org/show_bug.cgi?id=27135
3129
3130         * WebCore.gypi: Added.
3131
3132 2009-07-09  Jon Honeycutt  <jhoneycutt@apple.com>
3133
3134         A more robust fix for <rdar://problem/6930280> Reproducible crash at
3135         USA Today photo gallery
3136
3137         Reviewed by Steve Falkenburg.
3138
3139         * plugins/win/PluginMessageThrottlerWin.cpp:
3140         (WebCore::PluginMessageThrottlerWin::messageThrottleTimerFired):
3141         Protect the PluginView from destruction before calling its window proc.
3142
3143 2009-07-09  Jon Honeycutt  <jhoneycutt@apple.com>
3144
3145         <rdar://problem/6978804> WER #16: Repro Access Violation in
3146         WebCore::PluginView::bindingInstance (1310178023)
3147
3148         Reviewed by Darin Adler.
3149
3150         * plugins/PluginView.cpp:
3151         (WebCore::PluginView::bindingInstance):
3152         Protect the PluginView from destruction before calling NPN_GetValue. If
3153         the renderer for the PluginView was destroyed during the call, and the
3154         PluginView's ref count is now 1, return null.
3155
3156 2009-07-09  Jon Honeycutt  <jhoneycutt@apple.com>
3157
3158         Speculative fix for <rdar://problem/6991251> WER #13: Crash in
3159         WebKit!WebCore::PluginView::performRequest+203 (1311461169)
3160
3161         Reviewed by Darin Adler.
3162
3163         * plugins/PluginView.cpp:
3164         (WebCore::PluginView::performRequest):
3165         Protect the PluginView from destruction before performing a load.
3166         Removed some trailing whitespace.
3167
3168 2009-07-09  Jon Honeycutt  <jhoneycutt@apple.com>
3169
3170         Build fix.
3171
3172         * inspector/JavaScriptDebugServer.cpp:
3173         (WebCore::JavaScriptDebugServer::setJavaScriptPaused):
3174
3175 2009-07-09  Beth Dakin and Jon Honeycutt <bdakin@apple.com>
3176
3177         Reviewed by Dave Hyatt.
3178
3179         Make Widget RefCounted to fix or make fixable:
3180
3181         <rdar://problem/7038831> REGRESSION (TOT): In Mail, a crash occurs 
3182         at WebCore::Widget::afterMouseDown() after clicking To Do's close 
3183         box
3184         <rdar://problem/6978804> WER #16: Repro Access Violation in 
3185         WebCore::PluginView::bindingInstance (1310178023)
3186         -and-
3187         <rdar://problem/6991251> WER #13: Crash in WebKit!
3188         WebCore::PluginView::performRequest+203 (1311461169) 
3189
3190         * loader/EmptyClients.h:
3191         (WebCore::EmptyFrameLoaderClient::createPlugin):
3192         Changed to return PassRefPtr
3193         (WebCore::EmptyFrameLoaderClient::createJavaAppletWidget):
3194         Ditto.
3195
3196         * loader/FrameLoader.cpp:
3197         (WebCore::FrameLoader::loadSubframe):
3198         (WebCore::FrameLoader::loadPlugin):
3199         Make the widget variable a RefPtr. Use .get() when passing it to
3200         RenderPart::setWidget().
3201         (WebCore::FrameLoader::createJavaAppletWidget):
3202         Make the widget variable a RefPtr.
3203
3204         * loader/FrameLoader.h:
3205         Changed the return type of createJavaAppletWidget().
3206
3207         * loader/FrameLoaderClient.h:
3208         Change the return types of createPlugin() and 
3209         createJavaAppletWidget().
3210
3211         * page/Frame.cpp:
3212         (WebCore::Frame::createView):
3213         No need to call .get() since setWidget() takes a RefPtr.
3214
3215         * page/FrameView.cpp:
3216         (WebCore::FrameView::layoutIfNeededRecursive):
3217         children() now returns a HashSet of RefPtrs.
3218
3219         * page/FrameView.h:
3220         Remove inheritance from RefCounted; we pick this up from ScrollView
3221         through Widget.
3222
3223         * platform/ScrollView.cpp:
3224         (WebCore::ScrollView::addChild):
3225         addChild() now takes a PassRefPtr and m_children now keeps a 
3226         HashSet of RefPtrs.
3227
3228         * platform/ScrollView.h:
3229         ScrollView constructor is now protected.
3230         (WebCore::ScrollView::children):
3231         m_children is now a HashSet of RefPtrs.
3232
3233         * platform/Scrollbar.h:
3234         Remove inheritance from RefCounted; we pick this up from ScrollView
3235         through Widget.
3236
3237         * platform/Widget.h:
3238         Inherit from RefCounted. Cleaned up some whitespace. Make m_widget 
3239         a RefPtr.
3240
3241         * plugins/PluginView.cpp:
3242         (WebCore::PluginView::create):
3243         Adopt the PluginView when returning it.
3244
3245         * plugins/PluginView.h:
3246         Changed create() to return a PassRefPtr.
3247
3248         * rendering/RenderApplet.cpp:
3249         Receive result in a RefPtr when calling createJavaAppletWidget().
3250
3251         * rendering/RenderPart.cpp:
3252         (WebCore::RenderPart::setWidget): 
3253         setWidget() now takes a PassRefPtr. Also removed the manual ref of 
3254         FrameViews. This is handled by having m_widget be a RefPtr. Removed 
3255         deleteWidget().
3256
3257         * rendering/RenderPart.h:
3258         Removed override of deleteWidget().
3259
3260         * rendering/RenderWidget.cpp:
3261         (WebCore::RenderWidget::destroy):
3262         (WebCore::RenderWidget::setWidget):
3263         (WebCore::RenderWidget::paint):
3264         (WebCore::RenderWidget::setOverlapTestResult):
3265         (WebCore::RenderWidget::updateWidgetPosition):
3266         Use .get().
3267         (WebCore::RenderWidget::clearWidget):
3268         Don't call deleteWidget(). It was removed. 
3269
3270         * rendering/RenderWidget.h:
3271         Removed deleteWidget(). Made m_widget a RefPtr.
3272         (WebCore::RenderWidget::widget):
3273         Use .get().
3274
3275 2009-07-09  Chris Fleizach  <cfleizach@apple.com>
3276
3277         Reviewed by Darin Adler.
3278
3279         Bug 27129 - AX: possible assertion for a non-native image in accessibility
3280         https://bugs.webkit.org/show_bug.cgi?id=27129 
3281
3282         It's possible for an image that is not really an image to assert, because its renderer
3283         is turned into a RenderImage.
3284
3285         Test: accessibility/non-native-image-crash.html
3286
3287         * accessibility/AccessibilityRenderObject.cpp:
3288         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
3289         (WebCore::RoleEntry::):
3290         * accessibility/mac/AccessibilityObjectWrapper.mm:
3291         (-[AccessibilityObjectWrapper roleDescription]):
3292
3293 2009-07-09  Simon Fraser  <simon.fraser@apple.com>
3294
3295         Build fix for SnowLeopard.
3296         
3297         Avoid using the contentsTransform methods if not on Leopard, because
3298         we don't need to call them.
3299
3300         * platform/graphics/mac/GraphicsLayerCA.mm:
3301         (WebCore::GraphicsLayerCA::updateContentsTransform):
3302         * platform/graphics/mac/WebLayer.mm:
3303         (-[WebLayer setNeedsDisplayInRect:]):
3304         * platform/graphics/mac/WebTiledLayer.mm:
3305         (-[WebTiledLayer setNeedsDisplayInRect:]):
3306
3307 2009-07-09  Simon Fraser  <simon.fraser@apple.com>
3308
3309         Reviewed by Dave Hyatt
3310
3311         Improve the appearance of text in compositing layers when -[CALayer geometryFlipped]
3312         is not available.
3313         <rdar://problem/6120614>
3314
3315         * platform/graphics/GraphicsLayer.h:
3316         (WebCore::GraphicsLayer::setContentsOrientation):
3317         (WebCore::GraphicsLayer::contentsOrientation):
3318         * platform/graphics/GraphicsLayer.cpp:
3319         (WebCore::GraphicsLayer::GraphicsLayer):
3320         Add a m_contentsOrientation member and getter/setter to control whether
3321         the contents of this layer have a transform applied to them before display.
3322
3323         * platform/graphics/mac/GraphicsLayerCA.h:
3324         New method to return the default contents orientation.
3325
3326         * platform/graphics/mac/GraphicsLayerCA.mm:
3327         (WebCore::flipTransform):
3328         Convenience method to return a transform with a Y flip.
3329
3330         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
3331         (WebCore::GraphicsLayerCA::setSize):
3332         After the size changes we have to update the contentsTransform.
3333
3334         (WebCore::GraphicsLayerCA::setGeometryOrientation):
3335         (WebCore::GraphicsLayerCA::geometryOrientation):
3336         If -setGeometryFlipped: is not available, use a children transform.
3337         
3338         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
3339         Tiled layers have issues with flipped contentsTransform, so just use
3340         top-down drawing for them. Call updateContentsTransform() to set the
3341         new contents transform after swapping layers.
3342         
3343         (WebCore::GraphicsLayerCA::defaultContentsOrientation):
3344         Use bottom-up when -geometryFlipped is not available, otherwise top-down.
3345         
3346         (WebCore::GraphicsLayerCA::updateContentsTransform):
3347         Set the layer contents transform based on contentsOrientation().
3348
3349         (WebCore::GraphicsLayerCA::setContentsLayer):
3350         We have to manually flip contents layers if we're not using -geometryFlipped.
3351         
3352         * platform/graphics/mac/WebLayer.h:
3353         * platform/graphics/mac/WebLayer.mm:
3354         Do early return if layerContents is nil. Flip the CTM if the layer has
3355         bottom-up coordinates, so that CG sees a CTM with no flip.
3356         Do the CGContextRestoreGState() after drawing the debug indicator.
3357         
3358         (-[WebLayer setNeedsDisplayInRect:]):
3359         * platform/graphics/mac/WebTiledLayer.mm:
3360         (-[WebTiledLayer setNeedsDisplayInRect:]):
3361         Need to map the dirty rect through the contentsTransform.
3362
3363 2009-07-09  Alexey Proskuryakov  <ap@webkit.org>
3364
3365         Reviewed by Geoff Garen.
3366
3367         <rdar://problem/6921671> Visit counter shouldn't be incremented by redirects.
3368
3369         Can't test this functionality with layout tests.
3370
3371         * WebCore.base.exp:
3372         * history/HistoryItem.cpp:
3373         (WebCore::HistoryItem::recordVisitAtTime):
3374         (WebCore::HistoryItem::visited):
3375         * history/HistoryItem.h:
3376         Only increase visit count if explicitly told to. Now, some visits change last access time,
3377         but do not increase visit count.
3378
3379 2009-07-09  Eric Carlson  <eric.carlson@apple.com>
3380
3381         Reviewed by Simon Fraser.
3382
3383         <rdar://problem/7046098> MediaControllerThemeQT requires QuickTime 7.6.3
3384
3385         Require QuickTime 7.6.3 or higher to enable the new media controller UI.
3386
3387         * rendering/RenderThemeMac.mm:
3388         (WebCore::mediaControllerTheme):
3389
3390 2009-07-09  Sam Weinig  <sam@webkit.org>
3391
3392         Reviewed by Beth Dakin.
3393
3394         Remove incorrect comment.
3395
3396         * page/MouseEventWithHitTestResults.h:
3397
3398 2009-07-09  Mads Ager  <ager@chromium.org>
3399
3400         Reviewed by Dimitri Glazkov.
3401
3402         Update the V8 bindings codegenerator to use the RGBColor::create
3403         method to handle refcounts for RGBColor objects correctly.
3404         
3405        * bindings/scripts/CodeGeneratorV8.pm: Use RGBColor::create to create RGBColor objects.
3406
3407 2009-07-09  Eric Carlson  <eric.carlson@apple.com>
3408
3409         Reviewed by Adele Peterson.
3410
3411         Crash in RenderMedia::styleDidChange.
3412         <rdar://problem/7044313> CrashTracer: quicklook crashed generating thumbnail for page with 
3413         media element (RenderMedia::styleDidChange + 115)
3414
3415         Speculative fix for crash in styleDidChange. Null check controller elements before tell
3416         them to update style.
3417
3418         * rendering/RenderMedia.cpp:
3419         (WebCore::RenderMedia::styleDidChange):
3420
3421 2009-07-09  Adam Barth  <abarth@webkit.org>
3422
3423         Reviewed by Dimitri Glazkov.
3424
3425         [V8] Move V8DOMWrapper to its own file
3426         https://bugs.webkit.org/show_bug.cgi?id=27121
3427
3428         * bindings/v8/V8DOMWrapper.cpp: Added.
3429         (WebCore::GetToStringName):
3430         (WebCore::ConstructorToString):
3431         (WebCore::V8DOMWrapper::convertSVGElementInstanceToV8Object):
3432         (WebCore::V8DOMWrapper::convertSVGObjectWithContextToV8Object):
3433         (WebCore::V8DOMWrapper::domObjectHasJSWrapper):
3434         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
3435         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject):
3436         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode):
3437         (WebCore::V8DOMWrapper::getTemplate):
3438         (WebCore::V8DOMWrapper::convertToV8Object):
3439         (WebCore::V8DOMWrapper::setHiddenWindowReference):
3440         (WebCore::V8DOMWrapper::domWrapperType):
3441         (WebCore::V8DOMWrapper::convertToNativeObjectImpl):
3442         (WebCore::V8DOMWrapper::convertToSVGPODTypeImpl):
3443         (WebCore::V8DOMWrapper::lookupDOMWrapper):
3444         (WebCore::V8DOMWrapper::convertDOMWrapperToNodeHelper):
3445         (WebCore::V8DOMWrapper::wrapNativeNodeFilter):
3446         (WebCore::V8DOMWrapper::instantiateV8Object):
3447         (WebCore::V8DOMWrapper::setDOMWrapper):
3448         (WebCore::V8DOMWrapper::maybeDOMWrapper):
3449         (WebCore::V8DOMWrapper::isDOMEventWrapper):
3450         (WebCore::V8DOMWrapper::isWrapperOfType):
3451         (WebCore::V8DOMWrapper::htmlElementType):
3452         (WebCore::V8DOMWrapper::svgElementType):
3453         (WebCore::V8DOMWrapper::convertEventToV8Object):
3454         (WebCore::):
3455         (WebCore::V8DOMWrapper::convertNodeToV8Object):
3456         (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
3457         (WebCore::V8DOMWrapper::convertEventListenerToV8Object):
3458         (WebCore::V8DOMWrapper::convertDOMImplementationToV8Object):
3459         (WebCore::V8DOMWrapper::convertStyleSheetToV8Object):
3460         (WebCore::V8DOMWrapper::convertCSSValueToV8Object):
3461         (WebCore::V8DOMWrapper::convertCSSRuleToV8Object):
3462         (WebCore::V8DOMWrapper::convertWindowToV8Object):
3463         * bindings/v8/V8DOMWrapper.h: Added.
3464         (WebCore::V8DOMWrapper::convertDOMWrapperToNative):
3465         (WebCore::V8DOMWrapper::wrapCPointer):
3466         (WebCore::V8DOMWrapper::extractCPointer):
3467         (WebCore::V8DOMWrapper::convertDOMWrapperToNode):
3468         (WebCore::V8DOMWrapper::convertToV8Object):
3469         (WebCore::V8DOMWrapper::convertToNativeObject):
3470         (WebCore::V8DOMWrapper::convertToNativeEvent):
3471         (WebCore::V8DOMWrapper::extractCPointerImpl):
3472         (WebCore::V8DOMWrapper::instantiateV8Object):
3473         * bindings/v8/V8Proxy.cpp:
3474         * bindings/v8/V8Proxy.h:
3475
3476 2009-07-09  David Hyatt  <hyatt@apple.com>
3477
3478         Reviewed by Adele Peterson.
3479
3480         Crash in setFocusedFrame.
3481         <rdar://7032869> Crashing in setFocusedFrame on blogger.com.
3482
3483         Speculative fix for crasher in setFocusedFrame.  Make sure to ref both frames and fire
3484         the events only after the local member has been updated.
3485
3486         * page/FocusController.cpp:
3487         (WebCore::FocusController::setFocusedFrame):
3488
3489 2009-07-09  Eric Carlson  <eric.carlson@apple.com>
3490
3491         Reviewed by Adele Peterson.
3492
3493         Possible crashes when mouse clicks not dispatched because range input destroyed while 
3494         thumb is being dragged (e.g. scrub to end of movie)
3495         <rdar://problem/7037494> 
3496         https://bugs.webkit.org/show_bug.cgi?id=27101
3497
3498         Some shadow nodes "capture" all mouse events from mouseDown to mouseUp so they continue to 
3499         get mouse events even when the mouse is moved outside of the node. This is done by putting
3500         EventHandler into a mode where it sends all mouse events to the node regardless of the
3501         actual mouse position. The mode is set on mouseDown and cleared on mouseUp but if the
3502         node is deleted while in this mode, the mouseUp is never sent and EventHandler continues
3503         to try to send events to the deleted node. This sometimes results in a crash, and sometimes
3504         in a page that doesn't respond to click events.
3505
3506         Tests: fast/forms/search-delete-while-cancel-button-clicked.html
3507                fast/forms/slider-delete-while-dragging-thumb.html
3508                media/audio-delete-while-slider-thumb-clicked.html
3509                media/audio-delete-while-step-button-clicked.html
3510
3511         * rendering/MediaControlElements.cpp:
3512         (WebCore::MediaControlSeekButtonElement::detach):
3513             New, call setCapturingMouseEventsNode if capturing mouse events.
3514         * rendering/MediaControlElements.h:
3515             Declare detach().
3516
3517         * rendering/RenderSlider.cpp:
3518         (WebCore::SliderThumbElement::detach):
3519             New, call setCapturingMouseEventsNode if capturing mouse events.
3520
3521         * rendering/TextControlInnerElements.cpp:
3522         (WebCore::SearchFieldCancelButtonElement::detach):
3523             New, call setCapturingMouseEventsNode if capturing mouse events.
3524         * rendering/TextControlInnerElements.h:
3525             Declare detach().
3526
3527 2009-07-09  Yury Semikhatsky  <yurys@chromium.org>
3528
3529         Reviewed by Dimitri Glazkov.
3530
3531         Enter the Frame's context before creating new objects in setContextDebugId.
3532
3533         https://bugs.webkit.org/show_bug.cgi?id=27112
3534
3535         * bindings/v8/V8Proxy.cpp:
3536         (WebCore::V8Proxy::setContextDebugId):
3537
3538 2009-07-09  Simon Hausmann  <hausmann@webkit.org>
3539
3540         Fix the Qt build.
3541
3542         * WebCore.pro: Add new storage impl files to the build.
3543
3544 2009-07-08  Adam Barth  <abarth@webkit.org>
3545
3546         Rubber stamped by Eric Seidel.
3547
3548         [V8] Move DOM wrapper functions in V8Proxy to V8DOMWrapper
3549         https://bugs.webkit.org/show_bug.cgi?id=27107
3550
3551         This patch is just renaming.  Code motion will occur next.
3552
3553         * bindings/scripts/CodeGeneratorV8.pm:
3554         * bindings/v8/ScriptController.cpp:
3555         (WebCore::ScriptController::processingUserGesture):
3556         (WebCore::createScriptObject):
3557         (WebCore::ScriptController::createScriptObjectForPluginElement):
3558         * bindings/v8/ScriptObject.cpp:
3559         (WebCore::ScriptGlobalObject::set):
3560         * bindings/v8/ScriptObjectQuarantine.cpp:
3561         (WebCore::getQuarantinedScriptObject):
3562         * bindings/v8/V8AbstractEventListener.cpp:
3563         (WebCore::V8AbstractEventListener::handleEvent):
3564         (WebCore::V8AbstractEventListener::getReceiverObject):
3565         * bindings/v8/V8Collection.cpp:
3566         (WebCore::toOptionsCollectionSetter):
3567         * bindings/v8/V8Collection.h:
3568         (WebCore::getV8Object):
3569         (WebCore::getNamedPropertyOfCollection):
3570         (WebCore::nodeCollectionNamedPropertyGetter):
3571         (WebCore::getIndexedPropertyOfCollection):
3572         (WebCore::nodeCollectionIndexedPropertyGetter):
3573         (WebCore::nodeCollectionIndexedPropertyEnumerator):
3574         (WebCore::collectionIndexedPropertyEnumerator):
3575         (WebCore::collectionStringOrNullIndexedPropertyGetter):
3576         * bindings/v8/V8DOMMap.cpp:
3577         (WebCore::DOMData::handleWeakObject):
3578         (WebCore::DOMData::removeObjectsFromWrapperMap):
3579         * bindings/v8/V8GCController.cpp:
3580         (WebCore::enumerateDOMObjectMap):
3581         (WebCore::DOMObjectVisitor::visitDOMWrapper):
3582         (WebCore::GCPrologueVisitor::visitDOMWrapper):
3583         (WebCore::GCEpilogueVisitor::visitDOMWrapper):
3584         * bindings/v8/V8Helpers.cpp:
3585         (WebCore::wrapNPObject):
3586         * bindings/v8/V8NodeFilterCondition.cpp:
3587         (WebCore::V8NodeFilterCondition::acceptNode):
3588         * bindings/v8/V8Proxy.cpp:
3589         (WebCore::V8DOMWrapper::convertSVGElementInstanceToV8Object):
3590         (WebCore::V8DOMWrapper::convertSVGObjectWithContextToV8Object):
3591         (WebCore::V8DOMWrapper::domObjectHasJSWrapper):
3592         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
3593         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject):
3594         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode):
3595         (WebCore::V8Proxy::evaluateInNewContext):
3596         (WebCore::V8Proxy::getConstructor):
3597         (WebCore::V8DOMWrapper::getTemplate):
3598         (WebCore::V8Proxy::retrieveWindow):
3599         (WebCore::V8Proxy::updateDocumentWrapperCache):
3600         (WebCore::V8Proxy::clearForNavigation):
3601         (WebCore::V8Proxy::installDOMWindow):
3602         (WebCore::setDOMExceptionHelper):
3603         (WebCore::V8DOMWrapper::convertToV8Object):
3604         (WebCore::V8DOMWrapper::setHiddenWindowReference):
3605         (WebCore::V8DOMWrapper::domWrapperType):
3606         (WebCore::V8DOMWrapper::convertToNativeObjectImpl):
3607         (WebCore::V8DOMWrapper::convertToSVGPODTypeImpl):
3608         (WebCore::V8DOMWrapper::lookupDOMWrapper):
3609         (WebCore::V8DOMWrapper::convertDOMWrapperToNodeHelper):
3610         (WebCore::V8DOMWrapper::wrapNativeNodeFilter):
3611         (WebCore::V8DOMWrapper::instantiateV8Object):
3612         (WebCore::V8DOMWrapper::setDOMWrapper):
3613         (WebCore::V8DOMWrapper::maybeDOMWrapper):