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