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