Devirtualize CSSValue.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-11-08  Andreas Kling  <kling@webkit.org>
2
3         Devirtualize CSSValue.
4         <http://webkit.org/b/71666>
5
6         Reviewed by Antti Koivisto.
7
8         Make the CSSValue destructor non-virtual (along with all the subclasses.)
9         This removes the vtables, and the pointers thereto in each value instance,
10         shrinking each object by one CPU word (4 or 8 bytes.)
11
12         We use the same trick as CSSRule to implement destruction; providing our
13         own deref() instead of RefCounted's, and performing a statically typed
14         delete in a destroy() method called when the ref count reaches 0.
15
16         Also made all the empty subclass destructors inline.
17
18         * css/CSSAspectRatioValue.cpp:
19         * css/CSSAspectRatioValue.h:
20         (WebCore::CSSAspectRatioValue::~CSSAspectRatioValue):
21         * css/CSSBorderImageSliceValue.cpp:
22         * css/CSSBorderImageSliceValue.h:
23         (WebCore::CSSBorderImageSliceValue::~CSSBorderImageSliceValue):
24         * css/CSSBorderImageValue.cpp:
25         * css/CSSBorderImageValue.h:
26         (WebCore::CSSBorderImageValue::~CSSBorderImageValue):
27         * css/CSSCanvasValue.h:
28         * css/CSSCrossfadeValue.cpp:
29         * css/CSSCrossfadeValue.h:
30         (WebCore::CSSCrossfadeValue::~CSSCrossfadeValue):
31         * css/CSSCursorImageValue.h:
32         * css/CSSFlexValue.cpp:
33         * css/CSSFlexValue.h:
34         (WebCore::CSSFlexValue::~CSSFlexValue):
35         * css/CSSFontFaceSrcValue.cpp:
36         * css/CSSFontFaceSrcValue.h:
37         (WebCore::CSSFontFaceSrcValue::~CSSFontFaceSrcValue):
38         * css/CSSFunctionValue.cpp:
39         * css/CSSFunctionValue.h:
40         (WebCore::CSSFunctionValue::~CSSFunctionValue):
41         * css/CSSImageGeneratorValue.h:
42         * css/CSSImageValue.h:
43         * css/CSSMutableValue.h:
44         (WebCore::CSSMutableValue::~CSSMutableValue):
45         * css/CSSParserValues.h:
46         * css/CSSPrimitiveValue.h:
47         * css/CSSUnicodeRangeValue.cpp:
48         * css/CSSUnicodeRangeValue.h:
49         (WebCore::CSSUnicodeRangeValue::~CSSUnicodeRangeValue):
50         * css/CSSValue.cpp:
51         (WebCore::CSSValue::destroy):
52         * css/CSSValue.h:
53         (WebCore::CSSValue::deref):
54         (WebCore::CSSValue::~CSSValue):
55         * css/CSSValueList.cpp:
56         * css/CSSValueList.h:
57         (WebCore::CSSValueList::~CSSValueList):
58         * css/WebKitCSSFilterValue.cpp:
59         * css/WebKitCSSFilterValue.h:
60         (WebCore::WebKitCSSFilterValue::~WebKitCSSFilterValue):
61         * css/WebKitCSSTransformValue.cpp:
62         * css/WebKitCSSTransformValue.h:
63         (WebCore::WebKitCSSTransformValue::~WebKitCSSTransformValue):
64
65 2011-11-08  Darin Adler  <darin@apple.com>
66
67         Speculative fix for crashes seen in DocumentWriter::deprecatedFrameEncoding
68         https://bugs.webkit.org/show_bug.cgi?id=71828
69
70         Reviewed by Nate Chapin.
71
72         No new tests; not sure how to reproduce this, but crash traces indicate it
73         is an otherwise-harmless null dereference.
74
75         * loader/DocumentWriter.cpp:
76         (WebCore::DocumentWriter::deprecatedFrameEncoding):
77         Handle null document the same as a document without a URL.
78
79 2011-11-08  Sheriff Bot  <webkit.review.bot@gmail.com>
80
81         Unreviewed, rolling out r95720.
82         http://trac.webkit.org/changeset/95720
83         https://bugs.webkit.org/show_bug.cgi?id=71831
84
85         This has made the menulists on WebKit patch reviews much less
86         usable (Requested by mrobinson on #webkit).
87
88         * platform/gtk/GtkPopupMenu.cpp:
89         (WebCore::GtkPopupMenu::menuPositionFunction):
90
91 2011-11-08  Nico Weber  <thakis@chromium.org>
92
93         [chromium] Remove 6 exit time destructors and 6 static initializers
94         https://bugs.webkit.org/show_bug.cgi?id=71760
95
96         Reviewed by Nate Chapin.
97
98         Do this by moving global statics into function-local statics, and using
99         DEFINE_LOCAL_STATIC to leak them. Since this code is accessed on a single
100         thread, this is a safe change to make.
101
102         No behavior change, so no new tests.
103
104         * bindings/v8/ScriptGCEvent.cpp:
105         (WebCore::sEventListeners):
106         (WebCore::ScriptGCEvent::addEventListener):
107         (WebCore::ScriptGCEvent::removeEventListener):
108         (WebCore::ScriptGCEvent::gcEpilogueCallback):
109         * bindings/v8/ScriptGCEvent.h:
110         * bindings/v8/V8NPObject.cpp:
111         (WebCore::staticTemplateMap):
112         (WebCore::weakTemplateCallback):
113         (WebCore::npObjectGetProperty):
114         (WebCore::staticNPObjectMap):
115         (WebCore::weakNPObjectCallback):
116         (WebCore::createV8ObjectForNPObject):
117         (WebCore::forgetV8ObjectForNPObject):
118         * bindings/v8/V8Proxy.cpp:
119         (WebCore::staticExtensionsList):
120         (WebCore::V8Proxy::registeredExtensionWithV8):
121         (WebCore::V8Proxy::registerExtension):
122         (WebCore::V8Proxy::extensions):
123         * bindings/v8/V8Proxy.h:
124         * bindings/v8/npruntime.cpp:
125         * plugins/chromium/PluginDataChromium.cpp:
126         (WebCore::pluginCache):
127         (WebCore::PluginData::initPlugins):
128         (WebCore::PluginData::refresh):
129         (WebCore::getPluginMimeTypeFromExtension):
130
131 2011-11-08  Hans Wennborg  <hans@chromium.org>
132
133         IndexedDB: Start using the onSuccessWithContinuation() callback
134         https://bugs.webkit.org/show_bug.cgi?id=71565
135
136         Reviewed by Tony Chang.
137
138         This is a follow-up to r99169 where we start using this new
139         callback for cursors.
140
141         * storage/IDBCursorBackendImpl.cpp:
142         (WebCore::IDBCursorBackendImpl::continueFunctionInternal):
143         * storage/IDBRequest.cpp:
144         (WebCore::IDBRequest::setCursor):
145
146 2011-11-08  Justin Schuh  <jschuh@chromium.org>
147
148         Document::loader should use documentLoader(), not activeDocumentLoader()
149         https://bugs.webkit.org/show_bug.cgi?id=65895
150
151         Reviewed by Brady Eidson.
152
153         Test: fast/loader/stateobjects/replacestate-in-onunload.html
154
155         * dom/Document.cpp:
156         (WebCore::Document::loader):
157
158 2011-11-08  Andreas Kling  <kling@webkit.org>
159
160         CSSImageGeneratorValue: Devirtualize image(), isFixedSize() and fixedSize().
161         <http://webkit.org/b/71824>
162
163         Reviewed by Darin Adler.
164
165         Redirect the calls to the appropriate subclass in CSSImageGeneratorValue.cpp.
166
167         * css/CSSCanvasValue.h:
168         (WebCore::CSSCanvasValue::isFixedSize):
169         * css/CSSCrossfadeValue.h:
170         (WebCore::CSSCrossfadeValue::isFixedSize):
171         * css/CSSGradientValue.h:
172         (WebCore::CSSGradientValue::isFixedSize):
173         (WebCore::CSSGradientValue::fixedSize):
174         * css/CSSImageGeneratorValue.cpp:
175         (WebCore::CSSImageGeneratorValue::image):
176         (WebCore::CSSImageGeneratorValue::isFixedSize):
177         (WebCore::CSSImageGeneratorValue::fixedSize):
178         * css/CSSImageGeneratorValue.h:
179
180 2011-11-08  Andrey Kosyakov  <caseq@chromium.org>
181
182         Web Inspector: [Extension API][Chromium] injected extension API needs to return an object
183         https://bugs.webkit.org/show_bug.cgi?id=71822
184
185         Reviewed by Pavel Feldman.
186
187         * inspector/front-end/ExtensionAPI.js:
188         (buildExtensionAPIInjectedScript):
189
190 2011-11-08  Andreas Kling  <kling@webkit.org>
191
192         CSSImageValue: Devirtualize cachedImage(CachedResourceLoader*).
193         <http://webkit.org/b/71814>
194
195         Reviewed by Antti Koivisto.
196
197         Defer to CSSCursorImageValue (the only CSSImageValue subclass)
198         when appropriate in CSSImageValue::cachedImage(CachedResourceLoader*).
199
200         * css/CSSCursorImageValue.h:
201         * css/CSSImageValue.cpp:
202         (WebCore::CSSImageValue::cachedImage):
203         * css/CSSImageValue.h:
204
205 2011-11-08  Andrey Kosyakov  <caseq@chromium.org>
206
207         Web Inspector: add "Evaluate in console" as a shortcut and context menu items to scripts panel
208         https://bugs.webkit.org/show_bug.cgi?id=71817
209
210         Reviewed by Pavel Feldman.
211
212         * English.lproj/localizedStrings.js:
213         * inspector/front-end/ConsoleView.js:
214         (WebInspector.ConsoleView.prototype.evaluate):
215         (WebInspector.ConsoleView.prototype._enterKeyPressed):
216         * inspector/front-end/JavaScriptSourceFrame.js:
217         (WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu):
218         * inspector/front-end/ScriptsPanel.js:
219         (WebInspector.ScriptsPanel.prototype._evaluateSelectionInConsole):
220         * inspector/front-end/ShortcutsScreen.js:
221         (WebInspector.ShortcutsSection.prototype.addRelatedKeys):
222         (WebInspector.ShortcutsSection.prototype.addAlternateKeys):
223         * inspector/front-end/externs.js:
224         (WebInspector.evaluateInConsole):
225         * inspector/front-end/inspector.js:
226         (WebInspector.evaluateInConsole):
227
228 2011-11-08  Andreas Kling  <kling@webkit.org>
229
230         CSSValue: Devirtualize cssText().
231         <http://webkit.org/b/71813>
232
233         Reviewed by Antti Koivisto.
234
235         Rename all subclass implementations to customCssText() and add
236         a CSSValue::cssText() that defers to the appropriate subclass
237         based on the type info.
238
239         The rename is both for clarity, and to ensure that calling
240         cssText() will always end up in the correct method.
241
242         * css/CSSAspectRatioValue.cpp:
243         (WebCore::CSSAspectRatioValue::customCssText):
244         * css/CSSAspectRatioValue.h:
245         * css/CSSBorderImageSliceValue.cpp:
246         (WebCore::CSSBorderImageSliceValue::customCssText):
247         * css/CSSBorderImageSliceValue.h:
248         * css/CSSBorderImageValue.cpp:
249         (WebCore::CSSBorderImageValue::customCssText):
250         * css/CSSBorderImageValue.h:
251         * css/CSSCanvasValue.cpp:
252         (WebCore::CSSCanvasValue::customCssText):
253         * css/CSSCanvasValue.h:
254         * css/CSSCrossfadeValue.cpp:
255         (WebCore::CSSCrossfadeValue::customCssText):
256         * css/CSSCrossfadeValue.h:
257         * css/CSSFlexValue.cpp:
258         (WebCore::CSSFlexValue::customCssText):
259         * css/CSSFlexValue.h:
260         * css/CSSFontFaceSrcValue.cpp:
261         (WebCore::CSSFontFaceSrcValue::customCssText):
262         * css/CSSFontFaceSrcValue.h:
263         * css/CSSFunctionValue.cpp:
264         (WebCore::CSSFunctionValue::customCssText):
265         * css/CSSFunctionValue.h:
266         * css/CSSGradientValue.cpp:
267         (WebCore::CSSLinearGradientValue::customCssText):
268         (WebCore::CSSRadialGradientValue::customCssText):
269         * css/CSSGradientValue.h:
270         * css/CSSInheritedValue.cpp:
271         (WebCore::CSSInheritedValue::customCssText):
272         * css/CSSInheritedValue.h:
273         * css/CSSInitialValue.cpp:
274         (WebCore::CSSInitialValue::customCssText):
275         * css/CSSInitialValue.h:
276         * css/CSSLineBoxContainValue.cpp:
277         (WebCore::CSSLineBoxContainValue::customCssText):
278         * css/CSSLineBoxContainValue.h:
279         * css/CSSPrimitiveValue.cpp:
280         (WebCore::CSSPrimitiveValue::customCssText):
281         * css/CSSPrimitiveValue.h:
282         * css/CSSReflectValue.cpp:
283         (WebCore::CSSReflectValue::customCssText):
284         * css/CSSReflectValue.h:
285         * css/CSSTimingFunctionValue.cpp:
286         (WebCore::CSSLinearTimingFunctionValue::customCssText):
287         (WebCore::CSSCubicBezierTimingFunctionValue::customCssText):
288         (WebCore::CSSStepsTimingFunctionValue::customCssText):
289         * css/CSSTimingFunctionValue.h:
290         (WebCore::CSSLinearTimingFunctionValue::CSSLinearTimingFunctionValue):
291         * css/CSSUnicodeRangeValue.cpp:
292         (WebCore::CSSUnicodeRangeValue::customCssText):
293         * css/CSSUnicodeRangeValue.h:
294         * css/CSSValue.cpp:
295         (WebCore::CSSValue::cssText):
296         * css/CSSValue.h:
297         * css/CSSValueList.cpp:
298         (WebCore::CSSValueList::customCssText):
299         * css/CSSValueList.h:
300         * css/FontFamilyValue.cpp:
301         (WebCore::FontFamilyValue::customCssText):
302         * css/FontFamilyValue.h:
303         * css/FontFeatureValue.cpp:
304         (WebCore::FontFeatureValue::customCssText):
305         * css/FontFeatureValue.h:
306         * css/FontValue.cpp:
307         (WebCore::FontValue::customCssText):
308         * css/FontValue.h:
309         * css/ShadowValue.cpp:
310         (WebCore::ShadowValue::customCssText):
311         * css/ShadowValue.h:
312         * css/WebKitCSSFilterValue.cpp:
313         (WebCore::WebKitCSSFilterValue::customCssText):
314         * css/WebKitCSSFilterValue.h:
315         * css/WebKitCSSTransformValue.cpp:
316         (WebCore::WebKitCSSTransformValue::customCssText):
317         * css/WebKitCSSTransformValue.h:
318         * svg/SVGColor.cpp:
319         (WebCore::SVGColor::customCssText):
320         * svg/SVGColor.h:
321         * svg/SVGPaint.cpp:
322         (WebCore::SVGPaint::customCssText):
323         * svg/SVGPaint.h:
324
325 2011-11-08  Gavin Peters  <gavinp@chromium.org>
326
327         Fix width of m_type in CachedResource
328         https://bugs.webkit.org/show_bug.cgi?id=71727
329
330         Reviewed by Nate Chapin.
331
332         Test: fast/dom/HTMLLinkElement/cachedresource-types.html
333
334         * loader/cache/CachedResource.cpp:
335         (WebCore::CachedResource::CachedResource):
336         * loader/cache/CachedResource.h:
337
338 2011-11-08  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
339
340         [Qt] Don't set OBJECTS_DIR and DEFINES in default_pre
341
342         If a pro file needs to access the OBJECTS_DIR it should use the
343         form ${QMAKE_VAR_OBJECTS_DIR} to ensure the value is evaluated
344         after defaults_post has been processed.
345
346         Setting DEFINES in defaults_pre is also bad, as any DEFINES=foo on
347         the command line will override whatever we set in defaults_pre.
348
349         Reviewed by Simon Hausmann.
350
351         * Target.pri:
352
353 2011-11-08  Pavel Feldman  <pfeldman@google.com>
354
355         Web Inspector: add JavaScript keywords to the autocomplete.
356         https://bugs.webkit.org/show_bug.cgi?id=71782
357
358         Reviewed by Yury Semikhatsky.
359
360         * inspector/front-end/ConsoleView.js:
361         (WebInspector.ConsoleView.prototype._completions.receivedPropertyNames):
362         (WebInspector.ConsoleView.prototype._completions):
363         (WebInspector.ConsoleView.prototype._reportCompletions):
364
365 2011-11-08  Nikolas Zimmermann  <nzimmermann@rim.com>
366
367         Introduce SVGLengthContext, to allow to resolve relative units to arbitary viewports
368         https://bugs.webkit.org/show_bug.cgi?id=71780
369
370         Reviewed by Zoltan Herczeg.
371
372         Introduce SVGLengthContext to cleanup SVGLength, by moving all conversion of relative units that depend on style or viewport
373         out of SVGLength, into SVGLengthContext. Pass SVGLengthContext& to SVGLength::value/setValue/... functions instead of a pure
374         "const SVGElement* context", which was previously used to determine the viewport when resolving percentage units.
375         SVGLengthContext carries an additional FloatRect of the custom viewport, to which percentages are resolved, if specified.
376
377         This allows us to kill several duplicates of the same code, which handles objectBoundingBox mode for gradients/patterns/masks/etc..
378         A follow-up patch will convert filters to use the new SVGLengthContext::resolveRectangle code as well.
379
380         This is a preparation for bug 10430, to fix feImage + objectBoundingBox support when rendering referenced elements, instead of files.
381
382         Doesn't affect any tests yet.
383
384         * CMakeLists.txt:
385         * GNUmakefile.list.am:
386         * Target.pri:
387         * WebCore.gypi:
388         * WebCore.vcproj/WebCore.vcproj:
389         * WebCore.xcodeproj/project.pbxproj:
390         * rendering/svg/RenderSVGResourceGradient.cpp:
391         (WebCore::RenderSVGResourceGradient::applyResource):
392         * rendering/svg/RenderSVGResourceGradient.h:
393         * rendering/svg/RenderSVGResourceLinearGradient.h:
394         (WebCore::RenderSVGResourceLinearGradient::gradientUnits):
395         * rendering/svg/RenderSVGResourcePattern.cpp:
396         (WebCore::RenderSVGResourcePattern::applyResource):
397         (WebCore::calculatePatternBoundaries):
398         (WebCore::RenderSVGResourcePattern::buildTileImageTransform):
399         (WebCore::RenderSVGResourcePattern::createTileImage):
400         * rendering/svg/RenderSVGResourceRadialGradient.h:
401         (WebCore::RenderSVGResourceRadialGradient::gradientUnits):
402         * rendering/svg/SVGRenderTreeAsText.cpp:
403         (WebCore::writeCommonGradientProperties):
404         (WebCore::writeSVGResourceContainer):
405         * svg/GradientAttributes.h:
406         (WebCore::GradientAttributes::GradientAttributes):
407         (WebCore::GradientAttributes::gradientUnits):
408         (WebCore::GradientAttributes::setGradientUnits):
409         (WebCore::GradientAttributes::hasGradientUnits):
410         * svg/PatternAttributes.h:
411         (WebCore::PatternAttributes::PatternAttributes):
412         (WebCore::PatternAttributes::patternUnits):
413         (WebCore::PatternAttributes::patternContentUnits):
414         (WebCore::PatternAttributes::setPatternUnits):
415         (WebCore::PatternAttributes::setPatternContentUnits):
416         (WebCore::PatternAttributes::hasPatternUnits):
417         (WebCore::PatternAttributes::hasPatternContentUnits):
418         * svg/SVGAllInOne.cpp:
419         * svg/SVGElement.h:
420         (WebCore::SVGElement::operator SVGLengthContext):
421         * svg/SVGFilterElement.cpp:
422         (WebCore::SVGFilterElement::filterBoundingBox):
423         * svg/SVGLength.cpp:
424         (WebCore::SVGLength::SVGLength):
425         (WebCore::SVGLength::unitMode):
426         (WebCore::SVGLength::value):
427         (WebCore::SVGLength::setValue):
428         (WebCore::SVGLength::convertToSpecifiedUnits):
429         * svg/SVGLength.h:
430         (WebCore::SVGLength::blend):
431         * svg/SVGLengthContext.cpp: Added.
432         (WebCore::SVGLengthContext::SVGLengthContext):
433         (WebCore::SVGLengthContext::resolveRectangle):
434         (WebCore::SVGLengthContext::resolvePoint):
435         (WebCore::SVGLengthContext::resolveLength):
436         (WebCore::SVGLengthContext::convertValueToUserUnits):
437         (WebCore::SVGLengthContext::convertValueFromUserUnits):
438         (WebCore::SVGLengthContext::convertValueFromUserUnitsToPercentage):
439         (WebCore::SVGLengthContext::convertValueFromPercentageToUserUnits):
440         (WebCore::SVGLengthContext::convertValueFromUserUnitsToEMS):
441         (WebCore::SVGLengthContext::convertValueFromEMSToUserUnits):
442         (WebCore::SVGLengthContext::convertValueFromUserUnitsToEXS):
443         (WebCore::SVGLengthContext::convertValueFromEXSToUserUnits):
444         (WebCore::SVGLengthContext::determineViewport):
445         * svg/SVGLengthContext.h: Added.
446         (WebCore::SVGLengthContext::resolveRectangle):
447         * svg/SVGLinearGradientElement.cpp:
448         (WebCore::SVGLinearGradientElement::collectGradientAttributes):
449         (WebCore::SVGLinearGradientElement::calculateStartEndPoints):
450         * svg/SVGMaskElement.cpp:
451         (WebCore::SVGMaskElement::maskBoundingBox):
452         * svg/SVGPatternElement.cpp:
453         (WebCore::SVGPatternElement::collectPatternAttributes):
454         * svg/SVGRadialGradientElement.cpp:
455         (WebCore::SVGRadialGradientElement::collectGradientAttributes):
456         (WebCore::SVGRadialGradientElement::calculateFocalCenterPointsAndRadius):
457
458 2011-11-08  Andreas Kling  <kling@webkit.org>
459
460         CSSValue: Devirtualize addSubresourceStyleURLs().
461         <http://webkit.org/b/71805>
462
463         Reviewed by Antti Koivisto.
464
465         Make addSubresourceStyleURLs() non-virtual and call the appropriate
466         subclass implementation based on the subclass type info.
467
468         * css/CSSBorderImageValue.h:
469         * css/CSSFontFaceSrcValue.h:
470         * css/CSSPrimitiveValue.h:
471         * css/CSSReflectValue.h:
472         * css/CSSValue.cpp:
473         (WebCore::CSSValue::addSubresourceStyleURLs):
474         * css/CSSValue.h:
475         (WebCore::CSSValue::addSubresourceStyleURLs):
476         * css/CSSValueList.h:
477
478 2011-11-08  Andrey Kosyakov  <caseq@chromium.org>
479
480         Web Inspector: do not show object popover when selection is active
481         https://bugs.webkit.org/show_bug.cgi?id=71804
482
483         Reviewed by Yury Semikhatsky.
484
485         * inspector/front-end/JavaScriptSourceFrame.js:
486         (WebInspector.JavaScriptSourceFrame.prototype._shouldShowPopover):
487
488 2011-11-08  Alexander Pavlov  <apavlov@chromium.org>
489
490         Web Inspector: Do not hide SuggestBox if typed-in string in the middle of input equals one of suggestions
491         https://bugs.webkit.org/show_bug.cgi?id=71797
492
493         Reviewed by Yury Semikhatsky.
494
495         * inspector/front-end/TextPrompt.js:
496         (WebInspector.TextPrompt.prototype.onKeyDown):
497         (WebInspector.TextPrompt.prototype.complete):
498
499 2011-11-08  Andreas Kling  <kling@webkit.org>
500
501         CSSGradientValue: Devirtualize createGradient().
502         <http://webkit.org/b/71800>
503
504         Reviewed by Antti Koivisto.
505
506         Make createGradient() non-virtual and call the appropriate subclass
507         implementation in image() based on is{Linear,Radial}Gradient().
508
509         * css/CSSGradientValue.cpp:
510         (WebCore::CSSGradientValue::image):
511         * css/CSSGradientValue.h:
512
513 2011-11-08  Andreas Kling  <kling@webkit.org>
514
515         CSSCanvasValue: Remove inheritance from CanvasObserver.
516         <http://webkit.org/b/71796>
517
518         Reviewed by Antti Koivisto.
519
520         To completely devirtualize all the CSSValues, we need to remove
521         CSSCanvasValue's inheritance from CanvasObserver, as that is forcing
522         a vptr into the class.
523
524         Use the same approach as CSSImportRule and make a simple proxying
525         CanvasObserver subclass and put that as a member variable of the value.
526
527         * css/CSSCanvasValue.cpp:
528         (WebCore::CSSCanvasValue::~CSSCanvasValue):
529         (WebCore::CSSCanvasValue::element):
530         * css/CSSCanvasValue.h:
531         (WebCore::CSSCanvasValue::CSSCanvasValue):
532         (WebCore::CSSCanvasValue::CanvasObserverProxy::CanvasObserverProxy):
533         (WebCore::CSSCanvasValue::CanvasObserverProxy::~CanvasObserverProxy):
534         (WebCore::CSSCanvasValue::CanvasObserverProxy::canvasChanged):
535         (WebCore::CSSCanvasValue::CanvasObserverProxy::canvasResized):
536         (WebCore::CSSCanvasValue::CanvasObserverProxy::canvasDestroyed):
537
538 2011-11-08  Yury Semikhatsky  <yurys@chromium.org>
539
540         Web Inspector: display notification in the front-end when inspected worker terminates
541         https://bugs.webkit.org/show_bug.cgi?id=71770
542
543         When inspected worker terminates we will show a notification similar to the help
544         screen. The notification disappears when the worker restarts or the user closes it
545         manually.
546
547         Reviewed by Pavel Feldman.
548
549         * English.lproj/localizedStrings.js:
550         * inspector/front-end/ScriptsPanel.js:
551         * inspector/front-end/WorkerManager.js:
552         (WebInspector.WorkerManager.loaded):
553         (WebInspector.WorkerManager.showWorkerTerminatedScreen):
554         (WebInspector.WorkerTerminatedScreen):
555         * inspector/front-end/inspector.js:
556         (WebInspector.disconnectFromBackend):
557         (WebInspector.frontendReused):
558
559 2011-11-08  Nikolas Zimmermann  <nzimmermann@rim.com>
560
561         Fold ImageBySizeCache again into CSSImageGeneratorValue
562         https://bugs.webkit.org/show_bug.cgi?id=71785
563
564         Reviewed by Zoltan Herczeg.
565
566         Remove ImageBySizeCache, and fold it into CSSImageGeneratorValue, as it used to be.
567         CachedImage has switched to SVGImageCache and no longer needs it.
568
569         * CMakeLists.txt:
570         * GNUmakefile.list.am:
571         * Target.pri:
572         * WebCore.gypi:
573         * WebCore.vcproj/WebCore.vcproj:
574         * WebCore.xcodeproj/project.pbxproj:
575         * css/CSSImageGeneratorValue.cpp:
576         (WebCore::CSSImageGeneratorValue::addClient):
577         (WebCore::CSSImageGeneratorValue::removeClient):
578         (WebCore::CSSImageGeneratorValue::getImage):
579         (WebCore::CSSImageGeneratorValue::putImage):
580         * css/CSSImageGeneratorValue.h:
581         (WebCore::SizeAndCount::SizeAndCount):
582         (WebCore::CSSImageGeneratorValue::clients):
583         * rendering/ImageBySizeCache.cpp: Removed.
584         * rendering/ImageBySizeCache.h: Removed.
585
586 2011-11-08  Alexander Pavlov  <apavlov@chromium.org>
587
588         Web Inspector: Avoid automatic Console suggestions with empty expression
589         https://bugs.webkit.org/show_bug.cgi?id=71783
590
591         Reviewed by Yury Semikhatsky.
592
593         * inspector/front-end/ConsoleView.js:
594
595 2011-11-08  Nikolas Zimmermann  <nzimmermann@rim.com>
596
597         Not reviewed. Fix build, by removing an unused variable.
598
599         * html/canvas/CanvasRenderingContext2D.cpp:
600         (WebCore::isOriginClean):
601         (WebCore::CanvasRenderingContext2D::createPattern):
602
603 2011-11-08  Nikolas Zimmermann  <nzimmermann@rim.com>
604
605         Switch SVGImage cache to store ImageBuffers instead of whole SVGImages, including a DOM/Render tree
606         https://bugs.webkit.org/show_bug.cgi?id=71368
607
608         Reviewed by Zoltan Herczeg.
609
610         When determining whether the canvas would be tainted, we need access to the SVGImage, not its cached BitmapImage.
611         Otherwhise wrong assumptions are mode, leading to regressions.
612
613         Fixes http/tests/security/canvas-remote-read-svg-image.html and related tests on the bots.
614
615         * html/canvas/CanvasRenderingContext.cpp:
616         (WebCore::CanvasRenderingContext::wouldTaintOrigin): Forgot to switch them back to use cachedImage->image().
617         * html/canvas/CanvasRenderingContext2D.cpp:
618         (WebCore::isOriginClean): Ditto.
619
620 2011-11-08  Vsevolod Vlasov  <vsevik@chromium.org>
621
622         Web Inspector: Console should be scrolled to bottom when shown for the first time.
623         https://bugs.webkit.org/show_bug.cgi?id=71781
624
625         Reviewed by Pavel Feldman.
626
627         * inspector/front-end/ConsoleView.js:
628
629 2011-11-08  Nikolas Zimmermann  <nzimmermann@rim.com>
630
631         Switch SVGImage cache to store ImageBuffers instead of whole SVGImages, including a DOM/Render tree
632         https://bugs.webkit.org/show_bug.cgi?id=71368
633
634         Reviewed by Antti Koivisto.
635
636         Fix regressions/races introduced by r98852. SVGImage repainting didn't work under certain circumstances.
637         The problem was hard to reproduce on Mac ports, but easily visible on Chromium, when opening two files
638         that shared the same animated SVG image. The problem of sharing a single ImageObserver across multiple
639         instances of the same SVGImage, leads to nasty problems, that are timing dependant. changedInRect() calls
640         that should only by received in one document, are received in the other as well, due the shared nature
641         of CachedImage. To avoid these problems alltogether, a new approach is needed, that was initially suggested
642         by Antti.
643
644         Avoid creating multiple SVGImages and caching them for different sizes/zoom levels. Introduce SVGImageCache
645         which holds rendered versions of the SVGImage at certain sizes/zoom levels. It holds (ImageBuffer, Image) pairs
646         for each renderer, associated with a size and zoom level.
647
648         This is a major change to the cache as introduced some weeks ago. Instead of holding multiple SVGImages, each containing
649         a whole DOM/render tree, we now create bitmap images rendered at the requested sizes/zoom levels and cache them.
650
651         Revert ImageBySizeCache changes that were needed to make it usable wih SVGImage. Its now used only in CSSImageGeneratorValue and
652         thus the extra information that CSSImageGeneratorValue doesn't need can be removed again (desired/actual size differentations, and the zoom level).
653
654         Tests: svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size.html
655                svg/as-image/animated-svg-as-image-same-image.html
656
657         * CMakeLists.txt: Add svg/graphics/SVGImageCache.* to build.
658         * GNUmakefile.list.am: Ditto.
659         * Target.pri: Ditto.
660         * WebCore.gypi: Ditto.
661         * WebCore.vcproj/WebCore.vcproj: Ditto.
662         * WebCore.vcproj/copyForwardingHeaders.cmd: Copy headers from svg/graphics, as SVGImageCache is needed by CachedImage in SVG enabled builds.
663         * WebCore.xcodeproj/project.pbxproj: Add svg/graphics/SVGImageCache.* to build.
664         * css/CSSImageGeneratorValue.cpp: Remove zoom parameter from addClient/getImage, no need to pass 1 default values anymore.
665         (WebCore::CSSImageGeneratorValue::addClient):
666         (WebCore::CSSImageGeneratorValue::getImage):
667         * loader/cache/CachedImage.cpp: Stop using ImageBySizeCache, and switch to the new SVGImageCache.
668         (WebCore::CachedImage::removeClientForRenderer):
669         (WebCore::CachedImage::lookupOrCreateImageForRenderer):
670         (WebCore::CachedImage::setContainerSizeForRenderer):
671         (WebCore::CachedImage::imageSizeForRenderer):
672         (WebCore::CachedImage::clear):
673         (WebCore::CachedImage::createImage):
674         (WebCore::CachedImage::destroyDecodedData):
675         (WebCore::CachedImage::decodedSizeChanged):
676         (WebCore::CachedImage::didDraw):
677         (WebCore::CachedImage::shouldPauseAnimation):
678         (WebCore::CachedImage::animationAdvanced):
679         (WebCore::CachedImage::changedInRect):
680         * loader/cache/CachedImage.h:
681         * page/DragController.cpp: Stop using imageForRenderer(), as it may return cached BitmapImages, that don't carry a filename extension anymore, which is required here.
682         (WebCore::getImage):
683         * rendering/ImageBySizeCache.cpp: Revert changes to ImageBySizeCache, which were needed to make it usable for SVGImages. CSSImageGenerator doesn't need it.
684         (WebCore::ImageBySizeCache::addClient):
685         (WebCore::ImageBySizeCache::removeClient):
686         (WebCore::ImageBySizeCache::getImage):
687         * rendering/ImageBySizeCache.h: Ditto.
688         (WebCore::SizeAndCount::SizeAndCount):
689         * rendering/RenderImage.cpp: Stop using imageForRenderer(), use cachedImage()->image(), which is guaranteed to be a SVGImage for svg images, and not a cached bitmap copy.
690         (WebCore::RenderImage::embeddedContentBox):
691         * rendering/RenderReplaced.cpp: Simplify logic to figure out the intrinsic size - the special logic for the old SVGImage cache can go away now.
692         (WebCore::RenderReplaced::computeIntrinsicLogicalWidth):
693         (WebCore::RenderReplaced::computeIntrinsicLogicalHeight):
694         * rendering/style/StyleCachedImage.cpp: Call removeClientForRenderer(), which takes care of clearing SVGImageCache entries as well.
695         (WebCore::StyleCachedImage::removeClient): This change is needed, as we don't want to make removeClient() virtual in CachedResource.
696         * rendering/svg/RenderSVGRoot.cpp: Rename isEmbeddedThroughImageElement to isEmbeddedThroughSVGImage, as this is what it actually checks.
697         (WebCore::RenderSVGRoot::isEmbeddedThroughSVGImage):
698         * rendering/svg/RenderSVGRoot.h:
699         * svg/SVGSVGElement.cpp: Fix bug that's visible now with the SVGImageCache, which was already there before, but hard to trigger.
700         (WebCore::SVGSVGElement::currentViewBoxRect): The viewBox depends on who's asking for it: the host document or the embedded document? Take that into account.
701         * svg/SVGSVGElement.h:
702         * svg/graphics/SVGImage.cpp: Cleanup some code. Add new logic that draws a SVGImage into an ImageBuffer at a desired size & zoom.
703         (WebCore::SVGImage::setContainerSize):
704         (WebCore::SVGImage::size):
705         (WebCore::SVGImage::drawSVGToImageBuffer):
706         * svg/graphics/SVGImage.h:
707         * svg/graphics/SVGImageCache.cpp: Added. SVGImageCache caches Image/ImageBuffer pairs for each _renderer_ and size/zoom level. The ImageBySizeCache only cared about size.
708         (WebCore::SVGImageCache::SVGImageCache):
709         (WebCore::SVGImageCache::~SVGImageCache):
710         (WebCore::SVGImageCache::removeRendererFromCache):
711         (WebCore::SVGImageCache::setRequestedSizeAndZoom):
712         (WebCore::SVGImageCache::getRequestedSizeAndZoom):
713         (WebCore::SVGImageCache::imageContentChanged):
714         (WebCore::SVGImageCache::redrawTimerFired):
715         (WebCore::SVGImageCache::lookupOrCreateBitmapImageForRenderer):
716         * svg/graphics/SVGImageCache.h: Added.
717         (WebCore::SVGImageCache::create):
718         (WebCore::SVGImageCache::CachedSizeAndZoom::CachedSizeAndZoom):
719         (WebCore::SVGImageCache::CachedImageData::CachedImageData):
720
721 2011-11-07  Yury Semikhatsky  <yurys@chromium.org>
722
723         Web Inspector: refactor shortcuts and settings screens
724         https://bugs.webkit.org/show_bug.cgi?id=71773
725
726         Keep pointer to the visible screen and hide it automatically when new one is going
727         to be displayed.
728
729         Reviewed by Pavel Feldman.
730
731         * inspector/front-end/HelpScreen.js:
732         (WebInspector.HelpScreen.prototype.show):
733         (WebInspector.HelpScreen.prototype.hide):
734         * inspector/front-end/ShortcutsScreen.js:
735         (WebInspector.ShortcutsScreen): ShortcutsScreen is now a descendant of HelpScreen.
736         (WebInspector.ShortcutsScreen.prototype.show):
737         * inspector/front-end/inspector.js:
738         (WebInspector._hideSettingsScreen):
739         (WebInspector.documentKeyDown):
740
741 2011-11-08  Nikolas Zimmermann  <nzimmermann@rim.com>
742
743         Not reviewed. Fix Snow Leopard 32bit builds.
744
745         * css/CSSParser.cpp:
746         (WebCore::CSSParser::parseAspectRatio): CSSParserValue::fValue is a double, use narrowPrecisionToFloat() to convert double->float.
747         * platform/ClockGeneric.cpp: Remove unneeded variable out of 32bit integer value range.
748         * webaudio/BiquadDSPKernel.cpp:
749         (WebCore::BiquadDSPKernel::getFrequencyResponse): Use narrowPrecisionTofloat() to convert double->float.
750
751 2011-11-07  Daniel Bates  <dbates@rim.com>
752
753         Add CredentialStorage.cpp to WebCore/CMakeLists.txt
754         https://bugs.webkit.org/show_bug.cgi?id=71748
755
756         Reviewed by Martin Robinson.
757
758         Adds CredentialStorage.cpp to WebCore/CMakeLists.txt since its provides a
759         base implementation of this feature.
760
761         Also adds a stub implementation of CredentialStorage to the WinCE port.
762
763         * CMakeLists.txt: Added source file CredentialStorage.cpp.
764         * CMakeListsEfl.txt: Added source file CredentialStorageCurl.cpp when building
765           with the Curl networking backend.
766         * CMakeListsWinCE.txt: Added source file CredentialStorageWin.cpp.
767         * platform/network/win/CredentialStorageWin.cpp: Added.
768         (WebCore::Credential::getFromPersistentStorage): Stub implementation.
769
770 2011-11-07  Kentaro Hara  <haraken@chromium.org>
771
772         Remove [CustomGetter] IDL for window.Image of V8
773         https://bugs.webkit.org/show_bug.cgi?id=71739
774
775         Reviewed by Adam Barth.
776
777         Currently, window.Image uses a custom getter to get the template
778         of 'HTMLImageElementConstructor'. However, this getter does not need to
779         be custom and can use a default getter
780         'DOMWindowInternal::DOMWindowConstructorGetter'.
781
782         Tests: fast/js/custom-constructors.html
783                fast/dom/image-object.html
784                fast/dom/gc-image-element.html
785                fast/dom/Window/custom-constructors.html
786
787         * bindings/v8/custom/V8DOMWindowCustom.cpp: Removed a custom getter.
788         * page/DOMWindow.idl: Removed [CustomGetter] IDL from window.Image of V8. Renamed 'HTMLImageElementConstructor' to 'HTMLImageElementConstructorConstructor' in order to make window.Image use the template of (not 'HTMLImageElement' but) 'HTMLImageElementConstructor'. Note that CodeGenerator*.pm strips /Constructor$/ from the IDL type.
789
790 2011-11-07  Chris Fleizach  <cfleizach@apple.com>
791
792         REGRESSION(r99025-r99037): platform/mac/accessibility/select-element-selection-with-optgroups.html is asserting
793         https://bugs.webkit.org/show_bug.cgi?id=71421
794
795         Reviewed by Ryosuke Niwa.
796
797         Remove an assert that was added by r99035. It was added based on a comment in the code, but not tested.
798
799         * html/HTMLSelectElement.cpp:
800         (WebCore::HTMLSelectElement::selectOption):
801
802 2011-11-07  Emil A Eklund  <eae@chromium.org>
803
804         Revert platform and scrolling to ints
805         https://bugs.webkit.org/show_bug.cgi?id=71585
806
807         Reviewed by Eric Seidel.
808
809         Replace all uses of LayoutUnit and related types with ints in platform
810         and scrolling code.
811
812         No new tests.
813
814         * page/FrameView.cpp:
815         * page/FrameView.h:
816         * platform/PopupMenuClient.h:
817         * platform/ScrollAnimatorNone.cpp:
818         * platform/ScrollAnimatorNone.h:
819         * platform/ScrollView.cpp:
820         * platform/ScrollView.h:
821         * platform/ScrollableArea.h:
822         * rendering/RenderLayer.cpp:
823         * rendering/RenderLayer.h:
824         * rendering/RenderListBox.cpp:
825         * rendering/RenderListBox.h:
826         * rendering/RenderMenuList.cpp:
827         * rendering/RenderMenuList.h:
828         * rendering/RenderTextControlSingleLine.cpp:
829         * rendering/RenderTextControlSingleLine.h:
830
831 2011-11-07  Kentaro Hara  <haraken@chromium.org>
832
833         Fixed wrong test results of fast/js/custom-constructors.html
834         https://bugs.webkit.org/show_bug.cgi?id=71669
835
836         Reviewed by Darin Adler.
837
838         According to the HTMLOptionElement spec
839         (http://dev.w3.org/html5/spec/the-button-element.html#the-option-element),
840         'text', 'label' and 'value' have neither [TreatUndefinedAs=EmptyString]
841         nor [TreatNullAs=EmptyString]. Thus, an undefined value should be
842         converted to a string "undefined" and a null value should be
843         converted to a string "null", following the step 3 of the IDL
844         conversion spec (http://dev.w3.org/2006/webapi/WebIDL/#es-DOMString).
845
846         * bindings/js/JSOptionConstructor.cpp:
847         (WebCore::constructHTMLOptionElement): Removed isUndefined() check from 'text' and 'value' since the spec does not have [TreatUndefinedAs=EmptyString].
848         * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp:
849         (WebCore::v8HTMLOptionElementConstructorCallback): Ditto.
850         * html/HTMLOptionElement.idl: Removed [ConvertNullToNullString] from 'text', 'label' and 'value' since the spec does not have [TreatNullAs=EmptyString].
851
852 2011-11-07  Adam Barth  <abarth@webkit.org>
853
854         Move DomainRelaxationForbidden scheme registry to SchemeRegistry
855         https://bugs.webkit.org/show_bug.cgi?id=71750
856
857         Reviewed by Eric Seidel.
858
859         As stated in the FIXME, scheme registries belong in SchemeRegistry, not
860         in SecurityOrigin.
861
862         * WebCore.exp.in:
863         * dom/Document.cpp:
864         (WebCore::Document::setDomain):
865         * page/SecurityOrigin.cpp:
866         * page/SecurityOrigin.h:
867         * platform/SchemeRegistry.cpp:
868         (WebCore::schemesForbiddenFromDomainRelaxation):
869         (WebCore::SchemeRegistry::setDomainRelaxationForbiddenForURLScheme):
870         (WebCore::SchemeRegistry::isDomainRelaxationForbiddenForURLScheme):
871         * platform/SchemeRegistry.h:
872
873 2011-11-07  Dan Bernstein  <mitz@apple.com>
874
875         <rdar://problem/10405215> REGRESSION (r98178): World of Warcraft Launcher crashes in FrameView::isOnActivePage()
876         https://bugs.webkit.org/show_bug.cgi?id=71743
877
878         Reviewed by Beth Dakin.
879
880         * page/FrameView.cpp:
881         (WebCore::FrameView::isOnActivePage): Added a check for a null m_frame.
882
883 2011-11-07  Dmitry Lomov  <dslomov@google.com>
884
885         https://bugs.webkit.org/show_bug.cgi?id=71534
886         [V8] On neutering TypedArrayViews, V8 should be notified to drain code generation cache.
887
888         Reviewed by David Levin.
889
890         * bindings/scripts/CodeGeneratorJS.pm:
891         (GenerateImplementation):
892         * bindings/scripts/CodeGeneratorV8.pm:
893         * html/canvas/DataView.cpp:
894         * html/canvas/DataView.h:
895         * html/canvas/Float32Array.h:
896         * html/canvas/Float64Array.h:
897         * html/canvas/Int16Array.h:
898         * html/canvas/Int32Array.h:
899         * html/canvas/Int8Array.h:
900         * html/canvas/TypedArrayBase.h:
901         * html/canvas/Uint16Array.h:
902         * html/canvas/Uint32Array.h:
903         * html/canvas/Uint8Array.h:
904
905 2011-11-07  Adam Barth  <abarth@webkit.org>
906
907         addMessage's last few arguments should be optional
908         https://bugs.webkit.org/show_bug.cgi?id=70946
909
910         Reviewed by Darin Adler.
911
912         As requested by Darin Adler.  I wanted to call this method addMessage,
913         but the compiler was unhappy locating the overload on
914         ScriptExecutionContext when Document had an override too.  Changing the
915         name to addConsoleMessage made all the code happier.
916
917         * dom/Document.cpp:
918         (WebCore::Document::processHttpEquiv):
919         * dom/ScriptExecutionContext.cpp:
920         (WebCore::ScriptExecutionContext::addMessage):
921         * dom/ScriptExecutionContext.h:
922         * html/canvas/CanvasRenderingContext2D.cpp:
923         (WebCore::CanvasRenderingContext2D::getImageData):
924         * html/parser/XSSAuditor.cpp:
925         (WebCore::XSSAuditor::filterToken):
926         * loader/ImageLoader.cpp:
927         (WebCore::ImageLoader::notifyFinished):
928         * page/ContentSecurityPolicy.cpp:
929         (WebCore::ContentSecurityPolicy::reportViolation):
930         (WebCore::ContentSecurityPolicy::logUnrecognizedDirective):
931         * page/EventSource.cpp:
932         (WebCore::EventSource::didReceiveResponse):
933         * webaudio/AudioBufferSourceNode.cpp:
934         (WebCore::AudioBufferSourceNode::looping):
935         (WebCore::AudioBufferSourceNode::setLooping):
936         * webaudio/AudioContext.cpp:
937         (WebCore::AudioContext::createLowPass2Filter):
938         (WebCore::AudioContext::createHighPass2Filter):
939         * xml/XMLHttpRequest.cpp:
940         (WebCore::reportUnsafeUsage):
941
942 2011-11-07  Adam Barth  <abarth@webkit.org>
943
944         WebWorkers fail with document.domain set when accessing from subdomain
945         https://bugs.webkit.org/show_bug.cgi?id=67978
946
947         Reviewed by Sam Weinig.
948
949         Workers should ignore document.domain when deciding which URLs a
950         document can request, just like XMLHttpRequest and every other API.
951
952         Test: http/tests/workers/worker-document-domain-security.html
953
954         * workers/AbstractWorker.cpp:
955         (WebCore::AbstractWorker::resolveURL):
956
957 2011-11-07  Scott Graham  <scottmg@chromium.org>
958
959         Allow gamepad API to be enabled at runtime
960         https://bugs.webkit.org/show_bug.cgi?id=71736
961
962         Part of full patch, found at
963         https://bugs.webkit.org/show_bug.cgi?id=69451
964
965         Reviewed by Adam Barth.
966
967         No new tests. No new functionality.
968
969         * bindings/generic/RuntimeEnabledFeatures.cpp:
970         * bindings/generic/RuntimeEnabledFeatures.h:
971         (WebCore::RuntimeEnabledFeatures::setGamepadsEnabled):
972         (WebCore::RuntimeEnabledFeatures::gamepadsEnabled):
973
974 2011-11-07  Kentaro Hara  <haraken@chromium.org>
975
976         Remove [CustomGetter] IDL for window.Option of V8
977         https://bugs.webkit.org/show_bug.cgi?id=71735
978
979         Reviewed by Nate Chapin.
980
981         Currently, window.Option uses a custom getter to get the template
982         of 'HTMLOptionElementConstructor'. However, this getter does not need to
983         be custom and can use a default getter
984         'DOMWindowInternal::DOMWindowConstructorGetter'.
985
986         Tests: fast/js/custom-constructors.html
987                fast/forms/option-index.html
988                fast/forms/add-and-remove-option.html
989                fast/dom/dom-add-optionelement.html
990
991         * bindings/v8/custom/V8DOMWindowCustom.cpp: Removed a custom getter.
992         * page/DOMWindow.idl: Removed [CustomGetter] IDL from window.Option of V8. Renamed 'HTMLOptionElementConstructor' to 'HTMLOptionElementConstructorConstructor' in order to make window.Option use the template of (not 'HTMLOptionElement' but) 'HTMLOptionElementConstructor'. Note that CodeGenerator*.pm strips /Constructor$/ from the IDL type.
993
994 2011-11-07  Mark Hahnenberg  <mhahnenberg@apple.com>
995
996         De-virtualize JSObject::putWithAttributes
997         https://bugs.webkit.org/show_bug.cgi?id=71716
998
999         Reviewed by Darin Adler.
1000
1001         No new tests.
1002
1003         Added putWithAttributes to the MethodTable, changed all the virtual 
1004         implementations of putWithAttributes to static ones, and replaced 
1005         all call sites with corresponding lookups in the MethodTable.
1006
1007         * bindings/js/JSDOMWindowShell.cpp:
1008         (WebCore::JSDOMWindowShell::putWithAttributes):
1009         * bindings/js/JSDOMWindowShell.h:
1010
1011 2011-11-07  Beth Dakin  <bdakin@apple.com>
1012
1013         https://bugs.webkit.org/show_bug.cgi?id=71490
1014         Support uiStateTransitionProgress for scrollbars
1015         -and corresponding-
1016         <rdar://problem/9849612>
1017
1018         Reviewed by Sam Weinig.
1019
1020         Step 1 of supporting uiStateTransitionProgress is knowing when the mouse has 
1021         entered or exited a scrollbar. These changes to Scrollbar pass that information 
1022         on to the ScrollAnimator. Also, Scrollbar::mouseUp() now takes a 
1023         PlatformMouseEvent as a parameter. This is necessary because m_hoveredNode is not 
1024         always up to date on a mouseUp, so mouseUp must hitTest the scrollbar to see if 
1025         the mouse has exited the scrollbar.
1026         * platform/Scrollbar.cpp:
1027         (WebCore::Scrollbar::mouseMoved):
1028         (WebCore::Scrollbar::mouseExited):
1029         (WebCore::Scrollbar::mouseUp):
1030         * platform/Scrollbar.h:
1031
1032         These changes are required now that Scrollbar::mouseUp() takes a parameter.
1033         * WebCore.exp.in:
1034         * page/EventHandler.cpp:
1035         (WebCore::EventHandler::handleMouseDoubleClickEvent):
1036         (WebCore::EventHandler::handleMouseReleaseEvent):
1037         * platform/chromium/PopupListBox.cpp:
1038         (WebCore::PopupListBox::handleMouseReleaseEvent):
1039         * platform/win/PopupMenuWin.cpp:
1040         (WebCore::PopupMenuWin::wndProc):
1041         
1042         ScrollAnimator passes the information on to AppKit.
1043         * platform/ScrollAnimator.h:
1044         (WebCore::ScrollAnimator::mouseEnteredScrollbar):
1045         (WebCore::ScrollAnimator::mouseExitedScrollbar):
1046         * platform/mac/ScrollAnimatorMac.h:
1047         (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
1048         (WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
1049
1050         There are several new pieces of AppKit api we must call into.
1051         * platform/mac/NSScrollerImpDetails.h:
1052
1053         This is a temporary function that is needed for the time being since there is new 
1054         AppKit api required for this to work.
1055         * platform/mac/ScrollAnimatorMac.mm:
1056         (supportsUIStateTransitionProgress):
1057
1058         I refactored WebScrollbarPartAnimation so that it can handle the 
1059         uiStateTransitionProgress animation as well as the alpha animations it already 
1060         handled. This mostly involved re-naming things and making use of a new enum called 
1061         FeatureToAnimate which keeps track of what the instance of 
1062         WebScrollbarPartAnimation is animating.
1063         (-[WebScrollbarPartAnimation initWithScrollbarPainter:animate:scrollAnimator:animateFrom:animateTo:duration:]):
1064         (-[WebScrollbarPartAnimation setScrollbarPainter:]):
1065         (-[WebScrollbarPartAnimation setStartValue:]):
1066         (-[WebScrollbarPartAnimation setEndValue:]):
1067         (-[WebScrollbarPartAnimation setCurrentProgress:]):
1068
1069         WebScrollbarPainterDelegate has two new animations, 
1070         _verticalUIStateTransitionAnimation, and _horizontalUIStateTransitionAnimation. It 
1071         also responds to a few new delegate calls.
1072         (-[WebScrollbarPainterDelegate cancelAnimations]):
1073
1074         This is a new delegate call needed for uiStateTransitionProgress.
1075         (-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]):
1076
1077         I re-named setUpAnimation to setUpAlphaAnimation since it does a lot of things 
1078         that are specific to the alpha animation and I chose not to re-use it for 
1079         uiStateTransition.
1080         (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
1081         (-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
1082         (-[WebScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
1083
1084         New delegate call for the uiStateTransition animation that sets up that animation 
1085         and kicks it off.
1086         (-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
1087         (-[WebScrollbarPainterDelegate scrollAnimatorDestroyed]):
1088
1089 2011-11-07  Alice Boxhall  <aboxhall@chromium.org>
1090
1091         Remove unnecessary use of function pointer in FrameSelection::modify()
1092         https://bugs.webkit.org/show_bug.cgi?id=71646
1093
1094         Reviewed by Ryosuke Niwa.
1095
1096         * editing/FrameSelection.cpp:
1097         (WebCore::FrameSelection::modify):
1098
1099 2011-11-07  Andreas Kling  <kling@webkit.org>
1100
1101         Unreviewed Windows build fix after r99468.
1102
1103         * css/CSSPrimitiveValue.h: Unmark single-argument constructors
1104         as explicit, since this conflicts with the template constructors
1105         in CSSPrimitiveValueMappings.h.
1106
1107 2011-11-07  Jer Noble  <jer.noble@apple.com>
1108
1109         Build fix due to a erroneous search-and-replace.
1110
1111         Unreviewed build fix.
1112
1113         Replace all instances of GenericClock with ClockGeneric.
1114
1115         * WebCore.xcodeproj/project.pbxproj:
1116         * platform/ClockGeneric.cpp:
1117         (ClockGeneric::ClockGeneric):
1118
1119 2011-11-07  Adam Barth  <abarth@webkit.org>
1120
1121         Move parseSandboxPolicy to SecurityContext
1122         https://bugs.webkit.org/show_bug.cgi?id=71732
1123
1124         Reviewed by Eric Seidel.
1125
1126         As requested by Eric, this patch resolves a layering inversion.  Now
1127         that we have SecurityContext to hold the sandbox bits and the origin,
1128         it's a logical place to put the parser for sandbox policies.
1129
1130         * dom/SecurityContext.cpp:
1131         (WebCore::SecurityContext::parseSandboxPolicy):
1132         * dom/SecurityContext.h:
1133         * html/HTMLIFrameElement.cpp:
1134         (WebCore::HTMLIFrameElement::parseMappedAttribute):
1135         * page/ContentSecurityPolicy.cpp:
1136         (WebCore::ContentSecurityPolicy::applySandboxPolicy):
1137         * page/SecurityOrigin.cpp:
1138         * page/SecurityOrigin.h:
1139
1140 2011-11-07  Jer Noble  <jer.noble@apple.com>
1141
1142         Rename PlatformClockPOSIX -> ClockGeneric, and use WTF::currentTime() for its timing source.
1143         https://bugs.webkit.org/show_bug.cgi?id=71702
1144
1145         Reviewed by Sam Weinig.
1146
1147         No new tests; covered by existing tests.
1148
1149         * platform/Clock.cpp:
1150         (Clock::create):
1151         * platform/ClockGeneric.cpp: Renamed from Source/WebCore/platform/posix/PlatformClockPOSIX.cpp.
1152         (ClockGeneric::ClockGeneric):
1153         (ClockGeneric::setCurrentTime):
1154         (ClockGeneric::currentTime):
1155         (ClockGeneric::setPlayRate):
1156         (ClockGeneric::start):
1157         (ClockGeneric::stop):
1158         * platform/ClockGeneric.h: Renamed from Source/WebCore/platform/posix/PlatformClockPOSIX.h.
1159         (WebCore::ClockGeneric::playRate):
1160         (WebCore::ClockGeneric::isRunning):
1161
1162         Boilerplate project file changes:
1163         * CMakeLists.txt:
1164         * Target.pri:
1165         * WebCore.gypi:
1166         * WebCore.xcodeproj/project.pbxproj:
1167
1168 2011-11-07  Vangelis Kokkevis  <vangelis@chromium.org>
1169
1170         Create a separate setting for compositing of for scrollable [i]frames
1171         that forceCompositingMode can be used without turning frames into composited layers.
1172         https://bugs.webkit.org/show_bug.cgi?id=71714
1173
1174         Reviewed by James Robinson.
1175
1176         * page/Settings.cpp:
1177         (WebCore::Settings::Settings):
1178         * page/Settings.h:
1179         (WebCore::Settings::setAcceleratedCompositingForScrollableFramesEnabled):
1180         (WebCore::Settings::acceleratedCompositingForScrollableFramesEnabled):
1181         * rendering/RenderLayerCompositor.cpp:
1182         (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
1183         * testing/Internals.cpp:
1184         (WebCore::Internals::setEnableCompositingForScrollableFrames):
1185         * testing/Internals.h:
1186         * testing/Internals.idl:
1187
1188 2011-11-07  Rafael Weinstein  <rafaelw@chromium.org>
1189
1190         [MutationObservers] Fix mac build (with mutation_observers enabled)
1191         https://bugs.webkit.org/show_bug.cgi?id=71728
1192
1193         Reviewed by Tony Chang.
1194
1195         Errant forward declaration of MutationObserverRegistration removed from
1196         Node.h this would have broken a port that tried to build with mutation_observers=1.
1197
1198         * dom/Node.h:
1199
1200 2011-11-07  Kentaro Hara  <haraken@chromium.org>
1201
1202         Remove [CustomGetter] IDL from 'HTMLAudioElementConstructor' of V8
1203         https://bugs.webkit.org/show_bug.cgi?id=71660
1204
1205         Reviewed by Adam Barth.
1206
1207         Currently, "new Audio()" uses a custom getter to get the template
1208         of 'HTMLAudioElementConstructor'. However, this getter does not need to
1209         be custom and can use a default getter 'DOMWindowInternal::DOMWindowConstructorGetter'.
1210
1211         Tests: fast/js/custom-constructors.html
1212                media/audio-constructor.html
1213                media/audio-constructor-src.html
1214                media/audio-constructor-preload.html
1215                media/audio-controls-do-not-fade-out.html
1216                media/audio-controls-rendering.html
1217
1218         * bindings/v8/custom/V8DOMWindowCustom.cpp: Removed a custom getter.
1219         * page/DOMWindow.idl: Removed [CustomGetter] IDL from 'HTMLAudioElementConstructor' of V8. Renamed 'HTMLAudioElementConstructor' to 'HTMLAudioElementConstructorConstructor' in order to make 'new Audio()' use the template of (not 'HTMLAudioElement' but) 'HTMLAudioElementConstructor'. Note that CodeGenerator*.pm strips /Constructor$/ from an IDL type.
1220         * bindings/scripts/CodeGeneratorJS.pm:
1221         (GenerateImplementation): If an IDL type is 'XXXXConstructorConstructor', then we do not add a header file 'XXXXConstructor.h' to JSDOMWindow.cpp, because the NamedConstructor declaration is written in the header file of class XXXX 'XXXX.h'. Incidentally, the reason why CodeGeneratorV8.pm does not need a corresponding change is that V8 is still generating the NamedConstructor declaration in its dedicated header file 'XXXXConstructor.h'. This V8 issue will be fixed in the upcoming patch that implements [NamedConstructor] IDL in V8.
1222
1223 2011-11-07  Robert Sesek  <rsesek@chromium.org>
1224
1225         [chromium] Update WebCore.gyp to not use WebKitLibraries in include_dirs
1226         https://bugs.webkit.org/show_bug.cgi?id=71694
1227
1228         Reviewed by Adam Barth.
1229
1230         * WebCore.gyp/WebCore.gyp:
1231
1232 2011-11-07  Dominic Cooney  <dominicc@chromium.org>
1233
1234         Remove initPopStateEvent method
1235         https://bugs.webkit.org/show_bug.cgi?id=71691
1236
1237         Reviewed by Ojan Vafai.
1238
1239         * dom/PopStateEvent.cpp:
1240         * dom/PopStateEvent.h:
1241         * dom/PopStateEvent.idl:
1242
1243 2011-11-07  Andreas Kling  <kling@webkit.org>
1244
1245         CSSValue: Devirtualize isFooType().
1246         <http://webkit.org/b/71668>
1247
1248         Reviewed by Darin Adler.
1249
1250         Add a member to CSSValue to determine which subclass a given
1251         value object is, along with 5 bits to tell us whether the
1252         value is primitive/mutable/initial/inherited/a list.
1253
1254         All non-private subclass constructors now take CSSValue::ClassType
1255         as their first argument. A few constructors were duplicated as
1256         private members to allow calling them from ::create() methods
1257         without passing an explicit ClassType.
1258
1259         Furthermore, since CSSValue::cssValueType() can be inferred from
1260         the subclass type, we compute it instead of storing it in a member.
1261
1262         * CMakeLists.txt:
1263         * GNUmakefile.list.am:
1264         * Target.pri:
1265         * WebCore.gypi:
1266         * WebCore.vcproj/WebCore.vcproj:
1267         * WebCore.xcodeproj/project.pbxproj:
1268
1269             Adding CSSValue.cpp.
1270
1271         * css/CSSValue.cpp: Added.
1272         (WebCore::CSSValue::cssValueType):
1273
1274             Out-of-line implementation of this method. Only used by CSSOM.
1275
1276         * css/CSSValue.h:
1277         (WebCore::CSSValue::isMutableValue):
1278         (WebCore::CSSValue::isPrimitiveValue):
1279         (WebCore::CSSValue::isValueList):
1280         (WebCore::CSSValue::isInitialValue):
1281         (WebCore::CSSValue::isInheritedValue):
1282         (WebCore::CSSValue::isBorderImageValue):
1283         (WebCore::CSSValue::isBorderImageSliceValue):
1284         (WebCore::CSSValue::isCursorImageValue):
1285         (WebCore::CSSValue::isFontFamilyValue):
1286         (WebCore::CSSValue::isFontFeatureValue):
1287         (WebCore::CSSValue::isFontValue):
1288         (WebCore::CSSValue::isImageGeneratorValue):
1289         (WebCore::CSSValue::isImageValue):
1290         (WebCore::CSSValue::isImplicitInitialValue):
1291         (WebCore::CSSValue::isReflectValue):
1292         (WebCore::CSSValue::isShadowValue):
1293         (WebCore::CSSValue::isTimingFunctionValue):
1294         (WebCore::CSSValue::isWebKitCSSTransformValue):
1295         (WebCore::CSSValue::isCSSLineBoxContainValue):
1296         (WebCore::CSSValue::isFlexValue):
1297         (WebCore::CSSValue::isWebKitCSSFilterValue):
1298         (WebCore::CSSValue::isSVGColor):
1299         (WebCore::CSSValue::isSVGPaint):
1300         (WebCore::CSSValue::classType):
1301         (WebCore::CSSValue::CSSValue):
1302         (WebCore::CSSValue::isPrimitiveType):
1303         (WebCore::CSSValue::isListType):
1304         (WebCore::CSSValue::isMutableType):
1305         (WebCore::CSSValue::isInheritedType):
1306         (WebCore::CSSValue::isInitialType):
1307
1308             Store subclass type information into a member variable and
1309             made all the isFooValue() functions non-virtual and inline.
1310             Some subclass type lookups (primitive values, notably) are
1311             cached in a bool member on construction.
1312
1313         * css/CSSAspectRatioValue.h:
1314         (WebCore::CSSAspectRatioValue::CSSAspectRatioValue):
1315         * css/CSSBorderImageSliceValue.cpp:
1316         (WebCore::CSSBorderImageSliceValue::CSSBorderImageSliceValue):
1317         * css/CSSBorderImageSliceValue.h:
1318         * css/CSSBorderImageValue.cpp:
1319         (WebCore::CSSBorderImageValue::CSSBorderImageValue):
1320         * css/CSSBorderImageValue.h:
1321         * css/CSSCanvasValue.h:
1322         (WebCore::CSSCanvasValue::CSSCanvasValue):
1323         * css/CSSCrossfadeValue.h:
1324         (WebCore::CSSCrossfadeValue::CSSCrossfadeValue):
1325         * css/CSSCursorImageValue.cpp:
1326         (WebCore::CSSCursorImageValue::CSSCursorImageValue):
1327         * css/CSSCursorImageValue.h:
1328         * css/CSSFlexValue.h:
1329         (WebCore::CSSFlexValue::CSSFlexValue):
1330         * css/CSSFontFaceSrcValue.h:
1331         (WebCore::CSSFontFaceSrcValue::CSSFontFaceSrcValue):
1332         * css/CSSFunctionValue.cpp:
1333         (WebCore::CSSFunctionValue::CSSFunctionValue):
1334         * css/CSSGradientValue.h:
1335         (WebCore::CSSGradientValue::isLinearGradient):
1336         (WebCore::CSSGradientValue::isRadialGradient):
1337         (WebCore::CSSGradientValue::CSSGradientValue):
1338         (WebCore::CSSLinearGradientValue::CSSLinearGradientValue):
1339         (WebCore::CSSRadialGradientValue::CSSRadialGradientValue):
1340         * css/CSSImageGeneratorValue.cpp:
1341         (WebCore::CSSImageGeneratorValue::CSSImageGeneratorValue):
1342         * css/CSSImageGeneratorValue.h:
1343         * css/CSSImageValue.cpp:
1344         (WebCore::CSSImageValue::CSSImageValue):
1345         * css/CSSImageValue.h:
1346         * css/CSSInheritedValue.h:
1347         (WebCore::CSSInheritedValue::CSSInheritedValue):
1348         * css/CSSInitialValue.h:
1349         (WebCore::CSSInitialValue::CSSInitialValue):
1350         (WebCore::CSSInitialValue::create):
1351         * css/CSSLineBoxContainValue.cpp:
1352         (WebCore::CSSLineBoxContainValue::CSSLineBoxContainValue):
1353         * css/CSSLineBoxContainValue.h:
1354         * css/CSSMutableValue.h:
1355         (WebCore::CSSMutableValue::CSSMutableValue):
1356         * css/CSSPrimitiveValue.cpp:
1357         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1358         * css/CSSPrimitiveValue.h:
1359         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1360         * css/CSSPrimitiveValueMappings.h:
1361         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1362         * css/CSSReflectValue.h:
1363         (WebCore::CSSReflectValue::CSSReflectValue):
1364         * css/CSSTimingFunctionValue.h:
1365         (WebCore::CSSTimingFunctionValue::isLinearTimingFunctionValue):
1366         (WebCore::CSSTimingFunctionValue::isCubicBezierTimingFunctionValue):
1367         (WebCore::CSSTimingFunctionValue::isStepsTimingFunctionValue):
1368         (WebCore::CSSTimingFunctionValue::CSSTimingFunctionValue):
1369         (WebCore::CSSLinearTimingFunctionValue::CSSLinearTimingFunctionValue):
1370         (WebCore::CSSCubicBezierTimingFunctionValue::CSSCubicBezierTimingFunctionValue):
1371         (WebCore::CSSStepsTimingFunctionValue::CSSStepsTimingFunctionValue):
1372         * css/CSSUnicodeRangeValue.h:
1373         (WebCore::CSSUnicodeRangeValue::CSSUnicodeRangeValue):
1374         * css/CSSValueList.cpp:
1375         (WebCore::CSSValueList::CSSValueList):
1376         * css/CSSValueList.h:
1377         * css/FontFamilyValue.cpp:
1378         (WebCore::FontFamilyValue::FontFamilyValue):
1379         * css/FontFamilyValue.h:
1380         * css/FontFeatureValue.cpp:
1381         (WebCore::FontFeatureValue::FontFeatureValue):
1382         * css/FontFeatureValue.h:
1383         * css/FontValue.h:
1384         (WebCore::FontValue::FontValue):
1385         * css/ShadowValue.cpp:
1386         (WebCore::ShadowValue::ShadowValue):
1387         * css/ShadowValue.h:
1388         * css/WebKitCSSFilterValue.cpp:
1389         (WebCore::WebKitCSSFilterValue::WebKitCSSFilterValue):
1390         * css/WebKitCSSFilterValue.h:
1391         * css/WebKitCSSTransformValue.cpp:
1392         (WebCore::WebKitCSSTransformValue::WebKitCSSTransformValue):
1393         * css/WebKitCSSTransformValue.h:
1394         * svg/SVGColor.cpp:
1395         (WebCore::SVGColor::SVGColor):
1396         * svg/SVGColor.h:
1397         * svg/SVGPaint.cpp:
1398         (WebCore::SVGPaint::SVGPaint):
1399         * svg/SVGPaint.h:
1400
1401             Propagate subclass type information and kill isFooType() virtuals.
1402
1403 2011-11-07  Mihnea Ovidenie  <mihnea@adobe.com>
1404
1405         Leaks seen in RenderRegion::setRenderBoxRegionInfo on Leaks bot
1406         https://bugs.webkit.org/show_bug.cgi?id=71259
1407
1408         Reviewed by Darin Adler.
1409
1410         Leak fixes covered by existing tests.
1411
1412         * rendering/RenderFlowThread.cpp:
1413         (WebCore::RenderFlowThread::logicalWidthChangedInRegions):
1414         The RenderBoxRegionInfo taken out of RenderRegion must be deleted on all code paths.
1415         * rendering/RenderRegion.cpp:
1416         (WebCore::RenderRegion::removeRenderBoxRegionInfo):
1417         The RenderBoxRegionInfo map owns the values, therefore, when values are removed from map
1418         they must also be deleted.
1419
1420 2011-11-07  Adam Barth  <abarth@webkit.org>
1421
1422         iframe sandbox treats vertical tab as a valid delimiter
1423         https://bugs.webkit.org/show_bug.cgi?id=71704
1424
1425         Reviewed by Eric Seidel.
1426
1427         This patch adjusts our parser slightly to match the HTML5 spec.  The
1428         only difference is in how we handle vertical tabs.  Previously, we
1429         treated them as a delimiter, but we're not supposed to do that.
1430
1431         Test: fast/frames/sandboxed-iframe-parsing-space-characters.html
1432
1433         * page/SecurityOrigin.cpp:
1434         (WebCore::SecurityOrigin::parseSandboxPolicy):
1435
1436 2011-11-07  Adam Barth  <abarth@webkit.org>
1437
1438         Factor SecurityContext out of ScriptExecutionContext
1439         https://bugs.webkit.org/show_bug.cgi?id=71721
1440
1441         Reviewed by Eric Seidel.
1442
1443         The new SecurityContext object lets us tightly scope control of
1444         the security-critical information in ScriptExecutionContext.
1445         Originally I had hoped to put all this state on SecurityOrigin, but
1446         SecurityOrigin gets shared between documents in some corner cases, so
1447         it's not a good fit for state like the sandbox flags and the CSP policy
1448         that really needs to be per-document.
1449
1450         * CMakeLists.txt:
1451         * GNUmakefile.list.am:
1452         * Target.pri:
1453         * WebCore.gypi:
1454         * WebCore.vcproj/WebCore.vcproj:
1455         * WebCore.xcodeproj/project.pbxproj:
1456         * dom/DOMAllInOne.cpp:
1457         * dom/ScriptExecutionContext.cpp:
1458         (WebCore::ScriptExecutionContext::ScriptExecutionContext):
1459         * dom/ScriptExecutionContext.h:
1460         * loader/FrameLoader.h:
1461         * loader/FrameLoaderTypes.h:
1462         * page/SecurityOrigin.h:
1463
1464 2011-11-07  Kentaro Hara  <haraken@chromium.org>
1465
1466         Refactor CodeGeneratorV8.pm before making a core change for bug 71093.
1467         https://bugs.webkit.org/show_bug.cgi?id=71659
1468
1469         Reviewed by Adam Barth.
1470
1471         Just refactor CodeGeneratorV8.pm without any change in behavior,
1472         as the first step for fixing bug 71093.
1473
1474         Tests: WebCore/bindings/scripts/test/TestObj.idl
1475                WebCore/bindings/scripts/test/TestInterface.idl
1476
1477         * bindings/scripts/CodeGeneratorV8.pm:
1478         (GenerateHeader): Sort generated headers in alphabetical order. Removed unnecessary variable names from method signatures. These changes are for silencing style check errors when a new TestXXXX.idl is added.
1479         (GenerateConstructorCallback): Renamed variables to clarify their roles.
1480         (WriteData): Removed an unused array @implHeaderContent.
1481         * bindings/scripts/test/V8/V8TestInterface.h: Updated a run-binding-tests result.
1482         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: Ditto.
1483         * bindings/scripts/test/V8/V8TestObj.h: Ditto.
1484         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: Ditto.
1485
1486 2011-11-07  Ken Buchanan <kenrb@chromium.org>
1487
1488         Crash due to mixed direction text runs
1489         https://bugs.webkit.org/show_bug.cgi?id=66015
1490
1491         Reviewed by David Hyatt.
1492
1493         Test for bug fix.
1494
1495         * fast/text/international/bidi-neutral-in-mixed-direction-run-crash.html: Added
1496         * fast/text/international/bidi-neutral-in-mixed-direction-run-cras-expected.txt: Added
1497
1498 2011-11-07  Tim Horton  <timothy_horton@apple.com>
1499
1500         getBBox() on a SVGPathElement with curves incorrectly includes control points
1501         https://bugs.webkit.org/show_bug.cgi?id=53512
1502         <rdar://problem/9861154>
1503
1504         Reviewed by Oliver Hunt.
1505
1506         Split Path::boundingRect() into two, adding Path::fastBoundingRect()
1507         for a rough estimate of the bounding rect (always equal to or larger
1508         than boundingRect()). fastBoundingRect() currently falls back to
1509         boundingRect() for all ports besides CG, though in most cases
1510         (on a port-by-port basis) the current implementation of boundingRect()
1511         will need to become fastBoundingRect(), and a new, more accurate method will
1512         be implemented for boundingRect().
1513
1514         All previous callers of boundingRect() are transitioned to using fastBoundingRect()
1515         except SVGPathElement::getBBox, which wants an accurate bounding box.
1516
1517         The CoreGraphics implementation of Path::boundingRect() called
1518         CGPathGetBoundingBox, which includes the path's control points in its
1519         calculations. Snow Leopard added CGPathGetPathBoundingBox, which
1520         finds the bounding box of only points within the path, and does not
1521         include control points. On Snow Leopard and above, we now use the latter.
1522
1523         Test: svg/custom/getBBox-path.svg
1524
1525         * html/HTMLAreaElement.cpp:
1526         * html/canvas/CanvasRenderingContext2D.cpp:
1527         * platform/graphics/Path.cpp:
1528         * platform/graphics/Path.h:
1529         * platform/graphics/cg/GraphicsContextCG.cpp:
1530         * platform/graphics/cg/PathCG.cpp:
1531         (WebCore::Path::boundingRect):
1532         * rendering/RenderObject.h:
1533         * rendering/svg/RenderSVGPath.cpp:
1534         * svg/SVGPathElement.cpp:
1535         * svg/SVGPathElement.h:
1536
1537 2011-11-07  Vsevolod Vlasov  <vsevik@chromium.org>
1538
1539         Web Inspector: Suggest box should be open immediately if forced by Ctrl+Space.
1540         https://bugs.webkit.org/show_bug.cgi?id=71710
1541
1542         Reviewed by Pavel Feldman.
1543
1544         * inspector/front-end/TextPrompt.js:
1545         (WebInspector.TextPrompt.prototype.clearAutoComplete):
1546         (WebInspector.TextPrompt.prototype.autoCompleteSoon):
1547
1548 2011-11-07  vsevik@chromium.org  <vsevik@chromium.org>
1549
1550         Web Inspector: Suggest box should consume enter key pressed event.
1551         https://bugs.webkit.org/show_bug.cgi?id=71700
1552
1553         Reviewed by Pavel Feldman.
1554
1555         * inspector/front-end/ConsoleView.js:
1556         (WebInspector.ConsoleView):
1557         * inspector/front-end/TextPrompt.js:
1558         (WebInspector.TextPrompt.prototype._attachInternal):
1559         (WebInspector.TextPrompt.SuggestBox.prototype.enterKeyPressed):
1560
1561 2011-11-07  David Barr  <davidbarr@chromium.org>
1562
1563         Optimize outline rendering to avoid transparency layers
1564         https://bugs.webkit.org/show_bug.cgi?id=60750
1565
1566         Add fast path for solid block outlines with alpha.
1567         Improve readability of piecewise path while at it.
1568
1569         Reviewed by Simon Fraser.
1570
1571         No intended change in behaviour, no new tests.
1572
1573         * rendering/RenderObject.cpp:
1574         (WebCore::RenderObject::paintOutline):
1575
1576 2011-11-07  Vsevolod Vlasov  <vsevik@chromium.org>
1577
1578         Web Inspector: Suggest box should not accept suggestion on space key pressed.
1579         https://bugs.webkit.org/show_bug.cgi?id=71706
1580
1581         Reviewed by Pavel Feldman.
1582
1583         * inspector/front-end/TextPrompt.js:
1584         (WebInspector.TextPrompt.prototype.onKeyDown):
1585         (WebInspector.TextPrompt.SuggestBox.prototype.tabKeyPressed):
1586
1587 2011-11-07  Andreas Kling  <kling@webkit.org>
1588
1589         Don't use CSSOM's CSSValue.cssValueType internally in WebCore.
1590         <http://webkit.org/b/71679>
1591
1592         Reviewed by Darin Adler.
1593
1594         Swap out cssValueType() usage for isPrimitiveValue(), isInitialValue()
1595         and isInheritedValue() to increase code clarity.
1596
1597         The plan is to turn cssValueType() into a computed value based on the
1598         CSSValue subclass (coming soon to <http://webkit.org/b/71668>.)
1599         This is a clean-up in preparation for that.
1600
1601         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1602         (WebCore::JSCSSStyleDeclaration::nameGetter):
1603         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
1604         (WebCore::V8CSSStyleDeclaration::namedPropertyGetter):
1605         * css/CSSInheritedValue.h:
1606         (WebCore::CSSInheritedValue::isInheritedValue):
1607         * css/CSSInitialValue.h:
1608         (WebCore::CSSInitialValue::isInitialValue):
1609         * css/CSSParser.cpp:
1610         (WebCore::CSSParser::parseColor):
1611         * css/CSSStyleSelector.cpp:
1612         (WebCore::CSSStyleSelector::applyDeclaration):
1613         (WebCore::CSSStyleSelector::applyProperty):
1614         (WebCore::CSSStyleSelector::mapFillAttachment):
1615         (WebCore::CSSStyleSelector::mapFillClip):
1616         (WebCore::CSSStyleSelector::mapFillComposite):
1617         (WebCore::CSSStyleSelector::mapFillOrigin):
1618         (WebCore::CSSStyleSelector::mapFillImage):
1619         (WebCore::CSSStyleSelector::mapFillRepeatX):
1620         (WebCore::CSSStyleSelector::mapFillRepeatY):
1621         (WebCore::CSSStyleSelector::mapFillSize):
1622         (WebCore::CSSStyleSelector::mapFillXPosition):
1623         (WebCore::CSSStyleSelector::mapFillYPosition):
1624         (WebCore::CSSStyleSelector::mapAnimationDelay):
1625         (WebCore::CSSStyleSelector::mapAnimationDirection):
1626         (WebCore::CSSStyleSelector::mapAnimationDuration):
1627         (WebCore::CSSStyleSelector::mapAnimationFillMode):
1628         (WebCore::CSSStyleSelector::mapAnimationIterationCount):
1629         (WebCore::CSSStyleSelector::mapAnimationName):
1630         (WebCore::CSSStyleSelector::mapAnimationPlayState):
1631         (WebCore::CSSStyleSelector::mapAnimationProperty):
1632         (WebCore::CSSStyleSelector::mapAnimationTimingFunction):
1633         * css/CSSValue.h:
1634         (WebCore::CSSValue::isInheritedValue):
1635         (WebCore::CSSValue::isInitialValue):
1636         * css/SVGCSSStyleSelector.cpp:
1637         (WebCore::CSSStyleSelector::applySVGProperty):
1638         * editing/EditingStyle.cpp:
1639         (WebCore::EditingStyle::extractFontSizeDelta):
1640         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
1641
1642 2011-11-07  Sheriff Bot  <webkit.review.bot@gmail.com>
1643
1644         Unreviewed, rolling out r99432.
1645         http://trac.webkit.org/changeset/99432
1646         https://bugs.webkit.org/show_bug.cgi?id=71709
1647
1648         It made layout tests extra slow on all bots (Requested by
1649         Ossy_night on #webkit).
1650
1651         * inspector/front-end/ConsoleView.js:
1652         (WebInspector.ConsoleView):
1653         * inspector/front-end/TextPrompt.js:
1654         (WebInspector.TextPrompt.prototype._attachInternal):
1655         (WebInspector.TextPrompt.SuggestBox.prototype.enterKeyPressed):
1656
1657 2011-11-07  Andreas Kling  <kling@webkit.org>
1658
1659         REGRESSION(r99409): Broke transitions/clip-transition.html
1660         <http://webkit.org/b/71692>
1661
1662         Reviewed by Darin Adler.
1663
1664         Add missing base class initializers to CSSPrimitiveValue constructors.
1665         This was causing some CSSPrimitiveValues to masquerade as CSS_CUSTOM values.
1666
1667         * css/CSSPrimitiveValue.h:
1668         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1669         * css/CSSPrimitiveValueMappings.h:
1670         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1671
1672 2011-11-07  ChangSeok Oh  <shivamidow@gmail.com>
1673
1674         [EFL] Support requestAnimationFrame API
1675         https://bugs.webkit.org/show_bug.cgi?id=67112
1676
1677         Reviewed by Andreas Kling.
1678
1679         Add some files to build-target when enabling requestAnimationFrame option.
1680
1681         fast/animation/request-animation-frame-cancel.html
1682         fast/animation/request-animation-frame-cancel2.html
1683         fast/animation/request-animation-frame-display.html
1684         fast/animation/request-animation-frame-during-modal.html
1685         fast/animation/request-animation-frame-timestamps.html
1686         fast/animation/request-animation-frame-within-callback.html
1687         fast/animation/request-animation-frame.html
1688
1689         * CMakeLists.txt:
1690         * UseJSC.cmake:
1691
1692 2011-11-07  Sam Weinig  <sam@webkit.org>
1693
1694         Add missing .in and .pl files to the Xcode project for easy access.
1695
1696         Reviewed by Eric Carlson.
1697
1698         * WebCore.xcodeproj/project.pbxproj:
1699         Add some missing files to the Xcode project.
1700
1701 2011-11-07  Jessie Berlin  <jberlin@apple.com>
1702
1703         Need a way to allow a scheme access to Local Storage and Databases while Private Browsing is
1704         enabled.
1705         https://bugs.webkit.org/show_bug.cgi?id=71631
1706
1707         Reviewed by Jon Honeycutt.
1708
1709         Check the SchemeRegistry before preventing read/write access to Local Storage and Databases
1710         in Private Browsing.
1711
1712         * WebCore.exp.in:
1713         Export the symbols for registering the schemes as allowing Local Storage and Database access
1714         in Private Browsing.
1715
1716         * dom/Document.cpp:
1717         (WebCore::Document::allowDatabaseAccess):
1718         Check if the scheme allows Database access in Private Browsing.
1719
1720         * platform/SchemeRegistry.cpp:
1721         (WebCore::schemesAllowingLocalStorageAccessInPrivateBrowsing):
1722         (WebCore::schemesAllowingDatabaseAccessInPrivateBrowsing):
1723         (WebCore::SchemeRegistry::registerURLSchemeAsAllowingLocalStorageAccessInPrivateBrowsing):
1724         (WebCore::SchemeRegistry::allowsLocalStorageAccessInPrivateBrowsing):
1725         (WebCore::SchemeRegistry::registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing):
1726         (WebCore::SchemeRegistry::allowsDatabaseAccessInPrivateBrowsing):
1727         * platform/SchemeRegistry.h:
1728
1729         * storage/Storage.cpp:
1730         (WebCore::Storage::length):
1731         Ask the storage area if it is disabled by Private Browsing in the frame instead of just
1732         checking if Private Browsing is enabled for that frame because the answer might depend on
1733         what type of storage that storage area is.
1734         (WebCore::Storage::key):
1735         Ditto.
1736         (WebCore::Storage::getItem):
1737         Ditto.
1738         (WebCore::Storage::contains):
1739         Ditto.
1740
1741         * storage/StorageArea.h:
1742         Make it possible to query a StorageArea for whether it is disabled by Private Browsing in a
1743         Frame.
1744         * storage/StorageAreaImpl.cpp:
1745         (WebCore::StorageAreaImpl::disabledByPrivateBrowsingInFrame):
1746         Renamed from privateBrowsingEnabled.
1747         Check not only if Private Browsing is enabled for the Frame, but also if the storage type is
1748         Local Storage and if there is an exception for the scheme of the resource currently loaded
1749         into the Frame.
1750         (WebCore::StorageAreaImpl::setItem):
1751         Renamed privateBrowsingEnabled -> disabledByPrivateBrowsingInFrame.
1752         (WebCore::StorageAreaImpl::removeItem):
1753         Ditto.
1754         (WebCore::StorageAreaImpl::clear):
1755         Ditto.
1756         * storage/StorageAreaImpl.h:
1757
1758 2011-11-07  Dominic Cooney  <dominicc@chromium.org>
1759
1760         Remove initCloseEvent method
1761         https://bugs.webkit.org/show_bug.cgi?id=71374
1762
1763         Reviewed by Ojan Vafai.
1764
1765         Test: fast/dom/Window/window-properties.html
1766
1767         * websockets/CloseEvent.h:
1768         (WebCore::CloseEvent::initCloseEvent):
1769         * websockets/CloseEvent.idl:
1770
1771 2011-11-07  Anders Carlsson  <andersca@apple.com>
1772
1773         Simplify NetscapePlugin::convertPoint and make it work (in theory) with transformed plug-ins
1774         https://bugs.webkit.org/show_bug.cgi?id=71699
1775
1776         Reviewed by Sam Weinig.
1777
1778         Export AffineTransform symbols used by WebKit2.
1779
1780         * WebCore.exp.in:
1781
1782 2011-11-07  Michael Saboff  <msaboff@apple.com>
1783
1784         Towards 8 Bit Strings: Templatize JSC::Lexer class by character type
1785         https://bugs.webkit.org/show_bug.cgi?id=71331
1786
1787         Changed the SourceProvider::data() virtual method to return a
1788         StringImpl* instead of a UChar*.
1789         Changed Identifier() constructor to use JSGlobalData*.
1790
1791         Reviewed by Darin Adler.
1792
1793         No new tests - refactored SourceProvider class and sub-classes.
1794
1795         * bindings/js/CachedScriptSourceProvider.h:
1796         (WebCore::CachedScriptSourceProvider::stringData):
1797         * bindings/js/StringSourceProvider.h:
1798         (WebCore::StringSourceProvider::stringData):
1799         * bridge/qt/qt_runtime.cpp:
1800         (JSC::Bindings::convertQVariantToValue):
1801
1802 2011-11-07  Dominic Cooney  <dominicc@chromium.org>
1803
1804         Remove initOverflowEvent from JavaScript bindings
1805         https://bugs.webkit.org/show_bug.cgi?id=71687
1806
1807         Reviewed by Ojan Vafai.
1808
1809         Now that OverflowEvent has a constructor, we don't need the
1810         initOverflowEvent method. It has to remain in the Objective C
1811         binding because it is part of the Objective C public API.
1812
1813         * dom/OverflowEvent.idl:
1814
1815 2011-11-07  Noel Gordon  <noel.gordon@gmail.com>
1816
1817         Refactor canvas encoding mimeType validation
1818         https://bugs.webkit.org/show_bug.cgi?id=71651
1819
1820         Reviewed by Andreas Kling.
1821
1822         No new tests, refactoring only, covered by existing canvas tests.
1823
1824         * html/HTMLCanvasElement.cpp:
1825         (WebCore::HTMLCanvasElement::toEncodingMimeType): move encoder mimeType
1826         validation logic into a helper routine.
1827         (WebCore::HTMLCanvasElement::toDataURL):
1828         * html/HTMLCanvasElement.h:
1829
1830 2011-11-07  Vsevolod Vlasov  <vsevik@chromium.org>
1831
1832         Web Inspector: Suggest box should consume enter key pressed event.
1833         https://bugs.webkit.org/show_bug.cgi?id=71700
1834
1835         Reviewed by Pavel Feldman.
1836
1837         * inspector/front-end/ConsoleView.js:
1838         (WebInspector.ConsoleView):
1839         * inspector/front-end/TextPrompt.js:
1840         (WebInspector.TextPrompt.prototype._attachInternal):
1841         (WebInspector.TextPrompt.SuggestBox.prototype.enterKeyPressed):
1842
1843 2011-11-07  Dominic Cooney  <dominicc@chromium.org>
1844
1845         Remove initPageTransitionEvent method
1846         https://bugs.webkit.org/show_bug.cgi?id=71689
1847
1848         Reviewed by Ojan Vafai.
1849
1850         initPageTransitionEvent was removed from the HTML spec; it has
1851         been replaced by new PageTransitionEvent(...).
1852
1853         Removing a method, so no new tests.
1854
1855         * dom/PageTransitionEvent.cpp:
1856         * dom/PageTransitionEvent.h:
1857         * dom/PageTransitionEvent.idl:
1858
1859 2011-11-07  Alexander Pavlov  <apavlov@chromium.org>
1860
1861         Web Inspector: TextPrompt+SuggestBox should autocomplete on "Right" keydown and with a single suggestion in place
1862         https://bugs.webkit.org/show_bug.cgi?id=71676
1863
1864         Reviewed by Pavel Feldman.
1865
1866         * inspector/front-end/TextPrompt.js:
1867         (WebInspector.TextPrompt.prototype.onKeyDown):
1868         (WebInspector.TextPrompt.SuggestBox.prototype._updateItems):
1869         * inspector/front-end/inspectorCommon.css:
1870         (body): Revert inadvertent style change from a preceding commit.
1871
1872 2011-11-07  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
1873
1874         Fix the Qt build on Mac OS X when using the QuickTime media backend
1875
1876         When QtWebKit is built on Mac OS X using the QuickTime media backend
1877         we build both KURLCFNet.cpp and KURLMac, just like the Mac port, so
1878         we have to guard the potentially duplicate symbol createCFURL with
1879         more than just !PLATFORM(MAC).
1880
1881         Reviewed by Andreas Kling.
1882
1883         * platform/cf/KURLCFNet.cpp:
1884
1885 2011-11-07  Pavel Feldman  <pfeldman@google.com>
1886
1887         Not reviewed: follow up to r99407. Style the suggest box.
1888         https://bugs.webkit.org/show_bug.cgi?id=65511
1889
1890
1891         * inspector/front-end/TextPrompt.js:
1892         * inspector/front-end/inspector.css:
1893         * inspector/front-end/textPrompt.css:
1894
1895 2011-11-07  Roland Steiner  <rolandsteiner@chromium.org>
1896
1897         https://bugs.webkit.org/show_bug.cgi?id=70223
1898         CSSStyleSheet: finding the owner node should be in its own method
1899
1900         Add styleSheetOwnerNode() function that returns the owner Node of the style sheet, or 0.
1901
1902         Reviewed by Dimitri Glazkov.
1903
1904         No new tests. (refactoring)
1905
1906         * css/CSSStyleSheet.cpp:
1907         (WebCore::CSSStyleSheet::styleSheetOwnerNode):
1908         (WebCore::CSSStyleSheet::document):
1909         * css/CSSStyleSheet.h:
1910
1911 2011-11-07  Yury Semikhatsky  <yurys@chromium.org>
1912
1913         [Chromium] Web Inspector: use native worker inspector instead of fake workers
1914         https://bugs.webkit.org/show_bug.cgi?id=71670
1915
1916         Removed context menu option for switching between native and "fake" workers
1917         debugger. Native debugger is used by default on platforms that support it.
1918
1919         Reviewed by Pavel Feldman.
1920
1921         * English.lproj/localizedStrings.js:
1922         * inspector/front-end/ScriptsPanel.js:
1923         (WebInspector.ScriptsPanel.prototype._toggleFormatSource):
1924         * inspector/front-end/Settings.js:
1925         (WebInspector.Settings):
1926         * inspector/front-end/WorkersSidebarPane.js:
1927         (WebInspector.WorkerListSidebarPane):
1928         (WebInspector.WorkerListSidebarPane.prototype._autoattachToWorkersClicked):
1929         * inspector/front-end/scriptsPanel.css:
1930         (#shared-workers-list):
1931
1932 2011-11-07  Vsevolod Vlasov  <vsevik@chromium.org>
1933
1934         Web Inspector: Add advanced search shortcut to ShortcutsScreen.
1935         https://bugs.webkit.org/show_bug.cgi?id=71302
1936
1937         Reviewed by Pavel Feldman.
1938
1939         * English.lproj/localizedStrings.js:
1940         * inspector/front-end/AdvancedSearchController.js:
1941         (WebInspector.AdvancedSearchController.createShortcut):
1942         * inspector/front-end/inspector.js:
1943         (WebInspector._registerShortcuts):
1944
1945 2011-11-07  Andreas Kling  <kling@webkit.org>
1946
1947         CSSImageValue: Remove inheritance from CachedImageClient.
1948         <http://webkit.org/b/71675>
1949
1950         Reviewed by Antti Koivisto.
1951
1952         CSSImageValue doesn't actually use any of the CachedImageClient
1953         functionality, and holds a reference to the resource via the
1954         CachedResourceHandle in StyleCachedImage.
1955
1956         So we can safely remove the multiple inheritance and simplify
1957         the class.
1958
1959         * css/CSSImageValue.cpp:
1960         (WebCore::CSSImageValue::~CSSImageValue):
1961         (WebCore::CSSImageValue::cachedImage):
1962         (WebCore::CSSImageValue::clearCachedImage):
1963         * css/CSSImageValue.h:
1964
1965 2011-11-07  Andreas Kling  <kling@webkit.org>
1966
1967         CSSPrimitiveValue: Remove unused virtual function parseString().
1968         <http://webkit.org/b/71671>
1969
1970         Reviewed by Antti Koivisto.
1971
1972         * css/CSSPrimitiveValue.cpp:
1973         * css/CSSPrimitiveValue.h:
1974
1975 2011-11-07  Andrey Kosyakov  <caseq@chromium.org>
1976
1977         Web Inspector: use toString as the Date object description.
1978         https://bugs.webkit.org/show_bug.cgi?id=71605
1979
1980         Reviewed by Yury Semikhatsky.
1981
1982         Test: inspector/remote-object.html
1983
1984         * inspector/InjectedScriptSource.js:
1985         (.):
1986
1987 2011-10-26  Andrey Kosyakov  <caseq@chromium.org>
1988
1989         Web Inspector: [refactoring] get JS-specific methods out of SourceFrame
1990         https://bugs.webkit.org/show_bug.cgi?id=70885
1991
1992         Reviewed by Pavel Feldman.
1993
1994         No new tests, as there's no new functionality.
1995
1996         * inspector/front-end/JavaScriptSourceFrame.js:
1997         (WebInspector.JavaScriptSourceFrame):
1998         (WebInspector.JavaScriptSourceFrame.prototype.willHide):
1999         (WebInspector.JavaScriptSourceFrame.prototype.requestContent):
2000         (WebInspector.JavaScriptSourceFrame.prototype.canEditSource):
2001         (WebInspector.JavaScriptSourceFrame.prototype.suggestedFileName):
2002         (WebInspector.JavaScriptSourceFrame.prototype.editContent):
2003         (WebInspector.JavaScriptSourceFrame.prototype.contentChanged):
2004         (WebInspector.JavaScriptSourceFrame.prototype.setReadonly):
2005         (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu.addConditionalBreakpoint.didEditBreakpointCondition):
2006         (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu.):
2007         (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu.else.editBreakpointCondition.didEditBreakpointCondition):
2008         (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu.else):
2009         (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu):
2010         (WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu):
2011         (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged):
2012         (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
2013         (WebInspector.JavaScriptSourceFrame.prototype.cancelEditing):
2014         (WebInspector.JavaScriptSourceFrame.prototype.didEditContent):
2015         (WebInspector.JavaScriptSourceFrame.prototype._getPopoverAnchor):
2016         (WebInspector.JavaScriptSourceFrame.prototype._onShowPopover.showObjectPopover):
2017         (WebInspector.JavaScriptSourceFrame.prototype._onShowPopover):
2018         (WebInspector.JavaScriptSourceFrame.prototype._onHidePopover):
2019         (WebInspector.JavaScriptSourceFrame.prototype.addBreakpoint):
2020         (WebInspector.JavaScriptSourceFrame.prototype.removeBreakpoint):
2021         (WebInspector.JavaScriptSourceFrame.prototype._mouseDown):
2022         (WebInspector.JavaScriptSourceFrame.prototype._editBreakpointCondition.finishEditing):
2023         (WebInspector.JavaScriptSourceFrame.prototype._editBreakpointCondition):
2024         (WebInspector.JavaScriptSourceFrame.prototype._createConditionElement):
2025         (WebInspector.JavaScriptSourceFrame.prototype.setExecutionLine):
2026         (WebInspector.JavaScriptSourceFrame.prototype.clearExecutionLine):
2027         (WebInspector.JavaScriptSourceFrame.prototype._lineNumberAfterEditing):
2028         (WebInspector.JavaScriptSourceFrame.prototype._onTextViewerContentLoaded):
2029         (WebInspector.JavaScriptSourceFrameDelegate):
2030         (WebInspector.JavaScriptSourceFrameDelegate.prototype.requestContent):
2031         (WebInspector.JavaScriptSourceFrameDelegate.prototype.setBreakpoint):
2032         (WebInspector.JavaScriptSourceFrameDelegate.prototype.removeBreakpoint):
2033         (WebInspector.JavaScriptSourceFrameDelegate.prototype.updateBreakpoint):
2034         (WebInspector.JavaScriptSourceFrameDelegate.prototype.findBreakpoint):
2035         (WebInspector.JavaScriptSourceFrameDelegate.prototype.continueToLine):
2036         (WebInspector.JavaScriptSourceFrameDelegate.prototype.canEditScriptSource):
2037         (WebInspector.JavaScriptSourceFrameDelegate.prototype.setScriptSource):
2038         (WebInspector.JavaScriptSourceFrameDelegate.prototype.setScriptSourceIsBeingEdited):
2039         (WebInspector.JavaScriptSourceFrameDelegate.prototype.suggestedFileName):
2040         (WebInspector.JavaScriptSourceFrameDelegate.prototype.addToWatch):
2041         * inspector/front-end/ResourceView.js:
2042         (WebInspector.ResourceSourceFrame):
2043         * inspector/front-end/ScriptsPanel.js:
2044         (WebInspector.SourceFrameDelegateForScriptsPanel):
2045         * inspector/front-end/SourceFrame.js:
2046         (WebInspector.SourceFrame):
2047         (WebInspector.SourceFrame.prototype.willHide):
2048         (WebInspector.SourceFrame.prototype.get textViewer):
2049         (WebInspector.SourceFrame.prototype.requestContent):
2050         (WebInspector.SourceFrame.prototype._saveViewerState):
2051         (WebInspector.SourceFrame.prototype._restoreViewerState):
2052         (WebInspector.SourceFrame.prototype.beforeTextChanged):
2053         (WebInspector.SourceFrame.prototype.afterTextChanged):
2054         (WebInspector.SourceFrame.prototype._initializeTextViewer):
2055         (WebInspector.SourceFrame.prototype.populateLineGutterContextMenu):
2056         (WebInspector.SourceFrame.prototype.suggestedFileName):
2057         (WebInspector.SourceFrame.prototype.canEditSource):
2058         (WebInspector.SourceFrame.prototype.startEditing):
2059         (WebInspector.SourceFrame.prototype.commitEditing):
2060         (WebInspector.SourceFrame.prototype.didEditContent):
2061         (WebInspector.SourceFrame.prototype.editContent):
2062         (WebInspector.SourceFrame.prototype.cancelEditing):
2063         (WebInspector.SourceFrame.prototype.setReadOnly):
2064         * inspector/front-end/inspector.html:
2065
2066 2011-11-06  Andreas Kling  <kling@webkit.org>
2067
2068         CSSValue: Devirtualize cssValueType().
2069         <http://webkit.org/b/71667>
2070
2071         Reviewed by Antti Koivisto.
2072
2073         Keep the cssValueType in a CSSValue member instead of using
2074         virtual functions.
2075
2076         This is part of a project to completely devirtualize CSSValue
2077         <http://webkit.org/b/71666> and will incur a temporary object
2078         size regression for CSSValue while the work is ongoing.
2079
2080         * css/CSSInheritedValue.cpp:
2081         * css/CSSInheritedValue.h:
2082         (WebCore::CSSInheritedValue::CSSInheritedValue):
2083         * css/CSSInitialValue.cpp:
2084         * css/CSSInitialValue.h:
2085         (WebCore::CSSInitialValue::CSSInitialValue):
2086         * css/CSSPrimitiveValue.cpp:
2087         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2088         * css/CSSPrimitiveValue.h:
2089         * css/CSSValue.h:
2090         (WebCore::CSSValue::cssValueType):
2091         (WebCore::CSSValue::CSSValue):
2092         * css/CSSValueList.cpp:
2093         (WebCore::CSSValueList::CSSValueList):
2094         * css/CSSValueList.h:
2095
2096 2011-11-07  Pavel Feldman  <pfeldman@chromium.org>
2097
2098         Web Inspector: introduce UserAgent override setting.
2099         https://bugs.webkit.org/show_bug.cgi?id=71627
2100
2101         Reviewed by Yury Semikhatsky.
2102
2103         * English.lproj/localizedStrings.js:
2104         * inspector/InspectorResourceAgent.cpp:
2105         (WebCore::InspectorResourceAgent::clearFrontend):
2106         (WebCore::InspectorResourceAgent::applyUserAgentOverride):
2107         (WebCore::InspectorResourceAgent::setUserAgentOverride):
2108         * inspector/front-end/HelpScreen.js:
2109         (WebInspector.HelpScreen):
2110         (WebInspector.HelpScreen.prototype.show):
2111         (WebInspector.HelpScreen.prototype._onBlur):
2112         * inspector/front-end/NetworkManager.js:
2113         (WebInspector.NetworkManager.prototype._cacheDisabledSettingChanged):
2114         (WebInspector.NetworkManager.prototype._userAgentSettingChanged):
2115         * inspector/front-end/Settings.js:
2116         (WebInspector.Settings):
2117         * inspector/front-end/SettingsScreen.js:
2118         (WebInspector.SettingsScreen):
2119         (WebInspector.SettingsScreen.prototype._createSelectSetting.get for):
2120         (WebInspector.SettingsScreen.prototype._createCustomSetting):
2121         (WebInspector.SettingsScreen.prototype._createUserActionControl.checkboxClicked):
2122         (WebInspector.SettingsScreen.prototype._createUserAgentSelectRowElement.get const):
2123         (WebInspector.SettingsScreen.prototype._createUserAgentSelectRowElement.textDoubleClicked):
2124         (WebInspector.SettingsScreen.prototype._createUserAgentSelectRowElement.textChanged):
2125         * inspector/front-end/helpScreen.css:
2126         (.help-table td):
2127         (.help-content fieldset label):
2128
2129 2011-11-07  Alexander Pavlov  <apavlov@chromium.org>
2130
2131         Web Inspector: autocomplete combobox for Styles sidebar and Console.
2132         https://bugs.webkit.org/show_bug.cgi?id=65511
2133
2134         Reviewed by Pavel Feldman.
2135
2136         * inspector/front-end/ConsoleView.js:
2137         (WebInspector.ConsoleView):
2138         * inspector/front-end/StylesSidebarPane.js:
2139         (WebInspector.StylePropertyTreeElement.prototype):
2140         ():
2141         * inspector/front-end/TextPrompt.js:
2142         (WebInspector.TextPrompt):
2143         (WebInspector.TextPrompt.prototype.setSuggestBoxEnabled):
2144         (WebInspector.TextPrompt.prototype._attachInternal):
2145         (WebInspector.TextPrompt.prototype.applySuggestion):
2146         (WebInspector.TextPrompt.prototype.acceptSuggestion):
2147         (WebInspector.TextPromptWithHistory):
2148         * inspector/front-end/inspector.css:
2149         (.suggest-box.generic-suggest):
2150         (.suggest-box.generic-suggest.above-anchor):
2151         (.suggest-box.generic-suggest .content):
2152
2153 2011-11-07  Pavel Feldman  <pfeldman@chromium.org>
2154
2155         Web Inspector: split script-formatter test into multiple tests.
2156         https://bugs.webkit.org/show_bug.cgi?id=71607
2157
2158         Reviewed by Yury Semikhatsky.
2159
2160         Tests: inspector/debugger/script-formatter-breakpoints.html
2161                inspector/debugger/script-formatter-console.html
2162
2163         * inspector/front-end/ScriptsPanel.js:
2164         (WebInspector.ScriptsPanel.prototype._removeSourceFrame):
2165
2166 2011-11-07  Keishi Hattori  <keishi@webkit.org>
2167
2168         Change ColorChooser from singleton to ordinary object
2169         https://bugs.webkit.org/show_bug.cgi?id=71644
2170
2171         Reviewed by Kent Tamura.
2172
2173         Changing WebCore::ColorChooser from a singleton to an ordinary object can broaden how browsers implement the color chooser interface.
2174
2175         * WebCore.exp.in:
2176         * html/ColorInputType.cpp:
2177         (WebCore::ColorInputType::~ColorInputType):
2178         (WebCore::ColorInputType::setValue): If a chooser exists, calls Chrome::setSelectedColorInColorChooser
2179         (WebCore::ColorInputType::handleDOMActivateEvent):
2180         (WebCore::ColorInputType::detach):
2181         (WebCore::ColorInputType::didCleanup): Called after cleanup is complete.
2182         (WebCore::ColorInputType::cleanupColorChooser): Renamed from cleanupColorChooserIfCurrentClient.
2183         * html/ColorInputType.h:
2184         * html/HTMLInputElement.cpp:
2185         (WebCore::HTMLInputElement::selectColorInColorChooser):
2186         * html/HTMLInputElement.h:
2187         * loader/EmptyClients.h:
2188         (WebCore::EmptyChromeClient::cleanupColorChooser): Added colorChooser argument because there are many WebCore::ColorChoosers now.
2189         (WebCore::EmptyChromeClient::setSelectedColorInColorChooser): Ditto.
2190         * page/Chrome.cpp:
2191         (WebCore::Chrome::cleanupColorChooser): Added colorChooser argument because there are many WebCore::ColorChoosers now.
2192         (WebCore::Chrome::setSelectedColorInColorChooser): Ditto.
2193         * page/Chrome.h:
2194         * page/ChromeClient.h:
2195         * platform/ColorChooser.cpp:
2196         (WebCore::ColorChooserClient::~ColorChooserClient):
2197         (WebCore::ColorChooserClient::newColorChooser): Creates a new color chooser that is connected to itself.
2198         (WebCore::ColorChooserClient::discardChooser): Discards the connected color chooser.
2199         (WebCore::ColorChooser::ColorChooser): ColorChooser is RefCounted.
2200         (WebCore::ColorChooser::create): Creates a ColorChooser that is connected to the given ColorChooserClient.
2201         (WebCore::ColorChooser::~ColorChooser):
2202         (WebCore::ColorChooser::didChooseColor): Called from WebKit side when user chose a color. Calls ColorChooserClient::didChooseColor
2203         (WebCore::ColorChooser::didCleanup): Called from WebKit side when user color chooser was cleaned up. Calls ColorChooserClient::didCleanup
2204         * platform/ColorChooser.h:
2205         (WebCore::ColorChooserClient::chooser): Returns the current ColorChooser.
2206         (WebCore::ColorChooser::disconnectClient): Disconnects the ColorChooserClient.
2207         * testing/Internals.cpp:
2208         (WebCore::Internals::selectColorInColorChooser): Added element argument. This calls didChooseColor on the ColorChooser of that element.
2209         * testing/Internals.h:
2210         * testing/Internals.idl: Removed connectColorChooserClient and updated selectColorInColorChooser.
2211
2212 2011-11-07  Alexander Pavlov  <apavlov@chromium.org>
2213
2214         Web Inspector: Cannot edit elements commented with <!--
2215         https://bugs.webkit.org/show_bug.cgi?id=71357
2216
2217         Reviewed by Pavel Feldman.
2218
2219         * inspector/InspectorDOMAgent.cpp:
2220         (WebCore::InspectorDOMAgent::getOuterHTML):
2221         (WebCore::InspectorDOMAgent::setOuterHTML):
2222         * inspector/front-end/ElementsTreeOutline.js:
2223         (WebInspector.ElementsTreeOutline.prototype.populateContextMenu):
2224         (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu):
2225         (WebInspector.ElementsTreeElement.prototype._populateTextContextMenu):
2226         (WebInspector.ElementsTreeElement.prototype._populateNodeContextMenu):
2227
2228 2011-11-06  Noel Gordon  <noel.gordon@gmail.com>
2229
2230         Fix some style issues in ImageBuffer.h
2231         https://bugs.webkit.org/show_bug.cgi?id=71649
2232
2233         Reviewed by Kent Tamura.
2234
2235         No new tests. Style change only.
2236
2237         * platform/graphics/ImageBuffer.h:
2238
2239 2011-11-06  Keishi Hattori  <keishi@webkit.org>
2240
2241         InputType::fallbackValue and defaultValue should be const
2242         https://bugs.webkit.org/show_bug.cgi?id=71641
2243
2244         Reviewed by Kent Tamura.
2245     
2246         Changing InputType::fallbackValue and defaultValue to const. Also adding OVERRIDE.
2247
2248         * html/BaseCheckableInputType.cpp:
2249         (WebCore::BaseCheckableInputType::fallbackValue):
2250         * html/BaseCheckableInputType.h:
2251         * html/ColorInputType.cpp:
2252         (WebCore::ColorInputType::fallbackValue):
2253         * html/ColorInputType.h:
2254         * html/InputType.cpp:
2255         (WebCore::InputType::fallbackValue):
2256         (WebCore::InputType::defaultValue):
2257         * html/InputType.h:
2258         * html/RangeInputType.cpp:
2259         (WebCore::RangeInputType::fallbackValue):
2260         * html/RangeInputType.h:
2261         * html/ResetInputType.cpp:
2262         (WebCore::ResetInputType::defaultValue):
2263         * html/ResetInputType.h:
2264         * html/SubmitInputType.cpp:
2265         (WebCore::SubmitInputType::defaultValue):
2266         * html/SubmitInputType.h:
2267
2268 2011-11-06  Keishi Hattori  <keishi@webkit.org>
2269
2270         Remove ColorInputType::handleClickEvent
2271         https://bugs.webkit.org/show_bug.cgi?id=71640
2272
2273         Reviewed by Kent Tamura.
2274
2275         When you click the input color element, both ColorInputType::handleClickEvent and
2276         ColorInputType::handleDOMActivateEvent are called, causing Chrome::openColorChooser
2277         to be called too many times.
2278
2279         * html/ColorInputType.cpp: Removed ColorInputType::handleClickEvent
2280         * html/ColorInputType.h: Removed ColorInputType::handleClickEvent
2281
2282 2011-11-06  Keishi Hattori  <keishi@webkit.org>
2283
2284         Remove extra semicolon in ColorInputType
2285         https://bugs.webkit.org/show_bug.cgi?id=71639
2286
2287         Reviewed by Kent Tamura.
2288
2289         * html/ColorInputType.cpp:
2290         (WebCore::ColorInputType::setValue):
2291
2292 2011-11-06  Dominic Cooney  <dominicc@chromium.org>
2293
2294         Remove initBeforeLoadEvent method
2295         https://bugs.webkit.org/show_bug.cgi?id=71636
2296
2297         Reviewed by Adam Barth.
2298
2299         Test: fast/dom/Window/window-properties.html
2300
2301         * dom/BeforeLoadEvent.h:
2302         * dom/BeforeLoadEvent.idl:
2303
2304 2011-11-06  Adam Barth  <abarth@webkit.org>
2305
2306         Don't crash when a context hasn't been created.  This fixed a
2307         testing-only crash on the bots in the Chromium port.
2308
2309         * testing/v8/WebCoreTestSupport.cpp:
2310         (WebCoreTestSupport::resetInternalsObject):
2311
2312 2011-11-06  Darin Adler  <darin@apple.com>
2313
2314         Leaks seen in RenderFlowThread::setRegionRangeForBox on Leaks bot
2315         https://bugs.webkit.org/show_bug.cgi?id=71260
2316
2317         Reviewed by Mark Rowe.
2318
2319         Memory leak fix covered by existing tests.
2320
2321         * rendering/RenderFlowThread.cpp:
2322         (WebCore::RenderFlowThread::removeRenderBoxRegionInfo):
2323         Instead of calling remove, call take and then delete, since the
2324         values of the map are owned and need to be deleted when removed.
2325
2326 2011-11-06  Adam Barth  <abarth@webkit.org>
2327
2328         Implement the sandbox directive for CSP
2329         https://bugs.webkit.org/show_bug.cgi?id=71604
2330
2331         Reviewed by Sam Weinig.
2332
2333         At TPAC, Microsoft was pushing pretty hard to add the sandbox directive
2334         to CSP.  There's a question about whether it's going to be in CSP 1.0
2335         or CSP 1.1, but it seems to be clearly headed into the spec.
2336
2337         This patch implements the sandbox directive for CSP.  It's built on the
2338         same machinery we use for the sandbox attribute for iframe.  Now that
2339         I've done the implementation, I'm going to write up some concrete text
2340         for the spec.
2341
2342         Tests: http/tests/security/contentSecurityPolicy/sandbox-allow-scripts-subframe.html
2343                http/tests/security/contentSecurityPolicy/sandbox-allow-scripts.html
2344                http/tests/security/contentSecurityPolicy/sandbox-empty-subframe.html
2345                http/tests/security/contentSecurityPolicy/sandbox-empty.html
2346
2347         * page/ContentSecurityPolicy.cpp:
2348         (WebCore::ContentSecurityPolicy::ContentSecurityPolicy):
2349         (WebCore::ContentSecurityPolicy::applySandboxPolicy):
2350         (WebCore::ContentSecurityPolicy::addDirective):
2351         * page/ContentSecurityPolicy.h:
2352
2353 2011-11-03  Filip Pizlo  <fpizlo@apple.com>
2354
2355         JSC should be able to sample itself in a more flexible way than just sampling flags
2356         https://bugs.webkit.org/show_bug.cgi?id=71522
2357
2358         Reviewed by Gavin Barraclough.
2359
2360         No new tests, since no functionality changed.
2361
2362         * ForwardingHeaders/wtf/Spectrum.h: Added.
2363
2364 2011-11-06  Nikita Vasilyev  <me@elv1s.ru>
2365
2366         Web Inspector: Unindent edited text by pressing Shift + Tab
2367         https://bugs.webkit.org/show_bug.cgi?id=70181
2368
2369         Indent and unindent text in all selected lines.
2370
2371         Reviewed by Pavel Feldman.
2372
2373         * inspector/front-end/TextViewer.js:
2374         (WebInspector.TextEditorMainPanel.prototype.unindentLines.get var):
2375         (WebInspector.TextEditorMainPanel.prototype.unindentLines):
2376
2377 2011-11-05  Martin Robinson  <mrobinson@igalia.com>
2378
2379         Remove ContextShadow
2380         https://bugs.webkit.org/show_bug.cgi?id=71617
2381
2382         Reviewed by Ariya Hidayat.
2383
2384         No new tests. This patch does not change behavior.
2385
2386         Completely remove ContextShadow. It's unused, unmaintained, and
2387         replaced by ShadowBlur.
2388
2389         * WebCore.gypi: Remove references to deleted files.
2390         * WebCore.vcproj/WebCore.vcproj: Remove references to deleted files.
2391         * platform/graphics/ContextShadow.cpp: Removed.
2392         * platform/graphics/ContextShadow.h: Removed.
2393         * platform/gtk/WidgetRenderingContext.cpp: Remove now-inaccurate TODO.
2394
2395 2011-11-04  Jon Lee  <jonlee@apple.com>
2396
2397         Dragging a file onto <input type="file"> should give distinct visual feedback
2398         https://bugs.webkit.org/show_bug.cgi?id=13897
2399         <rdar://problem/5232483>
2400
2401         Reviewed by Dan Bernstein.
2402
2403         When hovering over a file input element, we set the button's state to active
2404         to differentiate dragging one file over the input element (which populates that
2405         element) versus over the document (which would load the file into the view).
2406
2407         * html/HTMLInputElement.cpp:
2408         (WebCore::HTMLInputElement::HTMLInputElement):
2409         (WebCore::HTMLInputElement::canReceiveDroppedFiles):
2410         (WebCore::HTMLInputElement::setCanReceiveDroppedFiles): If set, the element
2411         is updated, which sets the active state on the button control.
2412         * html/HTMLInputElement.h: Add a boolean member representing whether the file
2413         input can receive dropped files.
2414         * page/DragController.cpp:
2415         (WebCore::DragController::DragController): Update/set the file input that
2416         can receive dropped files.
2417         (WebCore::DragController::dragExited):
2418         (WebCore::DragController::tryDocumentDrag):
2419         (WebCore::DragController::concludeEditDrag):
2420         * page/DragController.h:
2421         * rendering/RenderFileUploadControl.cpp:
2422         (WebCore::RenderFileUploadControl::updateFromElement): Sets the button active
2423         state if the input can receive dropped files.
2424
2425 2011-11-05  Darin Adler  <darin@apple.com>
2426
2427         Improve pending resource hash table code, including fixing a memory leak
2428         https://bugs.webkit.org/show_bug.cgi?id=71616
2429
2430         Reviewed by Adam Roben.
2431
2432         Memory leak fix and refactoring covered by existing tests.
2433
2434         * svg/SVGDocumentExtensions.cpp:
2435         (WebCore::SVGDocumentExtensions::addPendingResource): Replace the combination
2436         of contains, get, and add with just add, removing an extra unneeded hash table
2437         lookup each time this function is called.
2438         (WebCore::SVGDocumentExtensions::isElementInPendingResources): Added a comment
2439         about the performance of this function. Removed unnecessary check for an empty
2440         map; the code already efficiently exits doing nothing without the check.
2441         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources): Removed
2442         unnecessary check for an empty map; the code already efficiently does nothing
2443         without the check. Use removePendingResource rather than calling remove to
2444         avoid leaking the SVGPendingElements set.
2445         (WebCore::SVGDocumentExtensions::removePendingResource): Replace the
2446         combination of get and remove with a call to take, removing an extra
2447         unneeded hash table lookup each time this function is called
2448
2449 2011-11-05  Dan Winship  <danw@gnome.org>
2450
2451         [GTK] Actually use the user_data arguments to gio async functions
2452         instead of using g_object_set_data() to basically reinvent them.
2453         https://bugs.webkit.org/show_bug.cgi?id=71614
2454
2455         Reviewed by Martin Robinson.
2456
2457         No new tests; behavior is unchanged
2458
2459         * platform/network/soup/ResourceHandleSoup.cpp:
2460         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
2461         (WebCore::cleanupSoupRequestOperation):
2462         (WebCore::sendRequestCallback):
2463         (WebCore::startHTTPRequest):
2464         (WebCore::ResourceHandle::platformSetDefersLoading):
2465         (WebCore::closeCallback):
2466         (WebCore::readCallback):
2467         (WebCore::startNonHTTPRequest):
2468
2469 2011-11-05  Dan Winship  <danw@gnome.org>
2470
2471         [GTK] Don't unnecessarily 0-initialize read buffers.
2472         https://bugs.webkit.org/show_bug.cgi?id=71612
2473
2474         Reviewed by Martin Robinson.
2475
2476         No new tests; behavior is unchanged
2477
2478         * platform/network/soup/ResourceHandleSoup.cpp:
2479         (WebCore::sendRequestCallback):
2480
2481 2011-11-05  Dan Winship  <danw@gnome.org>
2482
2483         [GTK] Remove a bit of dead code
2484         https://bugs.webkit.org/show_bug.cgi?id=71613
2485
2486         Reviewed by Martin Robinson.
2487
2488         No new tests; behavior is unchanged
2489
2490         * platform/network/soup/ResourceHandleSoup.cpp:
2491         (WebCore::readCallback): the caller that needed the convertToUTF16
2492         code was removed in r77408, but the code was accidentally left
2493         behind.
2494
2495 2011-11-05  Adam Barth  <abarth@webkit.org>
2496
2497         Refactor sandbox flag calculation to make implementing CSP sandbox directive easier
2498         https://bugs.webkit.org/show_bug.cgi?id=71603
2499
2500         Reviewed by Sam Weinig.
2501
2502         This patch changes the way we compute sandbox bits.  Instead of caching
2503         the result on Frame, we always compute the sandbox bits for a new
2504         document fresh from the inputs to the process (the sandbox attribute
2505         and the forced sandbox flags).
2506
2507         This patch is just refactoring.  It shouldn't have an observable
2508         effects.  This patch makes it easier to implement CSP's sandbox
2509         directive in a subsequent patch.
2510
2511         * dom/Document.cpp:
2512         (WebCore::Document::initSecurityContext):
2513         * html/HTMLFrameOwnerElement.cpp:
2514         (WebCore::HTMLFrameOwnerElement::setSandboxFlags):
2515         * loader/FrameLoader.cpp:
2516         (WebCore::FrameLoader::FrameLoader):
2517         (WebCore::FrameLoader::init):
2518         (WebCore::FrameLoader::effectiveSandboxFlags):
2519         (WebCore::createWindow):
2520         * loader/FrameLoader.h:
2521         (WebCore::FrameLoader::forceSandboxFlags):
2522
2523 2011-11-05  Andreas Kling  <kling@webkit.org>
2524
2525         CSSStyleDeclaration: Devirtualize isMutableStyleDeclaration().
2526         https://bugs.webkit.org/show_bug.cgi?id=71609
2527
2528         Reviewed by Anders Carlsson.
2529
2530         Add a bool member to CSSStyleDeclaration that determines whether
2531         it's a CSSMutableDeclaration.
2532
2533         * css/CSSMutableStyleDeclaration.cpp:
2534         (WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration):
2535         * css/CSSMutableStyleDeclaration.h:
2536         * css/CSSStyleDeclaration.cpp:
2537         (WebCore::CSSStyleDeclaration::CSSStyleDeclaration):
2538         * css/CSSStyleDeclaration.h:
2539         (WebCore::CSSStyleDeclaration::isMutableStyleDeclaration):
2540
2541 2011-11-05  Andreas Kling  <kling@webkit.org>
2542
2543         Web Inspector: Simplify InspectorCSSAgent::inlineStyleElement().
2544         https://bugs.webkit.org/show_bug.cgi?id=71608
2545
2546         Reviewed by Pavel Feldman.
2547
2548         Use CSSMutableStyleDeclaration::isInlineStyleDeclaration() instead
2549         of doing the same checks manually.
2550
2551         * inspector/InspectorCSSAgent.cpp:
2552         (WebCore::InspectorCSSAgent::inlineStyleElement):
2553
2554 2011-11-05  Simon Hausmann  <simon.hausmann@nokia.com>
2555
2556         Reviewed by Andreas Kling.
2557
2558         Removed duplicated npruntime_internal.h from bindings/v8
2559         in favour of the one from bridge/, which has a few more
2560         #undefs.
2561
2562         https://bugs.webkit.org/show_bug.cgi?id=45617
2563
2564         * bindings/v8/npruntime_internal.h: Removed.
2565         * Target.pri: Removed strange occurence here.
2566
2567 2011-11-05  Simon Hausmann  <simon.hausmann@nokia.com>
2568
2569         Remove empty and unused dom/PositionCreationFunctions.h header file
2570         https://bugs.webkit.org/show_bug.cgi?id=71552
2571
2572         Reviewed by Kenneth Rohde Christiansen.
2573
2574         The file is empty (0 bytes) and not used anywhere. It was added in
2575         2009 in r48234 but hasn't been touched since then.
2576
2577         * WebCore.gypi:
2578         * dom/PositionCreationFunctions.h: Removed.
2579
2580 2011-11-04  Adam Barth  <abarth@webkit.org>
2581
2582         Fix assert after running tests in dumpAsText folders.  See
2583         https://bugs.webkit.org/show_bug.cgi?id=71599 for discussion.  This
2584         patch reverts part of a slightly over-agressive refactoring in
2585         http://trac.webkit.org/changeset/99347.
2586
2587         * dom/Document.cpp:
2588         (WebCore::Document::setIsViewSource):
2589
2590 2011-11-04  Ben Wells  <benwells@chromium.org>
2591
2592         Canvas drawImage(canvas) with SourceIn, DestinationIn, SourceOut, DestinationAtop and Copy have errors
2593         https://bugs.webkit.org/show_bug.cgi?id=71537
2594
2595         Reviewed by Stephen White.
2596
2597         drawImage(canvas) now uses the same approach as drawImage(image) to fix these errors.
2598
2599         Test: fast/canvas/canvas-composite-canvas.html
2600
2601         * html/canvas/CanvasRenderingContext2D.cpp:
2602         (WebCore::CanvasRenderingContext2D::drawImage):
2603         (WebCore::drawImageToContext):
2604         (WebCore::CanvasRenderingContext2D::fullCanvasCompositedDrawImage):
2605         * html/canvas/CanvasRenderingContext2D.h:
2606
2607 2011-11-04  Adam Barth  <abarth@webkit.org>
2608
2609         JavaScript URLs execute in sandboxed iframes
2610         https://bugs.webkit.org/show_bug.cgi?id=71599
2611
2612         Reviewed by Eric Seidel.
2613
2614         This patch fixes the intentional regression I introduced earlier today
2615         by moving the sandbox bits from SecurityOrigin to Document. In the
2616         process, I renamed SecurityOrigin::createEmpty to
2617         SecurityOrigin::createUnique to better align with HTML5 terminology.
2618
2619         * WebCore.exp.in:
2620         * bindings/ScriptControllerBase.cpp:
2621         (WebCore::ScriptController::canExecuteScripts):
2622         * dom/Document.cpp:
2623         (WebCore::Document::setIsViewSource):
2624         (WebCore::Document::initSecurityContext):
2625         * dom/ScriptExecutionContext.cpp:
2626         (WebCore::ScriptExecutionContext::ScriptExecutionContext):
2627         * dom/ScriptExecutionContext.h:
2628         (WebCore::ScriptExecutionContext::sandboxFlags):
2629         (WebCore::ScriptExecutionContext::enforceSandboxFlags):
2630         (WebCore::ScriptExecutionContext::isSandboxed):
2631         * html/HTMLAppletElement.cpp:
2632         (WebCore::HTMLAppletElement::canEmbedJava):
2633         * loader/DocumentWriter.cpp:
2634         (WebCore::DocumentWriter::begin):
2635         * loader/FrameLoader.cpp:
2636         (WebCore::isDocumentSandboxed):
2637         (WebCore::FrameLoader::addHTTPOriginIfNeeded):
2638         * loader/PolicyChecker.cpp:
2639         (WebCore::PolicyChecker::checkNewWindowPolicy):
2640         * loader/SubframeLoader.cpp:
2641         (WebCore::SubframeLoader::requestPlugin):
2642         * page/SecurityOrigin.cpp:
2643         (WebCore::SecurityOrigin::SecurityOrigin):
2644         (WebCore::SecurityOrigin::create):
2645         (WebCore::SecurityOrigin::createUnique):
2646         * page/SecurityOrigin.h:
2647
2648 2011-11-04  Joseph Pecoraro  <pecoraro@apple.com>
2649
2650         Potential Unused Param Build Issue
2651         https://bugs.webkit.org/show_bug.cgi?id=71598
2652
2653         Reviewed by Kent Tamura.
2654
2655         * html/HTMLSelectElement.cpp:
2656         (WebCore::HTMLSelectElement::platformHandleKeydownEvent):
2657
2658 2011-11-04  Stephen Chenney  <schenney@chromium.org>
2659
2660         Crash in ScrollAnimator.cpp
2661         https://bugs.webkit.org/show_bug.cgi?id=69865
2662
2663         The code in ScrollAnimator assumes that horizontal per-page mouse
2664         wheel events cannot happen, which is not true. This patch adds layout
2665         tests for all paging wheel event situations and fixes the broken
2666         horizontal case.
2667
2668         Reviewed by Anders Carlsson
2669
2670         Tests: fast/events/platform-wheelevent-paging-x-in-non-scrolling-div.html
2671                fast/events/platform-wheelevent-paging-x-in-non-scrolling-page.html
2672                fast/events/platform-wheelevent-paging-x-in-scrolling-div.html
2673                fast/events/platform-wheelevent-paging-x-in-scrolling-page.html
2674                fast/events/platform-wheelevent-paging-xy-in-scrolling-div.html
2675                fast/events/platform-wheelevent-paging-xy-in-scrolling-page.html
2676                fast/events/platform-wheelevent-paging-y-in-non-scrolling-div.html
2677                fast/events/platform-wheelevent-paging-y-in-non-scrolling-page.html
2678                fast/events/platform-wheelevent-paging-y-in-scrolling-div.html
2679                fast/events/platform-wheelevent-paging-y-in-scrolling-page.html
2680
2681         * platform/PlatformWheelEvent.h: Modify the comment to reflect the new
2682         reality.
2683         * platform/ScrollAnimator.cpp:
2684         (WebCore::ScrollAnimator::handleWheelEvent): Modified the code to handle the
2685         horizontal per-page wheel event case.
2686
2687 2011-11-04  Rafael Weinstein  <rafaelw@chromium.org>
2688
2689         [MutationObservers] Refactor MutationObserverRegistration into its own class that is
2690         referenced by registration points
2691
2692         https://bugs.webkit.org/show_bug.cgi?id=71577
2693
2694         Reviewed by Ojan Vafai.
2695
2696         MutationObserverRegistration is now owned by the node which is observed. If transient
2697         registrations are created, they hold a reference to this object.
2698
2699         The ownership relationship between Node, MutationObserverRegistration &
2700         WebKitMutationObserver now goes like this: WebKitMutationObserver is RefCounted -
2701         and only script and MutationObserverRegistration take references to it. Exactly
2702         one MutationObserverRegistration can exist for any given tuple of
2703         <Node, WebKitMutationObserver>. This represents an observer observing at a given
2704         Node. Further observation by the same observer has the effect of *resetting*
2705         the existing observation. The Node owns the MutationObserverRegistration.
2706         Transient registrations are only pointers to the registration. The registration
2707         keeps a RefPtr to its registration node and all of its transient registration nodes
2708         as long as *any* transient registrations exist. This ensures the registration
2709         and all registration nodes stay alive at least until the end of the microtask.
2710
2711         No tests required - refactor only.
2712
2713         * GNUmakefile.list.am:
2714         * WebCore.gypi:
2715         * WebCore.pro:
2716         * WebCore.vcproj/WebCore.vcproj:
2717         * WebCore.xcodeproj/project.pbxproj:
2718         * dom/CharacterData.cpp:
2719         (WebCore::enqueueCharacterDataMutationRecord):
2720         * dom/ChildListMutationScope.cpp:
2721         (WebCore::MutationAccumulationRouter::MutationAccumulationRouter::incrementScopingLevel):
2722         * dom/Element.cpp:
2723         (WebCore::enqueueAttributesMutationRecord):
2724         * dom/MutationObserverRegistration.cpp: Added.
2725         (WebCore::MutationObserverRegistration::create):
2726         (WebCore::MutationObserverRegistration::MutationObserverRegistration):
2727         (WebCore::MutationObserverRegistration::~MutationObserverRegistration):
2728         (WebCore::MutationObserverRegistration::resetObservation):
2729         (WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach):
2730         (WebCore::MutationObserverRegistration::clearTransientRegistrations):
2731         (WebCore::MutationObserverRegistration::unregister):
2732         (WebCore::MutationObserverRegistration::shouldReceiveMutationFrom):
2733         * dom/MutationObserverRegistration.h: Copied from Source/WebCore/dom/WebKitMutationObserver.h.
2734         (WebCore::MutationObserverRegistration::observer):
2735         (WebCore::MutationObserverRegistration::deliveryOptions):
2736         * dom/Node.cpp:
2737         (WebCore::Node::clearRareData):
2738         (WebCore::Node::mutationObserverRegistry):
2739         (WebCore::Node::transientMutationObserverRegistry):
2740         (WebCore::addObserverToDeliverySet):
2741         (WebCore::Node::collectMatchingObserversForMutation):
2742         (WebCore::Node::getRegisteredMutationObserversOfType):
2743         (WebCore::Node::registerMutationObserver):
2744         (WebCore::Node::unregisterMutationObserver):
2745         (WebCore::Node::registerTransientMutationObserver):
2746         (WebCore::Node::unregisterTransientMutationObserver):
2747         (WebCore::Node::notifyMutationObserversNodeWillDetach):
2748         * dom/Node.h:
2749         * dom/NodeRareData.h:
2750         (WebCore::NodeRareData::mutationObserverRegistry):
2751         (WebCore::NodeRareData::ensureMutationObserverRegistry):
2752         (WebCore::NodeRareData::transientMutationObserverRegistry):
2753         (WebCore::NodeRareData::ensureTransientMutationObserverRegistry):
2754         * dom/WebKitMutationObserver.cpp:
2755         (WebCore::WebKitMutationObserver::~WebKitMutationObserver):
2756         (WebCore::WebKitMutationObserver::observe):
2757         (WebCore::WebKitMutationObserver::disconnect):
2758         (WebCore::WebKitMutationObserver::observationStarted):
2759         (WebCore::WebKitMutationObserver::observationEnded):
2760         (WebCore::WebKitMutationObserver::deliver):
2761         * dom/WebKitMutationObserver.h:
2762
2763 2011-11-04  Raymond Toy  <rtoy@google.com>
2764
2765        Add methods to compute magnitude and phase response for biquads
2766        https://bugs.webkit.org/show_bug.cgi?id=71055
2767
2768        Reviewed by Kenneth Russell.
2769
2770
2771         * platform/audio/Biquad.cpp:
2772         (WebCore::Biquad::getFrequencyResponse):
2773         Computes the magnitude and phase (radians) response for the given
2774         biquad at the specified set of (normalized) frequencies.
2775         * platform/audio/Biquad.h:
2776         Declare getFrequencyResponse.
2777         * webaudio/BiquadDSPKernel.cpp:
2778         (WebCore::BiquadDSPKernel::updateCoefficientsIfNecessary):
2779         Factor out the code that updates filter coefficients.  Allow the
2780         caller to specify whether the smoothed values are used or not and
2781         whether we do the update even if the coefficients are not dirty.
2782         (WebCore::BiquadDSPKernel::process):
2783         Use updateCoefficientsIfNecessary to update.
2784         (WebCore::BiquadDSPKernel::getFrequencyResponse):
2785         Implmentation of getFrequencyResponse.
2786         * webaudio/BiquadDSPKernel.h:
2787         Declare getFrequencyResponse.
2788         * webaudio/BiquadFilterNode.cpp:
2789         (WebCore::BiquadFilterNode::getFrequencyResponse):
2790         Implementation of getFrequencyResponse
2791         * webaudio/BiquadFilterNode.h:
2792         Declare getFrequencyResponse.
2793         * webaudio/BiquadFilterNode.idl:
2794         Define interface to getFrequencyResponse.
2795         * webaudio/BiquadProcessor.cpp:
2796         (WebCore::BiquadProcessor::checkForDirtyCoefficients):
2797         Factor out code for checking for dirty coefficients.
2798         (WebCore::BiquadProcessor::process):
2799         Use checkForDirtyCoefficients.
2800         (WebCore::BiquadProcessor::getFrequencyResponse):
2801         Implementation of getFrequencyResponse
2802         * webaudio/BiquadProcessor.h:
2803         Declare getFrequencyResponse.
2804
2805 2011-11-04  Benjamin Poulain  <bpoulain@apple.com>
2806
2807         [Mac] ResourceRequest's nsURLRequest() does not differentiate null and empty URLs with CFNetwork
2808         https://bugs.webkit.org/show_bug.cgi?id=71539
2809
2810         Reviewed by David Kilzer.
2811
2812         In order to have CFURL and NSURL to be consistent when both are used on Mac,
2813         KURL::createCFURL() is changed to support empty URL values.
2814
2815         * platform/cf/KURLCFNet.cpp:
2816         (WebCore::createCFURLFromBuffer):
2817         (WebCore::KURL::createCFURL):
2818         * platform/mac/KURLMac.mm:
2819         (WebCore::KURL::operator NSURL *):
2820         (WebCore::KURL::createCFURL):
2821
2822 2011-11-04  Fady Samuel  <fsamuel@chromium.org>
2823
2824         CSS Aspect Ratio Property Parsing Stage
2825         https://bugs.webkit.org/show_bug.cgi?id=70707
2826
2827         Reviewed by Ojan Vafai.
2828
2829         Added parsing support for -webkit-aspect-ratio CSS property.
2830         The spec can be found here: http://www.xanthir.com/blog/b4810
2831
2832         Test: fast/css/aspect-ratio-parsing-tests.html
2833
2834         * CMakeLists.txt:
2835         * GNUmakefile.list.am:
2836         * Target.pri:
2837         * WebCore.gypi:
2838         * WebCore.vcproj/WebCore.vcproj:
2839         * WebCore.xcodeproj/project.pbxproj:
2840         * css/CSSAspectRatioValue.cpp: Added.
2841         (WebCore::CSSAspectRatioValue::~CSSAspectRatioValue):
2842         (WebCore::CSSAspectRatioValue::cssText):
2843         * css/CSSAspectRatioValue.h: Added.
2844         (WebCore::CSSAspectRatioValue::create):
2845         (WebCore::CSSAspectRatioValue::numeratorValue):
2846         (WebCore::CSSAspectRatioValue::denominatorValue):
2847         (WebCore::CSSAspectRatioValue::CSSAspectRatioValue):
2848         * css/CSSComputedStyleDeclaration.cpp:
2849         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2850         * css/CSSMutableStyleDeclaration.cpp:
2851         * css/CSSParser.cpp:
2852         (WebCore::CSSParser::parseValue):
2853         (WebCore::CSSParser::parseAspectRatio):
2854         * css/CSSParser.h:
2855         * css/CSSProperty.cpp:
2856         (WebCore::CSSProperty::isInheritedProperty):
2857         * css/CSSPropertyNames.in:
2858         * css/CSSStyleSelector.cpp:
2859         (WebCore::CSSStyleSelector::applyProperty):
2860
2861 2011-11-04  Adam Barth  <abarth@webkit.org>
2862
2863         Delete FrameLoader::isSandboxed
2864         https://bugs.webkit.org/show_bug.cgi?id=71591
2865
2866         Reviewed by Eric Seidel.
2867
2868         We should always use document->securityOrigin()->isSandboxed because
2869         that picks up the sandbox bits that are frozen on the document rather
2870         than the ones that could change on the Frame.
2871
2872         This patch starts preparing us to implement the CSP sandbox directive,
2873         which will cause use to have document sandbox bits without any attribute.
2874
2875         * bindings/ScriptControllerBase.cpp:
2876         (WebCore::ScriptController::canExecuteScripts):
2877             - This call site was the only functional site left where these two
2878               could be different. This patch causes one progression and one
2879               regression. The progression is that we now correctly freeze the
2880               allow-scripts bit when a document is created, but the regression
2881               is we now allow the execution of JavaScript URLs, as noted in 
2882               fast/frames/sandboxed-iframe-scripting.html. That's even more of
2883               an edge case, so I think it's a win overall.
2884         * loader/DocumentWriter.cpp:
2885         (WebCore::DocumentWriter::begin):
2886             - I don't think this part of the change is testable. There's no
2887               time to execute script between when the bits get copied off the
2888               Frame and when they're checked, so there's no time to change them.
2889         * loader/FrameLoader.cpp:
2890             - Update FIXME comment that is now fixed.
2891         * loader/FrameLoader.h:
2892             - Remove wrong API.
2893
2894 2011-11-04  Adam Barth  <abarth@webkit.org>
2895
2896         When CSP blocks mixed content, we shouldn't also warn about mixed content
2897         https://bugs.webkit.org/show_bug.cgi?id=71588
2898
2899         Reviewed by Eric Seidel.
2900
2901         Getting both warnings confused some early adopters.  They thought the
2902         insecure loads were happening even though they blocked them with CSP.
2903         This patch restricts the mixed content warnings to show only when the
2904         load isn't already blocked by CSP or by the embedder.
2905
2906         Test: http/tests/security/contentSecurityPolicy/block-mixed-content-hides-warning.html
2907
2908         * loader/cache/CachedResourceLoader.cpp:
2909         (WebCore::CachedResourceLoader::canRequest):
2910
2911 2011-11-04  Michael Nordman  <michaeln@google.coom>
2912
2913         Allow ScriptExecutionContext::addMessage to be called from background threads.
2914         https://bugs.webkit.org/show_bug.cgi?id=71575
2915
2916         Reviewed by Nate Chapin.
2917
2918         No new tests.
2919
2920         * dom/Document.cpp:
2921         (WebCore::Document::addMessage):
2922         * dom/ScriptExecutionContext.cpp:
2923         * dom/ScriptExecutionContext.h:
2924         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::create):
2925         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::performTask):
2926         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):
2927         * workers/WorkerContext.cpp:
2928         (WebCore::WorkerContext::addMessage):
2929
2930 2011-11-04  Shawn Singh  <shawnsingh@chromium.org>
2931
2932         [chromium] Re-named the original scissorRect to clipRect
2933         https://bugs.webkit.org/show_bug.cgi?id=71580
2934
2935         Reviewed by James Robinson.
2936
2937         Existing tests are updated appropriately; and no new behavior is
2938         introduced by this patch.
2939
2940         * platform/graphics/chromium/LayerChromium.cpp:
2941         (WebCore::LayerChromium::LayerChromium):
2942         * platform/graphics/chromium/LayerChromium.h:
2943         (WebCore::LayerChromium::setUsesLayerClipping):
2944         (WebCore::LayerChromium::usesLayerClipping):
2945         (WebCore::LayerChromium::clipRect):
2946         (WebCore::LayerChromium::setClipRect):
2947         * platform/graphics/chromium/LayerRendererChromium.cpp:
2948         (WebCore::LayerRendererChromium::drawLayersInternal):
2949         (WebCore::LayerRendererChromium::drawLayer):
2950         * platform/graphics/chromium/RenderSurfaceChromium.h:
2951         (WebCore::RenderSurfaceChromium::clipRect):
2952         (WebCore::RenderSurfaceChromium::setClipRect):
2953         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2954         (WebCore::CCLayerImpl::CCLayerImpl):
2955         * platform/graphics/chromium/cc/CCLayerImpl.h:
2956         (WebCore::CCLayerImpl::setUsesLayerClipping):
2957         (WebCore::CCLayerImpl::usesLayerClipping):
2958         (WebCore::CCLayerImpl::clipRect):
2959         (WebCore::CCLayerImpl::setClipRect):
2960         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2961         (WebCore::CCLayerTreeHost::updateLayers):
2962         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
2963         (WebCore::layerShouldBeSkipped):
2964         (WebCore::calculateDrawTransformsAndVisibilityInternal):
2965         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h:
2966         (WebCore::CCLayerTreeHostCommon::calculateVisibleLayerRect):
2967         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
2968         (WebCore::CCRenderSurface::draw):
2969         * platform/graphics/chromium/cc/CCRenderSurface.h:
2970         (WebCore::CCRenderSurface::setClipRect):
2971         (WebCore::CCRenderSurface::clipRect):
2972
2973 2011-11-04  Dmitry Lomov  <dslomov@google.com>
2974
2975         Add the ability to transfer ArrayBuffer and "neuter" it.
2976         https://bugs.webkit.org/show_bug.cgi?id=71535
2977
2978         Reviewed by David Levin.
2979
2980         * html/canvas/ArrayBuffer.cpp:
2981         (WebCore::ArrayBuffer::create):
2982         (WebCore::ArrayBuffer::ArrayBuffer):
2983         (WebCore::ArrayBuffer::data):
2984         (WebCore::ArrayBuffer::byteLength):
2985         (WebCore::ArrayBuffer::transfer):
2986         (WebCore::ArrayBufferContents::~ArrayBufferContents):
2987         (WebCore::ArrayBufferContents::tryAllocate):
2988         (WebCore::ArrayBuffer::addView):
2989         (WebCore::ArrayBuffer::removeView):
2990         * html/canvas/ArrayBuffer.h:
2991         (WebCore::ArrayBufferContents::ArrayBufferContents):
2992         (WebCore::ArrayBufferContents::data):
2993         (WebCore::ArrayBufferContents::sizeInBytes):
2994         (WebCore::ArrayBufferContents::release):
2995         (WebCore::ArrayBuffer::~ArrayBuffer):
2996         * html/canvas/ArrayBufferView.cpp:
2997         (WebCore::ArrayBufferView::ArrayBufferView):
2998         (WebCore::ArrayBufferView::~ArrayBufferView):
2999         (WebCore::ArrayBufferView::neuter):
3000         * html/canvas/ArrayBufferView.h:
3001         * html/canvas/DataView.cpp:
3002         (WebCore::DataView::neuter):
3003         (WebCore::DataView::neuterBinding):
3004         * html/canvas/DataView.h:
3005         * html/canvas/TypedArrayBase.h:
3006         (WebCore::TypedArrayBase::neuter):
3007         (WebCore::TypedArrayBase::neuterBinding):
3008
3009 2011-11-04  Noel Gordon  <noel.gordon@gmail.com>
3010
3011         [Chromium] Implement canvas.toDataURL("image/webp")
3012         https://bugs.webkit.org/show_bug.cgi?id=70172
3013
3014         Reviewed by Adam Barth.
3015
3016         Add a webp image encoder for the chromium skia ports, add it to the canvas
3017         element toDataURL() flow with support for an optional quality [0.0-1.0].
3018         Use a webp compression method (3) that provides good speed and compression
3019         performance for this image format, and works well for various input image
3020         types: line-art, screen-shots, and photographic images.
3021
3022         Test: fast/canvas/canvas-toDataURL-webp.html
3023
3024         * WebCore.gypi:
3025         * platform/chromium/MIMETypeRegistryChromium.cpp:
3026         (WebCore::MIMETypeRegistry::isSupportedImageMIMETypeForEncoding):
3027         * platform/graphics/skia/ImageBufferSkia.cpp:
3028         (WebCore::ImageToDataURL):
3029         * platform/image-encoders/skia/WEBPImageEncoder.cpp: Added.
3030         (WebCore::writeOutput):
3031         (WebCore::importPicture):
3032         (WebCore::importPictureBGRA):
3033         (WebCore::importPictureRGBA):
3034         (WebCore::encodePixels):
3035         (WebCore::WEBPImageEncoder::encode):
3036         * platform/image-encoders/skia/WEBPImageEncoder.h: Added.
3037
3038 2011-11-04  Patrick Gansterer  <paroga@webkit.org>
3039
3040         [Qt] Remove ENABLE_SQLITE from qmake files
3041         https://bugs.webkit.org/show_bug.cgi?id=71546
3042
3043         Reviewed by Simon Hausmann.
3044
3045         ENABLE_SQLITE is required to build WebCore, so remove conditions.
3046
3047         * Target.pri:
3048
3049 2011-11-04  Nate Chapin  <japhet@chromium.org>
3050
3051         [V8] Null out V8NPObject::rootObject when the owning
3052         Frame goes away.
3053         https://bugs.webkit.org/show_bug.cgi?id=71569
3054
3055         Reviewed by Adam Barth.
3056
3057         No new tests, this has only been successfully triggered
3058         using ppapi flash.
3059
3060         * bindings/v8/V8Helpers.cpp:
3061         (WebCore::toV8Context):
3062         * bindings/v8/npruntime.cpp:
3063
3064 2011-11-04  Vineet Chaudhary  <vineet.chaudhary@motorola.com>
3065
3066         Send the submissions character encoding in hidden _charset_ field.
3067         https://bugs.webkit.org/show_bug.cgi?id=19079
3068
3069         Reviewed by Darin Adler.
3070
3071         Spec reference http://dev.w3.org/html5/spec/Overview.html#attr-fe-name-charset
3072         If _charset_ used as the name of a hidden control it should send character encoding
3073         as value while submissions.
3074
3075         Tests: http/tests/misc/char-encoding-in-hidden-charset-field-default.html
3076                http/tests/misc/char-encoding-in-hidden-charset-field-with-Big5.html
3077                http/tests/misc/char-encoding-in-hidden-charset-field-with-EUC-JP.html
3078                http/tests/misc/char-encoding-in-hidden-charset-field-with-ISO-2022-JP.html
3079                http/tests/misc/char-encoding-in-hidden-charset-field-with-Shift_JIS.html
3080                http/tests/misc/char-encoding-in-hidden-charset-field-with-accept-charset.html
3081                http/tests/misc/char-encoding-in-hidden-charset-field-with-get-method.html
3082                http/tests/misc/char-encoding-in-hidden-charset-field-with-one-field.html
3083                http/tests/misc/char-encoding-in-text-charset-field-with-value.html
3084                http/tests/misc/char-encoding-without-charset-field.html
3085
3086         * html/HiddenInputType.cpp:
3087         (WebCore::HiddenInputType::isHiddenType):
3088         (WebCore::HiddenInputType::appendFormData): For _charset_ send value as respective encodingType.
3089         * html/HiddenInputType.h: Override appendFormData for hidden control types.
3090
3091 2011-11-04  Robert Sesek  <rsesek@chromium.org>
3092
3093         [chromium] Use Chromium's copy of libWebKitSystemInterfaceLeopard.a
3094         https://bugs.webkit.org/show_bug.cgi?id=71563
3095
3096         Reviewed by Adam Barth.
3097
3098         Use libWebKitSystemInterfaceLeopard.a that's in the Chromium port,
3099         rather in WebKitLibraries/.
3100
3101         * WebCore.gyp/WebCore.gyp:
3102
3103 2011-11-04  Julien Chaffraix  <jchaffraix@webkit.org>
3104
3105         RenderLayer::styleChanged invalidates the GraphicsLayer needlessly
3106         https://bugs.webkit.org/show_bug.cgi?id=71517
3107
3108         Reviewed by Simon Fraser.
3109
3110         Unused code removal covered by existing tests.
3111
3112         The current code is invalidating the whole RenderLayerBacking as part of
3113         a style change. However this is redundant with the repainting logic which
3114         would invalidate only the necessary bits.
3115
3116         * rendering/RenderLayer.cpp:
3117         (WebCore::RenderLayer::styleChanged):
3118         Remove the invalidation code as it duplicates and defeats the repaint logic.
3119
3120 2011-11-04  Mihnea Ovidenie  <mihnea@adobe.com>
3121
3122         Correct parsing of incomplete @-webkit-region rules.
3123         https://bugs.webkit.org/show_bug.cgi?id=71514
3124
3125         Reviewed by Adam Barth.
3126
3127         Test: fast/regions/parse-incomplete-region-rule.html
3128
3129         Make sure to set the region rule to 0 on the fail branch.
3130         * css/CSSGrammar.y:
3131
3132 2011-11-04  Adam Klein  <adamk@chromium.org>
3133
3134         Reduce refcount churn in ChildListMutationScope
3135         https://bugs.webkit.org/show_bug.cgi?id=71527
3136
3137         Reviewed by Ryosuke Niwa.
3138
3139         Only the ChildListMutationAccumulator needs to hold a reference to the
3140         target node, and the added/removed children only need be ref'd if a
3141         ChildListMutationAccumulator exists (i.e., if there are interested
3142         observers).
3143
3144         * dom/ChildListMutationScope.cpp:
3145         (WebCore::MutationAccumulationRouter::ChildListMutationAccumulator::enqueueMutationRecord):
3146         (WebCore::MutationAccumulationRouter::MutationAccumulationRouter::childAdded):
3147         (WebCore::MutationAccumulationRouter::MutationAccumulationRouter::willRemoveChild):
3148         (WebCore::ChildListMutationScope::ChildListMutationScope):
3149         (WebCore::ChildListMutationScope::~ChildListMutationScope):
3150         (WebCore::ChildListMutationScope::childAdded):
3151         (WebCore::ChildListMutationScope::willRemoveChild):
3152         * dom/ChildListMutationScope.h:
3153         * dom/ContainerNode.cpp:
3154         (WebCore::dispatchChildInsertionEvents):
3155         (WebCore::dispatchChildRemovalEvents):
3156
3157 2011-11-04  Levi Weintraub  <leviw@chromium.org>
3158
3159         Correct usage of LayoutUnits in RenderImage and SVGImage
3160         https://bugs.webkit.org/show_bug.cgi?id=71525
3161
3162         Reviewed by Darin Adler.
3163
3164         Correcting incorrect usage of LayoutUnits for image sizes that should be integers and fixing overloaded functions that
3165         should be using LayoutUnits.
3166
3167         No new tests -- no change in behavior.
3168
3169         * rendering/RenderImage.cpp:
3170         (WebCore::RenderImage::imageDimensionsChanged):
3171         (WebCore::RenderImage::paintIntoRect):
3172         (WebCore::RenderImage::nodeAtPoint):
3173         (WebCore::RenderImage::computeReplacedLogicalWidth):
3174         * rendering/RenderImage.h:
3175         * svg/graphics/SVGImage.cpp:
3176         (WebCore::SVGImageChromeClient::invalidateContentsAndWindow):
3177
3178 2011-11-04  Adam Barth  <abarth@webkit.org>
3179
3180         Implement allow-popups for iframe@sandbox
3181         https://bugs.webkit.org/show_bug.cgi?id=66505
3182
3183         Reviewed by Darin Adler.
3184
3185         Enable allow-popups sandbox bit.  My previous patch attempted to
3186         forward the sandbox bits during setOpener, but that interacted poorly
3187         with out (internal) sandboxing of the initial document.  This patch
3188         forwards the bits during createWindow, which is more targeted to the
3189         case when a sandbox frame actually creates a new window.
3190
3191         * loader/FrameLoader.cpp:
3192         (WebCore::createWindow):
3193         * loader/PolicyChecker.cpp:
3194         (WebCore::PolicyChecker::checkNewWindowPolicy):
3195
3196 2011-11-04  Kaustubh Atrawalkar  <kaustubh@motorola.com>
3197
3198         Remove initMediaStreamEvent method
3199         https://bugs.webkit.org/show_bug.cgi?id=71344
3200
3201         This method has been removed from the spec draft.
3202         http://www.whatwg.org/specs/web-apps/current-work/multipage/video-conferencing-and-peer-to-peer-communication.html#mediastreamevent
3203
3204         Reviewed by Adam Barth.
3205
3206         No new tests. Removed method.
3207
3208         * mediastream/MediaStreamEvent.cpp:
3209         * mediastream/MediaStreamEvent.h:
3210         * mediastream/MediaStreamEvent.idl:
3211
3212 2011-11-04  Adam Barth  <abarth@webkit.org>
3213
3214         Anonymous CORS fetch for WebGL texture fails when there is no appropriate server response even for the same origin requests
3215         https://bugs.webkit.org/show_bug.cgi?id=71053
3216
3217         Reviewed by Darin Adler.
3218
3219         The crossorigin attribute should behave like XMLHttpRequest:
3220         same-origin images pass without and CORS headers, but CORS checks are
3221         performed for cross-origin loads.  This patch better aligns our
3222         behavior with Firefox, as discussed in the bug.
3223
3224         Test: http/tests/security/img-crossorigin-loads-same-origin.html
3225
3226         * loader/ImageLoader.cpp:
3227         (WebCore::ImageLoader::notifyFinished):
3228
3229 2011-11-04  Gaurav Shah  <gauravsh@chromium.org>
3230
3231         HTMLKeygenElement: Fix "keytype" handling in appendFormData.
3232         https://bugs.webkit.org/show_bug.cgi?id=70617
3233
3234         This fixes a bug introduced by http://trac.webkit.org/changeset/97658
3235         which causes all HTML Keygen elements with a keytype optional attribute
3236         to be considered as unsupported.
3237
3238         A regression test is included.
3239
3240         Reviewed by Darin Adler.
3241
3242         Test: http/tests/misc/submit-post-keygen.html
3243
3244         * html/HTMLKeygenElement.cpp:
3245
3246 2011-11-03  Adrienne Walker  <enne@google.com>
3247
3248         [chromium] Implement checkerboarding for missing layer tiles
3249         https://bugs.webkit.org/show_bug.cgi?id=69585
3250
3251         Reviewed by James Robinson.
3252
3253         For tiles that have no texture or haven't even been created yet,
3254         draw using the background color of the layer.
3255
3256         The only background color set is currently the non-composited content,
3257         and all other layers use transparent black by default.
3258
3259         * platform/graphics/chromium/LayerChromium.cpp:
3260         (WebCore::LayerChromium::pushPropertiesTo):
3261         * platform/graphics/chromium/NonCompositedContentHost.cpp:
3262         (WebCore::NonCompositedContentHost::setBackgroundColor):
3263         * platform/graphics/chromium/NonCompositedContentHost.h:
3264         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
3265         (WebCore::CCLayerImpl::setBackgroundColor):
3266         * platform/graphics/chromium/cc/CCLayerImpl.h:
3267         (WebCore::CCLayerImpl::backgroundColor):
3268         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
3269         (WebCore::CCTiledLayerImpl::drawTiles):
3270
3271 2011-11-04  Nico Weber  <thakis@chromium.org>
3272
3273         [chromium] Remove most exit time destructors
3274         https://bugs.webkit.org/show_bug.cgi?id=71524
3275
3276         Do this by using the DEFINE_STATIC_LOCAL macro, which allocates things on the heaps and then leaks them.
3277
3278         Reviewed by Dimitri Glazkov.
3279
3280         No behavior change, so no new tests.
3281
3282         * platform/chromium/CursorChromium.cpp:
3283         (WebCore::pointerCursor):
3284         (WebCore::crossCursor):
3285         (WebCore::handCursor):
3286         (WebCore::iBeamCursor):
3287         (WebCore::waitCursor):
3288         (WebCore::helpCursor):
3289         (WebCore::eastResizeCursor):
3290         (WebCore::northResizeCursor):
3291         (WebCore::northEastResizeCursor):
3292         (WebCore::northWestResizeCursor):
3293         (WebCore::southResizeCursor):
3294         (WebCore::southEastResizeCursor):
3295         (WebCore::southWestResizeCursor):
3296         (WebCore::westResizeCursor):
3297         (WebCore::northSouthResizeCursor):
3298         (WebCore::eastWestResizeCursor):
3299         (WebCore::northEastSouthWestResizeCursor):
3300         (WebCore::northWestSouthEastResizeCursor):
3301         (WebCore::columnResizeCursor):
3302         (WebCore::rowResizeCursor):
3303         (WebCore::middlePanningCursor):
3304         (WebCore::eastPanningCursor):
3305         (WebCore::northPanningCursor):
3306         (WebCore::northEastPanningCursor):
3307         (WebCore::northWestPanningCursor):
3308         (WebCore::southPanningCursor):
3309         (WebCore::southEastPanningCursor):
3310         (WebCore::southWestPanningCursor):
3311         (WebCore::westPanningCursor):
3312         (WebCore::moveCursor):
3313         (WebCore::verticalTextCursor):
3314         (WebCore::cellCursor):
3315         (WebCore::contextMenuCursor):
3316         (WebCore::aliasCursor):
3317         (WebCore::progressCursor):
3318         (WebCore::noDropCursor):
3319         (WebCore::copyCursor):
3320         (WebCore::noneCursor):
3321         (WebCore::notAllowedCursor):
3322         (WebCore::zoomInCursor):
3323         (WebCore::zoomOutCursor):
3324         (WebCore::grabCursor):
3325         (WebCore::grabbingCursor):
3326         * platform/chromium/LanguageChromium.cpp:
3327         (WebCore::platformDefaultLanguage):
3328         * platform/chromium/MIMETypeRegistryChromium.cpp:
3329         (WebCore::dummyHashSet):
3330
3331 2011-11-03  Anders Carlsson  <andersca@apple.com>
3332
3333         Add NetscapePlugin::convertFromRootView
3334         https://bugs.webkit.org/show_bug.cgi?id=71526
3335
3336         Reviewed by Sam Weinig.
3337
3338         Export some symbols that WebKit2 needs.
3339
3340         * WebCore.exp.in:
3341
3342 2011-11-03  Adrienne Walker  <enne@google.com>
3343
3344         [chromium] Fix incorrect visibility/scissor rect for threaded compositing
3345         https://bugs.webkit.org/show_bug.cgi?id=70962
3346
3347         Reviewed by James Robinson.
3348
3349         In order to properly scroll independent of layout on the compositor
3350         thread, we have to apply the scroll to the right layer. Previously,
3351         the NonCompositedContentHost was the root of the graphics layer tree
3352         with all other layers underneath it. However, applying a scroll to
3353         that layer would also scroll the clip layer for the main frame
3354         underneath it, causing visibility issues.
3355
3356         This patch moves the NonCompositedHost to be a child of the
3357         RenderLayerCompositor's scroll layer. This was exposed on
3358         RenderLayerCompositor, because there's no other way to get to this
3359         layer in a way that doesn't make assumptions about the structure of
3360         the layers on a frame.
3361
3362         This also removes the hacks in calculateVisibleLayerRect and
3363         tilingTransform for scroll position.
3364
3365         Partially tested by existing compositor tests. Manually tested
3366         threaded compositing scrolling.
3367
3368         * platform/graphics/chromium/NonCompositedContentHost.cpp:
3369         (WebCore::NonCompositedContentHost::setScrollLayer):
3370         (WebCore::NonCompositedContentHost::setViewport):
3371         (WebCore::NonCompositedContentHost::scrollLayer):
3372         * platform/graphics/chromium/NonCompositedContentHost.h:
3373         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3374         (WebCore::CCLayerTreeHost::create):
3375         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
3376         (WebCore::CCLayerTreeHost::applyScrollDeltas):
3377         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3378         (WebCore::CCLayerTreeHost::setRootLayer):
3379         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h:
3380         (WebCore::CCLayerTreeHostCommon::calculateVisibleLayerRect):
3381         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3382         (WebCore::findScrollLayer):
3383         (WebCore::CCLayerTreeHostImpl::setRootLayer):
3384         (WebCore::CCLayerTreeHostImpl::scrollRootLayer):
3385         (WebCore::CCLayerTreeHostImpl::processScrollDeltas):
3386         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3387         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
3388         (WebCore::CCTiledLayerImpl::tilingTransform):
3389         * rendering/RenderLayerCompositor.cpp:
3390         (WebCore::RenderLayerCompositor::scrollLayer):
3391         * rendering/RenderLayerCompositor.h:
3392
3393 2011-11-04  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
3394
3395         [Qt] Refactor and clean up the qmake build system
3396
3397         The qmake build system has accumulated a bit of cruft and redundancy
3398         over time. There's also a fairly tight coupling between how to build
3399         the various targets, and _what_ to build, making it harder to add new
3400         rules or sources. This patch aims to elevate these issues somewhat.
3401
3402         This is a short-list of the changes:
3403
3404           * The rules for how to build targets are now mostly contained as
3405             prf-files in Tools/qmake/mkspecs/features. Using mkspecs also
3406             allows us to do pre- and post-processing of each project file,
3407             which helps to clean up the actual project files.
3408
3409           * Derived sources are no longer generated as a separate make-step
3410             but is part of each target's project file as a subdir. Makefile
3411             rules are used to ensure that we run make on the derived sources
3412             before running qmake on the actual target makefile. This makes
3413             it easier to keep a proper dependency between derived sources
3414             and the target.
3415
3416           * We use GNU make and the compiler to generate dependencies on
3417             UNIX-based systems running Qt 5. This allows us to lessen the
3418             need to run qmake, which should reduce compile time.
3419
3420           * WebKit2 is now build by default if building with Qt 5. It can
3421             be disabled by passing --no-webkit2 to build-webkit.
3422
3423         The result of these changes are hopefully a cleaner and easier
3424         build system to modify, and faster build times due to no longer
3425         running qmake on every single build. It's also a first step
3426         towards possibly generating the list of sources using another
3427         build system.
3428
3429         https://bugs.webkit.org/show_bug.cgi?id=71222
3430
3431         Reviewed by Simon Hausmann.
3432
3433         * DerivedSources.pri: Renamed from Source/WebCore/CodeGenerators.pri.
3434         * DerivedSources.pro: Removed.
3435         * Target.pri: Copied from Source/WebCore/WebCore.pro.
3436         * WebCore.pro:
3437
3438 2011-11-04  Tommy Widenflycht  <tommyw@google.com>
3439
3440         [chromium] MediaStream API: Fixing wrong path for PeerConnectionHandler.h in WebCore.gyp
3441         https://bugs.webkit.org/show_bug.cgi?id=71548
3442
3443         Reviewed by Tony Gentilcore.
3444
3445         * WebCore.gypi:
3446
3447 2011-11-04  Patrick Gansterer  <paroga@webkit.org>
3448
3449         Unreviewed CMake build fix for !ENABLE(SQL_DATABASE).
3450
3451         * CMakeLists.txt: Always compile the SQLite source files, since they are required for build.
3452
3453 2011-11-03  Ryosuke Niwa  <rniwa@webkit.org>
3454
3455         REGRESSION (r99076): Pasting into password fields is broken
3456         https://bugs.webkit.org/show_bug.cgi?id=71483
3457
3458         Reviewed by Darin Adler.
3459
3460         The bug was caused by plainText serializing secured (instead of original) text.
3461         Fixed the bug by adding new TextIterator behavior that serializes the original text
3462         and using it in ReplacementFragment::ReplacementFragment.
3463
3464         * editing/ReplaceSelectionCommand.cpp:
3465         (WebCore::ReplacementFragment::ReplacementFragment):
3466         * editing/TextIterator.cpp:
3467         (WebCore::TextIterator::TextIterator):
3468         (WebCore::TextIterator::emitText):
3469         * editing/TextIterator.h:
3470
3471 2011-11-03  Eric Carlson  <eric.carlson@apple.com>
3472
3473         Add TrackEvent
3474         https://bugs.webkit.org/show_bug.cgi?id=71178
3475
3476         Reviewed by Sam Weinig.
3477
3478         Test: fast/events/constructors/track-event-constructor.html
3479
3480         * CMakeLists.txt: Add new files for TrackEvent.
3481         * CodeGenerators.pri: Ditto.
3482         * DerivedSources.cpp: Ditto.
3483         * DerivedSources.make: Ditto.
3484         * GNUmakefile.am: Ditto.
3485         * GNUmakefile.list.am: Ditto.
3486         * WebCore.gypi: Ditto.
3487         * WebCore.pro: Ditto.
3488         * WebCore.xcodeproj/project.pbxproj: Ditto.
3489         * bindings/generic/EventConstructors.h: Ditto.
3490         * bindings/gobject/GNUmakefile.am: Ditto.