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