fd29f24b25fc56244ed553ed1bfa4a83fa2a6e85
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-10-17  Eric Carlson  <eric.carlson@apple.com>
2
3         Cues should be loaded by the cached resource loader
4         https://bugs.webkit.org/show_bug.cgi?id=70134
5
6         Reviewed by Darin Adler.
7
8         No new tests, changes covered by existing tests.
9
10         * CMakeLists.txt: Add CachedCues.cpp/h.
11         * GNUmakefile.list.am: Ditto.
12         * WebCore.gypi: Ditto.
13         * WebCore.xcodeproj/project.pbxproj: Ditto.
14
15         * loader/cache/CachedCues.cpp: Added.
16         (WebCore::CachedCues::CachedCues):
17         (WebCore::CachedCues::~CachedCues):
18         (WebCore::CachedCues::data): Called when new data has been loaded, pass it to all registered
19             clients.
20         * loader/cache/CachedCues.h: Added.
21
22         * loader/cache/CachedResource.cpp:
23         (WebCore::defaultPriorityForResourceType): Cues have low loader priority.
24         * loader/cache/CachedResource.h:
25
26         * loader/cache/CachedResourceClient.h:
27         (WebCore::CachedResourceClient::didReceiveData): New client interface.
28
29         * loader/cache/CachedResourceLoader.cpp:
30         (WebCore::createResource): Create and return a new cue loader.
31         (WebCore::CachedResourceLoader::requestCues):
32         (WebCore::CachedResourceLoader::checkInsecureContent): Cues aren't mentioned in the CPS spec
33             yet, but they only work with a media element so use the mdia policy.
34         (WebCore::CachedResourceLoader::canRequest): Allow cues to be loaded from any origin like media.
35         * loader/cache/CachedResourceLoader.h:
36
37         * loader/cache/CachedResourceRequest.cpp:
38         (WebCore::cachedResourceTypeToTargetType):
39         * platform/network/chromium/ResourceRequest.h:
40
41 2011-10-17  Dan Bernstein  <mitz@apple.com>
42
43         <rdar://problem/10293929> REGRESSION (r97525): iChat transcript has horizontal scroll bar when the conversation includes a wide image
44         https://bugs.webkit.org/show_bug.cgi?id=70204
45
46         Reviewed by Darin Adler.
47
48         Reverted r97525, which was supposed to fix <http://webkit.org/b/29447>.
49
50         * rendering/RenderBox.cpp:
51         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
52         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
53         * rendering/RenderBox.h:
54
55 2011-10-17  Ada Chan  <adachan@apple.com>
56
57         Export KURL::baseAsString() so it can be called in WebProcessProxy::assumeReadAccessToBaseURL() in WebKit2.
58         https://bugs.webkit.org/show_bug.cgi?id=70168
59
60         Reviewed by Alexey Proskuryakov.
61
62         No new tests. There is no change in functionality.
63
64         * WebCore.exp.in: Export KURL::baseAsString().
65
66 2011-10-17  Ryosuke Niwa  <rniwa@webkit.org>
67
68         Touch Internals.cpp to make 64-bit GTK+ build happy.
69
70         * testing/Internals.cpp:
71
72 2011-10-17  Chris Fleizach  <cfleizach@apple.com>
73
74         AX: children() method should be consolidated in AccessibilityObject
75         https://bugs.webkit.org/show_bug.cgi?id=70243
76
77         Code cleanup, no new tests.
78
79         Reviewed by Darin Adler.
80
81         * accessibility/AccessibilityObject.cpp:
82         (WebCore::AccessibilityObject::children):
83         * accessibility/AccessibilityObject.h:
84         * accessibility/AccessibilityRenderObject.cpp:
85         (WebCore::AccessibilityRenderObject::updateChildrenIfNecessary):
86         * accessibility/AccessibilityRenderObject.h:
87         * accessibility/AccessibilityScrollView.cpp:
88         (WebCore::AccessibilityScrollView::updateChildrenIfNecessary):
89         (WebCore::AccessibilityScrollView::updateScrollbars):
90         (WebCore::AccessibilityScrollView::addChildren):
91         * accessibility/AccessibilityScrollView.h:
92         * accessibility/AccessibilitySlider.cpp:
93         * accessibility/AccessibilitySlider.h:
94         * accessibility/AccessibilityTableColumn.cpp:
95         * accessibility/AccessibilityTableColumn.h:
96         * accessibility/AccessibilityTableHeaderContainer.cpp:
97         * accessibility/AccessibilityTableHeaderContainer.h:
98
99 2011-10-17  Vsevolod Vlasov  <vsevik@chromium.org>
100
101         Web Inspector: Search matches highlighting in text does not work correctly.
102         https://bugs.webkit.org/show_bug.cgi?id=70244
103
104         Reviewed by Pavel Feldman.
105
106         Test: inspector/utilities-highlight-results.html
107
108         * inspector/front-end/utilities.js:
109         ():
110
111 2011-10-17  Chris Fleizach  <cfleizach@apple.com>
112
113         AX: webkit won't always send live region notifications
114         https://bugs.webkit.org/show_bug.cgi?id=70030
115
116         Webkit purposefully does not send live region notifications if some AT client has not accessed the AX tree in between 
117         the last live region update (ostensibly to improve performance).
118         However, this is problematic if a screen reader misses one notification... it has no idea what happened and the only 
119         recourse is to rescan the page for changes. The correct thing to do is to always send notifications.
120
121         Reviewed by Darin Adler.
122
123         Test: platform/mac/accessibility/aria-liveregions-notifications-always-sent.html
124
125         * accessibility/AccessibilityRenderObject.cpp:
126         (WebCore::AccessibilityRenderObject::childrenChanged):
127
128 2011-10-12  Pavel Podivilov  <podivilov@chromium.org>
129
130         Web Inspector: fix handling of source mapping entries with no mapping.
131         https://bugs.webkit.org/show_bug.cgi?id=69941
132
133         Reviewed by Pavel Feldman.
134
135         * inspector/front-end/CompilerSourceMapping.js:
136         (WebInspector.ClosureCompilerSourceMapping.prototype._parseMappings):
137
138 2011-10-17  Mikhail Naganov  <mnaganov@chromium.org>
139
140         Web Inspector: [Chromium] Add an ability to look up and explore an object from a heap profile.
141         https://bugs.webkit.org/show_bug.cgi?id=61179
142
143         This is exteremely helpful when dealing with DOM wrappers, as
144         their properties are mostly implemented with getters and thus not
145         stored in heap snapshots.
146
147         Reviewed by Pavel Feldman.
148
149         * English.lproj/localizedStrings.js:
150         * bindings/js/ScriptProfiler.cpp:
151         (WebCore::ScriptProfiler::objectByHeapObjectId):
152         * bindings/js/ScriptProfiler.h:
153         * bindings/v8/ScriptProfiler.cpp:
154         (WebCore::ScriptProfiler::objectByHeapObjectId):
155         * bindings/v8/ScriptProfiler.h:
156         * inspector/Inspector.json:
157         * inspector/InspectorController.cpp:
158         (WebCore::InspectorController::InspectorController):
159         * inspector/InspectorProfilerAgent.cpp:
160         (WebCore::InspectorProfilerAgent::create):
161         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
162         (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId):
163         * inspector/InspectorProfilerAgent.h:
164         * inspector/front-end/DetailedHeapshotGridNodes.js:
165         (WebInspector.HeapSnapshotGridNode.prototype.hasHoverMessage.false.queryObjectContent):
166         (WebInspector.HeapSnapshotGenericObjectNode):
167         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
168         (WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent.else.formatResult):
169         (WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent):
170         (WebInspector.HeapSnapshotGenericObjectNode.prototype.shortenWindowURL):
171         * inspector/front-end/DetailedHeapshotView.js:
172         (WebInspector.DetailedHeapshotView.prototype._showObjectPopover):
173         * inspector/front-end/HeapSnapshot.js:
174         (WebInspector.HeapSnapshotNode.prototype.get canBeQueried):
175         (WebInspector.HeapSnapshotNode.prototype.get flags):
176         (WebInspector.HeapSnapshotNode.prototype.get isDOMWindow):
177         (WebInspector.HeapSnapshot.prototype._init):
178         (WebInspector.HeapSnapshot.prototype.dispose):
179         (WebInspector.HeapSnapshot.prototype._flagsOfNode):
180         (WebInspector.HeapSnapshot.prototype._calculateFlags):
181         (WebInspector.HeapSnapshot.prototype.updateStaticData):
182         (WebInspector.HeapSnapshotNodesProvider.prototype._serialize):
183         * inspector/front-end/HeapSnapshotProxy.js:
184         (WebInspector.HeapSnapshotProxy.prototype.get nodeFlags):
185         * inspector/front-end/RemoteObject.js:
186         (WebInspector.RemoteObject.fromError):
187         * inspector/front-end/heapProfiler.css:
188         (.detailed-heapshot-view tr:not(.selected) td.object-column span.highlight):
189
190 2011-10-17  Alexander Pavlov  <apavlov@chromium.org>
191
192         Web Inspector: Editing CSS selector doesn't fire onResourceContentCommitted
193         https://bugs.webkit.org/show_bug.cgi?id=70018
194
195         Reviewed by Yury Semikhatsky.
196
197         Test: inspector/styles/commit-selector.html
198
199         * inspector/front-end/CSSStyleModel.js:
200         (WebInspector.CSSStyleModel.prototype.setRuleSelector.callback):
201         (WebInspector.CSSStyleModel.prototype.setRuleSelector):
202
203 2011-10-17  Andreas Kling  <kling@webkit.org>
204
205         CSS/XSLStyleSheet: Remove insert() and remove().
206         https://bugs.webkit.org/show_bug.cgi?id=70226
207
208         Reviewed by Antti Koivisto.
209
210         Remove insert() and remove() from XSLStyleSheet. CSSStyleSheet retains remove()
211         since it's used by InspectorStyleSheet as well as SVGFontFaceElement.
212
213         * css/CSSStyleSheet.cpp:
214         (WebCore::CSSStyleSheet::remove):
215
216             Remove range check. This method is internal to WebKit and the call sites
217             already take care of it.
218
219         (WebCore::CSSStyleSheet::insertRule):
220         (WebCore::CSSStyleSheet::deleteRule):
221         * css/CSSStyleSheet.h:
222         * xml/XSLStyleSheet.h:
223
224 2011-10-17  Rosen Dash  <rosen.dash@motorola.com>
225
226         when CSS pseudo selectors are applied (:before and :after) the *-of-line keyboard navigation does not work
227         https://bugs.webkit.org/show_bug.cgi?id=10123
228
229         Reviewed by Ryosuke Niwa.
230
231         This patch addresses folllowing two issues:
232         1. When CSS pseudo elements are before or after is used with content attribute containing single character
233            at the start/end of text and we try to move cursor by right navigation key, the page freezes falling
234            into an infinite loop.
235         2. When these elements try to insert some text between a text line, navigation by right/left arrow key is prohibited.
236
237         Tests: editing/selection/css-pseudo-element-hang.html
238                editing/selection/css-pseudo-element.html
239
240         * editing/VisiblePosition.cpp:
241         (WebCore::VisiblePosition::leftVisuallyDistinctCandidate):
242         (WebCore::VisiblePosition::rightVisuallyDistinctCandidate):
243
244 2011-10-15  Antti Koivisto  <antti@apple.com>
245
246         Test :visited pseudo class
247         https://bugs.webkit.org/show_bug.cgi?id=70219
248
249         Reviewed by Andreas Kling.
250         
251         Currently DRT doesn't support :visited. All tests where it should match have wrong checked in results.
252         
253         - Make <a href=""> to match :visited in DRT. It already does on browsers. A number of existing tests 
254           for :visited use it already, the rest can be modified to use it.
255         - Make render tree dumps correctly dump the visited state dependent color.
256
257         * css/SelectorChecker.cpp:
258         (WebCore::SelectorChecker::determineLinkStateSlowCase):
259         * rendering/RenderTreeAsText.cpp:
260         (WebCore::RenderTreeAsText::writeRenderObject):
261
262 2011-10-17  Satish Sampath  <satish@chromium.org>
263
264         Avoid leaking document when leaving google.com due to geolocation
265         permission request.
266         https://bugs.webkit.org/show_bug.cgi?id=58027
267
268         Reviewed by Kenneth Rohde Christiansen.
269
270         * page/Geolocation.cpp:
271         (WebCore::Geolocation::Watchers::find): added
272         (WebCore::Geolocation::reset): cleared all pending notifiers.
273         (WebCore::Geolocation::clearWatch): removed from pending notifier set.
274         * page/Geolocation.h:
275         (WebCore::Geolocation::Watchers::find): added
276
277 2011-10-17  Andrei Lavreniyuk  <andy.lavr@gmail.com>
278
279         Fix clang WebKitGTK+ build.
280
281         Reviewed by Martin Robinson.
282
283         * plugins/gtk/PluginViewGtk.cpp:
284
285 2011-10-16  Adam Barth  <abarth@webkit.org>
286
287         Always disable ENABLE(ON_FIRST_TEXTAREA_FOCUS_SELECT_ALL) and delete associated code
288         https://bugs.webkit.org/show_bug.cgi?id=70216
289
290         Reviewed by Eric Seidel.
291
292         No port enables this feature.  It was added for the previous Android
293         port (and should have been an editing behavior in any case).
294
295         * html/HTMLTextAreaElement.cpp:
296         (WebCore::HTMLTextAreaElement::updateFocusAppearance):
297
298 2011-10-16  Ryosuke Niwa  <rniwa@webkit.org>
299
300         Expose rangeFromLocationAndLength and locationAndLengthFromRange via internals object
301         https://bugs.webkit.org/show_bug.cgi?id=68330
302
303         Reviewed by Hajime Morita.
304
305         Add rangeFromLocationAndLength, locationFromRange, and lengthFromRange to window.internals.
306
307         Test: editing/text-iterator/range-to-from-location-and-length.html
308
309         * WebCore.exp.in:
310         * testing/Internals.cpp:
311         (WebCore::Internals::scrollElementToRect):
312         (WebCore::Internals::rangeFromLocationAndLength):
313         (WebCore::Internals::locationFromRange):
314         (WebCore::Internals::lengthFromRange):
315         * testing/Internals.h:
316         * testing/Internals.idl:
317
318 2011-10-16  Kentaro Hara  <haraken@chromium.org>
319
320         Generate MessageChannel constructor by [Constructor] IDL
321         https://bugs.webkit.org/show_bug.cgi?id=70214
322
323         Reviewed by Adam Barth.
324
325         This patch generates an MessageChannel constructor for JSC by [Constructor] IDL,
326         but V8 is still using a custom constructor since the V8 constructor requires special logic.
327
328         Tests: fast/dom/global-constructors.html
329                fast/events/message-port.html
330                fast/events/message-port-no-wrapper.html
331                fast/dom/Window/window-postmessage-args.html
332
333         * bindings/js/JSMessageChannelCustom.cpp: Removed the MessageChannel constructor.
334         * dom/MessageChannel.idl: Generates the MessageChannel constructor for JSC.
335
336 2011-10-16  Ryosuke Niwa  <rniwa@webkit.org>
337
338         [Mac] fontForSelection and styleForSelectionStart should be moved to EditorMac
339         https://bugs.webkit.org/show_bug.cgi?id=70114
340
341         Reviewed by Hajime Morita.
342
343         Moved fontForSelection and styleForSelectionStart from Editor to EditorMac
344         and made styleForSelectionStart static local.
345
346         * editing/Editor.cpp:
347         * editing/Editor.h:
348         * editing/mac/EditorMac.mm:
349         (WebCore::styleForSelectionStart):
350         (WebCore::Editor::fontForSelection):
351         (WebCore::Editor::fontAttributesForSelectionStart):
352
353 2011-10-16  Kentaro Hara  <haraken@chromium.org>
354
355         Generate EventSource constructor for JSC by [Constructor] IDL
356         https://bugs.webkit.org/show_bug.cgi?id=70212
357
358         Reviewed by Adam Barth.
359
360         Removed JSEventSourceCustom.cpp.
361
362         Tests: fast/dom/global-constructors.html
363                fast/eventsource/eventsource-constructor.html
364                fast/eventsource/eventsource-attribute-listeners.html
365
366         * GNUmakefile.list.am: Removed JSEventSourceCustom.cpp.
367         * UseJSC.cmake: Ditto.
368         * WebCore.gypi: Ditto.
369         * WebCore.pro: Ditto.
370         * WebCore.xcodeproj/project.pbxproj: Ditto.
371         * bindings/js/JSBindingsAllInOne.cpp: Ditto.
372         * bindings/js/JSEventSourceCustom.cpp: Removed this file.
373         * page/EventSource.idl: Removed 'JSCustomConstructor' IDL.
374
375 2011-10-16  David Barr  <davidbarr@chromium.org>
376
377         Inline CSSPrimitiveValue::isQuirkValue() as non-virtual function
378         https://bugs.webkit.org/show_bug.cgi?id=64865
379
380         Reviewed by Darin Adler.
381
382         Based on profiling and patch from:
383         Tamas Czene <Czene.Tamas@stud.u-szeged.hu>
384
385         This is expected to produce a small performance progression.
386         Additional memory overhead is avoided by using spare bits.
387         CSSQuirkPrimitiveValue is removed as it becomes just a factory.
388
389         * GNUmakefile.list.am:
390         * WebCore.gypi:
391         * WebCore.order:
392         * WebCore.vcproj/WebCore.vcproj:
393         * WebCore.xcodeproj/project.pbxproj:
394         * css/CSSParser.cpp:
395         (WebCore::CSSParser::parseValidPrimitive):
396         * css/CSSParserValues.cpp:
397         (WebCore::CSSParserValue::createCSSValue):
398         * css/CSSPrimitiveValue.cpp:
399         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
400         * css/CSSPrimitiveValue.h:
401         (WebCore::CSSPrimitiveValue::createAllowingMarginQuirk):
402         Moved from CSSQuirkPrimitiveValue::create.
403         (WebCore::CSSPrimitiveValue::isQuirkValue):
404         * css/CSSQuirkPrimitiveValue.h: Removed.
405         * css/SVGCSSParser.cpp:
406         (WebCore::CSSParser::parseSVGValue):
407
408 2011-10-16  Kentaro Hara  <haraken@chromium.org>
409
410         Generate XMLHttpRequest constructor for JSC by [Constructor] IDL
411         https://bugs.webkit.org/show_bug.cgi?id=70208
412
413         Reviewed by Adam Barth.
414
415         This patch generates an XMLHttpRequest constructor for JSC by [Constructor] IDL,
416         but V8 is still using a custom constructor since the V8 constructor requires a special logic.
417
418         Tests: fast/dom/global-constructors.html
419                fast/dom/XMLHttpRequest-constants.html
420                fast/dom/xmlhttprequest-constructor-in-detached-document.html
421                http/tests/security/cookies/xmlhttprequest.html
422
423         * bindings/js/JSXMLHttpRequestCustom.cpp: Removed an XMLHttpRequest custom constructor.
424         * bindings/scripts/CodeGeneratorV8.pm: Currently, CodeGeneratorV8.pm generates constructor code whenever [Constructor] is specified, even if [V8CustomConstructor] is specified. This is wrong. This patch fixes the condition where the constructor code is generated.
425         * bindings/scripts/test/V8/V8TestObj.cpp: Updated a run-binding-tests result.
426         * xml/XMLHttpRequest.h: Added a necessary header.
427         * xml/XMLHttpRequest.idl: V8 is still using a custom constructor.
428
429 2011-10-16  Kentaro Hara  <haraken@chromium.org>
430
431         Generate XSLTProcessor constructor for JSC by [Constructor] IDL.
432         https://bugs.webkit.org/show_bug.cgi?id=70206
433
434         Reviewed by Adam Barth.
435
436         Tests: fast/xsl/xslt-processor.html
437                fast/xsl/default-html.html
438                fast/dom/global-constructors.html
439
440         * bindings/js/JSXSLTProcessorCustom.cpp: Removed a custom constructor.
441         * xml/XSLTProcessor.idl: Removed 'JSCustomConstructor'.
442
443 2011-10-16  Kentaro Hara  <haraken@chromium.org>
444
445         Support [Constructor] IDL for JSC.
446         https://bugs.webkit.org/show_bug.cgi?id=70101
447
448         Reviewed by Adam Barth.
449
450         The spec for [Constructor] IDL is here: http://www.w3.org/TR/WebIDL/#Constructor
451         This patch introduced [Constructor] IDL for JSC. This patch also added
452         [ConstructorRaisesException] for JSC. If [ConstructorRaisesException] is specified,
453         a placeholder for ExceptionCode is passed to XXX::create(), like XXX::create(..., ec).
454
455         Notes:
456         - We do not yet support constructor overloading.
457         - We do not yet support [Optional] without CallWithDefaultValue for constructor arguments.
458
459         Tests: Source/WebCore/bindings/scripts/test/TestInterface.idl
460                Source/WebCore/bindings/scripts/test/TestObj.idl
461
462         * bindings/scripts/CodeGeneratorJS.pm:
463         (GenerateHeader): Generates constructor declaration code to a header file, if a given DOM object has constructor.
464         (GenerateImplementation): Uses GenerateArgumentsCountCheck() and GenerateParametersCheck().
465         (GenerateArgumentsCountCheck): Splits out of GenerateImplementation() for reuse.
466         (GenerateParametersCheck): Splits out of GenerateImplementation() for reuse.
467         (GenerateConstructorDefinition): Generates constructor definition code.
468         * bindings/scripts/test/JS/JSTestInterface.cpp: Updated the run-binding-tests results.
469         (WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
470         * bindings/scripts/test/JS/JSTestInterface.h: Ditto.
471         (WebCore::JSTestInterfaceConstructor::create):
472         (WebCore::JSTestInterfaceConstructor::createStructure):
473         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto.
474         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
475         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: Ditto.
476         (WebCore::JSTestMediaQueryListListenerConstructor::create):
477         (WebCore::JSTestMediaQueryListListenerConstructor::createStructure):
478         * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
479         (WebCore::jsTestObjPrototypeFunctionVoidMethod):
480         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
481         (WebCore::jsTestObjPrototypeFunctionIntMethod):
482         (WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs):
483         (WebCore::jsTestObjPrototypeFunctionObjMethod):
484         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
485         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgs):
486         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
487         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
488         (WebCore::jsTestObjPrototypeFunctionIdbKey):
489         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
490         (WebCore::jsTestObjPrototypeFunctionMethodWithException):
491         (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException):
492         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
493         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
494         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrame):
495         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndArg):
496         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndOptionalArg):
497         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGesture):
498         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD):
499         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid):
500         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
501         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException):
502         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
503         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
504         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
505         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
506         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
507         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
508         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
509         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
510         (WebCore::jsTestObjPrototypeFunctionConditionalMethod1):
511         (WebCore::jsTestObjPrototypeFunctionConditionalMethod2):
512         (WebCore::jsTestObjPrototypeFunctionConditionalMethod3):
513         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
514         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
515         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
516         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
517         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
518         (WebCore::jsTestObjPrototypeFunctionClassMethod):
519         (WebCore::jsTestObjPrototypeFunctionClassMethodWithOptional):
520         * bindings/scripts/test/JS/JSTestObj.h: Ditto.
521         (WebCore::JSTestObjConstructor::create):
522         (WebCore::JSTestObjConstructor::createStructure):
523         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto.
524         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: Ditto.
525         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::create):
526         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure):
527
528 2011-10-16  Dmitry Lomov  <dslomov@google.com>
529
530         https://bugs.webkit.org/show_bug.cgi?id=70186
531         Pass MessagePortArray to JSC's SerializedScriptValue::serialize/deserialize.
532
533         Reviewed by Oliver Hunt.
534
535         * bindings/js/JSDOMWindowCustom.cpp:
536         (WebCore::handlePostMessage):
537         (WebCore::JSDOMWindow::postMessage):
538         (WebCore::JSDOMWindow::webkitPostMessage):
539         * bindings/js/JSDictionary.cpp:
540         (WebCore::JSDictionary::convertValue):
541         * bindings/js/JSHistoryCustom.cpp:
542         (WebCore::JSHistory::pushState):
543         (WebCore::JSHistory::replaceState):
544         * bindings/js/JSMessageEventCustom.cpp:
545         (WebCore::JSMessageEvent::data):
546         (WebCore::handleInitMessageEvent):
547         (WebCore::JSMessageEvent::initMessageEvent):
548         (WebCore::JSMessageEvent::webkitInitMessageEvent):
549         * bindings/js/JSMessagePortCustom.h:
550         (WebCore::handlePostMessage):
551         * bindings/js/JSPopStateEventCustom.cpp:
552         (WebCore::JSPopStateEvent::state):
553         * bindings/js/ScriptValue.cpp:
554         (WebCore::ScriptValue::serialize):
555         (WebCore::ScriptValue::deserialize):
556         * bindings/js/SerializedScriptValue.cpp:
557         (WebCore::SerializedScriptValue::create):
558         (WebCore::SerializedScriptValue::deserialize):
559         * bindings/js/SerializedScriptValue.h:
560
561 2011-10-16  Dan Bernstein  <mitz@apple.com>
562
563         REGRESSION (r96620): Float-avoiding block positioned incorrectly in right-to-left block
564         https://bugs.webkit.org/show_bug.cgi?id=70197
565
566         Reviewed by Dave Kilzer.
567
568         Test: fast/block/float/avoidance-rtl.html
569
570         * rendering/RenderBlock.cpp:
571         (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats): Changed
572         logicalLeftOffsetForContent() to startOffsetForContent() to get the right value in the
573         right-to-left case.
574
575 2011-10-16  Adam Barth  <abarth@webkit.org>
576
577         Always enable ENABLE(DOM_STORAGE)
578         https://bugs.webkit.org/show_bug.cgi?id=70189
579
580         Reviewed by Eric Seidel.
581
582         As discussed on webkit-dev, we are reducing the complexity of WebKit by
583         removing unnecessary configuration options.  DOMStorage is not a core
584         part of the web platform.  It should always be enabled.
585
586         * CMakeLists.txt:
587         * Configurations/FeatureDefines.xcconfig:
588         * GNUmakefile.am:
589         * GNUmakefile.list.am:
590         * UseJSC.cmake:
591         * WebCore.exp.in:
592         * WebCore.pro:
593         * bindings/js/JSEventCustom.cpp:
594         * bindings/js/JSInjectedScriptHostCustom.cpp:
595         * bindings/js/JSStorageCustom.cpp:
596         * bindings/v8/custom/V8EventCustom.cpp:
597         (WebCore::toV8):
598         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
599         (WebCore::V8InjectedScriptHost::storageIdCallback):
600         * bindings/v8/custom/V8StorageCustom.cpp:
601         * dom/Document.cpp:
602         (WebCore::Document::createEvent):
603         * dom/Event.cpp:
604         (WebCore::Event::isStorageEvent):
605         * dom/Event.h:
606         * dom/Node.cpp:
607         * features.pri:
608         * inspector/InjectedScriptHost.cpp:
609         (WebCore::InjectedScriptHost::InjectedScriptHost):
610         (WebCore::InjectedScriptHost::disconnect):
611         (WebCore::InjectedScriptHost::storageIdImpl):
612         * inspector/InjectedScriptHost.h:
613         (WebCore::InjectedScriptHost::init):
614         * inspector/InspectorController.cpp:
615         (WebCore::InspectorController::InspectorController):
616         (WebCore::InspectorController::connectFrontend):
617         (WebCore::InspectorController::disconnectFrontend):
618         (WebCore::InspectorController::restoreInspectorStateFromCookie):
619         * inspector/InspectorController.h:
620         * inspector/InspectorDOMStorageAgent.cpp:
621         * inspector/InspectorDOMStorageResource.cpp:
622         * inspector/InspectorDOMStorageResource.h:
623         * inspector/InspectorInstrumentation.cpp:
624         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
625         (WebCore::InspectorInstrumentation::didUseDOMStorageImpl):
626         * inspector/InspectorInstrumentation.h:
627         (WebCore::InspectorInstrumentation::didUseDOMStorage):
628         * inspector/InstrumentingAgents.h:
629         (WebCore::InstrumentingAgents::InstrumentingAgents):
630         * inspector/WorkerInspectorController.cpp:
631         (WebCore::WorkerInspectorController::WorkerInspectorController):
632         (WebCore::WorkerInspectorController::connectFrontend):
633         * inspector/generate-inspector-idl:
634         * page/Chrome.cpp:
635         * page/DOMWindow.cpp:
636         (WebCore::DOMWindow::~DOMWindow):
637         (WebCore::DOMWindow::clear):
638         (WebCore::DOMWindow::localStorage):
639         * page/DOMWindow.h:
640         * page/DOMWindow.idl:
641         * page/Navigator.cpp:
642         (WebCore::Navigator::getStorageUpdates):
643         * page/Navigator.h:
644         * page/Navigator.idl:
645         * page/Page.cpp:
646         * page/Page.h:
647         * page/PageGroup.cpp:
648         (WebCore::PageGroup::closeLocalStorage):
649         * page/PageGroup.h:
650         * page/Settings.cpp:
651         (WebCore::Settings::Settings):
652         (WebCore::Settings::setSessionStorageQuota):
653         * page/Settings.h:
654         (WebCore::Settings::sessionStorageQuota):
655         * storage/LocalStorageTask.cpp:
656         * storage/LocalStorageTask.h:
657         * storage/LocalStorageThread.cpp:
658         * storage/LocalStorageThread.h:
659         * storage/Storage.cpp:
660         * storage/Storage.h:
661         * storage/Storage.idl:
662         * storage/StorageArea.h:
663         * storage/StorageAreaImpl.cpp:
664         * storage/StorageAreaImpl.h:
665         * storage/StorageAreaSync.cpp:
666         (WebCore::StorageAreaSync::scheduleSync):
667         * storage/StorageAreaSync.h:
668         * storage/StorageEvent.cpp:
669         * storage/StorageEvent.h:
670         * storage/StorageEvent.idl:
671         * storage/StorageEventDispatcher.cpp:
672         * storage/StorageEventDispatcher.h:
673         * storage/StorageMap.cpp:
674         * storage/StorageMap.h:
675         * storage/StorageNamespace.cpp:
676         * storage/StorageNamespace.h:
677         * storage/StorageNamespaceImpl.cpp:
678         * storage/StorageNamespaceImpl.h:
679         * storage/StorageSyncManager.cpp:
680         (WebCore::StorageSyncManager::scheduleDeleteEmptyDatabase):
681         * storage/StorageSyncManager.h:
682         * storage/StorageTracker.cpp:
683         * storage/StorageTracker.h:
684
685 2011-10-15  Adam Barth  <abarth@webkit.org>
686
687         Rename ENABLE(SKIA_TEXT) to USE(SKIA_TEXT)
688         https://bugs.webkit.org/show_bug.cgi?id=70191
689
690         Reviewed by Daniel Bates.
691
692         SKIA_TEXT is not a WebKit feature.  It's a macro that determines
693         whether we use a feature of the underly library (Skia).
694
695         * platform/graphics/chromium/FontChromiumWin.cpp:
696         (WebCore::Font::drawComplexText):
697         * platform/graphics/chromium/UniscribeHelper.cpp:
698         (WebCore::UniscribeHelper::draw):
699         * platform/graphics/skia/PlatformContextSkia.cpp:
700         (WebCore::PlatformContextSkia::isNativeFontRenderingAllowed):
701         * platform/graphics/skia/PlatformContextSkia.h:
702         * platform/graphics/skia/SkiaFontWin.cpp:
703         * platform/graphics/skia/SkiaFontWin.h:
704
705 2011-10-15  Eric Carlson  <eric.carlson@apple.com>
706
707         Make VIDEO_TRACK compile with warnings as errors enabled
708         https://bugs.webkit.org/show_bug.cgi?id=70188
709
710         Reviewed by Filip Pizlo.
711
712         No new tests, no functionality changed.
713
714         * html/TextTrackCueList.h: Fix an include.
715         * html/track/CueParser.cpp:
716         (WebCore::CueParser::supportsType): Remove unused param.
717         * html/track/CueParser.h:
718         (WebCore::CueParserClient::~CueParserClient): Add virtual destructor.
719         * html/track/CueParserPrivate.h:
720         (WebCore::CueParserPrivateClient::~CueParserPrivateClient): Ditto.
721         * loader/CueLoader.h:
722         (WebCore::CueLoaderClient::~CueLoaderClient): Ditto.
723         (WebCore::CueLoader::~CueLoader): Ditto.
724
725 2011-10-15  Adam Barth  <abarth@webkit.org>
726
727         Rename ENABLE(TILED_BACKING_STORE) to USE(TILED_BACKING_STORE)
728         https://bugs.webkit.org/show_bug.cgi?id=70194
729
730         Reviewed by Daniel Bates.
731
732         TILED_BACKING_STORE isn't a web platform feature.  It's an
733         implementation strategy for WebKit that's used by some ports
734         and not by others.
735
736         * features.pri:
737         * loader/EmptyClients.h:
738         * page/Chrome.cpp:
739         * page/Chrome.h:
740         * page/ChromeClient.h:
741         * page/Frame.cpp:
742         (WebCore::Frame::Frame):
743         (WebCore::Frame::setView):
744         * page/Frame.h:
745         * page/FrameView.cpp:
746         (WebCore::FrameView::repaintContentRectangle):
747         (WebCore::FrameView::doDeferredRepaints):
748         * page/Settings.cpp:
749         (WebCore::Settings::setTiledBackingStoreEnabled):
750         * platform/HostWindow.h:
751         * platform/ScrollView.cpp:
752         (WebCore::ScrollView::setScrollPosition):
753         * platform/graphics/Tile.h:
754         * platform/graphics/TiledBackingStore.cpp:
755         * platform/graphics/TiledBackingStore.h:
756         * platform/graphics/TiledBackingStoreBackend.h:
757         * platform/graphics/TiledBackingStoreClient.h:
758         * platform/graphics/qt/GraphicsLayerQt.cpp:
759         (WebCore::GraphicsLayerQtImpl::GraphicsLayerQtImpl):
760         (WebCore::GraphicsLayerQtImpl::~GraphicsLayerQtImpl):
761         (WebCore::GraphicsLayerQtImpl::recache):
762         (WebCore::GraphicsLayerQtImpl::paint):
763         * platform/graphics/qt/TileQt.cpp:
764         * platform/graphics/qt/TileQt.h:
765         * platform/graphics/texmap/TextureMapperNode.cpp:
766         (WebCore::TextureMapperNode::computeTiles):
767         (WebCore::TextureMapperNode::renderContent):
768         (WebCore::TextureMapperNode::paintSelf):
769         (WebCore::TextureMapperNode::syncCompositingStateSelf):
770         * platform/graphics/texmap/TextureMapperNode.h:
771         (WebCore::TextureMapperNode::State::State):
772
773 2011-10-15  Adam Barth  <abarth@webkit.org>
774
775         Remove the last remnant of WBXML
776         https://bugs.webkit.org/show_bug.cgi?id=70187
777
778         Reviewed by Daniel Bates.
779
780         The bulk of the WBXML code was removed in 2009, but we missed one block.
781
782         * platform/wince/MIMETypeRegistryWinCE.cpp:
783         (WebCore::initMIMETypeEntensionMap):
784
785 2011-10-15  Darin Adler  <darin@apple.com>
786
787         REGRESSION(r97533): fast/forms/select-script-onchange.html failed after
788         https://bugs.webkit.org/show_bug.cgi?id=70173
789
790         Reviewed by Ryosuke Niwa.
791
792         * html/HTMLSelectElement.cpp:
793         (WebCore::HTMLSelectElement::setValue): Removed unneeded boolean argument
794         [true for deselect].
795         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Added explicit
796         boolean arguments for all calls to setSelectedIndex to restore pre-r97533
797         behavior.
798         (WebCore::HTMLSelectElement::typeAheadFind): Ditto.
799         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex): Ditto.
800
801         * html/HTMLSelectElement.h:
802         Removed default of true for userDrivenChange. Each caller should pass it
803         explicitly. Longer term we should use an enum instead of a boolean or find
804         some other way of avoiding the argument.
805         (WebCore::HTMLSelectElement::setSelectedIndex):
806         Pass false for userDrivenChange as the old code did pre-r97533.
807
808 2011-10-15  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
809
810         [Qt] [Symbian] Remove support for the Symbian platform for the QtWebKit port
811         https://bugs.webkit.org/show_bug.cgi?id=69920
812
813         Reviewed by Kenneth Rohde Christiansen.
814
815         No new tests as there is no new functionality.
816
817         * WebCore.gypi:
818         * WebCore.pri:
819         * WebCore.pro:
820         * bindings/v8/V8GCController.cpp:
821         (WebCore::V8GCController::checkMemoryUsage):
822         * config.h:
823         * css/CSSPrimitiveValueMappings.h:
824         (WebCore::CSSPrimitiveValue::operator int):
825         * features.pri:
826         * page/NavigatorBase.cpp:
827         * platform/graphics/qt/GraphicsContextQt.cpp:
828         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
829         * platform/network/qt/ResourceRequestQt.cpp:
830         (WebCore::initializeMaximumHTTPConnectionCountPerHost):
831         * platform/text/qt/TextCodecQt.cpp:
832         (WebCore::TextCodecQt::decode):
833         * plugins/PluginDatabase.cpp:
834         * plugins/PluginPackage.cpp:
835         (WebCore::PluginPackage::unload):
836         * plugins/PluginPackage.h:
837         (WebCore::PluginPackage::version):
838         * plugins/PluginView.cpp:
839         (WebCore::PluginView::setFrameRect):
840         * plugins/PluginView.h:
841         * plugins/npapi.h:
842         * plugins/symbian: Removed.
843         * plugins/symbian/PluginContainerSymbian.cpp: Removed.
844         * plugins/symbian/PluginContainerSymbian.h: Removed.
845         * plugins/symbian/PluginDatabaseSymbian.cpp: Removed.
846         * plugins/symbian/PluginPackageSymbian.cpp: Removed.
847         * plugins/symbian/PluginViewSymbian.cpp: Removed.
848         * plugins/symbian/npinterface.h: Removed.
849
850 2011-10-08  Robert Hogan  <robert@webkit.org>
851
852         CSS 2.1 failure: height-width-table-001.htm
853         https://bugs.webkit.org/show_bug.cgi?id=69709
854
855         Reviewed by Simon Fraser.
856
857         CSS 2.1 expects CSS table elements to treat fixed height/width as
858         excluding table borders, but HTML table elements to treat fixed height/width as
859         including them.
860         
861         See http://lists.w3.org/Archives/Public/www-style/2011Jan/0178.html
862             http://lists.w3.org/Archives/Public/public-css-testsuite/2011Oct/0005.html
863             
864         It looks like some clarification is pending in the specs, but the new behaviour
865         lets WebKit pass the following tests in the suite CSS and also match FF:
866           height-width-table-001.htm
867           height-width-inline-table-001.htm
868           abspos-containing-block-initial-004d.htm
869
870         * rendering/RenderTable.cpp:
871         (WebCore::RenderTable::computeLogicalWidth):
872         (WebCore::RenderTable::layout):
873
874 2011-10-15  Darin Adler  <darin@apple.com>
875
876         Make toHTMLElement fail to compile if you try to use it on an HTMLElement*
877         https://bugs.webkit.org/show_bug.cgi?id=70164
878
879         Reviewed by Adam Barth.
880
881         Refactoring covered by existing tests.
882
883         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
884         (WebCore::JSHTMLFrameSetElement::nameGetter): Removed unneeded casts and
885         some unneeded local variables as well. Changed the name of the local variable
886         for the HTMLFrameElement to frameElement to avoid confusion with the Frame.
887         * dom/Document.cpp:
888         (WebCore::Document::openSearchDescriptionURL): Removed unneeded HTMLElement
889         check; we can call hasTagName directly on a Node and that takes care of
890         checking both that it's an HTMLElement and checking the tag name.
891         * dom/MicroDataItemList.cpp:
892         (WebCore::MicroDataItemList::nodeMatches): Use toHTMLElement instead of
893         a cast. Also changed hasAttribute calls to fastHasAttribute and getAttribute
894         calls to fastGetAttribute since these are neither style attributes nor SVG
895         animatables.
896         * editing/ApplyStyleCommand.cpp:
897         (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown): Use toHTMLElement.
898         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded): Ditto.
899         * editing/DeleteButtonController.cpp:
900         (WebCore::DeleteButtonController::show): Removed unneeded toHTMLElement call.
901         * html/HTMLElement.cpp:
902         (WebCore::HTMLElement::setOuterHTML): Use toHTMLElement.
903         * html/HTMLElement.h: Added toHTMLElement overload to catch calls when the
904         pointer is already HTMLElement* or a pointer to a class derived from it.
905         * html/HTMLSelectElement.cpp:
906         (WebCore::HTMLSelectElement::recalcListItems): Use toHTMLElement.
907         * html/HTMLTextAreaElement.cpp:
908         (WebCore::HTMLTextAreaElement::innerTextElement): Use toHTMLElement.
909
910 2011-10-15  Antoine Labour  <piman@chromium.org>
911
912         Add WebAcceleratedContentLayer backed by a texture to support accelerated content hosting
913         https://bugs.webkit.org/show_bug.cgi?id=70084
914
915         Reviewed by James Robinson.
916
917         Covered by existing compositing/ tests
918
919         * platform/graphics/chromium/LayerChromium.h:
920         * platform/graphics/chromium/LayerRendererChromium.cpp:
921         (WebCore::LayerRendererChromium::pluginLayerProgramFlip):
922         (WebCore::LayerRendererChromium::cleanupSharedObjects):
923         * platform/graphics/chromium/LayerRendererChromium.h:
924         * platform/graphics/chromium/PluginLayerChromium.cpp:
925         (WebCore::PluginLayerChromium::PluginLayerChromium):
926         (WebCore::PluginLayerChromium::setTextureId):
927         (WebCore::PluginLayerChromium::setFlipped):
928         (WebCore::PluginLayerChromium::pushPropertiesTo):
929         * platform/graphics/chromium/PluginLayerChromium.h:
930         (WebCore::PluginLayerChromium::flipped):
931         * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
932         (WebCore::CCPluginLayerImpl::CCPluginLayerImpl):
933         (WebCore::CCPluginLayerImpl::draw):
934         * platform/graphics/chromium/cc/CCPluginLayerImpl.h:
935         (WebCore::CCPluginLayerImpl::setFlipped):
936
937 2011-10-15  Michael Nordman  <michaeln@google.com>
938
939         [Chromium] Some WebSQLDatabase in worker bug fixes.
940         https://bugs.webkit.org/show_bug.cgi?id=70071
941
942         - Test for a NULL webView WebWorkerClientImpl.
943         - Avoid altering Database instance lifetimes during WorkerThread::stop().
944
945         Existing tests coverage applies.
946
947         Reviewed by David Levin.
948
949         * storage/chromium/DatabaseTrackerChromium.cpp:
950         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
951
952 2011-10-14  Adam Barth  <abarth@webkit.org>
953
954         Update expected results.
955
956         * bindings/scripts/test/V8/V8TestObj.cpp:
957         (WebCore::TestObjInternal::serializedValueCallback):
958
959 2011-10-14  Ryosuke Niwa  <rniwa@webkit.org>
960
961         GTK build fix after r97533.
962
963         * accessibility/gtk/AXObjectCacheAtk.cpp:
964         (WebCore::notifyChildrenSelectionChange):
965         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
966         (optionFromSelection):
967         (webkit_accessible_selection_get_selection_count):
968
969 2011-10-14  David Kilzer  <ddkilzer@apple.com>
970
971         <http://webkit.org/b/70158> Fix clang compiler warnings
972
973         Reviewed by Darin Adler.
974
975         * dom/ViewportArguments.cpp:
976         (WebCore::computeViewportAttributes): Use std::max<float>()
977         instead of std::max().
978
979 2011-10-14  Mark Hahnenberg  <mhahnenberg@apple.com>
980
981         Rename getOwnPropertySlot to getOwnPropertySlotVirtual
982         https://bugs.webkit.org/show_bug.cgi?id=69810
983
984         Reviewed by Geoffrey Garen.
985
986         No new tests.
987
988         Renamed the virtual version of getOwnPropertySlot to getOwnPropertySlotVirtual
989         in preparation for when we add the static getOwnPropertySlot to the MethodTable 
990         in ClassInfo.
991
992         Also added a few static getOwnPropertySlot functions where they had been overlooked 
993         before (especially in CodeGeneratorJS.pm).
994
995         * WebCore.exp.in:
996         * bindings/js/JSDOMWindowCustom.cpp:
997         (WebCore::JSDOMWindow::getOwnPropertySlotVirtual):
998         (WebCore::JSDOMWindow::getOwnPropertySlot):
999         (WebCore::DialogHandler::returnValue):
1000         * bindings/js/JSDOMWindowShell.cpp:
1001         (WebCore::JSDOMWindowShell::getOwnPropertySlotVirtual):
1002         (WebCore::JSDOMWindowShell::getOwnPropertySlot):
1003         * bindings/js/JSDOMWindowShell.h:
1004         * bindings/js/JSWorkerContextCustom.cpp:
1005         (WebCore::JSWorkerContext::getOwnPropertySlotDelegate):
1006         * bindings/js/SerializedScriptValue.cpp:
1007         (WebCore::CloneSerializer::getSparseIndex):
1008         (WebCore::CloneSerializer::getProperty):
1009         * bindings/scripts/CodeGeneratorJS.pm:
1010         (GenerateGetOwnPropertySlotBody):
1011         (GenerateHeader):
1012         (GenerateImplementation):
1013         (GenerateConstructorDeclaration):
1014         (GenerateConstructorDefinition):
1015         * bindings/scripts/test/JS/JSTestInterface.cpp:
1016         (WebCore::JSTestInterfaceConstructor::getOwnPropertySlotVirtual):
1017         (WebCore::JSTestInterfaceConstructor::getOwnPropertySlot):
1018         (WebCore::JSTestInterface::getOwnPropertySlotVirtual):
1019         (WebCore::JSTestInterface::getOwnPropertySlot):
1020         * bindings/scripts/test/JS/JSTestInterface.h:
1021         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1022         (WebCore::JSTestMediaQueryListListenerConstructor::getOwnPropertySlotVirtual):
1023         (WebCore::JSTestMediaQueryListListenerConstructor::getOwnPropertySlot):
1024         (WebCore::JSTestMediaQueryListListenerPrototype::getOwnPropertySlotVirtual):
1025         (WebCore::JSTestMediaQueryListListenerPrototype::getOwnPropertySlot):
1026         (WebCore::JSTestMediaQueryListListener::getOwnPropertySlotVirtual):
1027         (WebCore::JSTestMediaQueryListListener::getOwnPropertySlot):
1028         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1029         * bindings/scripts/test/JS/JSTestObj.cpp:
1030         (WebCore::JSTestObjConstructor::getOwnPropertySlotVirtual):
1031         (WebCore::JSTestObjConstructor::getOwnPropertySlot):
1032         (WebCore::JSTestObjPrototype::getOwnPropertySlotVirtual):
1033         (WebCore::JSTestObjPrototype::getOwnPropertySlot):
1034         (WebCore::JSTestObj::getOwnPropertySlotVirtual):
1035         (WebCore::JSTestObj::getOwnPropertySlot):
1036         * bindings/scripts/test/JS/JSTestObj.h:
1037         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1038         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::getOwnPropertySlotVirtual):
1039         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::getOwnPropertySlot):
1040         (WebCore::JSTestSerializedScriptValueInterface::getOwnPropertySlotVirtual):
1041         (WebCore::JSTestSerializedScriptValueInterface::getOwnPropertySlot):
1042         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1043         * bridge/objc/objc_runtime.h:
1044         * bridge/objc/objc_runtime.mm:
1045         (JSC::Bindings::ObjcFallbackObjectImp::getOwnPropertySlotVirtual):
1046         * bridge/qt/qt_instance.cpp:
1047         (JSC::Bindings::QtInstance::getOwnPropertySlot):
1048         * bridge/qt/qt_runtime.cpp:
1049         (JSC::Bindings::QtRuntimeMetaMethod::getOwnPropertySlotVirtual):
1050         (JSC::Bindings::QtRuntimeConnectionMethod::getOwnPropertySlotVirtual):
1051         * bridge/qt/qt_runtime.h:
1052         * bridge/runtime_array.cpp:
1053         (JSC::RuntimeArray::getOwnPropertySlotVirtual):
1054         * bridge/runtime_array.h:
1055         * bridge/runtime_method.cpp:
1056         (JSC::RuntimeMethod::getOwnPropertySlotVirtual):
1057         * bridge/runtime_method.h:
1058         * bridge/runtime_object.cpp:
1059         (JSC::Bindings::RuntimeObject::getOwnPropertySlotVirtual):
1060         * bridge/runtime_object.h:
1061
1062 2011-10-14  Ryosuke Niwa  <rniwa@webkit.org>
1063
1064         Windows build fix attempt after r97533.
1065
1066         * html/HTMLSelectElementWin.cpp:
1067         (WebCore::HTMLSelectElement::platformHandleKeydownEvent):
1068
1069 2011-10-14  Darin Adler  <darin@apple.com>
1070
1071         Follow up the recent HTMLSelectElement improvements with a little bit more
1072         https://bugs.webkit.org/show_bug.cgi?id=70139
1073
1074         Reviewed by Ryosuke Niwa.
1075
1076         Refactoring, covered by existing tests.
1077
1078         Mostly, this adds a toHTMLSelectElement and uses it wherever possible.
1079
1080         * accessibility/AccessibilityListBox.cpp:
1081         (WebCore::AccessibilityListBox::canSetSelectedChildrenAttribute): Use toHTMLSelectElement.
1082         (WebCore::AccessibilityListBox::addChildren): Ditto. Also removed unneeded toHTMLElement.
1083         * accessibility/AccessibilityMenuListPopup.cpp:
1084         (WebCore::AccessibilityMenuListPopup::addChildren): Ditto.
1085         * accessibility/AccessibilityRenderObject.cpp:
1086         (WebCore::AccessibilityRenderObject::isMultiSelectable): Ditto.
1087         (WebCore::AccessibilityRenderObject::stringValue): Removed checks on the type of the
1088         underlying node, since other code already assumes that a menu list renderer is only
1089         created for a select element. Streamlined the code a bit and removed some unneeded
1090         local variables.
1091         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
1092         (WebCore::JSHTMLOptionsCollection::indexSetter): Use toHTMLSelectElement.
1093         * bindings/js/JSHTMLSelectElementCustom.cpp:
1094         (WebCore::JSHTMLSelectElement::remove): Ditto.
1095         (WebCore::JSHTMLSelectElement::indexSetter): Ditto.
1096         * editing/FrameSelection.cpp:
1097         (WebCore::FrameSelection::selectAll): Ditto.
1098         * html/HTMLKeygenElement.cpp:
1099         (WebCore::HTMLKeygenElement::shadowSelect): Ditto.
1100         * html/HTMLOptGroupElement.cpp:
1101         (WebCore::HTMLOptGroupElement::recalcSelectOptions): Ditto.
1102         (WebCore::HTMLOptGroupElement::ownerSelectElement): Ditto.
1103         * html/HTMLOptionElement.cpp:
1104         (WebCore::HTMLOptionElement::selected): Changed code to call renamed
1105         updateListItemSelectedStates rather than the confusing old name
1106         recalcListItemsIfNeeded.
1107         (WebCore::HTMLOptionElement::childrenChanged): Changed to call
1108         optionElementChildrenChanged rather than calling childrenChanged,
1109         because the children of the select element did not change!
1110         (WebCore::HTMLOptionElement::ownerSelectElement): Use toHTMLSelectElement.
1111         * html/HTMLOptionsCollection.cpp:
1112         (WebCore::HTMLOptionsCollection::add): Use toHTMLSelectElement.
1113         (WebCore::HTMLOptionsCollection::remove): Use toHTMLSelectElement.
1114         (WebCore::HTMLOptionsCollection::selectedIndex): Use toHTMLSelectElement.
1115         (WebCore::HTMLOptionsCollection::setSelectedIndex): Use toHTMLSelectElement.
1116         (WebCore::HTMLOptionsCollection::setLength): Use toHTMLSelectElement.
1117         * html/HTMLSelectElement.cpp:
1118         (WebCore::HTMLSelectElement::setSelectedIndexByUser): Call setSelectedIndex
1119         without the now-unneeded internal suffix.
1120         (WebCore::HTMLSelectElement::parseMappedAttribute): When the code says that
1121         we should "determine selectedness of the items", call updateListItemSelectedStates
1122         rather than the confusingly named recalcListItemsIfNeeded.
1123         (WebCore::HTMLSelectElement::updateListItemSelectedStates): Renamed
1124         recalcListItemsIfNeeded to this, since that's what this function is for.
1125         (WebCore::HTMLSelectElement::optionElementChildrenChanged): Added. Does
1126         the same work as childrenChanged, although it does not call up to the
1127         base class childrenChanged function. Later we might find we can remove
1128         some of the work here, for example it's not clear we should call the
1129         accessibility childrenChanged function.
1130         (WebCore::HTMLSelectElement::nextValidIndex): Changed this to a member function
1131         and made it get the list items itself rather than requiring they be passed in.
1132         (WebCore::HTMLSelectElement::nextSelectableListIndex): Updated for change to
1133         nextValidIndex.
1134         (WebCore::HTMLSelectElement::previousSelectableListIndex): Ditto.
1135         (WebCore::HTMLSelectElement::firstSelectableListIndex): Ditto.
1136         (WebCore::HTMLSelectElement::lastSelectableListIndex): Ditto.
1137         (WebCore::HTMLSelectElement::nextSelectableListIndexPageAway): Ditto.
1138         (WebCore::HTMLSelectElement::listItems): Removed unneeded const_cast, since
1139         recalcListItems is now a const member function. Call recalcListItems by that
1140         name instead of recalcListItemsInternal.
1141         (WebCore::HTMLSelectElement::recalcListItems): Renamed from recalcListItemsInternal
1142         and made this a const member function. The data members that this needs to modify
1143         are now mutable.
1144         (WebCore::HTMLSelectElement::setSelectedIndex): Renamed from setSelectedIndexInternal.
1145         Changed call to updateValidity to instead call setNeedsValidityCheck, since both
1146         do the same thing.
1147         (WebCore::HTMLSelectElement::parseMultipleAttribute): Ditto.
1148         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Updated for change to
1149         nextValidIndex, removed unneeded comparison with zero that's already handled by
1150         casting to an unsigned type, and use setSelectedIndex instead of using
1151         setSelectedIndexInternal since they are both the same thing.
1152         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): Removed another unneeded
1153         comparision with zero that's handled by casting to an unsigned type.
1154         (WebCore::HTMLSelectElement::lastSelectedListIndex): Use size_t instead of unsigned
1155         for a vector index.
1156         (WebCore::HTMLSelectElement::typeAheadFind): Use setSelectedIndex instead of
1157         setSelectedIndexInternal.
1158         (WebCore::HTMLSelectElement::insertedIntoTree): Removed unneeded explicit boolean
1159         when calling a function that already has a default value of true.
1160         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex): Use setSelectedIndex
1161         instead of setSelectedIndexInternal.
1162
1163         * html/HTMLSelectElement.h: Made childrenChanged private. Added
1164         optionElementChildrenChanged. Renamed recalcListItemsIfNeeded to the clearer
1165         updateListItemSelectedStates. Removed unused listBoxSelectItem. Removed
1166         updateValidity after changing all callers to instead call setNeedsValidityCheck.
1167         Made canSelectAll and selectAll non-virtual. Removed recalcListItemsInternal
1168         since it's the same thing as recalcListItems now. Renamed setSelectedIndexInternal
1169         to setSelectedIndex since it's the same function, just with a few arguments we
1170         don't want to allow outside callers to pass. Changed nextValidIndex into a
1171         non-static member function. Made m_listItems and m_shouldRecalcListItems mutable.
1172         Added a toHTMLSelectElement function, modeled on the toElement function.
1173
1174         * html/ValidityState.cpp:
1175         (WebCore::ValidityState::valueMissing): Use toHTMLSelectElement.
1176         * rendering/RenderListBox.cpp:
1177         (WebCore::RenderListBox::updateFromElement): Ditto.
1178         (WebCore::RenderListBox::scrollToRevealSelection): Ditto.
1179         (WebCore::RenderListBox::size): Ditto.
1180         (WebCore::RenderListBox::numItems): Ditto.
1181         (WebCore::RenderListBox::addFocusRingRects): Ditto.
1182         (WebCore::RenderListBox::paintItemForeground): Ditto.
1183         (WebCore::RenderListBox::paintItemBackground): Ditto.
1184         (WebCore::RenderListBox::panScroll): Ditto.
1185         (WebCore::RenderListBox::autoscroll): Ditto.
1186         (WebCore::RenderListBox::stopAutoscroll): Ditto.
1187         (WebCore::RenderListBox::valueChanged): Ditto.
1188         (WebCore::RenderListBox::nodeAtPoint): Ditto.
1189         * rendering/RenderMenuList.cpp:
1190         (WebCore::RenderMenuList::updateOptionsWidth): Ditto.
1191         (WebCore::RenderMenuList::updateFromElement): Ditto.
1192         (WebCore::RenderMenuList::setTextFromOption): Ditto.
1193         (WebCore::RenderMenuList::showPopup): Ditto.
1194         (WebCore::RenderMenuList::valueChanged): Ditto.
1195         (WebCore::RenderMenuList::listBoxSelectItem): Ditto.
1196         (WebCore::RenderMenuList::multiple): Ditto.
1197         (WebCore::RenderMenuList::didSetSelectedIndex): Ditto.
1198         (WebCore::RenderMenuList::didUpdateActiveOption): Ditto.
1199         (WebCore::RenderMenuList::itemText): Ditto.
1200         (WebCore::RenderMenuList::itemAccessibilityText): Ditto.
1201         (WebCore::RenderMenuList::itemToolTip): Ditto.
1202         (WebCore::RenderMenuList::itemIsEnabled): Ditto. Also use the
1203         disabled function instead of the virtual isEnabledFormControl
1204         function to check if the optgroup is enabled.
1205         (WebCore::RenderMenuList::itemStyle): Ditto.
1206         (WebCore::RenderMenuList::itemBackgroundColor): Ditto.
1207         (WebCore::RenderMenuList::listSize): Ditto.
1208         (WebCore::RenderMenuList::selectedIndex): Ditto.
1209         (WebCore::RenderMenuList::itemIsSeparator): Ditto.
1210         (WebCore::RenderMenuList::itemIsLabel): Ditto.
1211         (WebCore::RenderMenuList::itemIsSelected): Ditto.
1212         (WebCore::RenderMenuList::setTextFromItem): Ditto.
1213
1214 2011-10-14  Mark Hahnenberg  <mhahnenberg@apple.com>
1215
1216         Rename virtual put to putVirtual
1217         https://bugs.webkit.org/show_bug.cgi?id=69851
1218
1219         Reviewed by Darin Adler.
1220
1221         No new tests.
1222
1223         Renamed virtual versions of put to putVirtual in prepration for 
1224         adding the static put to the MethodTable in ClassInfo since the 
1225         compiler gets mad if the virtual and static versions have the same 
1226         name.
1227
1228         * WebCore.exp.in:
1229         * bindings/js/JSDOMWindowCustom.cpp:
1230         (WebCore::JSDOMWindow::putVirtual):
1231         * bindings/js/JSDOMWindowShell.cpp:
1232         (WebCore::JSDOMWindowShell::putVirtual):
1233         * bindings/js/JSDOMWindowShell.h:
1234         * bindings/js/JSLocationCustom.cpp:
1235         (WebCore::JSLocation::putDelegate):
1236         * bindings/js/JSPluginElementFunctions.cpp:
1237         (WebCore::runtimeObjectCustomPut):
1238         * bindings/js/SerializedScriptValue.cpp:
1239         (WebCore::CloneDeserializer::putProperty):
1240         * bindings/objc/WebScriptObject.mm:
1241         (-[WebScriptObject setValue:forKey:]):
1242         (-[WebScriptObject setWebScriptValueAtIndex:value:]):
1243         * bindings/scripts/CodeGeneratorJS.pm:
1244         (GenerateHeader):
1245         (GenerateImplementation):
1246         * bindings/scripts/test/JS/JSTestObj.cpp:
1247         (WebCore::JSTestObj::putVirtual):
1248         * bindings/scripts/test/JS/JSTestObj.h:
1249         * bridge/NP_jsobject.cpp:
1250         (_NPN_SetProperty):
1251         * bridge/jni/jni_jsobject.mm:
1252         (JavaJSObject::setMember):
1253         (JavaJSObject::setSlot):
1254         * bridge/objc/objc_runtime.h:
1255         * bridge/objc/objc_runtime.mm:
1256         (JSC::Bindings::ObjcFallbackObjectImp::putVirtual):
1257         * bridge/qt/qt_instance.cpp:
1258         (JSC::Bindings::QtInstance::put):
1259         * bridge/qt/qt_runtime.cpp:
1260         (JSC::Bindings::convertQVariantToValue):
1261         * bridge/runtime_array.cpp:
1262         (JSC::RuntimeArray::putVirtual):
1263         * bridge/runtime_array.h:
1264         * bridge/runtime_object.cpp:
1265         (JSC::Bindings::RuntimeObject::putVirtual):
1266         * bridge/runtime_object.h:
1267         * bridge/testqtbindings.cpp:
1268         (main):
1269
1270 2011-10-14  Sheriff Bot  <webkit.review.bot@gmail.com>
1271
1272         Unreviewed, rolling out r97519.
1273         http://trac.webkit.org/changeset/97519
1274         https://bugs.webkit.org/show_bug.cgi?id=70156
1275
1276         Broke 79+ tests on bots (Requested by dglazkov on #webkit).
1277
1278         * platform/graphics/skia/GraphicsContextSkia.cpp:
1279         (WebCore::getFocusRingOutset):
1280         (WebCore::GraphicsContext::drawFocusRing):
1281
1282 2011-09-28  Robert Hogan  <robert@webkit.org>
1283
1284         Replaced elements squeezed when width is specified as percentage inside a table with Auto layout
1285         https://bugs.webkit.org/show_bug.cgi?id=29447
1286
1287         If inserting a 'replaced' element (e.g. image, plugin) in a table cell that is not descendant from
1288         a block with fixed layout then do not squeeze the element, let it use its intrinsic width and height.
1289
1290         Reviewed by David Hyatt.
1291
1292         Test: fast/replaced/table-percent-width.html
1293
1294         * rendering/RenderBox.cpp:
1295         (WebCore::shouldExpandToIntrinsicDimension):
1296         (WebCore::RenderBox::containingBlockReplacedLogicalWidthForContent):
1297         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
1298         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
1299         * rendering/RenderBox.h:
1300
1301 2011-10-14  Cary Clark  <caryclark@google.com>
1302
1303         [Chromium Skia on Mac] Improve focus ring
1304         https://bugs.webkit.org/show_bug.cgi?id=70124
1305
1306         Reviewed by Eric Seidel.
1307         
1308         The focus ring code formerly outset the bounds of
1309         the component rectangles by fractional amounts. Because
1310         the rectangles are SkIRect (integer based), the fractional
1311         outset had no effect.
1312
1313         The equivalent code in GraphicsContextMac.mm computes
1314         the curve radius and rectangle outset with integers, so
1315         the use of floats in Skia's case, besides not working,
1316         is unnecessary.
1317
1318         The Skia code also failed to take the offset into account.
1319         In LayoutTests, the focus rings either have an offset of
1320         0 or 2. The CoreGraphics code increases the ring's rectangles
1321         by the offset, then passes the result to wkDrawFocusRing.
1322
1323         I did not find any documentation about how wkDrawFocusRing
1324         further inflates the focus ring, but empirically I determined
1325         that adding 2 to the offset generated rings with identical
1326         outer diameters.
1327  
1328         With these adjustments, the layout tests generate focus rings
1329         in the Skia on Mac case that match the coverage of the
1330         Chromium CG-based platform, in particular, matching:
1331         
1332         editing/inserting/editable-inline-element.html
1333         editing/selection/3690703-2.html
1334
1335         * platform/graphics/skia/GraphicsContextSkia.cpp:
1336         (WebCore::getFocusRingOutset):
1337         (WebCore::GraphicsContext::drawFocusRing):
1338
1339 2011-10-14  Chang Shu  <cshu@webkit.org>
1340
1341         [Qt] Enable fullscreen api on Qt
1342         https://bugs.webkit.org/show_bug.cgi?id=70131
1343
1344         As a result, we have 3 passed tests.
1345
1346         Reviewed by Noam Rosenthal.
1347
1348         * features.pri:
1349
1350 2011-10-14  Beth Dakin  <bdakin@apple.com>
1351
1352         https://bugs.webkit.org/show_bug.cgi?id=70148
1353         Should switch to CoreUI version of CorrectionDot, GrammarDot, and SpellingDot
1354         -and corresponding-
1355         <rdar://problem/10208281>
1356
1357         Reviewed by Anders Carlsson.
1358
1359         Use NS*Dot whenever it's available, and fallback to *Dot only when it is not.
1360         * platform/graphics/mac/GraphicsContextMac.mm:
1361         (WebCore::createPatternColor):
1362         (WebCore::GraphicsContext::drawLineForTextChecking):
1363
1364 2011-10-14  Dmitry Lomov  <dslomov@google.com>
1365
1366         https://bugs.webkit.org/show_bug.cgi?id=70120
1367         [Chromium] Pass MessagePortArray to SerializedScriptValue::serialize/deserialize.
1368         This patch augments SerializedScriptValue with MessagePortArray* parameter to implement MessagePort 
1369         transfer within the message in the future.
1370
1371         Reviewed by David Levin.
1372
1373         * bindings/scripts/CodeGeneratorV8.pm:
1374         (GenerateParametersCheck):
1375         * bindings/v8/SerializedScriptValue.cpp:
1376         (WebCore::SerializedScriptValue::create):
1377         (WebCore::SerializedScriptValue::SerializedScriptValue):
1378         (WebCore::SerializedScriptValue::deserialize):
1379         * bindings/v8/SerializedScriptValue.h:
1380         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1381         (WebCore::handlePostMessageCallback):
1382         (WebCore::V8DOMWindow::postMessageCallback):
1383         (WebCore::V8DOMWindow::webkitPostMessageCallback):
1384         * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
1385         (WebCore::handlePostMessageCallback):
1386         (WebCore::V8DedicatedWorkerContext::postMessageCallback):
1387         (WebCore::V8DedicatedWorkerContext::webkitPostMessageCallback):
1388         * bindings/v8/custom/V8HistoryCustom.cpp:
1389         (WebCore::V8History::pushStateCallback):
1390         (WebCore::V8History::replaceStateCallback):
1391         * bindings/v8/custom/V8MessageEventCustom.cpp:
1392         (WebCore::V8MessageEvent::dataAccessorGetter):
1393         * bindings/v8/custom/V8MessagePortCustom.cpp:
1394         (WebCore::handlePostMessageCallback):
1395         (WebCore::V8MessagePort::postMessageCallback):
1396         (WebCore::V8MessagePort::webkitPostMessageCallback):
1397         * bindings/v8/custom/V8WorkerCustom.cpp:
1398         (WebCore::handlePostMessageCallback):
1399         (WebCore::V8Worker::postMessageCallback):
1400         (WebCore::V8Worker::webkitPostMessageCallback):
1401         * workers/Worker.idl:
1402
1403 2011-10-14  Jeff Miller  <jeffm@apple.com>
1404
1405         InjectedBundleHitTestResult::imageRect() should return rect in WKView coordinates
1406         https://bugs.webkit.org/show_bug.cgi?id=69963
1407         
1408         Add infrastructure to convert from any frame view's coordinate system to the
1409         root view's coordinate system.
1410
1411         Reviewed by Simon Fraser.
1412
1413         No new tests (yet), this is covered by <https://bugs.webkit.org/show_bug.cgi?id=70136>.
1414
1415         * WebCore.exp.in: Exported WebCore::ScrollView::contentsToRootView(), used by InjectedBundleHitTestResult.cpp.
1416         
1417         * platform/ScrollView.cpp:
1418         (WebCore::ScrollView::rootViewToContents): Added (both point and rect versions).
1419         (WebCore::ScrollView::contentsToRootView): Ditto.
1420         
1421         * platform/ScrollView.h: Added member functions to convert to/from root view coordinates.
1422         
1423         * platform/Widget.cpp:
1424         (WebCore::Widget::convertFromRootView): Added (both point and rect versions).
1425         (WebCore::Widget::convertToRootView): Ditto.
1426         
1427         * platform/Widget.h: Added member functions to convert to/from root view coordinates.
1428
1429 2011-10-14  Andreas Kling  <kling@webkit.org>
1430
1431         CSSParser: Remove StyleBase usage.
1432         https://bugs.webkit.org/show_bug.cgi?id=70150
1433
1434         Reviewed by Darin Adler.
1435
1436         Split CSSParser::m_parsedStyleObjects into two vectors of
1437         CSSRules and MediaLists.
1438
1439         * css/CSSParser.cpp:
1440         (WebCore::CSSParser::createMediaList):
1441         (WebCore::CSSParser::createCharsetRule):
1442         (WebCore::CSSParser::createImportRule):
1443         (WebCore::CSSParser::createMediaRule):
1444         (WebCore::CSSParser::createKeyframesRule):
1445         (WebCore::CSSParser::createStyleRule):
1446         (WebCore::CSSParser::createFontFaceRule):
1447         (WebCore::CSSParser::createPageRule):
1448         (WebCore::CSSParser::createKeyframeRule):
1449         * css/CSSParser.h:
1450
1451 2011-10-14  Adam Barth  <abarth@webkit.org>
1452
1453         canvas getImageData should explain why it throws SECURITY_ERR
1454         https://bugs.webkit.org/show_bug.cgi?id=70088
1455
1456         Reviewed by Darin Adler.
1457
1458         Log as message to the console when getImageData fails because the
1459         canvas is tainted.
1460
1461         * html/canvas/CanvasRenderingContext2D.cpp:
1462         (WebCore::CanvasRenderingContext2D::getImageData):
1463
1464 2011-10-14  Andreas Kling  <kling@webkit.org>
1465
1466         Inspector: Remove StyleBase usage.
1467         https://bugs.webkit.org/show_bug.cgi?id=70138
1468
1469         Reviewed by Antti Koivisto.
1470
1471         Be fully specific about whether we're operating on a CSSRule or
1472         a CSSStyleSheet.
1473
1474         No behavior change expected, this merely is a cleanup.
1475
1476         * inspector/InspectorCSSAgent.cpp:
1477         (WebCore::InspectorCSSAgent::parentStyleSheet):
1478         (WebCore::InspectorCSSAgent::asCSSStyleRule):
1479         * inspector/InspectorCSSAgent.h:
1480         * inspector/InspectorStyleSheet.cpp:
1481         (WebCore::asCSSRuleList):
1482
1483 2011-10-14  Mark Hahnenberg  <mhahnenberg@apple.com>
1484
1485         Rename virtual deleteProperty to deletePropertyVirtual
1486         https://bugs.webkit.org/show_bug.cgi?id=69884
1487
1488         Reviewed by Darin Adler.
1489
1490         No new tests.
1491
1492         Renamed virtual versions of deleteProperty to deletePropertyVirtual in prepration for 
1493         adding the static deleteProperty to the MethodTable in ClassInfo since the 
1494         compiler gets mad if the virtual and static versions have the same name.
1495
1496         * WebCore.exp.in:
1497         * bindings/js/JSDOMStringMapCustom.cpp:
1498         (WebCore::JSDOMStringMap::deletePropertyVirtual):
1499         * bindings/js/JSDOMWindowCustom.cpp:
1500         (WebCore::JSDOMWindow::deletePropertyVirtual):
1501         * bindings/js/JSDOMWindowShell.cpp:
1502         (WebCore::JSDOMWindowShell::deletePropertyVirtual):
1503         * bindings/js/JSDOMWindowShell.h:
1504         * bindings/js/JSHistoryCustom.cpp:
1505         (WebCore::JSHistory::deletePropertyVirtual):
1506         * bindings/js/JSLocationCustom.cpp:
1507         (WebCore::JSLocation::deletePropertyVirtual):
1508         * bindings/js/JSStorageCustom.cpp:
1509         (WebCore::JSStorage::deletePropertyVirtual):
1510         * bindings/js/ScriptObject.cpp:
1511         (WebCore::ScriptGlobalObject::remove):
1512         * bindings/objc/WebScriptObject.mm:
1513         (-[WebScriptObject removeWebScriptKey:]):
1514         * bindings/scripts/CodeGeneratorJS.pm:
1515         (GenerateHeader):
1516         * bridge/NP_jsobject.cpp:
1517         (_NPN_RemoveProperty):
1518         * bridge/jni/jni_jsobject.mm:
1519         (JavaJSObject::removeMember):
1520         * bridge/objc/objc_runtime.h:
1521         * bridge/objc/objc_runtime.mm:
1522         (JSC::Bindings::ObjcFallbackObjectImp::deletePropertyVirtual):
1523         * bridge/runtime_array.cpp:
1524         (JSC::RuntimeArray::deletePropertyVirtual):
1525         * bridge/runtime_array.h:
1526         * bridge/runtime_object.cpp:
1527         (JSC::Bindings::RuntimeObject::deletePropertyVirtual):
1528         * bridge/runtime_object.h:
1529
1530 2011-10-14  Simon Fraser  <simon.fraser@apple.com>
1531
1532         Web Inspector: WebProcess crashes hard when inspecting elements with border-images applied
1533         https://bugs.webkit.org/show_bug.cgi?id=70105
1534
1535         Reviewed by Dave Hyatt.
1536         
1537         Fix three different crashes related to getting computed style for border-image.
1538         In both valueForNinePieceImageSlice() and valueForNinePieceImageQuad(),
1539         assign 'right' to 'left' because we've computed a value for 'right' already.
1540         Otherwise this would leave 'right' as null, causing later crashes in cssText().
1541         
1542         In mapNinePieceImage(), borderImage->imageValue() can be null for a border-image
1543         shorthand that is missing the image value.
1544
1545         Test: fast/css/getComputedStyle/computed-style-border-image.html
1546
1547         * css/CSSComputedStyleDeclaration.cpp:
1548         (WebCore::valueForNinePieceImageSlice):
1549         (WebCore::valueForNinePieceImageQuad):
1550         * css/CSSStyleSelector.cpp:
1551         (WebCore::CSSStyleSelector::mapNinePieceImage):
1552
1553 2011-10-14  Ryosuke Niwa  <rniwa@webkit.org>
1554
1555         Mac build fix after r97497.
1556
1557         * editing/markup.cpp:
1558         (WebCore::isNonTableCellHTMLBlockElement):
1559
1560 2011-10-14  Daniel Cheng  <dcheng@chromium.org>
1561
1562         Context-aware HTML paste for Chromium
1563         https://bugs.webkit.org/show_bug.cgi?id=62112
1564
1565         Reviewed by Ryosuke Niwa.
1566
1567         Add createFragmentFromMarkupWithContext which understands enough about DOM structure to
1568         retain necessary elements to preserve structure and appearance when extracting a subset of
1569         a DOM tree.
1570
1571         Covered by existing layout tests.
1572
1573         * editing/MarkupAccumulator.h:
1574         * editing/markup.cpp:
1575         (WebCore::isNonTableCellHTMLBlockElement):
1576         (WebCore::isHTMLBlockElement):
1577         (WebCore::ancestorToRetainStructureAndAppearanceForBlock):
1578         (WebCore::ancestorToRetainStructureAndAppearance):
1579         (WebCore::ancestorToRetainStructureAndAppearanceWithNoRenderer):
1580         (WebCore::findNodesSurroundingContext):
1581         (WebCore::trimFragment):
1582         (WebCore::createFragmentFromMarkupWithContext):
1583         * editing/markup.h:
1584         * platform/chromium/ChromiumDataObject.cpp:
1585         (WebCore::ChromiumDataObject::getData):
1586         * platform/chromium/DataTransferItemChromium.cpp:
1587         (WebCore::DataTransferItemChromium::getAsString):
1588         * platform/chromium/PasteboardChromium.cpp:
1589         (WebCore::Pasteboard::documentFragment):
1590         * platform/chromium/PlatformSupport.h:
1591
1592 2011-10-14  Peter Beverloo  <peter@chromium.org>
1593
1594         [Chromium] Inherit settings from Chromium's envsetup.sh, address a NDK todo
1595         https://bugs.webkit.org/show_bug.cgi?id=70028
1596
1597         Reviewed by Adam Barth.
1598
1599         * WebCore.gyp/WebCore.gyp:
1600
1601 2011-10-14  Nate Chapin  <japhet@chromium.org>
1602
1603         Check CachedResourceClient types with ASSERTs rather
1604         than if statements.
1605         https://bugs.webkit.org/show_bug.cgi?id=70113
1606
1607         Reviewed by Adam Barth.
1608
1609         No new tests, no functionality change.
1610
1611         * loader/cache/CachedCSSStyleSheet.cpp:
1612         * loader/cache/CachedFont.cpp:
1613         * loader/cache/CachedImage.cpp:
1614         * loader/cache/CachedResourceClientWalker.h:
1615         * loader/cache/CachedXSLStyleSheet.cpp:
1616
1617 2011-10-14  Andreas Kling  <kling@webkit.org>
1618
1619         Don't assert that CSSRules are CSSRules.
1620
1621         Rubber-stamped by Antti Koivisto.
1622
1623         * css/CSSRule.h:
1624         (WebCore::CSSRule::isRule):
1625         * css/CSSStyleSheet.cpp:
1626         (WebCore::CSSStyleSheet::append):
1627         (WebCore::CSSStyleSheet::insert):
1628
1629 2011-10-14  Beth Dakin  <bdakin@apple.com>
1630
1631         Attempted Leopard build fix.
1632
1633         * platform/graphics/GraphicsContext.cpp:
1634         (WebCore::GraphicsContext::createCompatibleBuffer):
1635
1636 2011-10-14  Andreas Kling  <kling@webkit.org>
1637
1638         CSSStyleSheet should only ever contain CSSRules.
1639         https://bugs.webkit.org/show_bug.cgi?id=70116
1640
1641         Reviewed by Antti Koivisto.
1642
1643         Move child management from the StyleSheet class down into
1644         CSSStyleSheet and XSLStyleSheet. XSLStyleSheet continues to
1645         manage StyleBase objects, while CSSStyleSheet now only contains
1646         CSSRule.
1647
1648         This is enforced at both compile time and runtime with explicit
1649         types and assertions.
1650
1651         * css/CSSRule.h:
1652         (WebCore::CSSRule::isRule):
1653
1654             Promoted to a public method so we can use it in assertions.
1655
1656         * css/CSSRuleList.h:
1657         (WebCore::CSSRuleList::create):
1658         (WebCore::CSSRuleList::styleSheet):
1659         * css/CSSRuleList.cpp:
1660         (WebCore::CSSRuleList::CSSRuleList):
1661         * bindings/js/JSCSSRuleListCustom.cpp:
1662         (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
1663
1664             Change backing to a CSSStyleSheet instead of a StyleSheet.
1665
1666         * css/CSSRuleList.cpp:
1667         (WebCore::CSSRuleList::item):
1668
1669             Remove redundant assertions.
1670
1671         * css/CSSStyleSheet.cpp:
1672         (WebCore::CSSStyleSheet::isLoading):
1673         (WebCore::CSSStyleSheet::addSubresourceStyleURLs):
1674         * css/CSSStyleSelector.cpp:
1675         (WebCore::RuleSet::addRulesFromSheet):
1676         * inspector/InspectorCSSAgent.cpp:
1677         (WebCore::InspectorCSSAgent::collectStyleSheets):
1678         * page/PageSerializer.cpp:
1679         (WebCore::PageSerializer::serializeCSSStyleSheet):
1680
1681             Use more specific CSSRule* since that's what we get from
1682             CSSStyleSheet::item() now.
1683
1684         * css/StyleSheet.cpp:
1685         (WebCore::StyleSheet::~StyleSheet):
1686         * css/CSSStyleSheet.cpp:
1687         (WebCore::CSSStyleSheet::~CSSStyleSheet):
1688         * xml/XSLStyleSheetLibxslt.cpp:
1689         (WebCore::XSLStyleSheet::~XSLStyleSheet):
1690         * xml/XSLStyleSheetQt.cpp:
1691         (WebCore::XSLStyleSheet::~XSLStyleSheet):
1692
1693             Orphaning logic from ~StyleSheet() moved to subclass dtors.
1694
1695         * css/StyleSheet.h:
1696         * css/CSSStyleSheet.h:
1697         (WebCore::CSSStyleSheet::length):
1698         (WebCore::CSSStyleSheet::item):
1699         * css/CSSStyleSheet.cpp:
1700         (WebCore::CSSStyleSheet::append):
1701         (WebCore::CSSStyleSheet::insert):
1702         (WebCore::CSSStyleSheet::remove):
1703
1704             Moved from StyleSheet and changed to only accept CSSRules.
1705
1706         * css/StyleSheet.h:
1707         * xml/XSLStyleSheet.h:
1708         (WebCore::XSLStyleSheet::length):
1709         (WebCore::XSLStyleSheet::item):
1710         (WebCore::XSLStyleSheet::append):
1711         (WebCore::XSLStyleSheet::insert):
1712         (WebCore::XSLStyleSheet::remove):
1713
1714             Moved from StyleSheet though still uses StyleBase.
1715
1716 2011-10-14 Yuji Sanachan <sanachan.y@gmail.com>
1717
1718         Include dom/ExceptionCode.h instead of Filesystem APIs headers
1719         to fix compile error when ENABLE_WORKERS=1 and ENABLE_FILE_SYSTEM=0
1720         https://bugs.webkit.org/show_bug.cgi?id=70036
1721
1722         Reviewed by Darin Adler.
1723
1724         * workers/WorkerContext.cpp:
1725         (WebCore::WorkerContext::importScript):
1726
1727 2011-10-14  Darin Adler  <darin@apple.com>
1728
1729         Text drawn via -webkit-background-clip:text should be non-blurry with all scaling 
1730         techniques
1731         https://bugs.webkit.org/show_bug.cgi?id=68641
1732
1733         Reviewed by Simon Fraser. Committed by Beth Dakin.
1734
1735         * platform/graphics/GraphicsContext.cpp:
1736         (WebCore::GraphicsContext::createCompatibleBuffer): Allocate a buffer based on the 
1737         scale
1738         factor of the context.
1739         * platform/graphics/GraphicsContext.h: Added createCompatibleBuffer.
1740
1741         * rendering/RenderBoxModelObject.cpp:
1742         (WebCore::RenderBoxModelObject::paintFillLayerExtended): Use 
1743         createCompatibleBuffer.
1744
1745 2011-10-14  Ryosuke Niwa  <rniwa@webkit.org>
1746
1747         Move selectionStartStyle and selectionHasStyle to EditingStyle
1748         https://bugs.webkit.org/show_bug.cgi?id=69882
1749
1750         Reviewed by Enrica Casucci.
1751
1752         Moved selectionHasStyle and selectionStartStyle from Editor to EditingStyle.
1753         Also moved much of code in Editor::selectionStartCSSPropertyValue to method of EditingStyle.
1754
1755         In addition, moved Range::editingStartPosition to htmlediting where it belongs
1756         and renamed it to adjustedSelectionStartForStyleComputation.
1757
1758         * dom/Range.cpp:
1759         * dom/Range.h:
1760         * editing/EditingStyle.cpp:
1761         (WebCore::EditingStyle::triStateOfStyle): Extracted from selectionHasStyle.
1762         (WebCore::EditingStyle::legacyFontSize): Extracted from selectionStartCSSPropertyValue.
1763         (WebCore::EditingStyle::styleAtSelectionStart): Moved from Editor::selectionStartStyle.
1764         * editing/EditingStyle.h:
1765         * editing/Editor.cpp:
1766         (WebCore::Editor::fontForSelection):
1767         (WebCore::Editor::selectionStartHasStyle):
1768         (WebCore::Editor::selectionHasStyle):
1769         (WebCore::Editor::selectionStartCSSPropertyValue):
1770         * editing/Editor.h:
1771         * editing/EditorCommand.cpp:
1772         (WebCore::executeToggleStyleInList):
1773         * editing/htmlediting.cpp:
1774         (WebCore::adjustedSelectionStartForStyleComputation): Moved from Range::editingStartPosition.
1775         * editing/htmlediting.h:
1776
1777 2011-10-14  Ryosuke Niwa  <rniwa@webkit.org>
1778
1779         Redundant comparison in AccessibilityObject.cpp updateAXLineStartForVisiblePosition
1780         https://bugs.webkit.org/show_bug.cgi?id=70074
1781
1782         Reviewed by Chris Fleizach.
1783
1784         Removed redundant code.
1785
1786         * accessibility/AccessibilityObject.cpp:
1787         (WebCore::updateAXLineStartForVisiblePosition):
1788
1789 2011-10-12  Ryosuke Niwa  <rniwa@webkit.org>
1790
1791         Make the interface of locationAndLengthFromRange and rangeFromLocationAndLength consistent
1792         https://bugs.webkit.org/show_bug.cgi?id=69964
1793
1794         Reviewed by Enrica Casucci.
1795
1796         Extracted the logic to determine the scope element as FrameSelection::rootEditableElementOrDocumentElement
1797         and deployed it in WebKit layer. Made locationAndLengthFromRange take a scope element and renamed it to
1798         getLocationAndLengthFromRange.
1799
1800         * WebCore.exp.in:
1801         * editing/FrameSelection.cpp:
1802         (WebCore::FrameSelection::rootEditableElementOrDocumentElement):
1803         * editing/FrameSelection.h:
1804         * editing/TextIterator.cpp:
1805         (WebCore::TextIterator::getLocationAndLengthFromRange):
1806         * editing/TextIterator.h:
1807
1808 2011-10-13  Arko Saha  <arko@motorola.com>
1809
1810         Microdata: Basic implementation of document.getItems() method.
1811         https://bugs.webkit.org/show_bug.cgi?id=68610
1812
1813         Reviewed by Ryosuke Niwa.
1814
1815         Added ENABLE(MICRODATA) feature flag. Implement document.getItems() DOM API.
1816         Spec: http://www.whatwg.org/specs/web-apps/current-work/complete/microdata.html
1817
1818         Tests: fast/dom/MicroData/001.html
1819                fast/dom/MicroData/002.html
1820                fast/dom/MicroData/003.html
1821                fast/dom/MicroData/004.html
1822                fast/dom/MicroData/005.html
1823                fast/dom/MicroData/006.html
1824                fast/dom/MicroData/007.html
1825                fast/dom/MicroData/008.html
1826                fast/dom/MicroData/009.html
1827
1828         * CMakeLists.txt:
1829         * DerivedSources.make:
1830         * GNUmakefile.am:
1831         * GNUmakefile.list.am:
1832         * WebCore.gypi:
1833         * WebCore.pro:
1834         * WebCore.vcproj/WebCore.vcproj:
1835         * dom/Document.cpp:
1836         (WebCore::Document::getItems): Returns NodeList of the element in the Document that
1837         create items, that are not part of other items, and that are of one of the types
1838         given in the argument. If no tokens specified/undefined in the argument, then
1839         return a NodeList containing all top level microdata items.
1840         (WebCore::Document::removeCachedMicroDataItemList): Remove Microdata item node list
1841         from cache.
1842         * dom/Document.h:
1843         * dom/Document.idl: Added getItems() microdata DOM API.
1844         * dom/MicroDataItemList.cpp: Added.
1845         (WebCore::MicroDataItemList::MicroDataItemList):
1846         (WebCore::MicroDataItemList::~MicroDataItemList):
1847         (WebCore::MicroDataItemList::nodeMatches):
1848         * dom/MicroDataItemList.h: Added.
1849         (WebCore::MicroDataItemList::create):
1850         * dom/Node.cpp:
1851         (WebCore::Node::itemTypeAttributeChanged): It is responsible to invalidate the Microdata
1852         item node cache when itemType attribute changes.
1853         (WebCore::NodeListsNodeData::invalidateCachesThatDependOnAttributes):
1854         (WebCore::NodeListsNodeData::invalidateMicrodataItemListCaches): Invalidate Microdata item
1855         list cache.
1856         (WebCore::NodeListsNodeData::isEmpty):
1857         * dom/Node.h:
1858         * dom/NodeRareData.h:
1859         * features.pri:
1860         * html/HTMLAttributeNames.in: Added itemid, itemprop, itemscope, itemtype attributes.
1861         * html/HTMLElement.cpp:
1862         (WebCore::HTMLElement::parseMappedAttribute): Handle itemtype attribute change.
1863         * html/HTMLElement.idl: Added itemid, itemprop, itemscope, itemtypes microdata attributes.
1864
1865 2011-10-14  Andreas Kling  <kling@webkit.org>
1866
1867         Stricter management of WebKitCSSKeyframeRules.
1868         https://bugs.webkit.org/show_bug.cgi?id=70109
1869
1870         Reviewed by Antti Koivisto.
1871
1872         Covered by existing tests.
1873
1874         * css/CSSParser.h:
1875         * css/CSSParser.cpp:
1876         (WebCore::CSSParser::parseKeyframeRule):
1877
1878             Return a WebKitCSSKeyframeRule instead of a CSSRule.
1879
1880         * css/CSSRuleList.cpp:
1881         (WebCore::CSSRuleList::deleteRule):
1882         * css/WebKitCSSKeyframesRule.cpp:
1883         (WebCore::WebKitCSSKeyframesRule::deleteRule):
1884
1885             Moved style sheet orphaning logic for @-webkit-keyframe
1886             from CSSRuleList into WebKitCSSKeyframesRule::deleteRule()
1887             since that's the only caller operating on those rules.
1888
1889         * css/WebKitCSSKeyframesRule.cpp:
1890         (WebCore::WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule):
1891         (WebCore::WebKitCSSKeyframesRule::length):
1892         (WebCore::WebKitCSSKeyframesRule::item):
1893         (WebCore::WebKitCSSKeyframesRule::insertRule):
1894
1895             Change isKeyframeRule() checks to assertions since we know
1896             our rules are always WebKitCSSKeyframeRules. Also tidied up.
1897
1898 2011-10-14  Andreas Kling  <kling@webkit.org>
1899
1900         Unreviewed, actually remove StyleList.* after r97640.
1901
1902         * css/StyleList.cpp: Removed.
1903         * css/StyleList.h: Removed.
1904
1905 2011-10-14  Andreas Kling  <kling@webkit.org>
1906
1907         Merge StyleList into StyleSheet.
1908         https://bugs.webkit.org/show_bug.cgi?id=70100
1909
1910         Reviewed by Antti "printf" Koivisto.
1911
1912         Merge all functionality from StyleList into StyleSheet,
1913         since StyleSheet was the only subclass of StyleList anyway.
1914
1915         Also removed FIXME's about throwing exceptions in CSSRuleList
1916         since they were incorrect. The call sites already handle the
1917         relevant cases.
1918
1919         * CMakeLists.txt:
1920         * GNUmakefile.list.am:
1921         * WebCore.gypi:
1922         * WebCore.pro:
1923         * WebCore.vcproj/WebCore.vcproj:
1924         * WebCore.xcodeproj/project.pbxproj:
1925         * bindings/js/JSCSSRuleListCustom.cpp:
1926         (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
1927         * css/CSSRuleList.cpp:
1928         (WebCore::CSSRuleList::CSSRuleList):
1929         (WebCore::CSSRuleList::length):
1930         (WebCore::CSSRuleList::item):
1931         (WebCore::CSSRuleList::deleteRule):
1932         (WebCore::CSSRuleList::append):
1933         (WebCore::CSSRuleList::insertRule):
1934         * css/CSSRuleList.h:
1935         (WebCore::CSSRuleList::create):
1936         (WebCore::CSSRuleList::styleSheet):
1937         * css/StyleList.cpp: Removed.
1938         * css/StyleList.h: Removed.
1939         * css/StyleSheet.cpp:
1940         (WebCore::StyleSheet::StyleSheet):
1941         (WebCore::StyleSheet::append):
1942         (WebCore::StyleSheet::insert):
1943         (WebCore::StyleSheet::remove):
1944         * css/StyleSheet.h:
1945         (WebCore::StyleSheet::length):
1946         (WebCore::StyleSheet::item):
1947
1948 2011-10-14  Mihnea Ovidenie  <mihnea@adobe.com>
1949
1950         [CSS Regions] Change -webkit-flow to -webkit-flow-into
1951         https://bugs.webkit.org/show_bug.cgi?id=70014
1952
1953         Reviewed by David Hyatt.
1954
1955         1. -webkit-flow is renamed to -webkit-flow-into
1956         2. -webkit-flow-into takes <ident> instead of strings
1957
1958         * css/CSSComputedStyleDeclaration.cpp:
1959         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1960         * css/CSSParser.cpp:
1961         (WebCore::CSSParser::parseValue):
1962         (WebCore::validFlowName):
1963         (WebCore::CSSParser::parseFlowThread):
1964         * css/CSSPropertyNames.in:
1965         * css/CSSStyleSelector.cpp:
1966         (WebCore::CSSStyleSelector::applyProperty):
1967
1968 2011-10-12  Hans Wennborg  <hans@chromium.org>
1969
1970         IndexedDB: Remove SQLite backing store
1971         https://bugs.webkit.org/show_bug.cgi?id=69620
1972
1973         Reviewed by Darin Fisher.
1974
1975         Remove the SQLite backing store implementation; it is not used anymore.
1976         Also remove the maximumSize parameter, it is not used either.
1977
1978         No new functionality, so no new tests.
1979
1980         * GNUmakefile.list.am:
1981         * WebCore.gypi:
1982         * storage/IDBBackingStore.h:
1983         * storage/IDBFactory.cpp:
1984         (WebCore::IDBFactory::getDatabaseNames):
1985         (WebCore::IDBFactory::open):
1986         * storage/IDBFactoryBackendImpl.cpp:
1987         (WebCore::computeFileIdentifier):
1988         (WebCore::computeUniqueIdentifier):
1989         (WebCore::IDBFactoryBackendImpl::getDatabaseNames):
1990         (WebCore::IDBFactoryBackendImpl::open):
1991         (WebCore::IDBFactoryBackendImpl::openBackingStore):
1992         * storage/IDBFactoryBackendImpl.h:
1993         * storage/IDBFactoryBackendInterface.h:
1994         * storage/IDBLevelDBBackingStore.cpp:
1995         (WebCore::IDBLevelDBBackingStore::open):
1996         * storage/IDBLevelDBBackingStore.h:
1997         * storage/IDBSQLiteBackingStore.cpp: Removed.
1998         * storage/IDBSQLiteBackingStore.h: Removed.
1999
2000 2011-10-14  Nikolas Zimmermann  <nzimmermann@rim.com>
2001
2002         Not reviewed. Fix mac builds. r97448 broke them.
2003
2004         * WebCore.xcodeproj/project.pbxproj: Set ImageBySizeCache.h role to private.
2005
2006 2011-10-14  Justin Schuh  <jschuh@chromium.org>
2007
2008         Clear WebMediaPlayerClientImpl back pointer on destruction
2009         https://bugs.webkit.org/show_bug.cgi?id=69973
2010
2011         Reviewed by James Robinson.
2012
2013         Clear the backpointer and remove the unused m_currentFrame
2014
2015         * platform/graphics/chromium/VideoLayerChromium.cpp:
2016         (WebCore::VideoLayerChromium::VideoLayerChromium):
2017         (WebCore::VideoLayerChromium::cleanupResources):
2018         (WebCore::VideoLayerChromium::updateCompositorResources):
2019         (WebCore::VideoLayerChromium::releaseProvider):
2020         * platform/graphics/chromium/VideoLayerChromium.h:
2021
2022 2011-10-13  Hans Wennborg  <hans@chromium.org>
2023
2024         IndexedDB: Make IDBCursor.value() return an IDBAny object
2025         https://bugs.webkit.org/show_bug.cgi?id=70024
2026
2027         Reviewed by Tony Chang.
2028
2029         This is to work around the fact that the V8 bindings mechanism does
2030         eager deserialization of SerializedScriptValue attributes. This means
2031         that the value is fetched from the back-end only once, when the
2032         IDBCursor is first wrapped. When the cursor's value changes, this is
2033         not reflected.
2034
2035         We work around this by making IDBCursor.value() return the
2036         SerializedScriptValue wrapped in an IDBAny object.
2037
2038         * storage/IDBCursor.cpp:
2039         (WebCore::IDBCursor::value):
2040         * storage/IDBCursor.h:
2041         * storage/IDBCursorWithValue.idl:
2042
2043 2011-10-14  Rémi Duraffort  <remi.duraffort@st.com>
2044
2045         Fix compilation when the JS Debugger is disabled.
2046         https://bugs.webkit.org/show_bug.cgi?id=70007
2047
2048         Reviewed by Antti Koivisto.
2049
2050         * inspector/InspectorInstrumentation.cpp:
2051         (WebCore::InspectorInstrumentation::willEvaluateWorkerScript):
2052         * inspector/InspectorRuntimeAgent.cpp:
2053         * inspector/InspectorRuntimeAgent.h:
2054         * inspector/WorkerInspectorController.cpp:
2055         * inspector/WorkerInspectorController.h:
2056         * workers/WorkerMessagingProxy.cpp:
2057         (WebCore::WorkerMessagingProxy::disconnectFromInspector):
2058         (WebCore::WorkerMessagingProxy::sendMessageToInspector):
2059
2060 2011-10-13  Nikolas Zimmermann  <nzimmermann@rim.com>
2061
2062         Prepare SVGImage intrinsic size negotiation: Introduce an IntSize <-> SVGImage cache in CachedImage
2063         https://bugs.webkit.org/show_bug.cgi?id=69416
2064
2065         Reviewed by Antti Koivisto.
2066
2067         Refactor ImageBySizeCache out of CSSImageGeneratorValue as CachedImage wants to use the same type of cache for its purposes.
2068         When introducing the SVGImage intrinsic size negotiation the container size of an SVGImage is dependant on the place where
2069         it gets embedded (eg width/height attributes of host documents <img> force a certain size).
2070
2071         Currently CachedImage only contains a single RefPtr<Image>, which it constructs out of the decoded data.
2072         Multiple RenderObjects share the same CachedImages, when embedding eg. a SVG document in a <html:img> or using it in a background-image for a <div>.
2073         Consider the case where two RenderObjects use the same CachedImage, each with a different container size (200x100 vs 100x200) and the embedded
2074         document contains a viewBox and some arbitary preserveAspectRatio settings. To honour these we have to relayout the document with the desired
2075         size (percentual unit resolving etc, all depend on the RenderSVGRoots size).
2076
2077         With the current design this is hard to realize, w/o requring to relayout the embedded document for each embedder that uses an SVGImage.
2078         This patch introduces a cache right within CachedImage, which manages a map of images to certain sizes, by utilizing the new ImageBySizeCache.
2079
2080         CachedImage::imageForRenderer() takes a RenderObject* parameter, which it uses to look up the last set image container size for a renderer.
2081         Using that size it queries the cache whether it already has an SVGImage for that size, if not it gets created, by creating a whole
2082         new instance of SVGImage, filling it with the already decoded data, and passing on a fixed image container size, which overrides the
2083         size that RenderSVGRoot reports, when computeReplacedLogicalWidth/Height is called and thus laying out the document at the desired size.
2084         This image is then put in the cache for further reusability.
2085
2086         Likewise CachedImage::setContainerSizeForRenderer() now takes a RenderObject* parameter and stores that in the cache with an associated container size.
2087         It requires to touch several files which use CachedImage throughout WebCore/WebKit/WebKit2.
2088
2089         The actual cache is not yet turned on yet, so this is not a functional change so far, as it needs some other changes to SVGImage,
2090         which will come with the master patch in bug 47156.
2091
2092         No new tests yet, as the new cache isn't turned on yet.
2093
2094         * CMakeLists.txt: Add rendering/ImageBySizeCache.* to build.
2095         * GNUmakefile.list.am: Ditto.
2096         * WebCore.gypi: Ditto.
2097         * WebCore.pro: Ditto.
2098         * WebCore.vcproj/WebCore.vcproj: Ditto.
2099         * WebCore.xcodeproj/project.pbxproj: Ditto.
2100         * accessibility/AccessibilityRenderObject.cpp:
2101         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): Use new CachedImage::imageSizeForRenderer(RenderObject*) method.
2102         * bindings/objc/DOM.mm: Ditto (for CachedImage::image()).
2103         (-[DOMElement image]):
2104         (-[DOMElement _imageTIFFRepresentation]):
2105         * bridge/qt/qt_pixmapruntime.cpp:
2106         (JSC::Bindings::QtPixmapInstance::variantFromObject): Ditto (for CachedImage::image()).
2107         * css/CSSCanvasValue.cpp: s/m_clients/clients()/, which now live in the ImageBySizeCache instead of CSSImageGeneratorValue.
2108         (WebCore::CSSCanvasValue::canvasChanged):
2109         (WebCore::CSSCanvasValue::canvasResized):
2110         (WebCore::CSSCanvasValue::image):
2111         * css/CSSGradientValue.cpp: Ditto.
2112         (WebCore::CSSGradientValue::image):
2113         * css/CSSImageGeneratorValue.cpp: Move the sizes/clients/images cache into a new ImageBySizeCache class, to make it usable for CachedImage as well.
2114         (WebCore::CSSImageGeneratorValue::addClient): Adapt to move.
2115         (WebCore::CSSImageGeneratorValue::removeClient): Ditto.
2116         (WebCore::CSSImageGeneratorValue::getImage): Ditto.
2117         (WebCore::CSSImageGeneratorValue::putImage): Ditto.
2118         * css/CSSImageGeneratorValue.h:
2119         (WebCore::CSSImageGeneratorValue::clients): Forwarded to the ImageBySizeCache.
2120         * editing/DeleteButtonController.cpp: 
2121         (WebCore::isDeletableElement): CachedImage::canRender() now takes a RenderObject* parameter.
2122         * html/HTMLImageElement.cpp:
2123         (WebCore::HTMLImageElement::width): Use new CachedImage::imageSizeForRenderer(RenderObject*) method.
2124         (WebCore::HTMLImageElement::height): Ditto.
2125         (WebCore::HTMLImageElement::naturalWidth): Ditto.
2126         (WebCore::HTMLImageElement::naturalHeight): Ditto.
2127         * html/ImageDocument.cpp:
2128         (WebCore::ImageDocumentParser::finish): Ditto.
2129         (WebCore::ImageDocument::scale): Ditto.
2130         (WebCore::ImageDocument::resizeImageToFit): Ditto.
2131         (WebCore::ImageDocument::imageUpdated): Ditto.
2132         (WebCore::ImageDocument::restoreImageSize): Ditto.
2133         (WebCore::ImageDocument::imageFitsInWindow): Ditto.
2134         * html/canvas/CanvasRenderingContext.cpp:
2135         (WebCore::CanvasRenderingContext::wouldTaintOrigin): Use new CachedImage::imageForRenderer(RenderObject*) method.
2136         * html/canvas/CanvasRenderingContext2D.cpp:
2137         (WebCore::isOriginClean): Ditto.
2138         (WebCore::size): Ditto (for CachedImage::imageSizeForRenderer()).
2139         (WebCore::CanvasRenderingContext2D::drawImage): Ditto.
2140         (WebCore::CanvasRenderingContext2D::createPattern): Ditto.
2141         * html/canvas/WebGLRenderingContext.cpp:
2142         (WebCore::WebGLRenderingContext::texImage2D): Ditto.
2143         (WebCore::WebGLRenderingContext::texSubImage2D): Ditto.
2144         * loader/cache/CachedImage.cpp: Add currently _disabled_ cache for SVGImages. The intrinsic size negotiation will need to use multiple SVGImages
2145         for each requested size (equal to the size of the embedding place for the image) - make it possible to cache these SVGImages, and maintain a cache
2146         for them. The hash code is a 1:1 refactoring from the already present code in CSSImageGeneratorValue, now named 'ImageBySizeCache'.
2147         (WebCore::CachedImage::lookupImageForSize): Looks up an Image from the cache for a given IntSize. Currently turned off.
2148         (WebCore::CachedImage::lookupImageForRenderer): Looks up an Image from the cache for a given renderer. Currently turned off.
2149         (WebCore::CachedImage::lookupOrCreateImageForRenderer): Looks up an Image from the cache or creates a new SVGImage for a given size and caches it, if possible. Currently turned off.
2150         All following changes share this: Don't operate on m_image directly, instead always look up one from the cache for a given size or renderer - if that's not present fallback to m_image.
2151         When an SVGImage is first created by CachedImage::createImage() and stored in m_image, the cache remains empty.
2152
2153         If eg. <img width="30" height="70" src="foo.svg"> is used which implies a container size of 30x70 a new SVGImage is created with the additional information of a 30x70 container size
2154         which is immediately passed to the SVGImage after its creation. This SVGImage is put in the ImageBySizeCache associated with a container size of 30x70.
2155         We now have two SVGImage objects present, one living in CachedImage::m_image, created by createImage() during data decoding, and one living in the ImageBySizeCache
2156         created by lookupOrCreateImageForRenderer() associated with the 30x70 container. The first SVGImage::size() will return a value as defined in the referenced foo.svg,
2157         whereas the SVGImage::size() call of the new SVGImage living in the cache reports 30x70 and renders according to that.
2158
2159         Whenever any method of CachedImage is called with a RenderObject* or IntSize, we can't just operate on m_image anymore but instead have to lookup the right
2160         images for a certain renderer/size from the cache and operate on these. When calling eg. CachedImage::image() with a null renderer, m_image is returned.
2161         When passing with a valid renderer only cache lookups are done if the m_image is actually a SVGImage, otherwhise lookupImageForSize/Renderer will just return the m_image.
2162         There is no logical change induced for non-SVGImage derived images.
2163
2164         CachedImage::image() of course needs a RenderObject* parameter now, to identify which of the images from the cache to use, if the underlying image is a SVGImage.
2165         Luckily these information are already present in StyleCachedImage/StyleImage & friends and only need to be added for some additional methods.
2166         (WebCore::CachedImage::image): FIXME
2167         (WebCore::CachedImage::imageForRenderer): Call lookupOrCreateImageForRenderer() instead of returning m_image, if it's not null. Its a no-op for non SVGImage derived objects.
2168         (WebCore::CachedImage::setContainerSizeForRenderer): For non-SVGImages, just pass on the size to the m_image. For SVGImages, associate the passed in renderer with the IntSize in the cache.
2169                                                              This does NOT create the SVGImage yet, this is delayed until imageForRenderer() is called for a given renderer that wants this size.
2170         (WebCore::CachedImage::imageSize): Don't operate on m_image, ask lookupImageForRenderer() with the incoming renderer.
2171         (WebCore::CachedImage::imageRect): Ditto.
2172         (WebCore::CachedImage::clear): Force clearing the m_svgImageCache.
2173         (WebCore::CachedImage::data): Call m_image->size() instead of imageSize(), to avoid having to pass a null renderer to imageSize() as here no renderer is available yet.
2174         (WebCore::CachedImage::destroyDecodedData): Don't destroy decoded data for SVG images, as m_data needs to be accessable at any time to construct a cloned SVGImage.
2175                                                     In future we don't need this anymore if we make sure multiple SVGImages share the same trees, but that's for a follow-up patch.
2176         (WebCore::CachedImage::decodedSizeChanged): Don't operate on m_image, ask lookupImageForRenderer() with the incoming renderer.
2177         (WebCore::CachedImage::didDraw): Ditto.
2178         (WebCore::CachedImage::shouldPauseAnimation): Ditto.
2179         (WebCore::CachedImage::animationAdvanced): Ditto.
2180         (WebCore::CachedImage::changedInRect): Ditto. (eg. when leaving out this change animated SVG images wouldn't update anymore, as the animation didn't happen on m_image!)
2181         * loader/cache/CachedImage.h: imageForRenderer/canRender/setContainerSizeForRenderer/imageSizeForRenderer now all take a RenderObject* parameter to identifiy the current user of the image.
2182         (WebCore::CachedImage::canRender): Pass on the incoming renderer to imageSizeForRenderer().
2183         * page/DragController.cpp:
2184         (WebCore::getImage): Use new CachedImage::imageForRenderer(RenderObject*) method.
2185         * page/EventHandler.cpp:
2186         (WebCore::EventHandler::selectCursor): Ditto.
2187         * page/PageSerializer.cpp:
2188         (WebCore::PageSerializer::serializeFrame): Ditto.
2189         (WebCore::PageSerializer::addImageToResources): Ditto.
2190         (WebCore::PageSerializer::retrieveResourcesForCSSDeclaration): Ditto.
2191         * page/PageSerializer.h:
2192         * platform/chromium/ClipboardChromium.cpp:
2193         (WebCore::writeImageToDataObject): Ditto.
2194         * platform/chromium/PasteboardChromium.cpp:
2195         (WebCore::Pasteboard::writeImage): Ditto.
2196         * platform/graphics/Image.h:
2197         (WebCore::Image::isSVGImage): Add boolean helper to identify SVGImages, just like isBitmapImage().
2198         * platform/gtk/ClipboardGtk.cpp:
2199         (WebCore::ClipboardGtk::declareAndWriteDragImage): Use new CachedImage::imageForRenderer(RenderObject*) method.
2200         * platform/gtk/PasteboardGtk.cpp:
2201         (WebCore::Pasteboard::writeImage): Ditto.
2202         * platform/mac/HTMLConverter.mm:
2203         (fileWrapperForElement): Ditto.
2204         * platform/mac/PasteboardMac.mm:
2205         (WebCore::Pasteboard::writeImage): Ditto.
2206         * platform/qt/ClipboardQt.cpp:
2207         (WebCore::ClipboardQt::declareAndWriteDragImage): Ditto.
2208         * platform/qt/PasteboardQt.cpp:
2209         (WebCore::Pasteboard::writeImage): Ditto.
2210         * platform/win/ClipboardWin.cpp:
2211         (WebCore::writeImageToDataObject): Ditto.
2212         * platform/win/PasteboardWin.cpp:
2213         (WebCore::Pasteboard::writeImage): Ditto.
2214         * platform/wince/PasteboardWinCE.cpp:
2215         (WebCore::Pasteboard::writeImage): Ditto.
2216         * rendering/HitTestResult.cpp:
2217         (WebCore::HitTestResult::image): Ditto.
2218         * rendering/ImageBySizeCache.cpp: Copied from WebCore/css/CSSImageGeneratorValue.cpp, to preserve history for the original cache code.
2219         (WebCore::ImageBySizeCache::ImageBySizeCache): Straight copy from CSSImageGeneratorValue, renamed to ImageBySizeCache, removing all but the cache relevant code.
2220         (WebCore::ImageBySizeCache::addClient): Ditto.
2221         (WebCore::ImageBySizeCache::removeClient): Ditto.
2222         (WebCore::ImageBySizeCache::getImage): Ditto.
2223         (WebCore::ImageBySizeCache::putImage): Ditto.
2224         (WebCore::ImageBySizeCache::clear): New function, that clears the cache, introduced for the needs of CachedImage.
2225         (WebCore::ImageBySizeCache::imageForSize): New function to query an Image* for a given IntSize, introduced for the needs of CachedImage.
2226         (WebCore::ImageBySizeCache::sizeForClient): New function to query an IntSize for a given renderer.
2227         * rendering/ImageBySizeCache.h: Copied from WebCore/css/CSSImageGeneratorValue.h.
2228         (WebCore::ImageBySizeCache::clients):
2229         * rendering/InlineFlowBox.cpp:
2230         (WebCore::InlineFlowBox::paintFillLayer): CachedImage::canRender() now takes a RenderObject* parameter.
2231         (WebCore::InlineFlowBox::paintBoxDecorations): Ditto.
2232         (WebCore::InlineFlowBox::paintMask): Ditto.
2233         * rendering/RenderBox.cpp:
2234         (WebCore::RenderBox::paintMaskImages): Ditto.
2235         (WebCore::RenderBox::repaintLayerRectsForImage): Ditto.
2236         * rendering/RenderBoxModelObject.cpp:
2237         (WebCore::RenderBoxModelObject::paintFillLayerExtended): Ditto.
2238         (WebCore::RenderBoxModelObject::calculateFillTileSize): Ditto (for CachedImage::setContainerSizeForRenderer()).
2239         (WebCore::RenderBoxModelObject::paintNinePieceImage): Ditto.
2240         * rendering/RenderImage.cpp:
2241         (WebCore::RenderImage::imageSizeForError): Use new CachedImage::imageForRenderer(RenderObject*) method.
2242         (WebCore::RenderImage::setImageSizeForAltText): Ditto.
2243         (WebCore::RenderImage::computeReplacedLogicalWidth): FIXME
2244         * rendering/RenderImageResource.cpp:
2245         (WebCore::RenderImageResource::setContainerSizeForRenderer): Pass on m_renderer to CachedImage::setContainerSizeForRenderer().
2246         * rendering/RenderImageResource.h: Remove constness from setContainerSizeForRenderer.
2247         (WebCore::RenderImageResource::image): Pass on m_renderer to CachedImage::image().
2248         (WebCore::RenderImageResource::imageSize): Pass on m_renderer to CachedImage::imageSizeForRenderer().
2249         * rendering/RenderImageResourceStyleImage.h:
2250         (WebCore::RenderImageResourceStyleImage::setContainerSizeForRenderer): Remove constness, pass on m_renderer to StyleImage::setContainerSizeForRenderer().
2251         * rendering/RenderLayerBacking.cpp:
2252         (WebCore::RenderLayerBacking::isDirectlyCompositedImage): Use new CachedImage::imageForRenderer(RenderObject*) method.
2253         (WebCore::RenderLayerBacking::updateImageContents): Ditto.
2254         * rendering/RenderListMarker.cpp:
2255         (WebCore::RenderListMarker::computePreferredLogicalWidths): CachedImage::setContainerSizeForRenderer() now takes a RenderObject* parameter.
2256         * rendering/RenderObject.cpp:
2257         (WebCore::mustRepaintFillLayers): CachedImage::canRender() now takes a RenderObject* parameter.
2258         (WebCore::RenderObject::borderImageIsLoadedAndCanBeRendered): Ditto.
2259         * rendering/style/StyleCachedImage.cpp:
2260         (WebCore::StyleCachedImage::canRender): Pass on incoming renderer to CachedImage::canRender().
2261         (WebCore::StyleCachedImage::imageSize): Pass on incoming renderer to CachedImage::imageSizeForRenderer().
2262         (WebCore::StyleCachedImage::setContainerSizeForRenderer): Pass on incoming renderer to CachedImage::setContainerSizeForRenderer().
2263         (WebCore::StyleCachedImage::addClient): Remove unneeded return statment in void method.
2264         (WebCore::StyleCachedImage::removeClient): Ditto.
2265         (WebCore::StyleCachedImage::image): Pass on incoming renderer to CachedImage::image().
2266         * rendering/style/StyleCachedImage.h: Add RenderObject* parameter to canRender()/setContainerSizeForRenderer(). image() already has one, that was unused so far.
2267         * rendering/style/StyleGeneratedImage.cpp: Inlined setContainerSizeForRenderer.
2268         * rendering/style/StyleGeneratedImage.h: 
2269         (WebCore::StyleGeneratedImage::setContainerSizeForRenderer): Add RenderObject* parameter.
2270         * rendering/style/StyleImage.h:
2271         (WebCore::StyleImage::canRender): Ditto.
2272         * rendering/style/StylePendingImage.h:
2273         (WebCore::StylePendingImage::setContainerSizeForRenderer): Ditto.
2274         * svg/SVGFEImageElement.cpp:
2275         (WebCore::SVGFEImageElement::build): Use new CachedImage::imageForRenderer(RenderObject*) method.
2276         * svg/graphics/SVGImage.cpp: Cleanup file, the include hack seems not needed anymore.
2277         (WebCore::SVGImage::setContainerSize): s/LayoutSize/IntSize/ to match the code in platform/.
2278         * svg/graphics/SVGImage.h: Ditto.
2279         (WebCore::SVGImage::isSVGImage): Return true.
2280
2281 2011-10-13  Kenichi Ishibashi  <bashi@chromium.org>
2282
2283         [Chromium] Uninitialized read in WebCore::*Font* / HB_GSUB_Select_Feature
2284         https://bugs.webkit.org/show_bug.cgi?id=70087
2285
2286         Reviewed by Kent Tamura.
2287
2288         Initialize local variables in ComplexTextControllerLinux::setupfontFeatures.
2289
2290         No new tests because there is no behavior change. Manually tested with valgrind.
2291
2292         * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
2293         (WebCore::setupFontFeatures):
2294
2295 2011-10-13  Csaba Osztrogonác  <ossy@webkit.org>
2296
2297         [Qt][Win] Unreviewed buildfix after r97433.
2298
2299         * platform/MemoryPressureHandler.h: Add a missing include.
2300
2301 2011-10-13  Adam Barth  <abarth@webkit.org>
2302
2303         Spelling error in v8WebSocket::constructorCallback error
2304         https://bugs.webkit.org/show_bug.cgi?id=63943
2305
2306         Reviewed by Kent Tamura.
2307
2308         Fix typo.
2309
2310         * bindings/v8/custom/V8WebSocketCustom.cpp:
2311         (WebCore::V8WebSocket::constructorCallback):
2312
2313 2011-10-13  Mark Hahnenberg  <mhahnenberg@apple.com>
2314
2315         Rename virtual getConstructData to getConstructDataVirtual
2316         https://bugs.webkit.org/show_bug.cgi?id=69872
2317
2318         Reviewed by Geoffrey Garen.
2319
2320         No new tests.
2321
2322         Renamed virtual getConstructData functions to getConstructDataVirtual to 
2323         avoid conflicts when we add static getConstructData to the MethodTable.
2324
2325         * WebCore.exp.in:
2326         * bindings/js/JSAudioConstructor.cpp:
2327         (WebCore::JSAudioConstructor::getConstructDataVirtual):
2328         * bindings/js/JSAudioConstructor.h:
2329         * bindings/js/JSImageConstructor.cpp:
2330         (WebCore::JSImageConstructor::getConstructDataVirtual):
2331         * bindings/js/JSImageConstructor.h:
2332         * bindings/js/JSOptionConstructor.cpp:
2333         (WebCore::JSOptionConstructor::getConstructDataVirtual):
2334         * bindings/js/JSOptionConstructor.h:
2335         * bindings/js/ScriptFunctionCall.cpp:
2336         (WebCore::ScriptFunctionCall::construct):
2337         * bindings/scripts/CodeGeneratorJS.pm:
2338         (GenerateConstructorDeclaration):
2339         (GenerateConstructorDefinition):
2340         * bindings/scripts/test/JS/JSTestInterface.cpp:
2341         (WebCore::JSTestInterfaceConstructor::getConstructDataVirtual):
2342         * bridge/runtime_object.cpp:
2343         (JSC::Bindings::RuntimeObject::getConstructDataVirtual):
2344         * bridge/runtime_object.h:
2345
2346 2011-10-13  Simon Fraser  <simon.fraser@apple.com>
2347
2348         Remove #include of <QuartzCore/QuartzCore.h> in a widely-used header.
2349
2350         Reviewed by Sam Weinig.
2351
2352         * platform/PlatformScreen.h: Typedef PlatformDisplayID to a uint32_t.
2353         * platform/graphics/DisplayRefreshMonitor.h: Typedef CVDisplayLinkRef as
2354         an opaque type to avoid bringing in QuartzCore.h, and move displayLinkCallback
2355         to the .cpp file since it uses Core Video types.
2356         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
2357         (WebCore::displayLinkCallback): Make this a local static function, that
2358         calls a member fuction on the object.
2359         (WebCore::DisplayRefreshMonitor::requestRefreshCallback):
2360         (WebCore::DisplayRefreshMonitor::displayLinkFired):
2361
2362 2011-10-13  Michael Saboff  <msaboff@apple.com>
2363
2364         REGRESSION: High frequency memory warnings cause Safari to hog the CPU doing useless garbage collection
2365         https://bugs.webkit.org/show_bug.cgi?id=69774
2366
2367         Throttle the processing of memory pressure events to no more often than once every 5 seconds.
2368
2369         Reviewed by Geoffrey Garen.
2370
2371         No new tests.
2372
2373         * platform/MemoryPressureHandler.cpp:
2374         (WebCore::MemoryPressureHandler::MemoryPressureHandler):
2375         * platform/MemoryPressureHandler.h:
2376         * platform/mac/MemoryPressureHandlerMac.mm:
2377         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
2378
2379 2011-10-13  Kentaro Hara  <haraken@chromium.org>
2380
2381         Implement an OverflowEvent constructor for V8
2382         https://bugs.webkit.org/show_bug.cgi?id=70017
2383
2384         Reviewed by Adam Barth.
2385
2386         Test: fast/events/constructors/overflow-event-constructor.html
2387
2388         * bindings/v8/custom/V8EventConstructors.cpp: Added an OverflowEvent constructor.
2389         * dom/OverflowEvent.idl: Replaced 'JSCustomConstructor' with 'CustomConstructor'.
2390
2391 2011-10-13  Anantanarayanan G Iyengar  <ananta@chromium.org>
2392
2393         https://bugs.webkit.org/show_bug.cgi?id=70064
2394         
2395         The NPObjectWrapper class used by V8 bindings in Chromium to wrap the window
2396         script object was allocating an instance of itself in the NPAllocate
2397         implementation and returning this pointer. It should be returning a pointer
2398         to the wrapped NPObject structure (NPProxyObject). The member function
2399         getUnderlyingNPObject should return 0 if we fail to find the underlying NPObject
2400         for the call. It was incorrectly returning a pointer to the same NPObject in
2401         this case which could cause recursion. 
2402
2403         Reviewed by Nate Chapin.
2404
2405         No new tests as there is no change in functionality.
2406
2407         * bindings/v8/NPObjectWrapper.cpp:
2408         (WebCore::NPObjectWrapper::getObjectForCall):
2409         (WebCore::NPObjectWrapper::NPAllocate):
2410         * bindings/v8/NPObjectWrapper.h:
2411
2412 2011-10-13  Arthur Hsu  <arthurhsu@chromium.org>
2413
2414         Ensure font loaded before calling Skia to drawPosText in Chrome sandbox
2415         https://bugs.webkit.org/show_bug.cgi?id=69370
2416
2417         Reviewed by James Robinson.
2418
2419         * platform/graphics/chromium/FontChromiumWin.cpp:
2420         (WebCore::Font::drawGlyphs):
2421
2422 2011-10-13  Kentaro Hara  <haraken@chromium.org>
2423
2424         Regarding constructor, replace [ConstructorWith=...] IDL with [CallWith=...] IDL
2425         https://bugs.webkit.org/show_bug.cgi?id=69801
2426
2427         As for constructors, [ConstructorWith=...] has the same meaning as [CallWith=...].
2428         We should deprecate [ConstructorWith=...]. This is a clean-up bug for the bug 65839.
2429
2430         Reviewed by Adam Barth.
2431
2432         No new tests, since no change in behavior.
2433
2434         * bindings/scripts/CodeGeneratorV8.pm: Replaced [ConstructorWith=...] IDL with [CallWith=...] IDL.
2435         (GenerateConstructorCallback):
2436         * bindings/scripts/test/TestInterface.idl: Ditto.
2437         * fileapi/FileReader.idl: Ditto.
2438         * p2p/PeerConnection.idl: Ditto.
2439         * page/EventSource.idl: Ditto.
2440         * workers/Worker.idl: Ditto.
2441
2442 2011-10-13  Kentaro Hara  <haraken@chromium.org>
2443
2444         Constructor should not be called if the object is being constructed inside WebCore
2445         https://bugs.webkit.org/show_bug.cgi?id=70015
2446
2447         Reviewed by Adam Barth.
2448
2449         Summary: A DOM object can be created from the JS context and from the WebCore context.
2450         Constructor should be called if the object is created from the JS context,
2451         but should not be called if the object is created from the WebCore context.
2452
2453         Details:
2454         - Expected behavior when the object is created from the JS context (e.g. "new Event()"):
2455         (1) V8XXXX::constructorCallback() is called.
2456         (2) V8XXXX::constructorCallback() calls XXXX::create().
2457         (3) XXXX::create() creates a C++ object.
2458         (4) V8XXXX::constructorCallback() calls toV8() for the C++ object.
2459         (5) toV8() wraps the C++ object and returns the wrapped JS object.
2460
2461         - Actual behavior when the object is created from the JS context (e.g. "new Event()"):
2462         As described above (1) - (5). That's fine!!
2463
2464         - Expected behavior when the object is created from the WebCore context.
2465         (e.g. "window.addEventListener("load", function (event) { ... });". In this case,
2466         the Event object is created inside the WebCore context):
2467         (1) WebCore calls XXXX::create().
2468         (2) XXXX::create() creates a C++ object.
2469         (3) WebCore calls toV8() for the C++ object.
2470         (4) toV8() wraps the C++ object and returns the wrapped JS object.
2471
2472         - Actual behavior when the object is created from the WebCore context.
2473         (e.g. "window.addEventListener("load", function (event) { ... });"):
2474         (1) WebCore calls XXXX::create().
2475         (2) XXXX::create() creates a C++ object.
2476         (3) WebCore calls toV8() for the C++ object.
2477         (4) toV8() can call XXXX::constructorCallback(). (Whether or not toV8() calls
2478         XXXX::constructorCallback() depends on the implementation of toV8().)
2479         (5) V8XXXX::constructorCallback() calls XXXX::create().
2480         (6) XXXX::create() creates __another__ C++ object.
2481         (7) V8XXXX::constructorCallback() calls toV8() for the C++ object.
2482         (8) toV8() wraps the C++ object and returns the wrapped JS object.
2483
2484         This actual behavior definitely causes the following problems:
2485
2486         - Problem1: The object returned to JS is not the object created in (2)
2487         but the object created in (6). However, I do not yet know a test case that causes
2488         some visible bug because of this problem.
2489
2490         - Problem2: In (4), XXXX::constructorCallback() can be called with no argument.
2491         If XXXX::constructorCallback() expects at least one argument, XXXX::constructorCallback()
2492         throws TypeError, resulting in crash. For example, Event caused this problem
2493         when I implemented constructor for Event. Based on the discussion with Dominicc,
2494         we solved this problem by adding the following two lines of code to Event::constructorCallback()
2495         (See here: http://codesearch.google.com/codesearch#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/bindings/v8/custom/V8EventConstructors.cpp&exact_package=chromium&q=allowallocation&type=cs):
2496
2497         XXXX::constructorCallback(...) {
2498             ...;
2499             if (AllowAllocation::current())
2500                 return args.Holder();
2501             ...;
2502         }
2503
2504         This if check means "XXXX::constructorCallback() returns immediately if it is called
2505         from the WebCore context".
2506
2507         With these observations, we think that all constructorCallback() should have the above
2508         if check. This patch adds the if check to CodeGeneratorV8.pm. After this patch is landed,
2509         I would like to add the if check to all existing custom V8 constructors.
2510
2511         No new tests, since we could not find a test case that causes some visible bug without the if check.
2512
2513         * bindings/scripts/CodeGeneratorV8.pm:
2514         (GenerateConstructorCallback): Generates a constructor so that it returns immediately without doing anything if the constructor is called from the WebCore context.
2515         * bindings/scripts/test/V8/V8TestInterface.cpp: Updated the result.
2516         (WebCore::V8TestInterface::constructorCallback):
2517         * bindings/scripts/test/V8/V8TestObj.cpp: Ditto.
2518         (WebCore::V8TestObj::constructorCallback):
2519
2520 2011-10-13  Kentaro Hara  <haraken@chromium.org>
2521
2522         Implement a BeforeLoadEvent constructor for V8
2523         https://bugs.webkit.org/show_bug.cgi?id=69980
2524
2525         Reviewed by Adam Barth.
2526
2527         Test: fast/events/constructors/before-load-event-constructor.html
2528
2529         * bindings/v8/custom/V8EventConstructors.cpp: Added a BeforeLoadEvent constructor.
2530         * dom/BeforeLoadEvent.idl: Replaced 'JSCustomConstructor' with 'CustomConstructor'.
2531
2532 2011-10-13  Joshua Bell  <jsbell@chromium.org>
2533
2534         make IDBFactory.open wait for pending setVersion transactions to complete
2535         https://bugs.webkit.org/show_bug.cgi?id=69307
2536
2537         Reviewed by Tony Chang.
2538
2539         Added a queue of pending open calls, similar to the queue of pending
2540         setVersion calls. Ensure pending calls are processed in the correct
2541         order when transactions complete.
2542
2543         Tests: storage/indexeddb/open-close-version.html
2544                storage/indexeddb/two-version-changes.html
2545                storage/indexeddb/version-change-exclusive.html
2546
2547         * storage/IDBDatabaseBackendImpl.cpp:
2548         (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::create):
2549         (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::callbacks):
2550         (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::PendingOpenCall):
2551         (WebCore::IDBDatabaseBackendImpl::setVersion):
2552         (WebCore::IDBDatabaseBackendImpl::transactionStarted):
2553         (WebCore::IDBDatabaseBackendImpl::transactionFinished):
2554         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
2555         (WebCore::IDBDatabaseBackendImpl::openConnection):
2556         (WebCore::IDBDatabaseBackendImpl::close):
2557         * storage/IDBDatabaseBackendImpl.h:
2558         * storage/IDBFactoryBackendImpl.cpp:
2559         (WebCore::IDBFactoryBackendImpl::open):
2560         * storage/IDBTransactionBackendImpl.cpp:
2561         (WebCore::IDBTransactionBackendImpl::abort):
2562         (WebCore::IDBTransactionBackendImpl::start):
2563         (WebCore::IDBTransactionBackendImpl::commit):
2564
2565 2011-10-13  Chris Marrin  <cmarrin@apple.com>
2566
2567         Fix Leopard build
2568
2569         Unreviewed.
2570
2571         * platform/graphics/DisplayRefreshMonitor.h: Added.
2572
2573 2011-10-12  Chris Marrin  <cmarrin@apple.com>
2574
2575         Sync requestAnimationFrame callback to CVDisplayLink on Mac
2576         https://bugs.webkit.org/show_bug.cgi?id=68911
2577
2578         Reviewed by Simon Fraser.
2579
2580         Test: fast/animation/request-animation-frame-iframe.html
2581
2582         Implement CVDisplayLink which checks to see if any scheduleAnimation requests
2583         have come in. If so, remember the timestamp and do a callOnMainThread to fire
2584         the callbacks. A DisplayRefreshMonitorManager is a singleton which has a list
2585         of DisplayRefreshMonitors, one for each display. Each monitor has one or more
2586         DisplayRefreshMonitorClients, which is a abstract virtual class implemented
2587         by ScriptAnimationController. When an animation is scheduled, the
2588         displayRefreshFired method is called on the client, which in turn calls the
2589         requestAnimationFrame callbacks. 
2590
2591         DisplayRefreshMonitor and therefore the CVDisplayLink it owns is discarded
2592         when it no longer has any clients. This minimizes the number of concurrent
2593         CVDisplayLink threads.
2594
2595         * WebCore.exp.in:
2596         * WebCore.xcodeproj/project.pbxproj:
2597         * dom/Document.cpp:
2598         (WebCore::Document::windowScreenDidChange):
2599         (WebCore::Document::webkitRequestAnimationFrame):
2600         * dom/Document.h:
2601         * dom/ScriptedAnimationController.cpp:
2602         (WebCore::ScriptedAnimationController::ScriptedAnimationController):
2603         (WebCore::ScriptedAnimationController::windowScreenDidChange):
2604         (WebCore::ScriptedAnimationController::scheduleAnimation):
2605         * dom/ScriptedAnimationController.h:
2606         (WebCore::ScriptedAnimationController::displayRefreshFired):
2607         * page/Page.cpp:
2608         (WebCore::Page::Page):
2609         (WebCore::Page::windowScreenDidChange):
2610         * page/Page.h:
2611         (WebCore::Page::displayID):
2612         * platform/PlatformScreen.h:
2613         * platform/graphics/DisplayRefreshMonitor.cpp: Added.
2614         (WebCore::DisplayRefreshMonitorClient::DisplayRefreshMonitorClient):
2615         (WebCore::DisplayRefreshMonitorClient::~DisplayRefreshMonitorClient):
2616         (WebCore::DisplayRefreshMonitorClient::fireDisplayRefreshIfNeeded):
2617         (WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor):
2618         (WebCore::DisplayRefreshMonitor::refreshDisplayOnMainThread):
2619         (WebCore::DisplayRefreshMonitorManager::sharedManager):
2620         (WebCore::DisplayRefreshMonitorManager::findMonitor):
2621         (WebCore::DisplayRefreshMonitorManager::registerClient):
2622         (WebCore::DisplayRefreshMonitorManager::unregisterClient):
2623         (WebCore::DisplayRefreshMonitorManager::scheduleAnimation):
2624         (WebCore::DisplayRefreshMonitorManager::windowScreenDidChange):
2625         * platform/graphics/DisplayRefreshMonitor.h: Added.
2626         (WebCore::DisplayRefreshMonitorClient::scheduleAnimation):
2627         (WebCore::DisplayRefreshMonitor::hasClients):
2628         (WebCore::DisplayRefreshMonitor::addClient):
2629         (WebCore::DisplayRefreshMonitor::removeClient):
2630         (WebCore::DisplayRefreshMonitor::displayID):
2631         (WebCore::DisplayRefreshMonitorManager::DisplayRefreshMonitorManager):
2632         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp: Added.
2633         (WebCore::DisplayRefreshMonitor::displayLinkCallback):
2634         (WebCore::DisplayRefreshMonitor::~DisplayRefreshMonitor):
2635         (WebCore::DisplayRefreshMonitor::scheduleAnimation):
2636
2637 2011-10-13  Abhishek Arya  <inferno@chromium.org>
2638
2639         Unreviewed. Qt compile fix.
2640
2641         * css/CSSFontFaceSource.cpp: include Document.h.
2642
2643 2011-10-12  Abhishek Arya  <inferno@chromium.org>
2644
2645         Register custom fonts at their creation time,  
2646         rather than at retirement time.
2647         https://bugs.webkit.org/show_bug.cgi?id=68929
2648
2649         Reviewed by Dan Bernstein.
2650
2651         Test: fast/text/custom-font-data-crash2.html
2652
2653         * css/CSSFontFace.cpp:
2654         * css/CSSFontFace.h: remove function added in r94508,
2655         which is no longer needed. We now register custom fonts
2656         at creation time.
2657         * css/CSSFontFaceSource.cpp:
2658         (WebCore::CSSFontFaceSource::pruneTable): no longer need
2659         to delete/retire font data here, it will be handled in ~Document.
2660         (WebCore::CSSFontFaceSource::getFontData): register custom
2661         font to document's m_customFonts.
2662         * css/CSSFontSelector.cpp:
2663         * css/CSSFontSelector.h: remove function added in r94508,
2664         which is no longer needed. We now register custom fonts
2665         at creation time.
2666         * css/CSSSegmentedFontFace.cpp:
2667         (WebCore::CSSSegmentedFontFace::pruneTable): no longer need
2668         to delete/retire font data here, it will be handled in ~Document.
2669         (WebCore::CSSSegmentedFontFace::getFontData): register custom
2670         font to document's m_customFonts.
2671         * dom/Document.cpp: Change function names to registerCustomFont
2672         , deleteCustomFonts and local to m_customFont.
2673         (WebCore::Document::~Document):
2674         (WebCore::Document::recalcStyle): yanking out the comment. We
2675         no longer keep retired custom fonts. We clear all custom fonts
2676         on Document destruction.
2677         (WebCore::Document::registerCustomFont): 
2678         (WebCore::Document::deleteCustomFonts):
2679         * dom/Document.h:
2680
2681 2011-10-13  Ryosuke Niwa  <rniwa@webkit.org>
2682
2683         Crash in DeleteSelectionCommand::handleGeneralDelete
2684         https://bugs.webkit.org/show_bug.cgi?id=70045
2685
2686         Reviewed by Darin Adler.
2687
2688         Exit early when m_upstreamStart is null.
2689
2690         No new tests because we don't have a reduction.
2691
2692         * editing/DeleteSelectionCommand.cpp:
2693         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
2694
2695 2011-10-13  David Hyatt  <hyatt@apple.com>
2696
2697         https://bugs.webkit.org/show_bug.cgi?id=70049
2698         
2699         [CSS Regions] Add a test of a float being pushed down because it can't fit
2700         next to another float and make sure it re-evaluates its position when it changes
2701         regions as a result of the push.
2702
2703         Reviewed by Sam Weinig.
2704
2705         Added new test in fast/regions.
2706
2707         * rendering/RenderBlock.cpp:
2708         (WebCore::RenderBlock::computeLogicalLocationForFloat):
2709
2710 2011-10-13  Adam Barth  <abarth@webkit.org>
2711
2712         Move XSTL to script-src in Content-Security-Policy
2713         https://bugs.webkit.org/show_bug.cgi?id=63637
2714
2715         Reviewed by Eric Seidel.
2716
2717         The spec was unclear about how to treat XSLT.  My reading was that they
2718         should fall under style-src, but further discussion on the mailing list
2719         settled on using script-src because an XSLT can inject arbitrary DOM
2720         and script into a page, which is more risky than including style.
2721
2722         Tests: http/tests/security/contentSecurityPolicy/xsl-unaffected-by-style-src-1.php
2723                http/tests/security/contentSecurityPolicy/xsl-unaffected-by-style-src-2.php
2724
2725         * loader/cache/CachedResourceLoader.cpp:
2726         (WebCore::CachedResourceLoader::canRequest):
2727
2728 2011-10-13  Zeno Albisser  <zeno.albisser@nokia.com>
2729
2730         [Qt] QtWebKit build error for Mac 32bit
2731         https://bugs.webkit.org/show_bug.cgi?id=69914
2732
2733         In WebCore.pro and QtWebKit.pro we define NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
2734         when compiling with ENABLE_VIDEO and with WTF_USE_QTKIT.
2735         But this is meant to be defined in NSGeometry.h under certain preconditions.
2736         Without setting NS_BUILD_32_LIKE_64 none of these preconditions is
2737         met and therefore NSGeometry.h will create several conflicting type definitions.
2738
2739         With this patch we create consistent definitions again.
2740         Due to the order of include files we cannot remove
2741         NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES from WebCore.pro.
2742
2743         Reviewed by Andreas Kling.
2744
2745         * WebCore.pro:
2746
2747 2011-10-13  Tom Hudson  <tomhudson@google.com>
2748
2749         Revert border radius clips (r95239) for Chromium due to performance issues. Update test expectations to skip border radius clip layout tests.
2750         https://bugs.webkit.org/show_bug.cgi?id=69844
2751
2752         Reviewed by Simon Fraser.
2753
2754         * rendering/RenderLayer.cpp:
2755         (WebCore::RenderLayer::clipToRect): Only process border radius clips #if !PLATFORM(CHROMIUM)
2756
2757 2011-10-13  Julien Chaffraix  <jchaffraix@webkit.org>
2758
2759         Deprecate event.layerX and event.layerY in WebKit
2760         https://bugs.webkit.org/show_bug.cgi?id=69951
2761
2762         Reviewed by Darin Adler.
2763
2764         layerX and layerY were concepts of the old Netscape code that stayed
2765         in WebKit for a long time without changes. Now the code is completely
2766         wrong and Mozilla has expressed some interest in removing it from their
2767         API too.
2768
2769         This is a first step in the removal as layerX and layerY are exposed
2770         in some APIs. Chromium and Win are fine with removing the property
2771         directly, but ObjC needs to deprecate them first.
2772
2773         * bindings/objc/PublicDOMInterfaces.h: Mark the API as deprecated.
2774
2775         * dom/MouseRelatedEvent.cpp:
2776         (WebCore::MouseRelatedEvent::layerX):
2777         (WebCore::MouseRelatedEvent::layerY):
2778         * dom/UIEvent.cpp:
2779         (WebCore::UIEvent::layerX):
2780         (WebCore::UIEvent::layerY):
2781         Added a call to warnDeprecatedLayerXYUsage in the previous functions.
2782
2783         (WebCore::UIEvent::warnDeprecatedLayerXYUsage): Print a warning in the
2784         console about the removal of event.layerX and event.layerY in the near future.
2785
2786         * dom/UIEvent.h: Added warnDeprecatedLayerXYUsage.
2787
2788 2011-10-03  Robert Hogan  <robert@webkit.org>
2789
2790         CSS 2.1 failure: inline-replaced-height-008.htm
2791         https://bugs.webkit.org/show_bug.cgi?id=69273
2792
2793         Reviewed by Simon Fraser.
2794
2795         Test: css2.1/20110323/inline-block-replaced-height-008.html
2796
2797         Per http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-height,  if 'height' has computed value of 
2798         'auto', the replaced element has an intrinsic ratio and its used width is known or resolved, then 
2799         the used value of 'height' is determined by the equation (used width) / (intrinsic ratio).
2800
2801         * rendering/RenderImage.cpp:
2802         (WebCore::RenderImage::computeReplacedLogicalHeight):
2803         * rendering/RenderReplaced.h:
2804
2805 2011-10-13  Sheriff Bot  <webkit.review.bot@gmail.com>
2806
2807         Unreviewed, rolling out r97362.
2808         http://trac.webkit.org/changeset/97362
2809         https://bugs.webkit.org/show_bug.cgi?id=70039
2810
2811         Relies on V8 APIs that have been reverted upstream. (Requested
2812         by dglazkov on #webkit).
2813
2814         * English.lproj/localizedStrings.js:
2815         * bindings/js/ScriptProfiler.cpp:
2816         * bindings/js/ScriptProfiler.h:
2817         * bindings/v8/ScriptProfiler.cpp:
2818         * bindings/v8/ScriptProfiler.h:
2819         * inspector/Inspector.json:
2820         * inspector/InspectorController.cpp:
2821         (WebCore::InspectorController::InspectorController):
2822         * inspector/InspectorProfilerAgent.cpp:
2823         (WebCore::InspectorProfilerAgent::create):
2824         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
2825         * inspector/InspectorProfilerAgent.h:
2826         * inspector/front-end/DetailedHeapshotGridNodes.js:
2827         (WebInspector.HeapSnapshotGridNode.prototype.hasHoverMessage.false.hoverMessage):
2828         (WebInspector.HeapSnapshotGenericObjectNode):
2829         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
2830         (WebInspector.HeapSnapshotGenericObjectNode.prototype.hoverMessage):
2831         (WebInspector.HeapSnapshotGenericObjectNode.prototype.shortenWindowURL):
2832         * inspector/front-end/DetailedHeapshotView.js:
2833         (WebInspector.DetailedHeapshotView.prototype._showStringContentPopover):
2834         * inspector/front-end/HeapSnapshot.js:
2835         (WebInspector.HeapSnapshot.prototype._init):
2836         (WebInspector.HeapSnapshot.prototype.dispose):
2837         (WebInspector.HeapSnapshot.prototype.updateStaticData):
2838         (WebInspector.HeapSnapshotNodesProvider.prototype._serialize):
2839         * inspector/front-end/HeapSnapshotProxy.js:
2840         * inspector/front-end/RemoteObject.js:
2841         * inspector/front-end/heapProfiler.css:
2842
2843 2011-10-13  David Hyatt  <hyatt@apple.com>
2844
2845         https://bugs.webkit.org/show_bug.cgi?id=69932
2846         
2847         Layout repainting messed up for objects in regions. There were two bugs here.
2848         The first is that the regionOverflowRect needs to at least be the size of the 
2849         region's rect. When you're in the middle of layout, you haven't computed the
2850         overflow rect for the flow thread yet (the flow thread's height could even be 0),
2851         and so you just need to enforce a minimum size. Also removed the region-overflow:break
2852         clipping behavior, since it was established that was wrong.
2853         
2854         The second bug is that when you tell a region to repaint, you need to disable layout state,
2855         since applying layout deltas from the flow thread makes no sense. The region is in a totally
2856         different place in the render tree, so the current flow thread layout state can't be used
2857         to determine your coordinate offset.
2858
2859         Reviewed by Dan Bernstein.
2860
2861         Added fast/repaint test.
2862
2863         * rendering/RenderFlowThread.cpp:
2864         (WebCore::RenderFlowThread::repaintRectangleInRegions):
2865         * rendering/RenderRegion.cpp:
2866         (WebCore::RenderRegion::regionOverflowRect):
2867
2868 2011-10-13  Renata Hodovan  <reni@webkit.org>
2869
2870         FEComponentTransfer element doesn't support dynamic invalidation
2871         https://bugs.webkit.org/show_bug.cgi?id=69747
2872
2873         The dynamic changes are captured by the svgAttributeChange() function, and
2874         invalidate the filter primitive if necessary.
2875         invalidateFilterPrimitiveParent() is a new free function in
2876         SVGFilterPrimitiveStanardAttributes what makes the invalidation possible
2877         by objects not inherited from SVGFilterPrimitiveStanardAttributes too.
2878         This solution was used in SVGFEMergeNodeElement::svgAttributeChanged()
2879         previously and now it can use this new function too.
2880
2881         Reviewed by Nikolas Zimmermann.
2882
2883         Tests: svg/dynamic-updates/SVGFEComponentTransferElement-dom-amplitude-attr.html
2884                svg/dynamic-updates/SVGFEComponentTransferElement-dom-exponent-attr.html
2885                svg/dynamic-updates/SVGFEComponentTransferElement-dom-intercept-attr.html
2886                svg/dynamic-updates/SVGFEComponentTransferElement-dom-offset-attr.html
2887                svg/dynamic-updates/SVGFEComponentTransferElement-dom-slope-attr.html
2888                svg/dynamic-updates/SVGFEComponentTransferElement-dom-tableValues-attr.html
2889                svg/dynamic-updates/SVGFEComponentTransferElement-dom-type-attr.html
2890                svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-amplitude-prop.html
2891                svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-exponent-prop.html
2892                svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-intercept-prop.html
2893                svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-offset-prop.html
2894                svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-slope-prop.html
2895                svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-tableValues-prop.html
2896                svg/dynamic-updates/SVGFEComponentTransferElement-svgdom-type-prop.html
2897
2898         * svg/SVGComponentTransferFunctionElement.cpp:
2899         (WebCore::SVGComponentTransferFunctionElement::svgAttributeChanged):
2900         * svg/SVGComponentTransferFunctionElement.h:
2901         * svg/SVGFEComponentTransferElement.cpp:
2902         (WebCore::SVGFEComponentTransferElement::build):
2903         * svg/SVGFEMergeNodeElement.cpp:
2904         (WebCore::SVGFEMergeNodeElement::svgAttributeChanged):
2905         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2906         (WebCore::invalidateFilterPrimitiveParent):
2907         * svg/SVGFilterPrimitiveStandardAttributes.h:
2908
2909 2011-10-13  Deepak Sherveghar  <bpwv64@motorola.com>
2910
2911         REGRESSION (r95381): Standalone video can be focused and draws a focus ring.
2912         https://bugs.webkit.org/show_bug.cgi?id=69097
2913
2914         Reviewed by Eric Carlson.
2915
2916         We don't want to focus a media element in a standalone document.
2917
2918         Test: fast/events/media-focus-in-standalone-media-document.html
2919
2920         * html/HTMLMediaElement.cpp:
2921         (WebCore::HTMLMediaElement::supportsFocus): return false if media element is in a standalone media document.
2922
2923 2011-10-13  Mikhail Naganov  <mnaganov@chromium.org>
2924
2925         Web Inspector: [Chromium] Add an ability to look up and explore an object from a heap profile.
2926         https://bugs.webkit.org/show_bug.cgi?id=61179
2927
2928         This is exteremely helpful when dealing with DOM wrappers, as
2929         their properties are mostly implemented with getters and thus not
2930         stored in heap snapshots.
2931
2932         Reviewed by Pavel Feldman.
2933
2934         * English.lproj/localizedStrings.js:
2935         * bindings/js/ScriptProfiler.cpp:
2936         (WebCore::ScriptProfiler::objectByHeapObjectId):
2937         * bindings/js/ScriptProfiler.h:
2938         * bindings/v8/ScriptProfiler.cpp:
2939         (WebCore::ScriptProfiler::objectByHeapObjectId):
2940         * bindings/v8/ScriptProfiler.h:
2941         * inspector/Inspector.json:
2942         * inspector/InspectorController.cpp:
2943         (WebCore::InspectorController::InspectorController):
2944         * inspector/InspectorProfilerAgent.cpp:
2945         (WebCore::InspectorProfilerAgent::create):
2946         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
2947         (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId):
2948         * inspector/InspectorProfilerAgent.h:
2949         * inspector/front-end/DetailedHeapshotGridNodes.js:
2950         (WebInspector.HeapSnapshotGridNode.prototype.hasHoverMessage.false.queryObjectContent):
2951         (WebInspector.HeapSnapshotGenericObjectNode):
2952         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
2953         (WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent.else.formatResult):
2954         (WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent):
2955         (WebInspector.HeapSnapshotGenericObjectNode.prototype.shortenWindowURL):
2956         * inspector/front-end/DetailedHeapshotView.js:
2957         (WebInspector.DetailedHeapshotView.prototype._showObjectPopover):
2958         * inspector/front-end/HeapSnapshot.js:
2959         (WebInspector.HeapSnapshotNode.prototype.get canBeQueried):
2960         (WebInspector.HeapSnapshotNode.prototype.get flags):
2961         (WebInspector.HeapSnapshotNode.prototype.get isDOMWindow):
2962         (WebInspector.HeapSnapshot.prototype._init):
2963         (WebInspector.HeapSnapshot.prototype.dispose):
2964         (WebInspector.HeapSnapshot.prototype._flagsOfNode):
2965         (WebInspector.HeapSnapshot.prototype._calculateFlags):
2966         (WebInspector.HeapSnapshot.prototype.updateStaticData):
2967         (WebInspector.HeapSnapshotNodesProvider.prototype._serialize):
2968         * inspector/front-end/HeapSnapshotProxy.js:
2969         (WebInspector.HeapSnapshotProxy.prototype.get nodeFlags):
2970         * inspector/front-end/RemoteObject.js:
2971         (WebInspector.RemoteObject.fromError):
2972         * inspector/front-end/heapProfiler.css:
2973         (.detailed-heapshot-view tr:not(.selected) td.object-column span.highlight):
2974
2975 2011-10-13  Adam Barth  <abarth@webkit.org>
2976
2977         script-src * should allow all URLs
2978         https://bugs.webkit.org/show_bug.cgi?id=70011
2979
2980         Reviewed by Eric Seidel.
2981
2982         This patch gets us slightly ahead of the spec.  Technically, script-src
2983         means "any host" and inherits the current scheme.  However, that's not
2984         what developers expect and it's even contradicted by examples in the
2985         spec itself.  After this patch, * matches all URLs.
2986
2987         Test: http/tests/security/contentSecurityPolicy/script-src-star-cross-scheme.html
2988
2989         * page/ContentSecurityPolicy.cpp:
2990         (WebCore::CSPSourceList::CSPSourceList):
2991         (WebCore::CSPSourceList::matches):
2992         (WebCore::CSPSourceList::parseSource):
2993         (WebCore::CSPSourceList::addSourceStar):
2994
2995 2011-10-13  Kentaro Hara  <haraken@chromium.org>
2996
2997         Implement an OverflowEvent constructor for JSC
2998         https://bugs.webkit.org/show_bug.cgi?id=69907
2999
3000         Reviewed by Adam Barth.
3001
3002         There is no spec for the OverflowEvent constructor
3003         since it is WebKit-specific. However, judging from the current
3004         IDL of initOverflowEvent(), the constructor IDL should be as follows.
3005
3006         [Constructor(DOMString type, optional OverflowEventInit eventInitDict)]
3007         interface OverflowEvent : Event {
3008             ...;
3009         }
3010
3011         dictionary OverflowEventInit : EventInit {
3012             unsigned short orient;
3013             boolean horizontalOverflow;
3014             boolean verticalOverflow;
3015         }
3016
3017         Note: In initOverflowEvent(), we cannot specify |bubbles| and |cancelable|.
3018         I do not know why, but we can find a comment in fast/events/script-tests/init-events.js
3019         that says "initOverflowEvent has an interface that has a design that's
3020         inconsistent with the init functions from other events".
3021         On the other hand, the above constructor enables to specify |bubbles| and |cancelable|,
3022         which is consistent with other constructors.
3023
3024         Test: fast/events/constructors/overflow-event-constructor.html
3025
3026         * bindings/generic/EventConstructors.h: Added a definition for the OverflowEvent constructor.
3027         * bindings/js/JSEventConstructors.cpp: Added #includes for OverflowEvent.
3028         * dom/OverflowEvent.cpp:
3029         (WebCore::OverflowEventInit::OverflowEventInit):
3030         (WebCore::OverflowEvent::OverflowEvent):
3031         (WebCore::OverflowEvent::initOverflowEvent):
3032         * dom/OverflowEvent.h: Added a definition for OverflowEventInit.
3033         (WebCore::OverflowEvent::create):
3034         (WebCore::OverflowEvent::orient):
3035         (WebCore::OverflowEvent::horizontalOverflow):
3036         (WebCore::OverflowEvent::verticalOverflow):
3037         * dom/OverflowEvent.idl: Makes OverflowEvent constructible.
3038
3039 2011-10-13  Kent Tamura  <tkent@chromium.org>
3040
3041         Cleanup of HTMLSelectElement
3042         https://bugs.webkit.org/show_bug.cgi?id=69908
3043
3044         Reviewed by Darin Adler.
3045
3046         - Change the m_listItems type: Vector<Element*> -> Vector<HTMLElement*>
3047         - Rename a member: m_recalcListItems -> m_shouldRecalcListItems
3048         - Fold checkListItems() into listItems()
3049         - Style fixes
3050
3051         No new tests, just a cleanup.
3052
3053         * accessibility/AccessibilityListBox.cpp:
3054         (WebCore::AccessibilityListBox::addChildren):
3055         * accessibility/AccessibilityListBoxOption.cpp:
3056         (WebCore::AccessibilityListBoxOption::listBoxOptionIndex):
3057         * accessibility/AccessibilityMenuListPopup.cpp:
3058         (WebCore::AccessibilityMenuListPopup::addChildren):
3059         * accessibility/AccessibilityRenderObject.cpp:
3060         (WebCore::AccessibilityRenderObject::stringValue):
3061         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
3062         (optionFromSelection):
3063         (webkit_accessible_selection_get_selection_count):
3064         * dom/OptionElement.cpp:
3065         (WebCore::OptionElement::optionIndex):
3066         * html/HTMLSelectElement.cpp:
3067         (WebCore::HTMLSelectElement::HTMLSelectElement):
3068         (WebCore::HTMLSelectElement::add):
3069         (WebCore::HTMLSelectElement::value):
3070         (WebCore::HTMLSelectElement::setValue):
3071         (WebCore::HTMLSelectElement::parseMappedAttribute):
3072         (WebCore::HTMLSelectElement::recalcListItemsIfNeeded):
3073         (WebCore::HTMLSelectElement::setOption):
3074         (WebCore::HTMLSelectElement::setLength):
3075         (WebCore::HTMLSelectElement::nextValidIndex):
3076         (WebCore::HTMLSelectElement::firstSelectableListIndex):
3077         (WebCore::HTMLSelectElement::nextSelectableListIndexPageAway):
3078         (WebCore::HTMLSelectElement::selectAll):
3079         (WebCore::HTMLSelectElement::saveLastSelection):
3080         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
3081         (WebCore::HTMLSelectElement::updateListBoxSelection):
3082         (WebCore::HTMLSelectElement::listBoxOnChange):
3083         (WebCore::HTMLSelectElement::listItems):
3084         (WebCore::HTMLSelectElement::setRecalcListItems):
3085         (WebCore::HTMLSelectElement::recalcListItemsInternal):
3086         (WebCore::HTMLSelectElement::selectedIndex):
3087         (WebCore::HTMLSelectElement::setSelectedIndexInternal):
3088         (WebCore::HTMLSelectElement::optionToListIndex):
3089         (WebCore::HTMLSelectElement::listToOptionIndex):
3090         (WebCore::HTMLSelectElement::dispatchFocusEvent):
3091         (WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
3092         (WebCore::HTMLSelectElement::saveFormControlState): Use StringBuilder.
3093         (WebCore::HTMLSelectElement::restoreFormControlState):
3094         (WebCore::HTMLSelectElement::appendFormData):
3095         (WebCore::HTMLSelectElement::reset):
3096         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
3097         (WebCore::HTMLSelectElement::updateSelectedState):
3098         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
3099         (WebCore::HTMLSelectElement::lastSelectedListIndex):
3100         Optimize the code by iterating in the reverse order.
3101         (WebCore::HTMLSelectElement::typeAheadFind):
3102         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
3103         (WebCore::HTMLSelectElement::length):
3104         (WebCore::toSelectElement):
3105         * html/HTMLSelectElement.h:
3106         * rendering/RenderListBox.cpp:
3107         (WebCore::RenderListBox::updateFromElement):
3108         (WebCore::RenderListBox::addFocusRingRects):
3109         (WebCore::RenderListBox::paintItemForeground):
3110         (WebCore::RenderListBox::paintItemBackground):
3111         (WebCore::RenderListBox::nodeAtPoint):
3112         * rendering/RenderMenuList.cpp:
3113         (WebCore::RenderMenuList::updateOptionsWidth):
3114         (WebCore::RenderMenuList::setTextFromOption):
3115         (WebCore::RenderMenuList::itemText):
3116         (WebCore::RenderMenuList::itemAccessibilityText):
3117         (WebCore::RenderMenuList::itemToolTip):
3118         (WebCore::RenderMenuList::itemIsEnabled):
3119         (WebCore::RenderMenuList::itemStyle):
3120         (WebCore::RenderMenuList::itemBackgroundColor):
3121         (WebCore::RenderMenuList::itemIsSeparator):
3122         (WebCore::RenderMenuList::itemIsLabel):
3123         (WebCore::RenderMenuList::itemIsSelected):
3124
3125 2011-10-13  Adam Barth  <abarth@webkit.org>
3126
3127         DOMWindow subobjects can be re-created after navigation
3128         https://bugs.webkit.org/show_bug.cgi?id=68849
3129
3130         Reviewed by Sam Weinig.
3131
3132         Test: http/tests/security/xss-DENIED-getSelection-from-inactive-domwindow.html
3133
3134         * page/DOMWindow.cpp:
3135         (WebCore::DOMWindow::~DOMWindow):
3136             - Add ASSERTs to show that we're not recreating these objects.
3137             - Add a call to clear() as defense in depth in case we have any of
3138               these objects hanging around.
3139         (WebCore::DOMWindow::clear):
3140             - Clear out a couple of objects that weren't getting cleared.
3141               These are actually not likely to cause problems, but clearing
3142               them out is the safe thing to do.
3143         (WebCore::DOMWindow::isActive):
3144             - Add a concept of whether the DOMWindow is "active" in its frame.
3145               We had this concept in a couple places already, but centralizing
3146               it into a helper function make it easier to use and talk about.
3147         (WebCore::DOMWindow::orientation):
3148             - Whitespace nit.
3149         (WebCore::DOMWindow::screen):
3150         (WebCore::DOMWindow::history):
3151         (WebCore::DOMWindow::crypto):
3152         (WebCore::DOMWindow::locationbar):
3153         (WebCore::DOMWindow::menubar):
3154         (WebCore::DOMWindow::personalbar):
3155         (WebCore::DOMWindow::scrollbars):
3156         (WebCore::DOMWindow::statusbar):
3157         (WebCore::DOMWindow::toolbar):
3158         (WebCore::DOMWindow::console):
3159         (WebCore::DOMWindow::applicationCache):
3160         (WebCore::DOMWindow::navigator):
3161         (WebCore::DOMWindow::performance):
3162         (WebCore::DOMWindow::location):
3163         (WebCore::DOMWindow::sessionStorage):
3164         (WebCore::DOMWindow::localStorage):
3165         (WebCore::DOMWindow::webkitNotifications):
3166         (WebCore::DOMWindow::webkitIndexedDB):
3167         (WebCore::DOMWindow::getSelection):
3168         (WebCore::DOMWindow::styleMedia):
3169         (WebCore::DOMWindow::webkitURL):
3170         (WebCore::DOMWindow::webkitStorageInfo):
3171             - Avoid creating these objects when we're not active.  That can
3172               only lead to sadness.
3173         (WebCore::DOMWindow::webkitRequestFileSystem):
3174         (WebCore::DOMWindow::webkitResolveLocalFileSystemURL):
3175         (WebCore::DOMWindow::openDatabase):
3176         (WebCore::DOMWindow::postMessage):
3177             - While not techincally creating subobjects, these functions also
3178               seem unwise when the DOMWindow is inactive.
3179         (WebCore::DOMWindow::find):
3180         (WebCore::DOMWindow::length):
3181         (WebCore::DOMWindow::getMatchedCSSRules):
3182             - These functions operate on the active Document.  When we're not
3183               active, that's not us!
3184         (WebCore::DOMWindow::document):
3185             - Update to use the new concept of being active rather than having
3186               this function roll its own implementation.
3187         (WebCore::DOMWindow::webkitConvertPointFromNodeToPage):
3188         (WebCore::DOMWindow::webkitConvertPointFromPageToNode):
3189         (WebCore::DOMWindow::scrollBy):
3190         (WebCore::DOMWindow::scrollTo):
3191             - These functions also look unwise to run when inactive because
3192               they're reading information from the active document.
3193             - I added a RefPtr for node because the call to
3194               updateLayoutIgnorePendingStylesheets() seems likely to be able to
3195               run script somehow.
3196         (WebCore::DOMWindow::addEventListener):
3197         (WebCore::DOMWindow::removeEventListener):
3198         (WebCore::DOMWindow::dispatchLoadEvent):
3199         (WebCore::DOMWindow::dispatchEvent):
3200             - I don't think these functions worked when inactive anyway, but
3201               explicitly blocking them seems wise.
3202         (WebCore::DOMWindow::setLocation):
3203         (WebCore::DOMWindow::isInsecureScriptAccess):
3204         (WebCore::DOMWindow::open):
3205         (WebCore::DOMWindow::showModalDialog):
3206             - These already have checks for being active, but it can't hurt to
3207               be explicit at the top of the function.
3208         * page/DOMWindow.h:
3209
3210 2011-10-13  Kent Tamura  <tkent@chromium.org>
3211
3212         REGRESSION(r89915): <input type=email multiple> don't show the default value
3213         https://bugs.webkit.org/show_bug.cgi?id=69895
3214
3215         Reviewed by Hajime Morita.
3216
3217         m_valueIfDirty became unexpectedly empty because
3218         EmailInputType::sanitizeValue() returned an empty string for a
3219         null input string.
3220
3221         To solve this issue, HTMLInputElement::sanitizeValue() checks
3222         nullness, and remove the null check of sanitizeValue() of
3223         InputType subclasses.
3224         Also, we make InputType::sanitizeValue() const.
3225
3226         * html/ColorInputType.cpp:
3227         (WebCore::ColorInputType::sanitizeValue):
3228         - Make this const.
3229         - Remove null check.
3230         * html/ColorInputType.h: Make sanitizeValue() const.
3231         * html/EmailInputType.cpp:
3232         (WebCore::EmailInputType::sanitizeValue): Make this const.
3233         * html/EmailInputType.h: Make sanitizeValue() const.
3234         * html/HTMLInputElement.cpp:
3235         (WebCore::HTMLInputElement::sanitizeValue):
3236         (WebCore::HTMLInputElement::updateValueIfNeeded):
3237         * html/InputType.cpp:
3238         (WebCore::InputType::sanitizeValue):
3239         Returns a null string if the input string is null, and
3240         don't call InputType::sanitizeValue() in this case.
3241         * html/InputType.h: Make sanitizeValue() const.
3242         * html/NumberInputType.cpp:
3243         (WebCore::NumberInputType::sanitizeValue): Make this const.
3244         * html/NumberInputType.h: Make sanitizeValue() const.
3245         * html/RangeInputType.cpp:
3246         (WebCore::RangeInputType::sanitizeValue):
3247         - Make this const.
3248         - Remove null check.
3249         * html/RangeInputType.h: Make sanitizeValue() const.
3250         * html/TextFieldInputType.cpp:
3251         (WebCore::TextFieldInputType::sanitizeValue): Make this const.
3252         * html/TextFieldInputType.h: Make sanitizeValue() const.
3253
3254 2011-10-12  Joseph Pecoraro  <joepeck@webkit.org>
3255
3256         Pass Parsed Accept Attribute MIME Types to WebKit Clients
3257         https://bugs.webkit.org/show_bug.cgi?id=69598
3258
3259         Reviewed by David Kilzer.
3260
3261         No new tests. No new functionality in WebCore, just
3262         exposing more information to the WebKit port.
3263
3264         * html/FileInputType.cpp:
3265         (WebCore::FileInputType::handleDOMActivateEvent):
3266         (WebCore::FileInputType::receiveDropForDirectoryUpload):
3267         Set the MIME type list on the FileChooser settings.
3268
3269         * html/HTMLInputElement.h:
3270         * html/HTMLInputElement.cpp:
3271         (WebCore::HTMLInputElement::acceptMIMETypes):
3272         Accessor for a parsed list of MIME types from the accept attribute.
3273         
3274         * platform/FileChooser.h:
3275         Add a slot for a MIME type list on the chooser settings.
3276
3277 2011-10-12  Joseph Pecoraro  <joepeck@webkit.org>
3278
3279         Pass Parsed Accept Attribute MIME Types to WebKit Clients
3280         https://bugs.webkit.org/show_bug.cgi?id=69598
3281
3282         Reviewed by Kent Tamura.
3283
3284         Deprecate the old String version of getting the "accept"
3285         mime type values. Instead we will change to include a
3286         list of MIME types.
3287
3288         * html/FileInputType.cpp:
3289         (WebCore::FileInputType::handleDOMActivateEvent):
3290         (WebCore::FileInputType::receiveDropForDirectoryUpload):
3291         * platform/FileChooser.h:
3292
3293 2011-10-12  Adam Barth  <abarth@webkit.org>
3294
3295         Remove ENABLE(XHTMLMP) and associated code
3296         https://bugs.webkit.org/show_bug.cgi?id=69729
3297
3298         Reviewed by David Levin.
3299
3300         As discussed on webkit-dev, we are removing this feature as part of our
3301         cleanup of unmaintained code in WebKit.
3302
3303         * Configurations/FeatureDefines.xcconfig:
3304         * GNUmakefile.am:
3305         * GNUmakefile.list.am:
3306         * WebCore.gypi:
3307         * WebCore.pro:
3308         * WebCore.vcproj/WebCore.vcproj:
3309         * WebCore.xcodeproj/project.pbxproj:
3310         * dom/DOMImplementation.cpp:
3311         (WebCore::DOMImplementation::createDocument):
3312         * dom/Document.cpp:
3313         (WebCore::Document::Document):
3314         * dom/Document.h:
3315         (WebCore::Document::isMediaDocument):
3316         * dom/Node.cpp:
3317         * dom/make_names.pl:
3318         (usesDefaultJSWrapper):
3319         * features.pri:
3320         * html/HTMLElement.cpp:
3321         (WebCore::HTMLElement::rendererIsNeeded):
3322         * html/HTMLElementsAllInOne.cpp:
3323         * html/HTMLNoScriptElement.cpp: Removed.
3324         * html/HTMLNoScriptElement.h: Removed.
3325         * html/HTMLTagNames.in:
3326         * html/HTMLViewSourceDocument.cpp:
3327         (WebCore::HTMLViewSourceDocument::createParser):
3328         * loader/FrameLoader.cpp:
3329         * platform/wince/MIMETypeRegistryWinCE.cpp:
3330         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
3331         * xml/parser/XMLDocumentParser.h:
3332         (WebCore::XMLDocumentParser::isXHTMLDocument):
3333         * xml/parser/XMLDocumentParserLibxml2.cpp:
3334         (WebCore::XMLDocumentParser::XMLDocumentParser):
3335         (WebCore::XMLDocumentParser::startElementNs):
3336         (WebCore::XMLDocumentParser::endElementNs):
3337         (WebCore::XMLDocumentParser::endDocument):
3338         (WebCore::XMLDocumentParser::internalSubset):
3339         (WebCore::getEntityHandler):
3340         (WebCore::externalSubsetHandler):
3341         * xml/parser/XMLDocumentParserQt.cpp:
3342         (WebCore::XMLDocumentParser::XMLDocumentParser):
3343         (WebCore::XMLDocumentParser::parse):
3344         (WebCore::XMLDocumentParser::parseStartElement):
3345         (WebCore::XMLDocumentParser::parseEndElement):
3346         (WebCore::XMLDocumentParser::endDocument):
3347         (WebCore::XMLDocumentParser::parseDtd):
3348
3349 2011-10-12  Kentaro Hara  <haraken@chromium.org>
3350
3351         Implement a WebKitTransitionEvent constructor for V8
3352         https://bugs.webkit.org/show_bug.cgi?id=69911
3353
3354         Reviewed by Adam Barth.
3355
3356         Test: fast/events/constructors/webkit-transition-event-constructor.html
3357
3358         * bindings/v8/custom/V8EventConstructors.cpp: Added a WebKitTransitionEvent constructor.
3359         * dom/WebKitTransitionEvent.idl: Replaced 'JSCustomConstructor' with 'CustomConstructor'.
3360
3361 2011-10-12  Kentaro Hara  <haraken@chromium.org>
3362
3363         Implement a BeforeLoadEvent constructor for JSC
3364         https://bugs.webkit.org/show_bug.cgi?id=69893
3365
3366         Reviewed by Adam Barth.
3367
3368         There is no spec for the BeforeLoadEvent constructor
3369         since it is WebKit-specific. However, judging from the current
3370         IDL of initBeforeLoadEvent(), the constructor IDL
3371         should be as follows.
3372
3373         [Constructor(DOMString type, optional BeforeLoadEventInit eventInitDict)]
3374         interface BeforeLoadEvent : Event {
3375             ...;
3376         }
3377
3378         dictionary BeforeLoadEventInit : EventInit {
3379             DOMString url;
3380         }
3381
3382         Test: fast/events/constructors/before-load-event-constructor.html
3383
3384         * bindings/generic/EventConstructors.h: Added a definition for the BeforeLoadEvent constructor.
3385         * bindings/js/JSEventConstructors.cpp: Added #includes for BeforeLoadEvent.
3386         * dom/BeforeLoadEvent.h: Added a definition for BeforeLoadEventInit.
3387         (WebCore::BeforeLoadEventInit::BeforeLoadEventInit):
3388         (WebCore::BeforeLoadEvent::create):
3389         (WebCore::BeforeLoadEvent::initBeforeLoadEvent):
3390         (WebCore::BeforeLoadEvent::BeforeLoadEvent):
3391         * dom/BeforeLoadEvent.idl: Makes BeforeLoadEvent constructible.
3392
3393 2011-10-12  Ben Wells  <benwells@chromium.org>
3394
3395         [skia] Implement Path.currentPoint for skia
3396         https://bugs.webkit.org/show_bug.cgi?id=69817
3397
3398         Replace FIXME with implementation.
3399
3400         Reviewed by Kenneth Russell.
3401
3402         * platform/graphics/skia/PathSkia.cpp:
3403         (WebCore::Path::currentPoint):
3404
3405 2011-10-12  Ben Wells  <benwells@chromium.org>
3406
3407         Incorrect rendering with one-sided thick border and border-radius
3408         https://bugs.webkit.org/show_bug.cgi?id=38787
3409
3410         Reviewed by Simon Fraser.
3411
3412         Incorrect rendering resulted when the inner border could not be properly represented as a rounded
3413         rectangle. When this happens, and the inner border is clipped out, the clipping code clips out the
3414         enclosing rectangle instead.
3415
3416         This change addresses this by clipping in a different way in this case only. The inside is clipped
3417         out one side at a time with a rounded rect created by adjusting the unrenderable inner border
3418         rounded rectangle. The side polygon which is clipped to is also increased in this case to include
3419         the inside of the border so that no areas are missing.
3420
3421         Test: fast/borders/border-radius-complex-inner.html
3422
3423         * rendering/RenderBoxModelObject.cpp:
3424         (WebCore::RenderBoxModelObject::paintOneBorderSide):
3425         (WebCore::RenderBoxModelObject::paintBorder):
3426         (WebCore::calculateSideRectIncludingInner):
3427         (WebCore::calculateAdjustedInnerBorder):
3428         (WebCore::RenderBoxModelObject::clipBorderSideForComplexInnerPath):
3429         * rendering/RenderBoxModelObject.h:
3430
3431 2011-10-12  Luke Macpherson   <macpherson@chromium.org>
3432
3433         Clean up CSSPropertyTextDecoration implementation and ETextDecoration usage.
3434         https://bugs.webkit.org/show_bug.cgi?id=67625
3435
3436         Reviewed by Eric Seidel.
3437
3438         No new tests - no functionality changed.
3439
3440         The implementation of CSSPropertyTextDecoration is simlified because
3441         1) CSSValueListIterator produces a valid iterator when no results available.
3442         2) CSSParser only allows CSSValueNone or a list of appropriate idents.
3443         3) CSSParser will treat a zero-length list as invalid at parse time.
3444
3445         * css/CSSPrimitiveValueMappings.h:
3446         (WebCore::CSSPrimitiveValue::operator ETextDecoration):
3447         Implement cast from CSSPrimitiveValue to ETextDecoration.
3448         * css/CSSStyleSelector.cpp:
3449         (WebCore::CSSStyleSelector::applyProperty):
3450         * rendering/style/RenderStyle.h:
3451         Use ETextDecoration enum instead of int throughout.
3452         (WebCore::InheritedFlags::textDecorationsInEffect):
3453         (WebCore::InheritedFlags::textDecoration):
3454         (WebCore::InheritedFlags::addToTextDecorationsInEffect):
3455         (WebCore::InheritedFlags::setTextDecorationsInEffect):
3456         (WebCore::InheritedFlags::setTextDecoration):
3457         * rendering/style/RenderStyleConstants.h:
3458         Introduce constant for number of bits required to represent enum.
3459         (WebCore::operator|):
3460         Implement | operator for bitfield enum.
3461         (WebCore::operator|=):
3462         Implement |= operator for bitfield enum.
3463         * rendering/style/StyleVisualData.h:
3464         Use ETextDecoration instead of int.
3465
3466 2011-10-12  Tony Chang  <tony@chromium.org>
3467
3468         Implement -webkit-flex-align for cross axis alignment in flex-flow: row
3469         https://bugs.webkit.org/show_bug.cgi?id=69808
3470
3471         Reviewed by David Hyatt.
3472
3473         Tests: css3/flexbox/flex-align-percent-height.html
3474                css3/flexbox/flex-align-vertical-writing-mode.html
3475                css3/flexbox/flex-align.html
3476
3477         * rendering/RenderFlexibleBox.cpp:
3478         (WebCore::RenderFlexibleBox::isFlowAwareLogicalHeightAuto):
3479         (WebCore::RenderFlexibleBox::flowAwareContentLogicalHeight):
3480         (WebCore::RenderFlexibleBox::flowAwareBorderAndPaddingLogicalHeight):
3481         (WebCore::RenderFlexibleBox::flowAwareMarginLogicalHeightForChild):
3482         (WebCore::RenderFlexibleBox::flowAwareLogicalLocationForChild):
3483         (WebCore::RenderFlexibleBox::layoutInlineDirection):
3484         (WebCore::RenderFlexibleBox::availableLogicalHeightForChild):
3485         (WebCore::RenderFlexibleBox::marginBoxAscent):
3486         (WebCore::RenderFlexibleBox::layoutAndPlaceChildrenInlineDirection):
3487         (WebCore::RenderFlexibleBox::adjustLocationLogicalTopForChild):
3488         (WebCore::RenderFlexibleBox::alignChildrenBlockDirection):
3489         * rendering/RenderFlexibleBox.h:
3490
3491 2011-10-12  Mihnea Ovidenie  <mihnea@adobe.com>
3492
3493         [CSS Regions]Remove -webkit-content-order property
3494         https://bugs.webkit.org/show_bug.cgi?id=69848
3495
3496         Reviewed by Tony Chang.
3497
3498         -webkit-content-order property is removed from latest CSS Regions spec.
3499
3500         * css/CSSComputedStyleDeclaration.cpp:
3501         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3502         * css/CSSParser.cpp:
3503         (WebCore::CSSParser::parseValue):
3504         * css/CSSPropertyNames.in:
3505         * css/CSSStyleSelector.cpp:
3506         (WebCore::CSSStyleSelector::applyProperty):
3507         * dom/Node.cpp:
3508         (WebCore::Node::diff):
3509         * rendering/RenderFlowThread.cpp:
3510         (WebCore::compareRenderRegions):
3511         * rendering/RenderTreeAsText.cpp:
3512         (WebCore::writeRenderFlowThreads):
3513         * rendering/style/RenderStyle.h:
3514         * rendering/style/StyleRareNonInheritedData.cpp:
3515         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
3516         (WebCore::StyleRareNonInheritedData::operator==):
3517         * rendering/style/StyleRareNonInheritedData.h:
3518
3519 2011-10-12  Adam Bergkvist  <adam.bergkvist@ericsson.com>
3520
3521         Update PeerConnection to use WebCore platform interfaces
3522         https://bugs.webkit.org/show_bug.cgi?id=68462
3523
3524         Reviewed by Adam Barth.
3525
3526         Currently not testable.
3527
3528         * WebCore.gypi:
3529         * WebCore.pro:
3530         * bindings/js/JSPeerConnectionCustom.cpp:
3531         (WebCore::JSPeerConnectionConstructor::constructJSPeerConnection):
3532         * bindings/v8/custom/V8PeerConnectionCustom.cpp: Removed.
3533         * dom/MediaStreamList.cpp:
3534         (WebCore::MediaStreamList::item):
3535         (WebCore::MediaStreamList::append):
3536         (WebCore::MediaStreamList::remove):
3537         (WebCore::MediaStreamList::contains):
3538         * dom/MediaStreamList.h:
3539         * p2p/PeerConnection.cpp:
3540         (WebCore::PeerConnection::create):
3541         (WebCore::PeerConnection::PeerConnection):
3542         (WebCore::PeerConnection::processSignalingMessage):
3543         (WebCore::PeerConnection::readyState):
3544         (WebCore::PeerConnection::send):
3545         (WebCore::PeerConnection::addStream):
3546         (WebCore::PeerConnection::removeStream):
3547         (WebCore::PeerConnection::localStreams):
3548         (WebCore::PeerConnection::remoteStreams):
3549         (WebCore::PeerConnection::close):
3550         (WebCore::PeerConnection::iceProcessingCompleted):
3551         (WebCore::PeerConnection::sdpGenerated):
3552         (WebCore::PeerConnection::dataStreamMessageReceived):
3553         (WebCore::PeerConnection::remoteStreamAdded):
3554         (WebCore::PeerConnection::remoteStreamRemoved):
3555         (WebCore::PeerConnection::scriptExecutionContext):
3556         (WebCore::PeerConnection::stop):
3557         (WebCore::PeerConnection::scheduleInitialNegotiation):
3558         (WebCore::PeerConnection::initialNegotiationTimerFired):
3559         (WebCore::PeerConnection::ensureStreamChangeScheduled):
3560         (WebCore::PeerConnection::streamChangeTimerFired):
3561         (WebCore::PeerConnection::scheduleReadyStateChange):
3562         (WebCore::PeerConnection::readyStateChangeTimerFired):
3563         (WebCore::PeerConnection::changeReadyState):
3564         * p2p/PeerConnection.h:
3565         (WebCore::PeerConnection::refEventTarget):
3566         (WebCore::PeerConnection::derefEventTarget):
3567         * p2p/PeerConnection.idl:
3568         * page/MediaStreamClient.h:
3569         * page/MediaStreamController.cpp:
3570         (WebCore::MediaStreamController::MediaStreamController):
3571         * page/MediaStreamController.h:
3572         * page/MediaStreamFrameController.cpp:
3573         * page/MediaStreamFrameController.h:
3574
3575 2011-10-12  Chris Fleizach  <cfleizach@apple.com>
3576
3577         AX: CrashTracer: [USER] 296 crashes in WebProcess at com.apple.WebCore: WebCore::AccessibilityScrollbar::document const + 29
3578         https://bugs.webkit.org/show_bug.cgi?id=69936
3579
3580         AX Scrollbars have a weak pointer to their parent. They need to become AccessibilityMockObjects, so that they can
3581         participate in the detachFromParent() methods that happens when those parents go away.
3582         Could not reproduce the crash, but the backtrace is unequivocal.
3583
3584         Reviewed by Darin Adler.
3585
3586         * accessibility/AccessibilityScrollView.cpp:
3587         (WebCore::AccessibilityScrollView::removeChildScrollbar):
3588         * accessibility/AccessibilityScrollbar.cpp:
3589         (WebCore::AccessibilityScrollbar::AccessibilityScrollbar):
3590         * accessibility/AccessibilityScrollbar.h:
3591         (WebCore::AccessibilityScrollbar::scrollbar):
3592         (WebCore::AccessibilityScrollbar::isAccessibilityScrollbar):
3593
3594 2011-10-12  David Hyatt  <hyatt@apple.com>
3595
3596         https://bugs.webkit.org/show_bug.cgi?id=69950
3597         
3598         REGRESSION: Printing broken because of the isWritingModeRoot addition for unsplittable
3599         paginated content. Make sure not to include the RenderView when checking for writing mode
3600         roots. We only care about children that differ from their parents.
3601
3602         Reviewed by Dimitri Glazkov.
3603
3604         * rendering/LayoutState.cpp:
3605         (WebCore::LayoutState::LayoutState):
3606         * rendering/RenderBlock.cpp:
3607         (WebCore::RenderBlock::adjustForUnsplittableChild):
3608         * rendering/RenderBox.cpp:
3609         (WebCore::RenderBox::isUnsplittableForPagination):
3610         * rendering/RenderBox.h:
3611
3612 2011-10-12  Anna Cavender  <annacc@chromium.org>
3613
3614         Moving ScriptExecutionContext to the front of the argument list for
3615         IDL constructors that use ConstructorWith=ScriptExecutionContext.
3616         https://bugs.webkit.org/show_bug.cgi?id=69799
3617
3618         Reviewed by Adam Barth.
3619
3620         Tests:
3621         - http/tests/eventsource/* (for EventSource)
3622         - fast/filesystem/* (for Worker)
3623
3624         * bindings/js/JSEventSourceCustom.cpp:
3625         (WebCore::JSEventSourceConstructor::constructJSEventSource):
3626         * bindings/js/JSWorkerCustom.cpp:
3627         (WebCore::JSWorkerConstructor::constructJSWorker):
3628         * bindings/scripts/CodeGeneratorV8.pm:
3629         (GenerateConstructorCallback):
3630         * bindings/scripts/test/V8/V8TestInterface.cpp:
3631         (WebCore::V8TestInterface::constructorCallback):
3632         * page/EventSource.cpp:
3633         (WebCore::EventSource::create):
3634         * page/EventSource.h:
3635         * workers/Worker.cpp:
3636         (WebCore::Worker::create):
3637         * workers/Worker.h:
3638
3639 2011-10-11  David Hyatt  <hyatt@apple.com>
3640
3641         https://bugs.webkit.org/show_bug.cgi?id=69896
3642         
3643         [CSS Regions] Make positioned blocks work with variable width regions.
3644         
3645         Make positioned objects able to position and size independently in each region. This involves
3646         lifting the restriction in renderBoxRegionInfo for positioned objects and passing in region
3647         information to computeLogicalWidthForPositioned so that it can compute answers for a given
3648         region.
3649
3650         In order to make mixed writing modes work with positioned objects, this patch also takes some
3651         baby steps towards fixing differing writing modes in paginated environments.
3652
3653         Reviewed by Sam Weinig.
3654
3655         Added many new tests in fast/regions.
3656
3657         * rendering/LayoutState.cpp:
3658         (WebCore::LayoutState::LayoutState):
3659         Disable pagination whenever differing writing modes are encountered. The block effectively becomes
3660         unsplittable (as though it was an image).
3661
3662         * rendering/RenderBlock.cpp:
3663         (WebCore::RenderBlock::layoutBlock):
3664         Remove a FIXME that looks incorrect now.
3665
3666         (WebCore::RenderBlock::adjustPositionedBlock):
3667         Patch static inline position caching to call a new method that unshifts the position to put it back
3668         in the overall block's space rather than having it be per-region.
3669
3670         (WebCore::RenderBlock::layoutPositionedObjects):
3671         Make sure to attempt to set a logicalTop for positioned objects before they lay out so that they
3672         have a chance of paginating correctly the first time around. If for some reason the top estimate proves
3673         to be incorrect, we lay out again. Technically this bug exists for multi-column and printing as well, but
3674         for now just fixing it for regions.
3675
3676         (WebCore::RenderBlock::adjustForUnsplittableChild):
3677         Add writing mode roots to the set of objects we consider to be unsplittable.
3678
3679         (WebCore::RenderBlock::setStaticInlinePositionForChild):
3680         New helper function that handles shifting the inline static position back into the overall block's space
3681         rather than leaving it in a translated region-specific space.
3682
3683         * rendering/RenderBlock.h:
3684         (WebCore::RenderBlock::startOffsetForContent):
3685         New helper function for computing the start offset when no regions are involved.
3686
3687         * rendering/RenderBlockLineLayout.cpp:
3688         (WebCore::setStaticPositions):
3689         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
3690         Patched to call the new helper function, setStaticInlinePositionForChild.
3691
3692         * rendering/RenderBox.cpp:
3693         (WebCore::RenderBox::positionLineBox):
3694         Patched to call the new helper function, setStaticInlinePositionForChild.
3695
3696         (WebCore::RenderBox::computeLogicalWidthInRegion):
3697         Pass region information into the positioning logical width computation function.
3698
3699         (WebCore::RenderBox::renderBoxRegionInfo):
3700         Remove the positioning restriction and properly compute shifting and left/right offsets for positioned
3701         objects.
3702
3703         (WebCore::RenderBox::computeLogicalHeight):
3704         Add code for perpendicular flows that just positions the object within the first region it is encountered
3705         in. Since the object is unsplittable, this will work out. Should the object be so tall that it can't fit
3706         in any region, then the resulting rendering will potentially be terrible, but the expectation is that authors should
3707         avoid having perpendicular flows break across pages.
3708
3709         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
3710         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
3711         Patched to handle regions when they are passed in. Also makes sure that the pagination direction axis computation uses
3712         the flow thread's first region when the flow thread is the positioned object's containing block.
3713
3714         (WebCore::computeInlineStaticDistance):
3715         Patched to examine regions and to modify the static distance computation accordingly so that it is per-region.
3716
3717         (WebCore::RenderBox::computePositionedLogicalWidth):
3718         Pass along the region information when computing the positioned logical width.
3719
3720         (WebCore::computeLogicalLeftPositionedOffset):
3721         Handle the adjustment of the logical left offset for differing writing modes (in this case when the writing mode
3722         is flipped relative to us).
3723
3724         (WebCore::RenderBox::computePositionedLogicalHeight):
3725         Deal with perpendicular writing modes and make sure the object is placed properly using the first region it 
3726         occurs in.
3727
3728         (WebCore::computeLogicalTopPositionedOffset):
3729         Remove code that is no longer needed.
3730
3731         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
3732         Patched to pass in 0 instead of a region since replaced elements aren't handled yet.
3733
3734         * rendering/RenderBox.h:
3735         Changing the computePositionedLogicalWidth method to take region information.
3736
3737         * rendering/RenderDeprecatedFlexibleBox.cpp:
3738         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
3739         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
3740         Didn't bother fixing deprecated flexible box, and the new flexbox still can't handle positioned objects. When it does,
3741         it will use the new method. Put in some FIXMEs to help the flexbox coders see the issue when they port the code over
3742         to the new flexbox.
3743
3744         * rendering/RenderLayer.h:
3745         (WebCore::RenderLayer::staticInlinePosition):
3746         (WebCore::RenderLayer::staticBlockPosition):
3747         (WebCore::RenderLayer::setStaticInlinePosition):
3748         (WebCore::RenderLayer::setStaticBlockPosition):
3749         Patched to take LayoutUnits instead of ints.
3750
3751 2011-10-12  Nate Chapin  <japhet@chromium.org>
3752
3753         Remove logging to determine how null v8::Contexts are happening,
3754         and check the return value of V8DOMWindowShell::initContextIfNeeded()
3755         before using the context it initialized.
3756         https://bugs.webkit.org/show_bug.cgi?id=68099
3757
3758         Reviewed by Adam Barth.
3759
3760         No new tests, the only symptom is a crash without a known repro.
3761
3762         * bindings/v8/ScriptController.cpp:
3763         * bindings/v8/V8DOMWindowShell.cpp:
3764         (WebCore::V8DOMWindowShell::initContextIfNeeded): Return true
3765             if a context already existed.
3766         (WebCore::V8DOMWindowShell::namedItemAdded): Remove logging.
3767         * bindings/v8/V8Proxy.cpp:
3768
3769 2011-10-06  Robert Hogan  <robert@webkit.org>
3770
3771         CSS 2.1 failure: border-conflict-style-079
3772         https://bugs.webkit.org/show_bug.cgi?id=69551
3773
3774         Reviewed by Antonio Gomes.
3775
3776         * css/CSSValueKeywords.in: ridge and outset were the wrong way round
3777         * rendering/style/RenderStyleConstants.h: ditto
3778
3779
3780 2011-10-12  Jian Li  <jianli@chromium.org>
3781
3782         Support passing optional filename when FormData.append() is used to
3783         append a blob
3784         https://bugs.webkit.org/show_bug.cgi?id=69885
3785
3786         Reviewed by David Levin.
3787
3788         Covered by existing test with new test case added:
3789         http/tests/local/formdata/send-form-data-with-sliced-file.html
3790
3791         * bindings/js/JSDOMFormDataCustom.cpp:
3792         (WebCore::JSDOMFormData::append):
3793         * bindings/v8/custom/V8DOMFormDataCustom.cpp:
3794         (WebCore::V8DOMFormData::appendCallback):
3795         * html/DOMFormData.cpp:
3796         (WebCore::DOMFormData::append):
3797         * html/DOMFormData.h:
3798         * html/DOMFormData.idl:
3799         * html/FormDataList.cpp:
3800         (WebCore::FormDataList::appendBlob):
3801         * html/FormDataList.h:
3802         (WebCore::FormDataList::Item::Item):
3803         (WebCore::FormDataList::Item::filename):
3804         (WebCore::FormDataList::appendBlob):
3805         * platform/network/FormData.cpp:
3806         (WebCore::FormData::appendKeyValuePairItems):
3807
3808 2011-10-12  Sergey Glazunov  <serg.glazunov@gmail.com>
3809
3810         ScriptController::executeIfJavaScriptURL gets confused by synchronous frame loads
3811         https://bugs.webkit.org/show_bug.cgi?id=69777
3812
3813         Reviewed by Adam Barth.
3814
3815         Test: http/tests/security/xss-DENIED-synchronous-frame-load-in-javascript-url.html
3816
3817         * bindings/ScriptControllerBase.cpp:
3818         (WebCore::ScriptController::executeIfJavaScriptURL):
3819         * loader/DocumentWriter.cpp:
3820         (WebCore::DocumentWriter::replaceDocument):
3821         (WebCore::DocumentWriter::begin):
3822         * loader/DocumentWriter.h:
3823
3824 2011-10-12  Vsevolod Vlasov  <vsevik@chromium.org>
3825
3826         Web Inspector: Searching in multiple scripts in the scripts tab
3827         https://bugs.webkit.org/show_bug.cgi?id=38807
3828
3829         Reviewed by Pavel Feldman.
3830
3831         Added support for advanced search capabilities in inspector by means
3832         of showing the new SearchView in Drawer. Advanced search is activated
3833         with Ctrl+Shift+F (Cmd+Shift+F) shortcut.
3834
3835         * English.lproj/localizedStrings.js:
3836         * WebCore.gypi:
3837         * WebCore.vcproj/WebCore.vcproj:
3838         * inspector/compile-front-end.sh:
3839         * inspector/front-end/AdvancedSearchController.js: Added.
3840         * inspector/front-end/DebuggerPresentationModel.js:
3841         (WebInspector.DebuggerPresentationModel.prototype.uiSourceCodes):
3842         * inspector/front-end/ScriptsPanel.js:
3843         * inspector/front-end/ScriptsSearchScope.js: Added.
3844         * inspector/front-end/UISourceCode.js:
3845         (WebInspector.UISourceCode.prototype.searchInContent):
3846         * inspector/front-end/WebKit.qrc:
3847         * inspector/front-end/externs.js:
3848         (WebInspector.showViewInDrawer):
3849         * inspector/front-end/inspector.css:
3850         (.search-view):
3851         (.search-view .search-panel):
3852         (.search-view .search-results):
3853         (#search-results-pane-file-based .search-result):
3854         (#search-results-pane-file-based .search-result:first-child):
3855         (#search-results-pane-file-based .search-result .search-result-file-name):
3856         (#search-results-pane-file-based .search-result .search-result-matches-count):
3857         (#search-results-pane-file-based .search-match):
3858         (#search-results-pane-file-based .search-match .webkit-line-number.search-match-line-number):
3859         (#search-results-pane-file-based .search-match:not(:hover) .webkit-line-number.search-match-line-number):
3860         (#search-results-pane-file-based .search-match:hover):
3861         (#search-results-pane-file-based .search-match .highlighted-match):
3862         (#search-results-pane-file-based a):
3863         (#search-results-pane-file-based .search-match .search-match-content):
3864         * inspector/front-end/inspector.html:
3865         * inspector/front-end/inspector.js:
3866         (WebInspector.documentKeyDown):
3867         * inspector/front-end/utilities.js:
3868         ():
3869
3870 2011-10-12  Vsevolod Vlasov  <vsevik@chromium.org>
3871
3872         Web Inspector: Fix Drawer to make it possible to show views other than Console.
3873         https://bugs.webkit.org/show_bug.cgi?id=69831
3874
3875         Reviewed by Pavel Feldman.
3876
3877         Animation type extracted to distinguish between slow and normal
3878         animation and immediate show/hide.
3879         Implemented correct console toggle button behavior on showing views
3880         other than console in Drawer.
3881         View shown in Drawer is now shown in drawer-contents div with common
3882         styles moved there.
3883         Removed unused "_safelyRemoveChildren" method from Drawer.
3884
3885         * inspector/front-end/ConsolePanel.js:
3886         (WebInspector.ConsolePanel.prototype.show):
3887         (WebInspector.ConsolePanel.prototype.hide):
3888         * inspector/front-end/Drawer.js:
3889         (WebInspector.Drawer):
3890         (WebInspector.Drawer.prototype.show):
3891         (WebInspector.Drawer.prototype.hide):
3892         (WebInspector.Drawer.prototype._animationDuration):
3893         * inspector/front-end/inspector.css:
3894         (body.drawer-visible #drawer-contents):
3895         * inspector/front-end/inspector.js:
3896         (WebInspector._toggleConsoleButtonClicked):
3897         (WebInspector._escPressed):
3898         (WebInspector.showViewInDrawer):
3899         (WebInspector.documentKeyDown):
3900
3901 2011-10-12  Yury Semikhatsky  <yurys@chromium.org>
3902
3903         [v8] Use V8DOMWrapper::isWrapperOfType for determining global object type
3904         https://bugs.webkit.org/show_bug.cgi?id=69923
3905
3906         Get rid of globalObjectPrototypeIsDOMWindow, use V8DOMWrapper::isWrapperOfType instead.
3907
3908         Reviewed by Pavel Feldman.
3909
3910         * bindings/v8/V8DOMWrapper.cpp:
3911         (WebCore::V8DOMWrapper::instantiateV8Object):
3912         (WebCore::V8DOMWrapper::getEventListener):
3913
3914 2011-10-12  Yury Semikhatsky  <yurys@chromium.org>
3915
3916         [Chromium] Web Inspector: assertion failure when evaluating expression in worker inspector console
3917         https://bugs.webkit.org/show_bug.cgi?id=69922
3918
3919         Check that the global object is a DOMWindow wrapper befor casting it to V8DOMWindow.
3920
3921         Reviewed by Pavel Feldman.
3922
3923         * bindings/v8/ScriptState.cpp:
3924         (WebCore::ScriptState::domWindow):
3925
3926 2011-10-12  Yuta Kitamura  <yutak@chromium.org>
3927
3928         WebSocket: Update WebSocket protocol to hybi-17
3929         https://bugs.webkit.org/show_bug.cgi?id=69910
3930
3931         Reviewed by Kent Tamura.
3932
3933         Essential changes between hybi-10 and hybi-17 are:
3934         - Sec-WebSocket-Origin header has been renamed to "Origin".
3935         - Sec-WebSocket-Version header value has been bumped to 13.
3936
3937         No new tests are necessary. pywebsocket has already been updated to the latest version
3938         which understands the new protocol. Tests under http/tests/websocket/ should keep
3939         passing.
3940
3941         * websockets/WebSocketHandshake.cpp:
3942         (WebCore::WebSocketHandshake::clientHandshakeMessage):
3943         (WebCore::WebSocketHandshake::clientHandshakeRequest):
3944
3945 2011-10-11  Antti Koivisto  <antti@apple.com>
3946
3947         Resolve regular and visited link style in a single pass
3948         https://bugs.webkit.org/show_bug.cgi?id=69838
3949
3950         Reviewed by Darin Adler
3951         
3952         We can simplify and speed up selector matching by removing the recursive matching done
3953         to generate the style for the :visited pseudo selector. Both regular and visited link style
3954         can be generated in a single pass through the style selector.
3955         
3956         - Make SelectorChecker::checkSelector to return both :visited and :link matches for all links.
3957         - For each selector statically determine and cache the link states it may match.
3958         - When applying the matched style declarations, apply them to the right RenderStyle
3959           (regular, visited, or both).
3960
3961         Statically determining which link state will be matched works since we only support :visited matching
3962         based on the current element state (not ancestors or siblings).
3963         
3964         A later patch will eliminate the separate RenderStyle for visited style completely and include the
3965         few allowed properties to the regular RenderStyle.
3966
3967         * css/CSSStyleSelector.cpp:
3968         (WebCore::RuleData::linkMatchType):
3969         (WebCore::RuleSet::linkPseudoClassRules):
3970         (WebCore::CSSStyleSelector::addMatchedDeclaration):
3971         (WebCore::CSSStyleSelector::matchRules):
3972         (WebCore::CSSStyleSelector::styleForElement):
3973         (WebCore::CSSStyleSelector::pseudoStyleForElement):
3974         (WebCore::CSSStyleSelector::updateFont):
3975         (WebCore::CSSStyleSelector::checkSelector):
3976         (WebCore::RuleData::RuleData):
3977         (WebCore::RuleSet::addRule):
3978         (WebCore::RuleSet::collectFeatures):
3979         (WebCore::RuleSet::shrinkToFit):
3980         (WebCore::CSSStyleSelector::applyDeclaration):
3981         (WebCore::CSSStyleSelector::applyDeclarations):
3982         (WebCore::CSSStyleSelector::applyProperty):
3983         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
3984         * css/CSSStyleSelector.h:
3985         (WebCore::CSSStyleSelector::MatchedStyleDeclaration::MatchedStyleDeclaration):
3986         * css/SelectorChecker.cpp:
3987         (WebCore::SelectorChecker::SelectorChecker):
3988         (WebCore::SelectorChecker::checkSelector):
3989         (WebCore::SelectorChecker::fastCheckRightmostSelector):
3990         (WebCore::SelectorChecker::fastCheckSelector):
3991         (WebCore::SelectorChecker::checkOneSelector):
3992         (WebCore::SelectorChecker::commonPseudoClassSelectorMatches):
3993         (WebCore::SelectorChecker::determineLinkMatchType):
3994         * css/SelectorChecker.h:
3995         * rendering/style/RenderStyle.cpp:
3996         (WebCore::RenderStyle::addCachedPseudoStyle):
3997