Remove call to deprecatedCharactersWithNullTermination() in WebGL code
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-06-27  Anders Carlsson  <andersca@apple.com>
2
3         Remove call to deprecatedCharactersWithNullTermination() in WebGL code
4         https://bugs.webkit.org/show_bug.cgi?id=118154
5
6         Reviewed by Dean Jackson.
7
8         Remove an unneeded call to deprecatedCharactersWithNullTermination(). Ultimately, 
9         the string we used to call it on gets converted to an UTF-8 CString that has a null character anyway.
10
11         * html/canvas/WebGLProgram.cpp:
12         (WebCore::WebGLProgram::cacheActiveAttribLocations):
13
14 2013-06-27  Roger Fong  <roger_fong@apple.com>
15
16         Unreviewed. Temporarily add some stderr output to Media Engine load methods to determine which engine buildbots are using for layout tests.
17
18         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
19         (WebCore::MediaPlayerPrivateAVFoundation::load):
20         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
21         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::load):
22
23 2013-06-27  Anders Carlsson  <andersca@apple.com>
24
25         Stop using deprecatedCharactersWithNullTermination in SQLite code
26         https://bugs.webkit.org/show_bug.cgi?id=118146
27
28         Reviewed by Filip Pizlo.
29
30         Turns out SQLite uses UTF-8 internally so we might just as well use the SQLite functions
31         that take UTF-8 strings and do the conversion ourselves. This has the added advantage that we can
32         use String::utf8() which returns a null-terminated string.
33
34         Require a version of SQLite newer than 3.6.16 so we can remove two workarounds. 3.6.16 was released
35         4 years ago so supported port is likely to have it.
36
37         * platform/sql/SQLiteFileSystem.cpp:
38         (WebCore::SQLiteFileSystem::openDatabase):
39         Use sqlite3_open instead of sqlite3_open16.
40
41         * platform/sql/SQLiteFileSystem.h:
42         Fix parameter name capitalization.
43
44         * platform/sql/SQLiteStatement.cpp:
45         (WebCore::SQLiteStatement::prepare):
46         Use sqlite3_prepare_v2. Also, pass the length of the string (including the null character), since
47         that lets SQLite avoid a buffer copy. Remove a workaround for versions of SQLite older than 3.6.16.
48
49 2013-06-27  Andrew Lo  <anlo@blackberry.com>
50
51         [BlackBerry] Unnecessary root layer commits occur during html5 video playback
52         https://bugs.webkit.org/show_bug.cgi?id=118147
53
54         Reviewed by Rob Buis.
55         Internally reviewed by Arvid Nilsson, John Griggs.
56
57         Only request layer commits when layer properties change in
58         GraphicsLayerBlackBerry::updateContentsRect and
59         GraphicsLayerBlackBerry::setContentsToMedia.
60         JIRA112749.
61
62         * platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
63         (WebCore::GraphicsLayerBlackBerry::setContentsToMedia):
64         (WebCore::GraphicsLayerBlackBerry::updateContentsRect):
65
66 2013-06-27  Bem Jones-Bey  <bjonesbe@adobe.com>
67
68         [CSS Shapes] New positioning model: basic support for rectangle shape-outside
69         https://bugs.webkit.org/show_bug.cgi?id=118080
70
71         Reviewed by David Hyatt.
72
73         With the latest Editor's Draft of the CSS Shapes specification,
74         shape-outside no longer affects the positioning of floats. This is the
75         first step in changing the implementation to reflect this
76         specification change. The bulk of this change is reverting the code
77         that was needed to position floats based on the bounding box of the
78         shape.
79
80         Tests: csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-000.html
81                csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-001.html
82                csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-002.html
83                csswg/submitted/shapes/shape-outside/shape-outside-floats-square-000.html
84                csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-000.html
85                csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-001.html
86                csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-002.html
87
88         * rendering/LayoutState.cpp:
89         (WebCore::LayoutState::LayoutState): Revert changes to support float
90             positioning from shape-outside.
91         * rendering/RenderBlock.cpp:
92         (WebCore::RenderBlock::blockSelectionGaps): Ditto.
93         (WebCore::RenderBlock::insertFloatingObject): Ditto.
94         (WebCore::RenderBlock::positionNewFloats): Ditto.
95         (WebCore::RenderBlock::logicalLeftOffsetForLine): Instead of
96             converting to shape bounding box coordinates, convert to the
97             float's margin box coordinates.
98         (WebCore::RenderBlock::logicalRightOffsetForLine): Ditto.
99         (WebCore::positionForPointRespectingEditingBoundaries): Revert changes
100             to support float positioning from shape-outside.
101         * rendering/RenderBlock.h:
102         (WebCore::RenderBlock::xPositionForFloatIncludingMargin): Ditto.
103         (WebCore::RenderBlock::yPositionForFloatIncludingMargin): Ditto.
104         * rendering/RenderBlockLineLayout.cpp:
105         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Instead
106             of converting to shape bounding box coordinates, convert to the
107             float's margin box coordinates.
108         * rendering/RenderBox.cpp:
109         (WebCore::RenderBox::mapLocalToContainer): Revert changes to support
110             float positioning from shape-outside.
111         (WebCore::RenderBox::offsetFromContainer): Ditto.
112         (WebCore::RenderBox::computeRectForRepaint): Ditto.
113         (WebCore::RenderBox::layoutOverflowRectForPropagation): Ditto.
114         * rendering/RenderBoxModelObject.cpp: Ditto.
115         * rendering/RenderBoxModelObject.h: Ditto.
116         * rendering/RenderInline.cpp:
117         (WebCore::RenderInline::clippedOverflowRectForRepaint): Ditto.
118         (WebCore::RenderInline::computeRectForRepaint): Ditto.
119         (WebCore::RenderInline::mapLocalToContainer): Ditto.
120         * rendering/RenderLayer.cpp:
121         (WebCore::RenderLayer::updateLayerPosition): Ditto.
122         (WebCore::RenderLayer::calculateClipRects): Ditto.
123         (WebCore::RenderLayer::shouldBeNormalFlowOnly): Ditto.
124         * rendering/RenderLayer.h:
125         (WebCore::RenderLayer::offsetForInFlowPosition): Ditto.
126         * rendering/RenderObject.h: Ditto.
127         * rendering/shapes/ShapeInfo.h: Make m_renderer protected, since we
128             now need it in the subclass to compute the segments.
129         * rendering/shapes/ShapeOutsideInfo.cpp:
130         (WebCore::ShapeOutsideInfo::computeSegmentsForLine): Update segment
131             computation to use the float's margin box instead of the shape's
132             bounding box for computing the deltas.
133         (WebCore::ShapeOutsideInfo::leftSegmentMarginBoxDelta): This used to
134             be leftSegmentShapeBoundingBoxDelta, which has been renamed in the
135             obvious way.
136         (WebCore::ShapeOutsideInfo::rightSegmentMarginBoxDelta): This used to
137             be rightSegmentShapeBoundingBoxDelta, which has been renamed in the
138             obvious way.
139         * rendering/shapes/ShapeOutsideInfo.h: Revert changes to support float
140             positioning from shape-outside.
141         * rendering/style/RenderStyle.h: Ditto.
142
143 2013-06-27  Antti Koivisto  <antti@apple.com>
144
145         RenderLayerCompositor destructor is fragile
146         https://bugs.webkit.org/show_bug.cgi?id=118143
147
148         Reviewed by Simon Fraser.
149
150         With iOS tile cache implementation deleting RenderLayerCompositor may end up starting a deleted timer. 
151         This corrupts the timer heap and leads to a crash later. This happens because GraphicsLayers destructor 
152         calls back to the RenderLayerCompositor that is being deleted. This is pretty fragile in general.
153         
154         No test as there is no known way to repro this with plain webkit.
155
156         * platform/Timer.cpp:
157         (WebCore::TimerBase::TimerBase):
158         (WebCore::TimerBase::~TimerBase):
159         (WebCore::TimerBase::setNextFireTime):
160         * platform/Timer.h:
161         
162             Assert that the timer is alive before starting it. This turns bugs like this into clear crash stacks
163             instead of hard-to-debug timer heap corruptions.
164
165         * rendering/RenderLayerCompositor.cpp:
166         (WebCore::RenderLayerCompositor::~RenderLayerCompositor):
167         
168             Take care to delete owned GraphicsLayers before proceeding with the rest of the destructor.
169
170 2013-06-27  Christophe Dumez  <ch.dumez@sisa.samsung.com>
171
172         Update SVG interfaces to stop inheriting from SVGURIReference and SVGTests
173         https://bugs.webkit.org/show_bug.cgi?id=118142
174
175         Reviewed by Ryosuke Niwa.
176
177         Stop inheriting from SVGURIReference and SVGTests and use IDL implements statements
178         instead. This is one step towards getting rid of multiple inheritance in SVG (which
179         is no longer supported by Web IDL) and matching the latest specification:
180         - https://svgwg.org/svg2-draft/types.html#BasicDOMInterfaces
181
182         No new tests, no behavior change.
183
184         * CMakeLists.txt:
185         * DerivedSources.pri:
186         * GNUmakefile.list.am:
187         * svg/SVGAElement.idl:
188         * svg/SVGAltGlyphElement.idl:
189         * svg/SVGAnimationElement.idl:
190         * svg/SVGCircleElement.idl:
191         * svg/SVGClipPathElement.idl:
192         * svg/SVGCursorElement.idl:
193         * svg/SVGDefsElement.idl:
194         * svg/SVGEllipseElement.idl:
195         * svg/SVGFEImageElement.idl:
196         * svg/SVGFilterElement.idl:
197         * svg/SVGForeignObjectElement.idl:
198         * svg/SVGGElement.idl:
199         * svg/SVGGlyphRefElement.idl:
200         * svg/SVGGradientElement.idl:
201         * svg/SVGImageElement.idl:
202         * svg/SVGLineElement.idl:
203         * svg/SVGMPathElement.idl:
204         * svg/SVGMaskElement.idl:
205         * svg/SVGPathElement.idl:
206         * svg/SVGPatternElement.idl:
207         * svg/SVGPolygonElement.idl:
208         * svg/SVGPolylineElement.idl:
209         * svg/SVGRectElement.idl:
210         * svg/SVGSVGElement.idl:
211         * svg/SVGScriptElement.idl:
212         * svg/SVGSwitchElement.idl:
213         * svg/SVGTRefElement.idl:
214         * svg/SVGTextContentElement.idl:
215         * svg/SVGTextPathElement.idl:
216         * svg/SVGUseElement.idl:
217
218 2013-06-27  Ruth Fong  <ruth_fong@apple.com>
219
220         Polish context menus for media elements
221         https://bugs.webkit.org/show_bug.cgi?id=118078
222         <rdar://problem/14278960>
223
224         Reviewed by Eric Carlson.
225
226         No new tests: media/context-menu-action.html,
227         which has been disabled by bug 116651, is used to test context menus.
228
229         * English.lproj/Localizable.strings: Changed "Fullscreen" to "Full Screen"
230         and added strings "Show Controls" and "Hide Controls".
231
232         * page/ContextMenuController.cpp: Updated to include a new context menu item 
233         that toggles betweeen "Show Controls" and "Hide Controls".
234
235         * platform/ContextMenuItem.h:
236
237         * platform/LocalizedStrings.cpp:
238         * platform/LocalizedStrings.h:
239         * platform/efl/LocalizedStringsEfl.cpp:
240         * platform/gtk/LocalizedStringsGtk.cpp:
241         * platform/qt/LocalizedStringsQt.cpp:
242         Added equivalents of localized strings "Show Controls" and "Hide Controls".
243
244 2013-06-27  Chris Fleizach  <cfleizach@apple.com>
245
246         AX: IOS: crash while navigating with SVG
247         https://bugs.webkit.org/show_bug.cgi?id=118101
248
249         Need to check if the SVG path exists before copying it.
250
251         Reviewed by Stephen Chenney.
252
253         Test: platform/iphone-simulator/accessibility/svg-path-crash.html
254
255         * accessibility/AccessibilityRenderObject.cpp:
256         (WebCore::AccessibilityRenderObject::elementPath):
257         * rendering/svg/RenderSVGShape.h:
258         (WebCore::RenderSVGShape::hasPath):
259
260 2013-06-27  Seokju Kwon  <seokju.kwon@gmail.com>
261
262         Removing the redundant checks after r152078
263         https://bugs.webkit.org/show_bug.cgi?id=118117
264
265         Reviewed by Simon Fraser.
266
267         Avoided redundant checks in RenderLayerCompositor::reasonsForCompositing() after r152078.
268
269         No new tests as no functionality change.
270
271         * inspector/InspectorLayerTreeAgent.cpp:
272         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
273         * rendering/RenderLayerCompositor.cpp:
274         (WebCore::RenderLayerCompositor::logReasonsForCompositing):
275
276 2013-06-27  Christophe Dumez  <ch.dumez@sisa.samsung.com>
277
278         Remove [NoInterfaceObject] from WorkerGlobalScope
279         https://bugs.webkit.org/show_bug.cgi?id=118071
280
281         Reviewed by Kentaro Hara.
282
283         Expose WorkerGlobalScope interface in worker environment as per the latest
284         specification:
285         http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#the-workerglobalscope-common-interface
286
287         Also expose the SharedWorkerGlobalScope interface when the JavaScript global environment is a
288         shared worker environment, and the DedicatedWorkerGlobalScope interface when the JavaScript
289         global environment is a dedicated worker environment:
290         http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#sharedworkerglobalscope
291         http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#dedicatedworkerglobalscope
292
293         The semantics of the [GlobalContext] IDL extended attribute has changed to support this
294         use case. The value for the extended attribute is now the name of the interface to which the
295         Constructor attribute should be added (Window, WorkerGlobalScope, SharedWorkerGlobalScope...).
296         It is possible to specify several interface names by using '&' as separator. For e.g.
297         [GlobalContext=DOMWindow&WorkerGlobalScope].
298
299         Tests: fast/js/global-constructors-attributes-dedicated-worker.html
300                fast/js/global-constructors-attributes-shared-worker.html
301
302         * CMakeLists.txt:
303         * DerivedSources.make:
304         * DerivedSources.pri:
305         * GNUmakefile.am:
306         * Modules/websockets/WebSocket.idl:
307         * UseJSC.cmake:
308         * bindings/scripts/CodeGeneratorJS.pm:
309         (GenerateConstructorHelperMethods):
310         * bindings/scripts/IDLAttributes.txt:
311         * bindings/scripts/generate-bindings.pl:
312         (checkIfIDLAttributesExists):
313         * bindings/scripts/preprocess-idls.pl:
314         * dom/MessageChannel.idl:
315         * dom/MessageEvent.idl:
316         * fileapi/Blob.idl:
317         * fileapi/FileReader.idl:
318         * fileapi/FileReaderSync.idl:
319         * html/DOMURL.idl:
320         * html/canvas/ArrayBuffer.idl:
321         * html/canvas/DataView.idl:
322         * html/canvas/Float32Array.idl:
323         * html/canvas/Float64Array.idl:
324         * html/canvas/Int16Array.idl:
325         * html/canvas/Int32Array.idl:
326         * html/canvas/Int8Array.idl:
327         * html/canvas/Uint16Array.idl:
328         * html/canvas/Uint32Array.idl:
329         * html/canvas/Uint8Array.idl:
330         * html/canvas/Uint8ClampedArray.idl:
331         * page/EventSource.idl:
332         * workers/DedicatedWorkerGlobalScope.idl:
333         * workers/SharedWorkerGlobalScope.idl:
334         * workers/WorkerGlobalScope.idl:
335         * workers/WorkerLocation.idl:
336         * xml/XMLHttpRequest.idl:
337
338 2013-06-27  Commit Queue  <commit-queue@webkit.org>
339
340         Unreviewed, rolling out r152074.
341         http://trac.webkit.org/changeset/152074
342         https://bugs.webkit.org/show_bug.cgi?id=118137
343
344         It caused lots of layout and API test crash on Qt Wk2.
345         (Requested by kadam on #webkit).
346
347         * CMakeLists.txt:
348         * Target.pri:
349         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Removed.
350         * platform/graphics/texmap/coordinated/CompositingCoordinator.h: Removed.
351
352 2013-06-27  Seokju Kwon  <seokju.kwon@gmail.com>
353
354         Avoid duplicating hostWindow() call in FrameView::setFrameRect()
355         https://bugs.webkit.org/show_bug.cgi?id=118115
356
357         Reviewed by Christophe Dumez.
358
359         Remove a redundant call in FrameView::setFrameRect().
360
361         No function change, no tests.
362
363         * page/FrameView.cpp:
364         (WebCore::FrameView::scheduleAnimation):
365
366 2013-06-27  Xabier Rodriguez Calvar  <calvaris@igalia.com>
367
368         Fixing some compiler warnings
369         https://bugs.webkit.org/show_bug.cgi?id=117791
370
371         Reviewed by Martin Robinson.
372
373         No new tests needed.
374
375         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
376         (webkitAccessibleTextGetTextForOffset): Fixed warning about
377         uninitialized variable.
378
379 2013-06-27  Iago Toral Quiroga  <itoral@igalia.com>
380
381         Use consistent file names for WidgetBackingStoreGtkX11 class
382         https://bugs.webkit.org/show_bug.cgi?id=118124
383
384         Reviewed by Carlos Garcia Campos.
385
386         * GNUmakefile.list.am:
387         * PlatformGTK.cmake:
388         * platform/gtk/GtkWidgetBackingStoreX11.cpp: Removed.
389         * platform/gtk/GtkWidgetBackingStoreX11.h: Removed.
390         * platform/gtk/WidgetBackingStoreGtkX11.cpp: Added.
391         (WebCore::WidgetBackingStoreGtkX11::create):
392         (WebCore::WidgetBackingStoreGtkX11::WidgetBackingStoreGtkX11):
393         (WebCore::WidgetBackingStoreGtkX11::~WidgetBackingStoreGtkX11):
394         (WebCore::WidgetBackingStoreGtkX11::cairoSurface):
395         (WebCore::WidgetBackingStoreGtkX11::scroll):
396         * platform/gtk/WidgetBackingStoreGtkX11.h: Added.
397
398 2013-06-27  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
399
400         Buildfix for !ENABLE(SVG) builds.
401
402         Reviewed by Csaba Osztrogonác.
403
404         Moving RenderObject::hasAspectRatio() outside from ENABLE(SVG) guard.
405
406         * rendering/RenderObject.h:
407         (WebCore::RenderObject::hasAspectRatio):
408
409 2013-06-27  Kangil Han  <kangil.han@samsung.com>
410
411         Adopt is/toHTMLLabelElement for code cleanup
412         https://bugs.webkit.org/show_bug.cgi?id=118113
413
414         Reviewed by Andreas Kling.
415
416         To enhance readability, this patch adopts is/toHTMLLabelElement.
417         This also helps out to reduce duplicated use of static_cast.
418
419         * accessibility/AXObjectCache.cpp:
420         (WebCore::AXObjectCache::handleAttributeChanged):
421         (WebCore::AXObjectCache::labelChanged):
422         * accessibility/AccessibilityNodeObject.cpp:
423         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
424         (WebCore::AccessibilityNodeObject::labelForElement):
425         * accessibility/AccessibilityRenderObject.cpp:
426         (WebCore::AccessibilityRenderObject::labelElementContainer):
427         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
428         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
429         * dom/DocumentOrderedMap.cpp:
430         (WebCore::keyMatchesLabelForAttribute):
431         * dom/Element.cpp:
432         (WebCore::Element::updateLabel):
433         * dom/TreeScope.cpp:
434         (WebCore::TreeScope::labelElementForId):
435         * html/HTMLLabelElement.h:
436         (WebCore::isHTMLLabelElement):
437         (WebCore::toHTMLLabelElement):
438         * html/LabelsNodeList.cpp:
439         (WebCore::LabelsNodeList::nodeMatches):
440
441 2013-06-27  Peter Gal  <galpeter@inf.u-szeged.hu>
442
443         [curl] Fix unused variable/parameter warnings
444         https://bugs.webkit.org/show_bug.cgi?id=118050
445
446         Reviewed by Christophe Dumez.
447
448         Commented out unused parameters and removed an unused variable in the curl backend.
449
450         No tests required.
451
452         * platform/network/curl/CredentialStorageCurl.cpp:
453         (WebCore::CredentialStorage::getFromPersistentStorage):
454         * platform/network/curl/DNSCurl.cpp:
455         (WebCore::prefetchDNS):
456         * platform/network/curl/ResourceHandleManager.cpp:
457         (WebCore::curl_lock_callback):
458         (WebCore::curl_unlock_callback):
459         (WebCore::headerCallback):
460         (WebCore::ResourceHandleManager::downloadTimerCallback):
461
462 2013-06-27  Csaba Osztrogonác  <ossy@webkit.org>
463
464         Fix cast-align warnings in WebCore/platform/graphics/cairo
465         https://bugs.webkit.org/show_bug.cgi?id=117990
466
467         Reviewed by Rob Buis.
468
469         * platform/graphics/cairo/BitmapImageCairo.cpp:
470         (WebCore::BitmapImage::checkForSolidColor):
471         * platform/graphics/cairo/ImageBufferCairo.cpp:
472         (WebCore::ImageBuffer::platformTransformColorSpace):
473         (WebCore::getImageData):
474         (WebCore::ImageBuffer::putByteArray):
475
476 2013-06-27  Szabolcs Dávid  <davidsz@inf.u-szeged.hu>
477
478         [curl] Add "set-cookie" to appendable headers
479         https://bugs.webkit.org/show_bug.cgi?id=118061
480
481         Reviewed by Christophe Dumez.
482
483         Mark set-cookie as an appendable header.
484
485         * platform/network/curl/ResourceHandleManager.cpp:
486         (WebCore::isAppendableHeader):
487
488 2013-06-27  Horia Iosif Olaru  <olaru@adobe.com>
489
490         Remove ENABLE_CSS_COMPOSITING guards around -webkit-background-blend mode related code. The same flag guards -webkit-blend-mode code, but those guards are not touched by this change.
491
492         https://bugs.webkit.org/show_bug.cgi?id=117619
493
494         Reviewed by Dean Jackson.
495
496         Test: css3/compositing/effect-background-blend-mode-tiled.html
497
498         * WebCore.exp.in:
499         * bindings/generic/RuntimeEnabledFeatures.h:
500         * css/CSSComputedStyleDeclaration.cpp:
501         (WebCore::ComputedStyleExtractor::propertyValue):
502         * css/CSSParser.cpp:
503         (WebCore::CSSParser::parseValue):
504         (WebCore::CSSParser::parseFillProperty):
505         * css/CSSProperty.cpp:
506         (WebCore::CSSProperty::isInheritedProperty):
507         * css/CSSPropertyNames.in:
508         * css/DeprecatedStyleBuilder.cpp:
509         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
510
511 2013-06-26  Christophe Dumez  <ch.dumez@sisa.samsung.com>
512
513         Rename WorkerContext to WorkerGlobalScope
514         https://bugs.webkit.org/show_bug.cgi?id=118059
515
516         Reviewed by Kentaro Hara.
517
518         Rename WorkerContext / SharedWorkerContext / DedicatedWorkerContext to
519         WorkerGlobalScope / SharedWorkerGlobalScope / DedicatedWorkerGlobalScope
520         to match the latest specification:
521         http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#workerglobalscope
522
523         Those interfaces have [NoInterfaceObject] IDL extended attribute so the
524         name did not matter much so far. However, the specification was updated
525         and [NoInterfaceObject] was removed. We should therefore rename those
526         interfaces as a preparation for this change.
527
528         No new tests, no behavior change as these interfaces are not exposed to
529         JavaScript yet.
530
531         * CMakeLists.txt:
532         * DerivedSources.cpp:
533         * DerivedSources.make:
534         * DerivedSources.pri:
535         * GNUmakefile.am:
536         * GNUmakefile.list.am:
537         * Modules/filesystem/WorkerGlobalScopeFileSystem.cpp: Renamed from Source/WebCore/Modules/filesystem/WorkerContextFileSystem.cpp.
538         (WebCore::WorkerGlobalScopeFileSystem::webkitRequestFileSystem):
539         (WebCore::WorkerGlobalScopeFileSystem::webkitRequestFileSystemSync):
540         (WebCore::WorkerGlobalScopeFileSystem::webkitResolveLocalFileSystemURL):
541         (WebCore::WorkerGlobalScopeFileSystem::webkitResolveLocalFileSystemSyncURL):
542         * Modules/filesystem/WorkerGlobalScopeFileSystem.h: Renamed from Source/WebCore/Modules/filesystem/WorkerContextFileSystem.h.
543         * Modules/filesystem/WorkerGlobalScopeFileSystem.idl: Renamed from Source/WebCore/Modules/filesystem/WorkerContextFileSystem.idl.
544         * Modules/indexeddb/IDBFactory.cpp:
545         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp: Renamed from Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.cpp.
546         (WebCore::WorkerGlobalScopeIndexedDatabase::WorkerGlobalScopeIndexedDatabase):
547         (WebCore::WorkerGlobalScopeIndexedDatabase::~WorkerGlobalScopeIndexedDatabase):
548         (WebCore::WorkerGlobalScopeIndexedDatabase::supplementName):
549         (WebCore::WorkerGlobalScopeIndexedDatabase::from):
550         (WebCore::WorkerGlobalScopeIndexedDatabase::indexedDB):
551         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h: Renamed from Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.h.
552         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.idl: Renamed from Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.idl.
553         * Modules/notifications/Notification.cpp:
554         * Modules/notifications/NotificationCenter.cpp:
555         * Modules/notifications/WorkerGlobalScopeNotifications.cpp: Renamed from Source/WebCore/Modules/notifications/WorkerContextNotifications.cpp.
556         (WebCore::WorkerGlobalScopeNotifications::WorkerGlobalScopeNotifications):
557         (WebCore::WorkerGlobalScopeNotifications::~WorkerGlobalScopeNotifications):
558         (WebCore::WorkerGlobalScopeNotifications::supplementName):
559         (WebCore::WorkerGlobalScopeNotifications::from):
560         (WebCore::WorkerGlobalScopeNotifications::webkitNotifications):
561         * Modules/notifications/WorkerGlobalScopeNotifications.h: Renamed from Source/WebCore/Modules/notifications/WorkerContextNotifications.h.
562         * Modules/notifications/WorkerGlobalScopeNotifications.idl: Renamed from Source/WebCore/Modules/notifications/WorkerContextNotifications.idl.
563         * Modules/webdatabase/DatabaseContext.cpp:
564         (WebCore::DatabaseContext::allowDatabaseAccess):
565         (WebCore::DatabaseContext::databaseExceededQuota):
566         * Modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextWebDatabase.cpp.
567         (WebCore::WorkerGlobalScopeWebDatabase::openDatabase):
568         (WebCore::WorkerGlobalScopeWebDatabase::openDatabaseSync):
569         * Modules/webdatabase/WorkerGlobalScopeWebDatabase.h: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextWebDatabase.h.
570         (WebCore::WorkerGlobalScopeWebDatabase::WorkerGlobalScopeWebDatabase):
571         (WebCore::WorkerGlobalScopeWebDatabase::~WorkerGlobalScopeWebDatabase):
572         * Modules/webdatabase/WorkerGlobalScopeWebDatabase.idl: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextWebDatabase.idl.
573         * Modules/websockets/ThreadableWebSocketChannel.cpp:
574         (WebCore::ThreadableWebSocketChannel::create):
575         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
576         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasksCallback):
577         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
578         (WebCore::WorkerThreadableWebSocketChannel::WorkerThreadableWebSocketChannel):
579         (WebCore::workerGlobalScopeDidSend):
580         (WebCore::WorkerThreadableWebSocketChannel::Peer::send):
581         (WebCore::workerGlobalScopeDidGetBufferedAmount):
582         (WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount):
583         (WebCore::workerGlobalScopeDidConnect):
584         (WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect):
585         (WebCore::workerGlobalScopeDidReceiveMessage):
586         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage):
587         (WebCore::workerGlobalScopeDidReceiveBinaryData):
588         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
589         (WebCore::workerGlobalScopeDidUpdateBufferedAmount):
590         (WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
591         (WebCore::workerGlobalScopeDidStartClosingHandshake):
592         (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
593         (WebCore::workerGlobalScopeDidClose):
594         (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
595         (WebCore::workerGlobalScopeDidReceiveMessageError):
596         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
597         (WebCore::WorkerThreadableWebSocketChannel::Bridge::Bridge):
598         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::create):
599         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::~WorkerGlobalScopeDidInitializeTask):
600         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::WorkerGlobalScopeDidInitializeTask):
601         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
602         (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
603         (WebCore::WorkerThreadableWebSocketChannel::Bridge::waitForMethodCompletion):
604         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
605         (WebCore::WorkerThreadableWebSocketChannel::create):
606         (WebCore::WorkerThreadableWebSocketChannel::Bridge::create):
607         * Target.pri:
608         * UseJSC.cmake:
609         * WebCore.order:
610         * WebCore.vcxproj/WebCore.vcxproj:
611         * WebCore.vcxproj/WebCore.vcxproj.filters:
612         * WebCore.xcodeproj/project.pbxproj:
613         * bindings/cpp/WebDOMEventTarget.cpp:
614         (toWebKit):
615         * bindings/cpp/WebDOMEventTarget.h:
616         * bindings/generic/ActiveDOMCallback.cpp:
617         * bindings/js/DOMRequestState.h:
618         (WebCore::DOMRequestState::DOMRequestState):
619         * bindings/js/JSBindingsAllInOne.cpp:
620         * bindings/js/JSDOMBinding.h:
621         * bindings/js/JSDOMGlobalObject.cpp:
622         (WebCore::JSDOMGlobalObject::scriptExecutionContext):
623         (WebCore::toJSDOMGlobalObject):
624         * bindings/js/JSDedicatedWorkerGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSDedicatedWorkerContextCustom.cpp.
625         (WebCore::JSDedicatedWorkerGlobalScope::postMessage):
626         * bindings/js/JSEventListener.cpp:
627         (WebCore::JSEventListener::handleEvent):
628         * bindings/js/JSEventTargetCustom.cpp:
629         (WebCore::toJS):
630         * bindings/js/JSWorkerGlobalScopeBase.cpp: Renamed from Source/WebCore/bindings/js/JSWorkerContextBase.cpp.
631         (WebCore::JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase):
632         (WebCore::JSWorkerGlobalScopeBase::finishCreation):
633         (WebCore::JSWorkerGlobalScopeBase::destroy):
634         (WebCore::JSWorkerGlobalScopeBase::scriptExecutionContext):
635         (WebCore::toJS):
636         (WebCore::toJSDedicatedWorkerGlobalScope):
637         (WebCore::toJSSharedWorkerGlobalScope):
638         (WebCore::toJSWorkerGlobalScope):
639         * bindings/js/JSWorkerGlobalScopeBase.h: Renamed from Source/WebCore/bindings/js/JSWorkerContextBase.h.
640         (WebCore::JSWorkerGlobalScopeBase::impl):
641         (WebCore::JSWorkerGlobalScopeBase::createStructure):
642         * bindings/js/JSWorkerGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSWorkerContextCustom.cpp.
643         (WebCore::JSWorkerGlobalScope::visitChildren):
644         (WebCore::JSWorkerGlobalScope::getOwnPropertySlotDelegate):
645         (WebCore::JSWorkerGlobalScope::getOwnPropertyDescriptorDelegate):
646         (WebCore::JSWorkerGlobalScope::importScripts):
647         (WebCore::JSWorkerGlobalScope::setTimeout):
648         (WebCore::JSWorkerGlobalScope::setInterval):
649         * bindings/js/ScheduledAction.cpp:
650         (WebCore::ScheduledAction::execute):
651         * bindings/js/ScheduledAction.h:
652         * bindings/js/ScriptProfiler.cpp:
653         (WebCore::ScriptProfiler::startForWorkerGlobalScope):
654         (WebCore::ScriptProfiler::stopForWorkerGlobalScope):
655         * bindings/js/ScriptProfiler.h:
656         * bindings/js/ScriptState.cpp:
657         (WebCore::scriptStateFromWorkerGlobalScope):
658         * bindings/js/ScriptState.h:
659         * bindings/js/WorkerScriptController.cpp:
660         (WebCore::WorkerScriptController::WorkerScriptController):
661         (WebCore::WorkerScriptController::~WorkerScriptController):
662         (WebCore::WorkerScriptController::initScript):
663         (WebCore::WorkerScriptController::evaluate):
664         (WebCore::WorkerScriptController::setException):
665         (WebCore::WorkerScriptController::forbidExecution):
666         (WebCore::WorkerScriptController::isExecutionForbidden):
667         (WebCore::WorkerScriptController::disableEval):
668         (WebCore::WorkerScriptController::attachDebugger):
669         (WebCore::WorkerScriptController::detachDebugger):
670         * bindings/js/WorkerScriptController.h:
671         (WebCore::WorkerScriptController::workerGlobalScopeWrapper):
672         (WebCore::WorkerScriptController::initScriptIfNeeded):
673         * bindings/js/WorkerScriptDebugServer.cpp:
674         (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
675         (WebCore::WorkerScriptDebugServer::addListener):
676         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
677         (WebCore::WorkerScriptDebugServer::removeListener):
678         (WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
679         * bindings/js/WorkerScriptDebugServer.h:
680         * bindings/scripts/CodeGeneratorJS.pm:
681         (GenerateHeader):
682         (GenerateImplementation):
683         * bindings/scripts/IDLAttributes.txt:
684         * bindings/scripts/preprocess-idls.pl:
685         * dom/ActiveDOMObject.cpp:
686         * dom/EventTarget.h:
687         * dom/EventTargetFactory.in:
688         * dom/MessagePort.cpp:
689         (WebCore::MessagePort::dispatchMessages):
690         * dom/ScriptExecutionContext.cpp:
691         (WebCore::ScriptExecutionContext::createdMessagePort):
692         (WebCore::ScriptExecutionContext::destroyedMessagePort):
693         (WebCore::ScriptExecutionContext::vm):
694         * dom/ScriptExecutionContext.h:
695         (WebCore::ScriptExecutionContext::isWorkerGlobalScope):
696         * inspector/InjectedScriptManager.cpp:
697         (WebCore::InjectedScriptManager::createForWorker):
698         (WebCore::InjectedScriptManager::canAccessInspectedWorkerGlobalScope):
699         * inspector/InjectedScriptManager.h:
700         * inspector/InspectorConsoleInstrumentation.h:
701         (WebCore::InspectorInstrumentation::addMessageToConsole):
702         * inspector/InspectorInstrumentation.cpp:
703         (WebCore::InspectorInstrumentation::didStartWorkerGlobalScopeImpl):
704         (WebCore::InspectorInstrumentation::willEvaluateWorkerScript):
705         (WebCore::InspectorInstrumentation::workerGlobalScopeTerminatedImpl):
706         (WebCore::InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope):
707         (WebCore::InspectorInstrumentation::instrumentingAgentsForNonDocumentContext):
708         * inspector/InspectorInstrumentation.h:
709         (WebCore::InspectorInstrumentation::didStartWorkerGlobalScope):
710         (WebCore::InspectorInstrumentation::workerGlobalScopeTerminated):
711         * inspector/InspectorProfilerAgent.cpp:
712         (WebCore::WorkerProfilerAgent::WorkerProfilerAgent):
713         (WebCore::WorkerProfilerAgent::startProfiling):
714         (WebCore::WorkerProfilerAgent::stopProfiling):
715         (WebCore::InspectorProfilerAgent::create):
716         * inspector/InspectorProfilerAgent.h:
717         * inspector/InspectorRuntimeAgent.h:
718         * inspector/InspectorWorkerAgent.cpp:
719         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::WorkerFrontendChannel):
720         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::~WorkerFrontendChannel):
721         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::proxy):
722         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::connectToWorkerGlobalScope):
723         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::disconnectFromWorkerGlobalScope):
724         (WebCore::InspectorWorkerAgent::connectToWorker):
725         (WebCore::InspectorWorkerAgent::disconnectFromWorker):
726         (WebCore::InspectorWorkerAgent::didStartWorkerGlobalScope):
727         (WebCore::InspectorWorkerAgent::workerGlobalScopeTerminated):
728         (WebCore::InspectorWorkerAgent::destroyWorkerFrontendChannels):
729         (WebCore::InspectorWorkerAgent::createWorkerFrontendChannel):
730         * inspector/InspectorWorkerAgent.h:
731         * inspector/InstrumentingAgents.cpp:
732         (WebCore::instrumentationForWorkerGlobalScope):
733         * inspector/InstrumentingAgents.h:
734         * inspector/WorkerDebuggerAgent.cpp:
735         (WebCore::WorkerDebuggerAgent::create):
736         (WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent):
737         (WebCore::WorkerDebuggerAgent::~WorkerDebuggerAgent):
738         (WebCore::WorkerDebuggerAgent::interruptAndDispatchInspectorCommands):
739         (WebCore::WorkerDebuggerAgent::injectedScriptForEval):
740         * inspector/WorkerDebuggerAgent.h:
741         * inspector/WorkerInspectorController.cpp:
742         (WebCore::WorkerInspectorController::WorkerInspectorController):
743         (WebCore::WorkerInspectorController::connectFrontend):
744         * inspector/WorkerInspectorController.h:
745         * inspector/WorkerRuntimeAgent.cpp:
746         (WebCore::WorkerRuntimeAgent::WorkerRuntimeAgent):
747         (WebCore::WorkerRuntimeAgent::injectedScriptForEval):
748         (WebCore::WorkerRuntimeAgent::pauseWorkerGlobalScope):
749         * inspector/WorkerRuntimeAgent.h:
750         (WebCore::WorkerRuntimeAgent::create):
751         * loader/ThreadableLoader.cpp:
752         (WebCore::ThreadableLoader::create):
753         (WebCore::ThreadableLoader::loadResourceSynchronously):
754         * loader/WorkerThreadableLoader.cpp:
755         (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
756         (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
757         (WebCore::workerGlobalScopeDidSendData):
758         (WebCore::WorkerThreadableLoader::MainThreadBridge::didSendData):
759         (WebCore::workerGlobalScopeDidReceiveResponse):
760         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
761         (WebCore::workerGlobalScopeDidReceiveData):
762         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
763         (WebCore::workerGlobalScopeDidFinishLoading):
764         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
765         (WebCore::workerGlobalScopeDidFail):
766         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
767         (WebCore::workerGlobalScopeDidFailAccessControlCheck):
768         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck):
769         (WebCore::workerGlobalScopeDidFailRedirectCheck):
770         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck):
771         * loader/WorkerThreadableLoader.h:
772         (WebCore::WorkerThreadableLoader::create):
773         * loader/cache/MemoryCache.cpp:
774         (WebCore::MemoryCache::removeRequestFromCache):
775         * platform/blackberry/LocalFileSystemBlackBerry.cpp:
776         (WebCore::openFileSystem):
777         (WebCore::LocalFileSystem::deleteFileSystem):
778         * platform/blackberry/WorkerAsyncFileSystemBlackBerry.cpp:
779         (WebCore::WorkerAsyncFileSystemBlackBerry::WorkerAsyncFileSystemBlackBerry):
780         (WebCore::WorkerAsyncFileSystemBlackBerry::openFileSystem):
781         (WebCore::WorkerAsyncFileSystemBlackBerry::deleteFileSystem):
782         * platform/blackberry/WorkerAsyncFileSystemBlackBerry.h:
783         (WebCore::WorkerAsyncFileSystemBlackBerry::create):
784         * platform/blackberry/WorkerAsyncFileWriterBlackBerry.h:
785         * platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.cpp:
786         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::postTaskToWorkerThread):
787         * platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.h:
788         * platform/blackberry/WorkerPlatformFileWriterClient.cpp:
789         (WebCore::WorkerPlatformFileWriterClient::postTaskToWorkerThreadIfNeeded):
790         * platform/blackberry/WorkerPlatformFileWriterClient.h:
791         * workers/DedicatedWorkerGlobalScope.cpp: Renamed from Source/WebCore/workers/DedicatedWorkerContext.cpp.
792         (WebCore::DedicatedWorkerGlobalScope::create):
793         (WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
794         (WebCore::DedicatedWorkerGlobalScope::~DedicatedWorkerGlobalScope):
795         (WebCore::DedicatedWorkerGlobalScope::interfaceName):
796         (WebCore::DedicatedWorkerGlobalScope::postMessage):
797         (WebCore::DedicatedWorkerGlobalScope::importScripts):
798         (WebCore::DedicatedWorkerGlobalScope::thread):
799         * workers/DedicatedWorkerGlobalScope.h: Renamed from Source/WebCore/workers/DedicatedWorkerContext.h.
800         * workers/DedicatedWorkerGlobalScope.idl: Renamed from Source/WebCore/workers/DedicatedWorkerContext.idl.
801         * workers/DedicatedWorkerThread.cpp:
802         (WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
803         (WebCore::DedicatedWorkerThread::runEventLoop):
804         * workers/DedicatedWorkerThread.h:
805         * workers/DefaultSharedWorkerRepository.cpp:
806         (WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
807         (WebCore::SharedWorkerProxy::workerGlobalScopeClosed):
808         (WebCore::SharedWorkerProxy::workerGlobalScopeDestroyed):
809         (WebCore::SharedWorkerConnectTask::performTask):
810         (WebCore::SharedWorkerScriptLoader::notifyFinished):
811         (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
812         * workers/SharedWorkerGlobalScope.cpp: Renamed from Source/WebCore/workers/SharedWorkerContext.cpp.
813         (WebCore::createConnectEvent):
814         (WebCore::SharedWorkerGlobalScope::create):
815         (WebCore::SharedWorkerGlobalScope::SharedWorkerGlobalScope):
816         (WebCore::SharedWorkerGlobalScope::~SharedWorkerGlobalScope):
817         (WebCore::SharedWorkerGlobalScope::interfaceName):
818         (WebCore::SharedWorkerGlobalScope::thread):
819         (WebCore::SharedWorkerGlobalScope::logExceptionToConsole):
820         * workers/SharedWorkerGlobalScope.h: Renamed from Source/WebCore/workers/SharedWorkerContext.h.
821         (WebCore::SharedWorkerGlobalScope::name):
822         * workers/SharedWorkerGlobalScope.idl: Renamed from Source/WebCore/workers/SharedWorkerContext.idl.
823         * workers/SharedWorkerThread.cpp:
824         (WebCore::SharedWorkerThread::createWorkerGlobalScope):
825         * workers/SharedWorkerThread.h:
826         * workers/Worker.cpp:
827         (WebCore::Worker::Worker):
828         (WebCore::Worker::postMessage):
829         (WebCore::Worker::terminate):
830         (WebCore::Worker::notifyFinished):
831         * workers/Worker.h:
832         * workers/WorkerGlobalScope.cpp: Renamed from Source/WebCore/workers/WorkerContext.cpp.
833         (WebCore::CloseWorkerGlobalScopeTask::create):
834         (WebCore::CloseWorkerGlobalScopeTask::performTask):
835         (WebCore::CloseWorkerGlobalScopeTask::isCleanupTask):
836         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
837         (WebCore::WorkerGlobalScope::~WorkerGlobalScope):
838         (WebCore::WorkerGlobalScope::applyContentSecurityPolicyFromString):
839         (WebCore::WorkerGlobalScope::scriptExecutionContext):
840         (WebCore::WorkerGlobalScope::virtualURL):
841         (WebCore::WorkerGlobalScope::virtualCompleteURL):
842         (WebCore::WorkerGlobalScope::completeURL):
843         (WebCore::WorkerGlobalScope::userAgent):
844         (WebCore::WorkerGlobalScope::disableEval):
845         (WebCore::WorkerGlobalScope::location):
846         (WebCore::WorkerGlobalScope::close):
847         (WebCore::WorkerGlobalScope::navigator):
848         (WebCore::WorkerGlobalScope::hasPendingActivity):
849         (WebCore::WorkerGlobalScope::postTask):
850         (WebCore::WorkerGlobalScope::setTimeout):
851         (WebCore::WorkerGlobalScope::clearTimeout):
852         (WebCore::WorkerGlobalScope::clearInspector):
853         (WebCore::WorkerGlobalScope::setInterval):
854         (WebCore::WorkerGlobalScope::clearInterval):
855         (WebCore::WorkerGlobalScope::importScripts):
856         (WebCore::WorkerGlobalScope::errorEventTarget):
857         (WebCore::WorkerGlobalScope::logExceptionToConsole):
858         (WebCore::WorkerGlobalScope::addConsoleMessage):
859         (WebCore::WorkerGlobalScope::addMessage):
860         (WebCore::WorkerGlobalScope::addMessageToWorkerConsole):
861         (WebCore::WorkerGlobalScope::isContextThread):
862         (WebCore::WorkerGlobalScope::isJSExecutionForbidden):
863         (WebCore::WorkerGlobalScope::eventTargetData):
864         (WebCore::WorkerGlobalScope::ensureEventTargetData):
865         (WebCore::WorkerGlobalScope::Observer::Observer):
866         (WebCore::WorkerGlobalScope::Observer::~Observer):
867         (WebCore::WorkerGlobalScope::Observer::stopObserving):
868         (WebCore::WorkerGlobalScope::registerObserver):
869         (WebCore::WorkerGlobalScope::unregisterObserver):
870         (WebCore::WorkerGlobalScope::notifyObserversOfStop):
871         (WebCore::WorkerGlobalScope::eventQueue):
872         * workers/WorkerGlobalScope.h: Renamed from Source/WebCore/workers/WorkerContext.h.
873         (WebCore::WorkerGlobalScope::isSharedWorkerGlobalScope):
874         (WebCore::WorkerGlobalScope::isDedicatedWorkerGlobalScope):
875         (WebCore::WorkerGlobalScope::url):
876         (WebCore::WorkerGlobalScope::groupSettings):
877         (WebCore::WorkerGlobalScope::script):
878         (WebCore::WorkerGlobalScope::clearScript):
879         (WebCore::WorkerGlobalScope::thread):
880         (WebCore::WorkerGlobalScope::self):
881         (WebCore::WorkerGlobalScope::workerInspectorController):
882         (WebCore::WorkerGlobalScope::optionalNavigator):
883         (WebCore::WorkerGlobalScope::optionalLocation):
884         (WebCore::WorkerGlobalScope::isClosing):
885         * workers/WorkerGlobalScope.idl: Renamed from Source/WebCore/workers/WorkerContext.idl.
886         * workers/WorkerGlobalScopeProxy.h: Renamed from Source/WebCore/workers/WorkerContextProxy.h.
887         (WebCore::WorkerGlobalScopeProxy::~WorkerGlobalScopeProxy):
888         (WebCore::WorkerGlobalScopeProxy::PageInspector::~PageInspector):
889         (WebCore::WorkerGlobalScopeProxy::connectToInspector):
890         (WebCore::WorkerGlobalScopeProxy::disconnectFromInspector):
891         (WebCore::WorkerGlobalScopeProxy::sendMessageToInspector):
892         * workers/WorkerLoaderProxy.h:
893         * workers/WorkerMessagingProxy.cpp:
894         (WebCore::MessageWorkerGlobalScopeTask::create):
895         (WebCore::MessageWorkerGlobalScopeTask::MessageWorkerGlobalScopeTask):
896         (WebCore::MessageWorkerGlobalScopeTask::performTask):
897         (WebCore::WorkerGlobalScopeDestroyedTask::create):
898         (WebCore::WorkerGlobalScopeDestroyedTask::WorkerGlobalScopeDestroyedTask):
899         (WebCore::WorkerGlobalScopeDestroyedTask::performTask):
900         (WebCore::WorkerTerminateTask::performTask):
901         (WebCore::PostMessageToPageInspectorTask::performTask):
902         (WebCore::WorkerGlobalScopeProxy::create):
903         (WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
904         (WebCore::WorkerMessagingProxy::~WorkerMessagingProxy):
905         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
906         (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
907         (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
908         (WebCore::WorkerMessagingProxy::workerObjectDestroyedInternal):
909         (WebCore::connectToWorkerGlobalScopeInspectorTask):
910         (WebCore::WorkerMessagingProxy::connectToInspector):
911         (WebCore::disconnectFromWorkerGlobalScopeInspectorTask):
912         (WebCore::WorkerMessagingProxy::disconnectFromInspector):
913         (WebCore::dispatchOnInspectorBackendTask):
914         (WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyed):
915         (WebCore::WorkerMessagingProxy::workerGlobalScopeClosed):
916         (WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyedInternal):
917         (WebCore::WorkerMessagingProxy::terminateWorkerGlobalScope):
918         * workers/WorkerMessagingProxy.h:
919         * workers/WorkerObjectProxy.h:
920         * workers/WorkerReportingProxy.h:
921         * workers/WorkerRunLoop.cpp:
922         (WebCore::WorkerRunLoop::run):
923         (WebCore::WorkerRunLoop::runInMode):
924         (WebCore::WorkerRunLoop::runCleanupTasks):
925         (WebCore::WorkerRunLoop::Task::performTask):
926         * workers/WorkerRunLoop.h:
927         * workers/WorkerScriptLoader.cpp:
928         (WebCore::WorkerScriptLoader::loadSynchronously):
929         * workers/WorkerThread.cpp:
930         (WebCore::WorkerThread::workerThread):
931         (WebCore::WorkerThread::runEventLoop):
932         (WebCore::WorkerThreadShutdownFinishTask::performTask):
933         (WebCore::WorkerThreadShutdownStartTask::performTask):
934         (WebCore::WorkerThread::stop):
935         * workers/WorkerThread.h:
936         (WebCore::WorkerThread::workerGlobalScope):
937         * xml/XMLHttpRequest.cpp:
938         (WebCore::XMLHttpRequest::usesDashboardBackwardCompatibilityMode):
939         (WebCore::XMLHttpRequest::responseXML):
940
941 2013-06-26  Sanjoy Pal  <sanjoy.pal@samsung.com>
942
943         Avoid redundant checks for Compositing reasons in RenderLayerCompositor
944         https://bugs.webkit.org/show_bug.cgi?id=118114
945
946         Reviewed by Anders Carlsson.
947
948         A RenderObject can be any one of the Video, Canvas, Plugin or Iframe.
949         Hence removing the redundant checks.
950
951         No new tests as no functionality change.
952
953         * rendering/RenderLayerCompositor.cpp:
954         (WebCore::RenderLayerCompositor::reasonsForCompositing):
955
956 2013-06-26  Gwang Yoon Hwang  <ryumiel@company100.net>
957
958         Coordinated Graphics: Separate CoordinatedLayerTreeHost into CoordinatedLayerTreeHost and CompositingCoordinator
959         https://bugs.webkit.org/show_bug.cgi?id=104360
960
961         Reviewed by Noam Rosenthal.
962
963         The CoordinatedLayerTreeHost has too many responsibilities. It
964         implements LayerTreeHost, GraphicsLayerClient,
965         CoordinatedGraphicsLayerClient, CoordinatedImageBacking::Client,
966         UpdateAtlas::Client, GraphicsLayerFactory and
967         WebCustomFilterProgramProxyClient.
968
969         This refactoring reduces the responsibilities of CoordinatedLayerTreeHost.
970
971         This patch introduces a new class called CompositingCoordinator, which
972         takes the responsibility of managing compositing resources in
973         WebProcess.
974
975         CoordinatedLayerTreeHost is responsible only for the scheduling and
976         IPC-specific stuff, which are relevant only for WebKit2.
977
978         No new tests, covered by existing tests.
979
980         * CMakeLists.txt:
981         * Target.pri:
982         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Added.
983         (WebCore::CompositingCoordinator::create):
984         (WebCore::CompositingCoordinator::~CompositingCoordinator):
985         (WebCore::CompositingCoordinator::CompositingCoordinator):
986         (WebCore::CompositingCoordinator::setRootCompositingLayer):
987         (WebCore::CompositingCoordinator::sizeDidChange):
988         (WebCore::CompositingCoordinator::flushPendingLayerChanges):
989         (WebCore::CompositingCoordinator::syncDisplayState):
990         (WebCore::CompositingCoordinator::nextAnimationServiceTime):
991         (WebCore::CompositingCoordinator::clearPendingStateChanges):
992         (WebCore::CompositingCoordinator::initializeRootCompositingLayerIfNeeded):
993         (WebCore::CompositingCoordinator::createRootLayer):
994         (WebCore::CompositingCoordinator::syncLayerState):
995         (WebCore::CompositingCoordinator::createImageBackingIfNeeded):
996         (WebCore::CompositingCoordinator::createImageBacking):
997         (WebCore::CompositingCoordinator::updateImageBacking):
998         (WebCore::CompositingCoordinator::clearImageBackingContents):
999         (WebCore::CompositingCoordinator::removeImageBacking):
1000         (WebCore::CompositingCoordinator::flushPendingImageBackingChanges):
1001         (WebCore::CompositingCoordinator::notifyAnimationStarted):
1002         (WebCore::CompositingCoordinator::notifyFlushRequired):
1003         (WebCore::CompositingCoordinator::paintContents):
1004         (WebCore::CompositingCoordinator::createGraphicsLayer):
1005         (WebCore::CompositingCoordinator::deviceScaleFactor):
1006         (WebCore::CompositingCoordinator::pageScaleFactor):
1007         (WebCore::CompositingCoordinator::createUpdateAtlas):
1008         (WebCore::CompositingCoordinator::removeUpdateAtlas):
1009         (WebCore::CompositingCoordinator::visibleContentsRect):
1010         (WebCore::CompositingCoordinator::mainContentsLayer):
1011         (WebCore::CompositingCoordinator::setVisibleContentsRect):
1012         (WebCore::CompositingCoordinator::deviceOrPageScaleFactorChanged):
1013         (WebCore::CompositingCoordinator::detachLayer):
1014         (WebCore::CompositingCoordinator::commitScrollOffset):
1015         (WebCore::CompositingCoordinator::renderNextFrame):
1016         (WebCore::CompositingCoordinator::purgeBackingStores):
1017         (WebCore::CompositingCoordinator::paintToSurface):
1018         (WebCore::CompositingCoordinator::scheduleReleaseInactiveAtlases):
1019         (WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
1020         * platform/graphics/texmap/coordinated/CompositingCoordinator.h: Added.
1021         (WebCore::CompositingCoordinator::clearRootLayer):
1022         (WebCore::CompositingCoordinator::rootLayer):
1023         (WebCore::CompositingCoordinator::state):
1024
1025 2013-06-26  Kihong Kwon  <kihong.kwon@samsung.com>
1026
1027         Vibration cannot be canceled during pattern vibration.
1028         https://bugs.webkit.org/show_bug.cgi?id=117822
1029
1030         Reviewed by Gyuyoung Kim.
1031
1032         Vibration can not cancel during pattern vibration is working. If resting time which are
1033         even numbers of pattern m_isVibraing will be false and cancel will thus return early.
1034         In addition, m_timerStart needs to be stopped in the cancelVibration().
1035         If cancelVibration() is called right after m_timerStart is fired, timerStartFired
1036         function can be called even if vibration is already canceled because of timing issue of timer.
1037
1038         Test: vibration/cancelVibration-during-pattern-vibrating.html
1039
1040         * Modules/vibration/Vibration.cpp:
1041         (WebCore::Vibration::vibrate):
1042         (WebCore::Vibration::cancelVibration):
1043         (WebCore::Vibration::suspendVibration):
1044         (WebCore::Vibration::resumeVibration):
1045         (WebCore::Vibration::stopVibration):
1046         (WebCore::Vibration::timerStartFired):
1047         (WebCore::Vibration::timerStopFired):
1048         * Modules/vibration/Vibration.h:
1049
1050 2013-06-26  Anders Carlsson  <andersca@apple.com>
1051
1052         Deprecate StringImpl::charactersWithNullTermination
1053         https://bugs.webkit.org/show_bug.cgi?id=118108
1054
1055         Reviewed by Beth Dakin.
1056
1057         Rename calls to charactersWithNullTermination to deprecatedCharactersWithNullTermination.
1058
1059         * html/canvas/WebGLProgram.cpp:
1060         (WebCore::WebGLProgram::cacheActiveAttribLocations):
1061         * platform/graphics/win/FontCacheWin.cpp:
1062         (WebCore::getLinkedFonts):
1063         * platform/graphics/win/FontCustomPlatformData.cpp:
1064         (WebCore::FontCustomPlatformData::fontPlatformData):
1065         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
1066         (WebCore::FontCustomPlatformData::fontPlatformData):
1067         * platform/graphics/win/IconWin.cpp:
1068         (WebCore::Icon::createIconForFiles):
1069         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1070         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::setUpCookiesForQuickTime):
1071         * platform/graphics/wince/FontPlatformData.cpp:
1072         (WebCore::FontPlatformData::FontPlatformData):
1073         * platform/network/curl/CurlDownload.cpp:
1074         (CurlDownload::moveFileToDestination):
1075         * platform/network/win/CookieJarWin.cpp:
1076         (WebCore::setCookiesFromDOM):
1077         (WebCore::cookiesForDOM):
1078         * platform/network/win/DownloadBundleWin.cpp:
1079         (WebCore::DownloadBundle::appendResumeData):
1080         (WebCore::DownloadBundle::extractResumeData):
1081         * platform/network/win/ResourceHandleWin.cpp:
1082         (WebCore::createInternetHandle):
1083         (WebCore::ResourceHandle::start):
1084         (WebCore::ResourceHandle::fileLoadTimer):
1085         * platform/sql/SQLiteFileSystem.cpp:
1086         (WebCore::SQLiteFileSystem::openDatabase):
1087         * platform/sql/SQLiteStatement.cpp:
1088         (WebCore::SQLiteStatement::prepare):
1089         * platform/text/win/LocaleWin.cpp:
1090         (WebCore::LCIDFromLocaleInternal):
1091         * platform/text/win/TextCodecWin.cpp:
1092         (WebCore::TextCodecWin::enumerateSupportedEncodings):
1093         * platform/win/ClipboardUtilitiesWin.cpp:
1094         (WebCore::getWebLocData):
1095         (WebCore::createGlobalData):
1096         (WebCore::setFileDescriptorData):
1097         (WebCore::getURL):
1098         (WebCore::setCFData):
1099         * platform/win/ContextMenuWin.cpp:
1100         (WebCore::ContextMenu::createPlatformContextMenuFromItems):
1101         * platform/win/DragImageWin.cpp:
1102         (WebCore::createDragImageIconForCachedImageFilename):
1103         * platform/win/FileSystemWin.cpp:
1104         (WebCore::getFindData):
1105         (WebCore::deleteFile):
1106         (WebCore::deleteEmptyDirectory):
1107         (WebCore::pathByAppendingComponent):
1108         (WebCore::makeAllDirectories):
1109         (WebCore::pathGetFileName):
1110         (WebCore::openTemporaryFile):
1111         (WebCore::openFile):
1112         * platform/win/MIMETypeRegistryWin.cpp:
1113         (WebCore::mimeTypeForExtension):
1114         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
1115         * platform/win/PasteboardWin.cpp:
1116         (WebCore::createGlobalImageFileDescriptor):
1117         (WebCore::createGlobalHDropContent):
1118         * platform/win/PathWalker.cpp:
1119         (WebCore::PathWalker::PathWalker):
1120         * platform/win/SSLKeyGeneratorWin.cpp:
1121         (WebCore::WebCore::signedPublicKeyAndChallengeString):
1122         * platform/win/SharedBufferWin.cpp:
1123         (WebCore::SharedBuffer::createWithContentsOfFile):
1124         * platform/wince/FileSystemWinCE.cpp:
1125         (WebCore::getFileInfo):
1126         (WebCore::fileExists):
1127         (WebCore::deleteFile):
1128         (WebCore::deleteEmptyDirectory):
1129         (WebCore::makeAllDirectories):
1130         (WebCore::openTemporaryFile):
1131         (WebCore::openFile):
1132         * plugins/win/PluginDatabaseWin.cpp:
1133         (WebCore::PluginDatabase::getPluginPathsInDirectories):
1134         (WebCore::addMozillaPluginDirectories):
1135         (WebCore::addAdobeAcrobatPluginDirectory):
1136         (WebCore::addJavaPluginDirectory):
1137         * plugins/win/PluginPackageWin.cpp:
1138         (WebCore::getVersionInfo):
1139         (WebCore::PluginPackage::fetchInfo):
1140         (WebCore::PluginPackage::load):
1141         * plugins/win/PluginViewWin.cpp:
1142         (WebCore::PluginView::handlePostReadFile):
1143
1144 2013-06-26  Roger Fong  <roger_fong@apple.com>
1145
1146         Add an accessibility delegate interface to AppleWin port.
1147         https://bugs.webkit.org/show_bug.cgi?id=118094.
1148
1149         Reviewed by Brent Fulgham.
1150
1151         * accessibility/win/AXObjectCacheWin.cpp: We call the page client's AXStartFrameLoad and AXFinishFrameLoad methods here, which will in turn call the AccessibilityDelegate's callbacks.
1152         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
1153         * loader/EmptyClients.h:
1154         (WebCore::EmptyChromeClient::AXStartFrameLoad):
1155         (WebCore::EmptyChromeClient::AXFinishFrameLoad):
1156         * page/ChromeClient.h:
1157
1158 2013-06-26  Jer Noble  <jer.noble@apple.com>
1159
1160         Potential use-after-free after neutering AudioBuffer's underlying ArrayBuffer.
1161         https://bugs.webkit.org/show_bug.cgi?id=118040
1162
1163         Reviewed by Filip Pizlo.
1164
1165         Test: webaudio/audiobuffer-neuter.html
1166
1167         When creating an AudioBuffer's backing ArrayBufferView objects, mark them as 'unneuterable',
1168         meaning the underlying data will be copied in a neuter scenario rather than transferred. This
1169         means the underlying assumtions of the webaudio code can continue to assume that the memory
1170         areas owned by the ArrayBufferView will be present until the AudioBuffer is itself destroyed.
1171
1172         In order to not expose the 'unneuterable' behavior to JavaScript, return a fresh Float32Array
1173         wrapper around the ArrayBuffer object, rather than our own.
1174
1175         * Modules/webaudio/AudioBuffer.cpp:
1176         (WebCore::AudioBuffer::AudioBuffer): Mark the newly created channels as not neuterable.
1177         (WebCore::AudioBuffer::getChannelData): Return a new Float32Array object rather than a pointer to our own.
1178         * Modules/webaudio/AudioBuffer.h:
1179
1180 2013-06-26  Brent Fulgham  <bfulgham@apple.com>
1181
1182         [Windows] Unreviewed build correction after r152035.
1183
1184         * page/CaptionUserPreferencesMediaAF.cpp: Don't attempt to include CoreText.h
1185           if we do not have MediaAccessibility Framework.
1186
1187 2013-06-26  Brent Fulgham  <bfulgham@apple.com>
1188
1189         [Windows] Enable CaptionUserPreferencesMediaAF on Windows.
1190         https://bugs.webkit.org/show_bug.cgi?id=118076
1191
1192         Reviewed by Eric Carlson.
1193
1194         * WebCore.vcxproj/WebCore.vcxproj: Enable building the CaptionUserPreferencesMediaAF source file.
1195         * page/CaptionUserPreferencesMediaAF.cpp: Add soft-link commands for CoreText symbols needed in
1196           the implementation for Windows.
1197         * platform/LocalizedStrings.cpp: Enable Text Track-related strings on Windows.
1198         * platform/LocalizedStrings.h: Ditto.
1199
1200 2013-06-26  Ryosuke Niwa  <rniwa@webkit.org>
1201
1202         Speed up SVG sprites by only painting the source rect in SVGImage::draw
1203         https://bugs.webkit.org/show_bug.cgi?id=118070
1204
1205         Reviewed by Tim Horton.
1206
1207         Merge https://chromium.googlesource.com/chromium/blink/+/d359ab67fdd76a877d666dca91c311505dd27bbf.
1208
1209         * svg/graphics/SVGImage.cpp:
1210         (WebCore::SVGImage::draw):
1211
1212 2013-06-26  David Kilzer  <ddkilzer@apple.com>
1213
1214         BUILD FIX (r151981): Include HTMLAudioElement.h for ENABLE(PLUGIN_PROXY_FOR_VIDEO)
1215
1216         * css/StyleResolver.cpp:
1217         - Include HTMLAudioElement.h.
1218         - Sort headers.
1219         * rendering/RenderLayerCompositor.cpp:
1220         - Include HTMLAudioElement.h.
1221
1222 2013-06-26  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
1223
1224         getComputedStyle().width wrong after text changed
1225         https://bugs.webkit.org/show_bug.cgi?id=106611
1226
1227         Reviewed by Dean Jackson.
1228
1229         When a new RenderText is created, NodeRenderingContext::createRendererForTextIfNeeded() sets a style to the RenderText.
1230         If a font in the new style needs transcode (e.g. Meiryo), styleDidChange() calls transformText().
1231         It sets a preferredLogicalWidthsDirty flag.
1232         After that, createRendererForTextIfNeeded() inserts the RenderText to its parent renderer.
1233         However, RenderObjectChildList::insertChildNode() doesn't set a preferredLogicalWidthsDirty flag of owner
1234         because a preferredLogicalWidthsDirty flag of the RenderText is already true.
1235
1236         Inserting new child should always sets a preferredLogicalWidthsDirty flag.
1237         Therefore, this patch called setPreferredLogicalWidthsDirty() of owner.
1238
1239         Test: fast/dynamic/empty-absolute-innerhtml-transcoding-text.html
1240
1241         * rendering/RenderObjectChildList.cpp:
1242         (WebCore::RenderObjectChildList::insertChildNode):
1243
1244 2013-06-26  Brent Fulgham  <bfulgham@apple.com>
1245
1246         Prepare CaptionUserPreferencesMac for use on Windows port.
1247         https://bugs.webkit.org/show_bug.cgi?id=118069
1248
1249         Reviewed by Eric Carlson.
1250
1251         * WebCore.vcxproj/WebCore.vcxproj: Add new files.
1252         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1253         * WebCore.xcodeproj/project.pbxproj: Update for new file name.
1254         * page/CaptionUserPreferencesMac.h: Removed.
1255         * page/CaptionUserPreferencesMac.mm: Removed.
1256         * page/CaptionUserPreferencesMediaAF.cpp: Copied from page/CaptionUserPreferencesMac.mm.
1257         * page/CaptionUserPreferencesMediaAF.h: Copied from page/CaptionUserPreferencesMac.h.
1258         * page/PageGroup.cpp:
1259         (WebCore::PageGroup::captionPreferences): Updated to new class name.
1260
1261 2013-06-26  Ryosuke Niwa  <rniwa@webkit.org>
1262
1263         Remove unneccesary cast to Node* in MediaControlTextTrackContainerElement::updateDisplay
1264         https://bugs.webkit.org/show_bug.cgi?id=118020
1265
1266         Reviewed by Christophe Dumez.
1267
1268         Merge https://chromium.googlesource.com/chromium/blink/+/2de89f61bb316f5e166b45ce71bb2b293dbf575d
1269
1270         TextTrackCue is a Node, there's no reason to static_cast from it to Node*.
1271
1272         * html/shadow/MediaControlElements.cpp:
1273         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
1274
1275 2013-06-26  Ryosuke Niwa  <rniwa@webkit.org>
1276
1277         RenderBox::hasRenderOverflow should return bool instead of RenderOverflow*
1278         https://bugs.webkit.org/show_bug.cgi?id=118041
1279
1280         Reviewed by Christophe Dumez.
1281
1282         Merge https://chromium.googlesource.com/chromium/blink/+/1683b58c855b745463acbf18086e32279db5000f.
1283
1284         * rendering/RenderBox.h:
1285         (WebCore::RenderBox::hasRenderOverflow):
1286         (WebCore::RenderBox::hasHorizontalLayoutOverflow):
1287         (WebCore::RenderBox::hasVerticalLayoutOverflow):
1288
1289 2013-06-26  Ryosuke Niwa  <rniwa@webkit.org>
1290
1291         Remove unneeded static_casts from SelectorChecker
1292         https://bugs.webkit.org/show_bug.cgi?id=118018
1293
1294         Reviewed by Christophe Dumez.
1295
1296         Merge https://chromium.googlesource.com/chromium/blink/+/adc5b8bec2d8c6a857b3c930ca7484f76cad1367
1297
1298         SelectorChecker::checkOne casts to StyledElement just to call classNames, but
1299         this method is on Element so there's no reason for this. The cast here also
1300         looks pretty suspect. The method also casts to HTMLFrameElementBase to call
1301         containsFullScreenElement which is also on Element so the cast can be removed.
1302
1303         * css/SelectorChecker.cpp:
1304         (WebCore::SelectorChecker::checkOne):
1305
1306 2013-06-26  Ryosuke Niwa  <rniwa@webkit.org>
1307
1308         Set Attr.ownerDocument in Element#setAttributeNode()
1309         https://bugs.webkit.org/show_bug.cgi?id=118031
1310
1311         Reviewed by Andreas Kling.
1312
1313         Merge https://chromium.googlesource.com/chromium/blink/+/fa739fe5369f55bbdcb3fa123cb64df36b8ae414.
1314
1315         Adopt Attr node as needed.
1316
1317         Test: fast/dom/Attr/set-attribute-node-from-iframe.html
1318
1319         * dom/Element.cpp:
1320         (WebCore::Element::setAttributeNode):
1321
1322 2013-06-25  David Hyatt  <hyatt@apple.com>
1323
1324         Flex boxes (both old and new) don't handle max-height images correctly.
1325         https://bugs.webkit.org/show_bug.cgi?id=118000
1326
1327         Reviewed by Beth Dakin.
1328
1329         Tests: css3/flexbox/image-percent-max-height.html
1330                fast/flexbox/image-percent-max-height.html
1331
1332         * rendering/RenderBlock.cpp:
1333         (WebCore::RenderBlock::dirtyForLayoutFromPercentageHeightDescendants):
1334         (WebCore::RenderBlock::layoutBlockChildren):
1335         Pull the percentage height descendant code that dirties those descendants
1336         out of layoutBlockChildren and into a protected helper function,
1337         dirtyForLayoutFromPercentageHeightDescendants, that can be called from the 
1338         flex box code.
1339         
1340         Also patch dirtyForLayoutFromPercentageHeightDescendants so that it will dirty
1341         preferred logical widths when a child has an aspect ratio, since we know that
1342         percentage height changes will potentially affect the preferred widths of the image and
1343         its ancestor blocks.
1344
1345         * rendering/RenderBlock.h:
1346         Declaration of the new dirtyForLayoutFromPercentageHeightDescendants function.
1347
1348         * rendering/RenderDeprecatedFlexibleBox.cpp:
1349         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
1350         Make the old flex box code call dirtyForLayoutFromPercentageHeightDescendants so
1351         that everything is dirtied properly.
1352
1353         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
1354         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
1355         Remove the isReplaced()/percentage height/width dirtying now that the old flexible
1356         box is using the same dirtying mechanism as RenderBlock.
1357
1358         * rendering/RenderFlexibleBox.cpp:
1359         (WebCore::RenderFlexibleBox::layoutBlock):
1360         Patch the new flexible box code to use the dirtying mechanism that RenderBlock
1361         uses for percentage heights/widths on replaced descendants.
1362
1363         * rendering/RenderObject.h:
1364         (WebCore::RenderObject::hasAspectRatio):
1365         Pulled the static helper function from RenderReplaced into a full-blown method
1366         on RenderObject, so that dirtyForLayoutFromPercentageHeightDescendants can call
1367         it to check if an object has an aspect ratio.
1368
1369         * rendering/RenderReplaced.cpp:
1370         (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox):
1371         (WebCore::RenderReplaced::computeIntrinsicRatioInformation):
1372         Patch the call sites of the static helper function to use hasAspectRatio instead
1373         and get rid of the static in the cpp file.
1374
1375 2013-06-26  Kangil Han  <kangil.han@samsung.com>
1376
1377         Adopt is/toHTMLAreaElement for code cleanup
1378         https://bugs.webkit.org/show_bug.cgi?id=117980
1379
1380         Reviewed by Antonio Gomes.
1381
1382         To enhance readibility, this patch adopts is/toHTMLAreaElement.
1383         This also helps out to reduce duplicated use of static_cast.
1384
1385         * accessibility/AXObjectCache.cpp:
1386         (WebCore::AXObjectCache::focusedUIElementForPage):
1387         * accessibility/AccessibilityRenderObject.cpp:
1388         (WebCore::AccessibilityRenderObject::getDocumentLinks):
1389         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
1390         (WebCore::AccessibilityRenderObject::addImageMapChildren):
1391         * html/HTMLAreaElement.h:
1392         (WebCore::isHTMLAreaElement):
1393         (WebCore::toHTMLAreaElement):
1394         * html/HTMLMapElement.cpp:
1395         (WebCore::HTMLMapElement::mapMouseEvent):
1396         * page/FocusController.cpp:
1397         (WebCore::FocusController::advanceFocusDirectionally):
1398         * page/SpatialNavigation.cpp:
1399         (WebCore::FocusCandidate::FocusCandidate):
1400         (WebCore::areElementsOnSameLine):
1401         * rendering/HitTestResult.cpp:
1402         (WebCore::HitTestResult::absoluteLinkURL):
1403         * rendering/RenderImage.cpp:
1404         (WebCore::RenderImage::paintAreaElementFocusRing):
1405
1406 2013-06-26  Brady Eidson  <beidson@apple.com>
1407
1408         [Mac] Document URL is not updated by HSTS
1409         <rdar://problem/14241270> and https://bugs.webkit.org/show_bug.cgi?id=118003
1410         
1411         Patch started by Alexey Proskuryakov, finished by Brady Eidson.
1412
1413         Reviewed by Brady Eidson and then Alexey Proskuryakov.
1414
1415         Synthesize a response and properly handle willSendRequest when the URL changes in a way that's typical for HSTS.
1416
1417         * platform/network/mac/WebCoreURLResponse:
1418         * platform/network/mac/WebCoreURLResponse:
1419         (WebCore::synthesizeRedirectResponseIfNecessary): Synthesize a redirect response and when the URL changes in a way that's
1420           typical for HSTS connections.
1421
1422         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
1423         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]): Call synthesizeRedirectResponseIfNecessary.
1424
1425         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
1426         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]): Ditto.
1427
1428 2013-06-26  Andrei Bucur  <abucur@adobe.com>
1429
1430         [CSS Regions] fast/regions/seamless-iframe-flowed-into-regions.html asserts
1431         https://bugs.webkit.org/show_bug.cgi?id=117797
1432
1433         Reviewed by Antti Koivisto.
1434
1435         The seamless iframes inherit the current RenderFlowThread during layout. This means getting
1436         the LayoutState object from the flow thread RenderView object is not always correct.
1437         For RenderObjects inside the seamless iframes the view()/LayoutState object is different than the one
1438         of the RenderFlowThread. The patch changes the code to use the correct LayoutState object during
1439         layout when pushing a new state.
1440
1441         Tests: covered by fast/regions/seamless-iframe-flowed-into-regions.html
1442
1443         * rendering/RenderFlowThread.cpp:
1444         (WebCore::RenderFlowThread::currentActiveRenderBox):
1445         (WebCore::RenderFlowThread::pushFlowThreadLayoutState):
1446         (WebCore::RenderFlowThread::popFlowThreadLayoutState):
1447
1448 2013-06-26  Ryosuke Niwa  <rniwa@webkit.org>
1449
1450         Remove many static_casts to Element types from AccessibilityNodeObject
1451         https://bugs.webkit.org/show_bug.cgi?id=118021
1452
1453         Reviewed by Chris Fleizach.
1454
1455         Merge https://chromium.googlesource.com/chromium/blink/+/ecd837f94996a20fdb8798e24f26cf6edea2a423.
1456
1457         * accessibility/AccessibilityNodeObject.cpp:
1458         (WebCore::AccessibilityNodeObject::isReadOnly):
1459         (WebCore::AccessibilityNodeObject::alternativeTextForWebArea):
1460         (WebCore::AccessibilityNodeObject::text):
1461
1462 2013-06-26  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1463
1464         Stop inheriting SVGExternalResourcesRequired, SVGFitToViewBox and SVGZoomAndPan
1465         https://bugs.webkit.org/show_bug.cgi?id=118029
1466
1467         Reviewed by Kentaro Hara.
1468
1469         Stop inheriting SVGExternalResourcesRequired, SVGFitToViewBox and SVGZoomAndPan
1470         in the IDL and use implements statements instead.
1471
1472         This is one step towards getting rid of multiple inheritance in the SVG code
1473         and matching the latest specification:
1474         http://www.w3.org/TR/SVG2/types.html#BasicDOMInterfaces
1475
1476         There is no webexposed behavior change.
1477
1478         No new tests, no behavior change.
1479
1480         * svg/SVGAnimationElement.idl:
1481         * svg/SVGCircleElement.idl:
1482         * svg/SVGClipPathElement.idl:
1483         * svg/SVGCursorElement.idl:
1484         * svg/SVGDefsElement.idl:
1485         * svg/SVGEllipseElement.idl:
1486         * svg/SVGFEImageElement.idl:
1487         * svg/SVGFilterElement.idl:
1488         * svg/SVGForeignObjectElement.idl:
1489         * svg/SVGGElement.idl:
1490         * svg/SVGGradientElement.idl:
1491         * svg/SVGImageElement.idl:
1492         * svg/SVGLineElement.idl:
1493         * svg/SVGMPathElement.idl:
1494         * svg/SVGMarkerElement.idl:
1495         * svg/SVGMaskElement.idl:
1496         * svg/SVGPathElement.idl:
1497         * svg/SVGPatternElement.idl:
1498         * svg/SVGPolygonElement.idl:
1499         * svg/SVGPolylineElement.idl:
1500         * svg/SVGRectElement.idl:
1501         * svg/SVGSVGElement.idl:
1502         * svg/SVGScriptElement.idl:
1503         * svg/SVGSwitchElement.idl:
1504         * svg/SVGSymbolElement.idl:
1505         * svg/SVGTextContentElement.idl:
1506         * svg/SVGUseElement.idl:
1507         * svg/SVGViewSpec.idl:
1508
1509 2013-06-26  Ryosuke Niwa  <rniwa@webkit.org>
1510
1511         Use-after-free in RadioInputType::handleKeydownEvent
1512         https://bugs.webkit.org/show_bug.cgi?id=118035
1513
1514         Reviewed by Kent Tamura.
1515
1516         Use RefPtr for inputElement since setFocusedNode could blow it away.
1517
1518         * html/RadioInputType.cpp:
1519         (WebCore::RadioInputType::handleKeydownEvent):
1520
1521 2013-06-26  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1522
1523         Get rid of multiple inheritence for SVGViewElement interface
1524         https://bugs.webkit.org/show_bug.cgi?id=118014
1525
1526         Reviewed by Kentaro Hara.
1527
1528         Web IDL no longer supports multiple inheritence. As per the latest
1529         specification SVGViewElement should only inherit from SVGElement.
1530         'implements' statements are used for the rest. This patch refactors
1531         the IDL files to match the latest specification:
1532         http://www.w3.org/TR/SVG2/linking.html#InterfaceSVGViewElement
1533
1534         Note that there is a WebExposed change as SVGZoomAndPan used to be
1535         exposed on the Window and it is not anymore. SVGZoomAndPan merely
1536         supplements SVGViewElement and should not be exposed to JavaScript
1537         according to the latest specification.
1538
1539         No new tests, covered by existing tests.
1540
1541         * CMakeLists.txt:
1542         * DerivedSources.pri:
1543         * GNUmakefile.list.am:
1544         * svg/SVGExternalResourcesRequired.idl:
1545         * svg/SVGFitToViewBox.idl:
1546         * svg/SVGViewElement.idl:
1547         * svg/SVGZoomAndPan.idl:
1548
1549 2013-06-26  Ryosuke Niwa  <rniwa@webkit.org>
1550
1551         Mark SVG(Circle|Path|Rect)Element::createRenderer() with OVERRIDE
1552         https://bugs.webkit.org/show_bug.cgi?id=118037
1553
1554         Reviewed by Philip Rogers.
1555
1556         Merge https://chromium.googlesource.com/chromium/blink/+/e8196920e769ab0786b2b4b21d3fdc2d87afef0d.
1557
1558         * svg/SVGCircleElement.h:
1559         * svg/SVGPathElement.h:
1560         * svg/SVGRectElement.h:
1561
1562 2013-06-26  Kangil Han  <kangil.han@samsung.com>
1563
1564         Adopt is/toHTMLAudioElement for code cleanup
1565         https://bugs.webkit.org/show_bug.cgi?id=117985
1566
1567         Reviewed by Jer Noble.
1568
1569         To enhance readibility, this patch adopts is/toHTMLAudioElement.
1570         This also helps out to reduce duplicated use of static_cast.
1571
1572         * bindings/js/JSNodeCustom.cpp:
1573         (WebCore::isReachableFromDOM):
1574         * css/CSSDefaultStyleSheets.cpp:
1575         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
1576         * css/StyleResolver.cpp:
1577         (WebCore::StyleResolver::canShareStyleWithElement):
1578         * html/HTMLAudioElement.h:
1579         (WebCore::isHTMLAudioElement):
1580         (WebCore::toHTMLAudioElement):
1581         * loader/SubframeLoader.cpp:
1582         (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
1583         * rendering/HitTestResult.cpp:
1584         (WebCore::HitTestResult::mediaElement):
1585         * rendering/RenderLayerCompositor.cpp:
1586         (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
1587         * rendering/RenderThemeMac.mm:
1588         (WebCore::RenderThemeMac::paintMediaMuteButton):
1589         (WebCore::RenderThemeMac::paintMediaPlayButton):
1590
1591 2013-06-26  Ryosuke Niwa  <rniwa@webkit.org>
1592
1593         Refactoring: Fold Document::focusedNodeRemoved into Document::removeFocusedNodeOfSubtree
1594         https://bugs.webkit.org/show_bug.cgi?id=118036
1595
1596         Reviewed by Kent Tamura.
1597
1598         Merge https://chromium.googlesource.com/chromium/blink/+/3391beabe75548cc638a6c88982f913621a4410f.
1599
1600         * dom/Document.cpp:
1601         (WebCore::Document::removeFocusedNodeOfSubtree):
1602         * dom/Document.h:
1603
1604 2013-06-25  Ryosuke Niwa  <rniwa@webkit.org>
1605
1606         JSString should remember AtomicString
1607         https://bugs.webkit.org/show_bug.cgi?id=117386
1608
1609         Reviewed by Geoffrey Garen.
1610
1611         Added "Atomic" attribute as a WebKit extension to WebIDL, and deployed it in Element.idl and Node.idl so that
1612         the binding code can use newly added JSValue::toAtomic to update JSString's m_value.
1613
1614         * bindings/js/JSDOMBinding.cpp:
1615         (WebCore::valueToAtomicStringWithNullCheck): Added.
1616         (WebCore::valueToAtomicStringWithUndefinedOrNullCheck): Added.
1617
1618         * bindings/js/JSDOMBinding.h:
1619
1620         * bindings/scripts/CodeGeneratorJS.pm:
1621         (GetNativeTypeFromSignature): Return const AtomicString& when either Atomic attribute is specified or the type is
1622         Reflect. Note that setAttribute and getAttribute both use AtomicString for all arguments.
1623         (JSValueToNative): Use AtomicString equivalents when possible when converting DOMString to a WebCore object.
1624
1625         * bindings/scripts/IDLAttributes.txt: Added "Atomic" attribute.
1626
1627         * bindings/scripts/test/JS/JSTestObj.cpp: Baselined test cases.
1628         (WebCore::setJSTestObjReflectedStringAttr):
1629         (WebCore::setJSTestObjReflectedURLAttr):
1630         (WebCore::setJSTestObjReflectedCustomURLAttr):
1631
1632         * dom/Document.idl:
1633         * dom/Element.idl:
1634         * dom/Node.idl:
1635
1636 2013-06-25  Kangil Han  <kangil.han@samsung.com>
1637
1638         Adopt is/toHTMLAnchorElement for code cleanup
1639         https://bugs.webkit.org/show_bug.cgi?id=117973
1640
1641         Reviewed by Andreas Kling.
1642
1643         To enhance readibility, this patch adopts is/toHTMLAnchorElement.
1644         This also helps out to reduce duplicated use of static_cast.
1645
1646         * accessibility/AccessibilityNodeObject.cpp:
1647         (WebCore::AccessibilityNodeObject::anchorElement):
1648         * accessibility/AccessibilityRenderObject.cpp:
1649         (WebCore::AccessibilityRenderObject::anchorElement):
1650         (WebCore::AccessibilityRenderObject::internalLinkElement):
1651         (WebCore::AccessibilityRenderObject::url):
1652         (WebCore::AccessibilityRenderObject::stringValueForMSAA):
1653         (WebCore::AccessibilityRenderObject::isLinked):
1654         * css/CSSDefaultStyleSheets.cpp:
1655         (WebCore::elementCanUseSimpleDefaultStyle):
1656         * css/SelectorChecker.cpp:
1657         (WebCore::SelectorChecker::checkOne):
1658         * dom/Document.cpp:
1659         (WebCore::Document::updateBaseURL):
1660         * dom/TreeScope.cpp:
1661         (WebCore::TreeScope::findAnchor):
1662         * dom/VisitedLinkState.cpp:
1663         (WebCore::linkHashForElement):
1664         (WebCore::VisitedLinkState::determineLinkStateSlowCase):
1665         * html/HTMLAnchorElement.h:
1666         (WebCore::isHTMLAnchorElement):
1667         (WebCore::toHTMLAnchorElement):
1668         * page/DragController.cpp:
1669         (WebCore::DragController::draggableElement):
1670         * rendering/HitTestResult.cpp:
1671         (WebCore::HitTestResult::absoluteLinkURL):
1672         (WebCore::HitTestResult::isLiveLink):
1673         * rendering/RenderObject.cpp:
1674         (WebCore::RenderObject::getTextDecorationColors):
1675
1676 2013-06-25  Dean Jackson  <dino@apple.com>
1677
1678         Don't snapshot plug-ins that come from the same host as the page
1679         https://bugs.webkit.org/show_bug.cgi?id=117969
1680         <rdar://problem/12885400>
1681
1682         Reviewed by Tim Horton.
1683
1684         If a page is serving plug-in content directly, then that content
1685         is typically very important to the page. For example, embedding
1686         a video or audio player. In this case, don't snapshot the plug-ins.
1687
1688         * html/HTMLPlugInImageElement.cpp:
1689         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Add a test
1690         that compares the plug-in's URL against the main page's URL and don't snapshot
1691         if they are the same.
1692
1693 2013-06-25  Alex Christensen  <achristensen@apple.com>
1694
1695         Added PLATFORM(WIN) to many places where it was missing for compiling WebGL for Windows.
1696         https://bugs.webkit.org/show_bug.cgi?id=117955
1697
1698         Reviewed by Brent Fulgham.
1699
1700         * platform/graphics/GraphicsContext3D.cpp:
1701         * platform/graphics/OpenGLShims.cpp:
1702         * platform/graphics/cairo/GraphicsContext3DCairo.cpp: Include new location of ShaderLang.h on Windows as of r151854.
1703         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
1704         (WebCore::Extensions3DOpenGL::createVertexArrayOES):
1705         (WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
1706         (WebCore::Extensions3DOpenGL::isVertexArrayOES):
1707         (WebCore::Extensions3DOpenGL::bindVertexArrayOES):
1708         * platform/graphics/opengl/Extensions3DOpenGL.h:
1709         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
1710         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1711         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: Added PLATFORM(WIN) when necessary to each file.
1712
1713 2013-06-25  Bruno de Oliveira Abinader  <brunoabinader@gmail.com>
1714
1715         Fixes a typo in renderTextDecorationFlagsToCSSValue
1716         https://bugs.webkit.org/show_bug.cgi?id=117989
1717
1718         Reviewed by Gyuyoung Kim.
1719
1720         Return value should be PassRefPtr instead of RefPtr.
1721
1722         Backported from Blink:
1723         https://src.chromium.org/viewvc/blink?view=rev&revision=152994
1724
1725         No new tests, no behavior change.
1726
1727         * css/CSSComputedStyleDeclaration.cpp:
1728         (WebCore::renderTextDecorationFlagsToCSSValue):
1729
1730 2013-06-25  Santosh Mahto  <santosh.ma@samsung.com>
1731
1732         "application/x-mimearchive" should be included in finding remoteWebArchive while document loading
1733         https://bugs.webkit.org/show_bug.cgi?id=117734
1734
1735         Reviewed by Alexey Proskuryakov.
1736
1737         "application/x-mimearchive" is also used  while checking for
1738          RemoteArchive.
1739
1740         * loader/DocumentLoader.cpp:
1741         (WebCore::DocumentLoader::continueAfterContentPolicy):
1742
1743 2013-06-25  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1744
1745         HTMLMediaElement should inherit from MediaPlayerClient privately
1746         https://bugs.webkit.org/show_bug.cgi?id=117874
1747
1748         Reviewed by Andreas Kling.
1749
1750         Fixing FIXME: HTMLMediaElement was stuck with public inheritance from
1751         MediaPlayerClient due to the Chromium and Qt port.
1752
1753         The Qt port is changed to not cast from MediaPlayerClient to HTMLMediaElement.
1754
1755         * html/HTMLMediaElement.h:
1756         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
1757         (WebCore::MediaPlayerPrivateQt::commitLoad):
1758
1759 2013-06-25  Csaba Osztrogonác  <ossy@webkit.org>
1760
1761         Checking if frame is complete and access duration doesn't need a decode
1762         https://bugs.webkit.org/show_bug.cgi?id=116041
1763
1764         Reviewed by Allan Sandfeld Jensen.
1765
1766         This change is to avoid image decoding for these two operations:
1767         1. frameIsCompleteAtIndex
1768         2. frameDurationAtIndex
1769         These two operations are moved to ImageDecoder interface and are now const
1770         to prevent future regression.
1771
1772         We are now able to check if a frame is complete by parsing the entire GIF file
1773         without decoding. This also provides information like frame duration such that
1774         controller the animation doesn't require any decoding.
1775
1776         Based on the Blink patch by Hin-Chung Lam <hclam@google.com>
1777         https://src.chromium.org/viewvc/blink?revision=149883&view=revision
1778
1779         * platform/graphics/BitmapImage.cpp:
1780         (WebCore::BitmapImage::frameIsCompleteAtIndex):
1781         (WebCore::BitmapImage::frameDurationAtIndex):
1782         * platform/graphics/ImageSource.cpp:
1783         (WebCore::ImageSource::frameDurationAtIndex):
1784         (WebCore::ImageSource::frameHasAlphaAtIndex):
1785         (WebCore::ImageSource::frameIsCompleteAtIndex):
1786         * platform/graphics/ImageSource.h:
1787         * platform/image-decoders/ImageDecoder.cpp:
1788         (WebCore::ImageDecoder::frameHasAlphaAtIndex):
1789         (WebCore::ImageDecoder::frameIsCompleteAtIndex):
1790         * platform/image-decoders/ImageDecoder.h:
1791         (WebCore::ImageDecoder::frameDurationAtIndex):
1792         * platform/image-decoders/gif/GIFImageDecoder.cpp:
1793         (WebCore::GIFImageDecoder::frameIsCompleteAtIndex):
1794         (WebCore::GIFImageDecoder::frameDurationAtIndex):
1795         (WebCore::GIFImageDecoder::haveDecodedRow):
1796         (WebCore::GIFImageDecoder::gifComplete):
1797         (WebCore::GIFImageDecoder::decode):
1798         (WebCore::GIFImageDecoder::initFrameBuffer):
1799         * platform/image-decoders/gif/GIFImageDecoder.h:
1800         * platform/image-decoders/gif/GIFImageReader.h:
1801         (GIFImageReader::frameContext):
1802         (GIFImageReader::parseCompleted):
1803
1804 2013-06-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1805
1806         Update AbstractWorker, Worker and SharedWorker to match the specification
1807         https://bugs.webkit.org/show_bug.cgi?id=117930
1808
1809         Reviewed by Kentaro Hara.
1810
1811         Update AbstractWorker, Worker and SharedWorker to match the spec:
1812         http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#abstractworker
1813         http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#worker
1814         http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#sharedworker
1815
1816         Worker and SharedWorker no longer inherit from AbstractWorker. Web IDL 'implements'
1817         statements are used instead. Worker and SharedWorker can now inherit from EventTarget
1818         as per the specification.
1819
1820         No new tests, no behavior change.
1821
1822         * workers/AbstractWorker.idl:
1823         * workers/SharedWorker.idl:
1824         * workers/Worker.idl:
1825
1826 2013-06-24  Andy Estes  <aestes@apple.com>
1827
1828         DerivedSources.make should optionally include SupplementalDependencies.dep
1829         https://bugs.webkit.org/show_bug.cgi?id=117972
1830
1831         Reviewed by Dan Bernstein.
1832
1833         make(1) logs a non-fatal error to stderr when an included Makefile can't
1834         be found. This error is non-fatal because after make(1) reads in all the
1835         Makefiles it runs the recipe for any rule that specifies one of the
1836         Makefiles as a target. Only if the Makefile is still missing after
1837         applying these rules does the error become fatal.
1838
1839         Since SupplementalDependencies.dep is generated by running a script on
1840         SupplementalDependencies.txt, the file won't exist during clean builds.
1841         Each time make(1) logs this non-fatal error, Xcode sees it and itself
1842         logs a non-fatal error. This is annoying.
1843
1844         We don't care about this error. We only care if the recipe to generate
1845         SupplementalDependencies.dep fails, which is already a fatal error.
1846         Suppress the error by including SupplementalDependencies.dep optionally.
1847
1848         * DerivedSources.make:
1849
1850 2013-06-24  Kangil Han  <kangil.han@samsung.com>
1851
1852         Add support for document.currentScript
1853         https://bugs.webkit.org/show_bug.cgi?id=104221
1854
1855         Reviewed by Ryosuke Niwa.
1856
1857         Merge http://src.chromium.org/viewvc/blink?view=revision&revision=152230
1858         document.currentScript reflects the script that is currently being executed.
1859
1860         Merge http://src.chromium.org/viewvc/blink?view=revision&revision=152237
1861         Following up patch for code clean-up.
1862
1863         Tests: fast/dom/Document/document-current-script-async.html
1864                fast/dom/Document/document-current-script.html
1865
1866         * dom/Document.cpp:
1867         (WebCore::Document::pushCurrentScript):
1868         (WebCore::Document::popCurrentScript):
1869         * dom/Document.h:
1870         (WebCore::Document::currentScript):
1871         * dom/Document.idl:
1872         * dom/ScriptElement.cpp:
1873         (WebCore::isHTMLScriptElement):
1874         (WebCore::isSVGScriptElement):
1875         (WebCore::ScriptElement::executeScript):
1876         (WebCore::toScriptElementIfPossible):
1877         * html/HTMLScriptElement.h:
1878         (WebCore::toHTMLScriptElement):
1879         * svg/SVGScriptElement.cpp:
1880         * svg/SVGScriptElement.h:
1881         (WebCore::toSVGScriptElement):
1882
1883 2013-06-24  Kangil Han  <kangil.han@samsung.com>
1884
1885         Adopt is/toHTMLFormElement for code cleanup
1886         https://bugs.webkit.org/show_bug.cgi?id=117937
1887
1888         Reviewed by Andreas Kling.
1889
1890         This refers to http://src.chromium.org/viewvc/blink?view=revision&revision=152859
1891
1892         To enhance readibility, this patch adopts is/toHTMLFormElement.
1893         This also helps out to reduce duplicated use of static_cast.
1894
1895         * accessibility/AccessibilityRenderObject.cpp:
1896         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1897         * bindings/js/JSDOMFormDataCustom.cpp:
1898         (WebCore::toHTMLFormElement):
1899         * bindings/js/JSHTMLFormElementCustom.cpp:
1900         (WebCore::JSHTMLFormElement::nameGetter):
1901         * editing/FrameSelection.cpp:
1902         (WebCore::scanForForm):
1903         (WebCore::FrameSelection::currentForm):
1904         * editing/InsertParagraphSeparatorCommand.cpp:
1905         (WebCore::InsertParagraphSeparatorCommand::doApply):
1906         * html/FormAssociatedElement.cpp:
1907         (WebCore::FormAssociatedElement::findAssociatedForm):
1908         * html/HTMLElement.cpp:
1909         (WebCore::HTMLElement::findFormAncestor):
1910         * html/HTMLFormControlsCollection.cpp:
1911         (WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
1912         (WebCore::HTMLFormControlsCollection::formControlElements):
1913         (WebCore::HTMLFormControlsCollection::formImageElements):
1914         (WebCore::HTMLFormControlsCollection::updateNameCache):
1915         * html/HTMLFormElement.h:
1916         (WebCore::isHTMLFormElement):
1917         (WebCore::toHTMLFormElement):
1918         * html/HTMLImageElement.cpp:
1919         (WebCore::HTMLImageElement::insertedInto):
1920         * html/HTMLNameCollection.cpp:
1921         (WebCore::WindowNameCollection::nodeMatchesIfNameAttributeMatch):
1922         (WebCore::DocumentNameCollection::nodeMatchesIfNameAttributeMatch):
1923         (WebCore::DocumentNameCollection::nodeMatches):
1924         * html/RadioInputType.cpp:
1925         (WebCore::RadioInputType::handleKeydownEvent):
1926         * html/RadioNodeList.cpp:
1927         (WebCore::RadioNodeList::RadioNodeList):
1928         (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
1929         * html/parser/HTMLConstructionSite.cpp:
1930         (WebCore::HTMLConstructionSite::insertHTMLFormElement):
1931         * html/parser/HTMLTreeBuilder.cpp:
1932         (WebCore::closestFormAncestor):
1933         * page/Frame.cpp:
1934         (WebCore::Frame::searchForLabelsBeforeElement):
1935
1936 2013-06-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1937
1938         Remove unneeded include header files from WebCore
1939         https://bugs.webkit.org/show_bug.cgi?id=117926
1940
1941         Reviewed by Andreas Kling.
1942
1943         Merge from https://chromiumcodereview.appspot.com/17388003. 
1944
1945         Cleanup unused includes from WebCore.
1946
1947         * editing/CompositeEditCommand.cpp:
1948         * editing/DeleteSelectionCommand.cpp:
1949         * editing/EditingStyle.cpp:
1950         * editing/Editor.cpp:
1951         * editing/FrameSelection.cpp:
1952         * editing/HTMLInterchange.cpp:
1953         * editing/IndentOutdentCommand.cpp:
1954         * editing/InsertListCommand.cpp:
1955         * editing/InsertTextCommand.cpp:
1956         * editing/SpellChecker.h:
1957         * editing/VisibleUnits.cpp:
1958         * editing/VisibleUnits.h:
1959         * editing/markup.cpp:
1960         * fileapi/Blob.h:
1961         * fileapi/File.h:
1962         * fileapi/WebKitBlobBuilder.h:
1963         * history/HistoryItem.cpp:
1964         * history/HistoryItem.h:
1965         * html/BaseDateAndTimeInputType.cpp:
1966         * html/BaseDateAndTimeInputType.h:
1967         * html/ClassList.cpp:
1968         * html/ClassList.h:
1969         * html/DOMSettableTokenList.h:
1970         * html/DOMURL.cpp:
1971         * html/DateInputType.h:
1972         * html/FormController.h:
1973         * html/HTMLCanvasElement.cpp:
1974         * html/HTMLCollection.cpp:
1975         * html/HTMLCollection.h:
1976         * html/HTMLDocument.h:
1977         * html/HTMLEmbedElement.cpp:
1978         * html/HTMLFieldSetElement.h:
1979         * html/HTMLFormElement.cpp:
1980         * html/HTMLFrameOwnerElement.h:
1981         * html/HTMLIFrameElement.cpp:
1982         * html/HTMLInputElement.cpp:
1983         * html/HTMLLegendElement.cpp:
1984         * html/HTMLLinkElement.h:
1985         * html/HTMLMediaElement.cpp:
1986         * html/HTMLMeterElement.cpp:
1987         * html/HTMLOptionElement.cpp:
1988         * html/HTMLOutputElement.h:
1989         * html/HTMLPlugInImageElement.cpp:
1990         * html/HTMLPlugInImageElement.h:
1991         * html/HTMLProgressElement.cpp:
1992         * html/HTMLSelectElement.cpp:
1993         * html/HTMLTableElement.cpp:
1994         * html/HTMLTitleElement.cpp:
1995         * html/HTMLTrackElement.cpp:
1996         * html/ImageInputType.h:
1997         * html/InputType.h:
1998         * html/MediaController.h:
1999         * html/MediaFragmentURIParser.h:
2000         * html/NumberInputType.cpp:
2001         * html/RadioNodeList.h:
2002         * html/TextFieldInputType.h:
2003         * html/TypeAhead.cpp:
2004         * html/ValidityState.cpp:
2005         * html/canvas/CanvasPathMethods.h:
2006         * html/canvas/CanvasRenderingContext2D.cpp:
2007         * html/canvas/CanvasRenderingContext2D.h:
2008         * html/canvas/OESVertexArrayObject.h:
2009         * html/canvas/WebGLBuffer.cpp:
2010         * html/canvas/WebGLBuffer.h:
2011         * html/canvas/WebGLCompressedTextureATC.h:
2012         * html/canvas/WebGLCompressedTextureS3TC.cpp:
2013         * html/canvas/WebGLCompressedTextureS3TC.h:
2014         * html/canvas/WebGLContextObject.h:
2015         * html/canvas/WebGLDebugShaders.cpp:
2016         * html/canvas/WebGLObject.h:
2017         * html/canvas/WebGLProgram.h:
2018         * html/canvas/WebGLRenderingContext.cpp:
2019         * html/canvas/WebGLRenderingContext.h:
2020         * html/canvas/WebGLShader.h:
2021         * html/canvas/WebGLTexture.h:
2022         * html/canvas/WebGLUniformLocation.h:
2023         * html/canvas/WebGLVertexArrayObjectOES.h:
2024         * html/parser/BackgroundHTMLParser.cpp:
2025         * html/parser/BackgroundHTMLParser.h:
2026         * html/parser/CSSPreloadScanner.cpp:
2027         * html/parser/HTMLConstructionSite.cpp:
2028         * html/parser/HTMLConstructionSite.h:
2029         * html/parser/HTMLDocumentParser.h:
2030         * html/parser/HTMLElementStack.h:
2031         * html/parser/HTMLParserIdioms.cpp:
2032         * html/parser/HTMLParserIdioms.h:
2033         * html/parser/HTMLParserScheduler.h:
2034         * html/parser/HTMLPreloadScanner.cpp:
2035         * html/parser/HTMLSourceTracker.h:
2036         * html/parser/HTMLTreeBuilder.h:
2037         * html/parser/HTMLTreeBuilderSimulator.h:
2038         * html/parser/XSSAuditor.cpp:
2039         * html/parser/XSSAuditorDelegate.h:
2040         * html/shadow/HTMLContentElement.cpp:
2041         * html/shadow/HTMLContentElement.h:
2042         * html/shadow/MediaControlElements.cpp:
2043         * html/shadow/MediaControls.h:
2044         * html/shadow/SliderThumbElement.cpp:
2045         * html/shadow/SliderThumbElement.h:
2046         * html/shadow/TextControlInnerElements.cpp:
2047         * html/track/InbandTextTrack.h:
2048         * html/track/LoadableTextTrack.cpp:
2049         * html/track/LoadableTextTrack.h:
2050         * html/track/TextTrackCueGeneric.h:
2051
2052 2013-06-24  Simon Fraser  <simon.fraser@apple.com>
2053
2054         Don't crash if renderName() is called on a renderer with no style
2055         https://bugs.webkit.org/show_bug.cgi?id=117960
2056
2057         Reviewed by Dave Hyatt.
2058
2059         Calling renderName() at the top of RenderObject::willChangeStyle() when
2060         adding debug logging would often crash because various functions called
2061         from renderName() assume style is non-null. Fix this.
2062
2063         * rendering/RenderBlock.cpp:
2064         (WebCore::RenderBlock::renderName):
2065         * rendering/RenderInline.cpp:
2066         (WebCore::RenderInline::renderName):
2067
2068 2013-06-24  Alex Christensen  <achristensen@apple.com>
2069
2070         Added /d option to xcopy to prevent unnecessary copying and compiling.
2071         https://bugs.webkit.org/show_bug.cgi?id=117951
2072
2073         Reviewed by Brent Fulgham.
2074
2075         * WebCore.vcxproj/WebCorePreBuild.cmd:
2076
2077 2013-06-24  Simon Fraser  <simon.fraser@apple.com>
2078
2079         Fix various crashes on sites with fixed backgrounds
2080         https://bugs.webkit.org/show_bug.cgi?id=117959
2081
2082         Reviewed by Andy Estes.
2083         
2084         FrameView::removeSlowRepaintObject() would assume that addSlowRepaintObject()
2085         had been called before it, but this isn't always the case. For example, if
2086         a page has a fixed background on the body, this falls into the accelerated
2087         path in WK2 tiled mode, so addSlowRepaintObject() is never called. However,
2088         we still call removeSlowRepaintObject() if the body is removed.
2089         
2090         So null-check m_slowRepaintObjects to avoid crashing.
2091
2092         Test: platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-removal.html
2093
2094         * page/FrameView.cpp:
2095         (WebCore::FrameView::removeSlowRepaintObject):
2096
2097 2013-06-24  Ruth Fong  <ruth_fong@apple.com>
2098
2099         Expose the mediaHasAudio() function in WK2
2100         https://bugs.webkit.org/show_bug.cgi?id=117946
2101         <rdar://problem/14250527>
2102
2103         Reviewed by Beth Dakin.
2104
2105         * WebCore.exp.in: Updated to include symbol for
2106         HTMLMediaElement::mediaHasAudio() function.
2107
2108 2013-06-24  Simon Fraser  <simon.fraser@apple.com>
2109
2110         Move displayID stuff from Widget to Chrome
2111         https://bugs.webkit.org/show_bug.cgi?id=117944
2112
2113         Reviewed by Anders Carlsson.
2114
2115         In r151877 I polluted Widget with displayID-related stuff. This would
2116         be better on HostWindow, so move it there. This is a net code reduction,
2117         and eliminates PlatformScreenMac.h, and the NSScreen category.
2118
2119         * WebCore.exp.in: Remove some functions from the exports list.
2120         * WebCore.xcodeproj/project.pbxproj: PlatformScreenMac.h is gone!
2121         * dom/Document.cpp:
2122         (WebCore::Document::requestAnimationFrame): Get the displayID from page->chrome()
2123         * page/Chrome.cpp:
2124         (WebCore::Chrome::Chrome): Initialize m_displayID.
2125         (WebCore::Chrome::displayID):
2126         (WebCore::Chrome::windowScreenDidChange): Code moved from Page; save the
2127         displayID, and tell all subframes that the displayID changed.
2128         * page/Chrome.h: Add displayID-related functions.
2129         * page/FrameView.cpp: Removed windowDisplayID().
2130         * page/FrameView.h: Ditto.
2131         * page/Page.cpp: Removed code.
2132         (WebCore::Page::Page):
2133         * page/Page.h:
2134         * platform/HostWindow.h: Added virtual displayID-related functions.
2135         * platform/Widget.cpp: Removed code.
2136         * platform/Widget.h: Ditto.
2137         * platform/mac/PlatformScreenMac.h: Removed.
2138         * platform/mac/PlatformScreenMac.mm: Removed the NSScreen category.
2139         (WebCore::displayIDFromScreen):
2140         (WebCore::screenForDisplayID):
2141         (WebCore::displayFromWidget):
2142         (WebCore::screenForWidget):
2143         * platform/mac/WidgetMac.mm: Removed windowDisplayID().
2144         * rendering/RenderLayerCompositor.cpp:
2145         (WebCore::RenderLayerCompositor::notifyFlushBeforeDisplayRefresh): Get
2146         the displayID via chrome().
2147
2148 2013-06-24  Andreas Kling  <akling@apple.com>
2149
2150         Don't create Document's selector query cache just to invalidate it.
2151         <http://webkit.org/b/117942>
2152
2153         Reviewed by Anders Carlsson.
2154
2155         If Document::m_selectorQueryCache is null, there's nothing to invalidate,
2156         so don't go through the trouble of creating a query cache.
2157
2158         * dom/Document.cpp:
2159         (WebCore::Document::setCompatibilityMode):
2160         (WebCore::Document::updateBaseURL):
2161
2162 2013-06-24  Robert Hogan  <robert@webkit.org>
2163
2164         Refactor adding a line break
2165         https://bugs.webkit.org/show_bug.cgi?id=117907
2166
2167         Reviewed by Ryosuke Niwa.
2168
2169         Reduce code duplication when adding a line break.
2170         
2171         No new tests, refactoring.
2172
2173         * rendering/RenderBlockLineLayout.cpp:
2174         (WebCore::addLineBreak):
2175         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2176
2177 2013-06-24  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2178
2179         HashMap: reverse the order of the template arguments at alternate 'find', 'contains' and 'add' methods
2180         https://bugs.webkit.org/show_bug.cgi?id=117911
2181
2182         Reviewed by Anders Carlsson.
2183
2184         The order of the template arguments at HashMap alternate 'find', 'contains' and
2185         'add' methods is reversed so that callers can just pass the translator
2186         and let the compiler deduce input argument type.
2187
2188         Another rational is consistency with HashSet class.
2189
2190         * platform/network/HTTPHeaderMap.cpp:
2191         (WebCore::HTTPHeaderMap::get):
2192         (WebCore::HTTPHeaderMap::contains):
2193         (WebCore::HTTPHeaderMap::add):
2194
2195 2013-06-24  Robert Hogan  <robert@webkit.org>
2196
2197         Remove unnecessary check in RenderBlockLineLayout::nextSegmentBreak()
2198         https://bugs.webkit.org/show_bug.cgi?id=117713
2199
2200         Reviewed by David Hyatt.
2201
2202         Changeset r151613 should have done this instead. Since r151518 changed
2203         nextSegmentBreak() to detect line-break opportunities between no-wrap
2204         inlines there is no need to force the break later.
2205
2206         No new tests, covered by existing tests.
2207
2208         * rendering/RenderBlockLineLayout.cpp:
2209         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2210
2211 2013-06-24  Eric Carlson  <eric.carlson@apple.com>
2212
2213         Potential crash when in-band track is removed
2214         https://bugs.webkit.org/show_bug.cgi?id=117938
2215         <rdar://problem/14246763>
2216
2217         Reviewed by Jer Noble.
2218
2219         This is timing dependent and I was unable to come up with a reliable test.
2220
2221         * html/track/InbandTextTrack.cpp:
2222         (WebCore::InbandTextTrack::willRemoveTextTrackPrivate): Early return if the media element
2223             has been cleared.
2224
2225 2013-06-24  Chris Rogers  <crogers@google.com>
2226
2227         WaveTable name has changed to PeriodicWave
2228         https://bugs.webkit.org/show_bug.cgi?id=117748
2229
2230         Reviewed by Jer Noble.
2231
2232         See related Web Audio bug and spec change:
2233         https://www.w3.org/Bugs/Public/show_bug.cgi?id=19561
2234         https://dvcs.w3.org/hg/audio/rev/7c4a40a9bb57
2235
2236         * CMakeLists.txt:
2237         * DerivedSources.make:
2238         * DerivedSources.pri:
2239         * GNUmakefile.list.am:
2240         * Modules/webaudio/AudioContext.cpp:
2241         (WebCore::AudioContext::createPeriodicWave):
2242         * Modules/webaudio/AudioContext.h:
2243         * Modules/webaudio/AudioContext.idl:
2244         * Modules/webaudio/OscillatorNode.cpp:
2245         (WebCore::OscillatorNode::OscillatorNode):
2246         (WebCore::OscillatorNode::setType):
2247         (WebCore::OscillatorNode::calculateSampleAccuratePhaseIncrements):
2248         (WebCore::OscillatorNode::process):
2249         (WebCore::OscillatorNode::setPeriodicWave):
2250         (WebCore::OscillatorNode::propagatesSilence):
2251         * Modules/webaudio/OscillatorNode.h:
2252         * Modules/webaudio/OscillatorNode.idl:
2253         * Modules/webaudio/PeriodicWave.cpp: Renamed from Source/WebCore/Modules/webaudio/WaveTable.cpp.
2254         (WebCore::PeriodicWave::create):
2255         (WebCore::PeriodicWave::createSine):
2256         (WebCore::PeriodicWave::createSquare):
2257         (WebCore::PeriodicWave::createSawtooth):
2258         (WebCore::PeriodicWave::createTriangle):
2259         (WebCore::PeriodicWave::PeriodicWave):
2260         (WebCore::PeriodicWave::waveDataForFundamentalFrequency):
2261         (WebCore::PeriodicWave::maxNumberOfPartials):
2262         (WebCore::PeriodicWave::numberOfPartialsForRange):
2263         (WebCore::PeriodicWave::createBandLimitedTables):
2264         (WebCore::PeriodicWave::generateBasicWaveform):
2265         * Modules/webaudio/PeriodicWave.h: Renamed from Source/WebCore/Modules/webaudio/WaveTable.h.
2266         (WebCore::PeriodicWave::rateScale):
2267         (WebCore::PeriodicWave::periodicWaveSize):
2268         (WebCore::PeriodicWave::sampleRate):
2269         (WebCore::PeriodicWave::numberOfRanges):
2270         * Modules/webaudio/PeriodicWave.idl: Renamed from Source/WebCore/Modules/webaudio/WaveTable.idl.
2271         * Target.pri:
2272         * WebCore.xcodeproj/project.pbxproj:
2273
2274 2013-06-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2275
2276         Commented IDL implements statements should not impact code generation
2277         https://bugs.webkit.org/show_bug.cgi?id=117932
2278
2279         Reviewed by Kentaro Hara.
2280
2281         Fix regular expression in preprocess-idls.pl script so that commented
2282         IDL implements statements no longer cause any code to be generated.
2283
2284         No new tests, covered by TestObj.idl.
2285
2286         * bindings/scripts/preprocess-idls.pl:
2287         (getImplementedInterfacesFromIDL):
2288         * bindings/scripts/test/TestObj.idl:
2289
2290 2013-06-24  Kangil Han  <kangil.han@samsung.com>
2291
2292         Adopt is/toHTMLStyleElement for minor code cleanup
2293         https://bugs.webkit.org/show_bug.cgi?id=117917
2294
2295         Reviewed by Antti Koivisto.
2296
2297         This patch refers to http://src.chromium.org/viewvc/blink?view=revision&revision=152853
2298
2299         There are some usages of static_cast to HTMLStyleElement so this patch creates toHTMLStyleElement
2300         function for code cleanup. Plus, isHTMLStyleElement is also made for same purpose.
2301
2302         * css/CSSStyleSheet.cpp:
2303         (WebCore::isAcceptableCSSStyleSheetParent):
2304         * css/StyleScopeResolver.cpp:
2305         (WebCore::StyleScopeResolver::scopeFor):
2306         * css/StyleSheetList.cpp:
2307         (WebCore::StyleSheetList::getNamedItem):
2308         * dom/DocumentStyleSheetCollection.cpp:
2309         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
2310         * dom/Node.cpp:
2311         (WebCore::Node::numberOfScopedHTMLStyleChildren):
2312         * html/HTMLStyleElement.h:
2313         (WebCore::isHTMLStyleElement):
2314         (WebCore::toHTMLStyleElement):
2315         * inspector/InspectorCSSAgent.cpp:
2316         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
2317         * inspector/InspectorStyleSheet.cpp:
2318         (WebCore::InspectorStyleSheet::inlineStyleSheetText):
2319         * page/PageSerializer.cpp:
2320         (WebCore::PageSerializer::serializeFrame):
2321
2322 2013-06-24  Patrick Gansterer  <paroga@webkit.org>
2323
2324         Cleanup RenderThemeWin after r151783 and r151794.
2325         https://bugs.webkit.org/show_bug.cgi?id=117936
2326
2327         Reviewed by Alexis Menard.
2328
2329         GetSysColor() takes an integer as argument. Let cssValueIdToSysColorIndex()
2330         return an int instead of casting the values to the CSSValueID type.
2331
2332         * rendering/RenderThemeWin.cpp:
2333         (WebCore::cssValueIdToSysColorIndex):
2334         (WebCore::RenderThemeWin::systemColor):
2335
2336 2013-06-24  Patrick Gansterer  <paroga@webkit.org>
2337
2338         Use SetFilePointer instead of SetFilePointerEx in FileSystemWin
2339         https://bugs.webkit.org/show_bug.cgi?id=116205
2340
2341         Reviewed by Ryosuke Niwa.
2342
2343         SetFilePointerEx is not available on Windows CE, so use SetFilePointer.
2344         Also add a extra return for the case of an failure.
2345
2346         * platform/win/FileSystemWin.cpp:
2347         (WebCore::seekFile):
2348
2349 2013-06-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2350
2351         Introduce WindowTimers IDL interface
2352         https://bugs.webkit.org/show_bug.cgi?id=117929
2353
2354         Reviewed by Kentaro Hara.
2355
2356         Introduce WindowTimers IDL interface and have both DOMWindow and WorkerContext
2357         implement it to match the latest specification and avoid IDL duplication:
2358         - http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#windowtimers
2359         - http://dev.w3.org/html5/workers/#apis-available-to-workers
2360
2361         No new tests, no behavior change.
2362
2363         * CMakeLists.txt:
2364         * DerivedSources.make:
2365         * DerivedSources.pri:
2366         * GNUmakefile.list.am:
2367         * page/DOMWindow.idl:
2368         * page/WindowTimers.idl:
2369         * workers/WorkerContext.idl:
2370
2371 2013-06-24  Patrick Gansterer  <paroga@webkit.org>
2372
2373         Build fix for WinCE after r151563.
2374
2375         * bindings/js/JSDOMBinding.cpp:
2376         (WebCore::toInt8): Use fabs() instead of abs().
2377         (WebCore::toUInt8): Ditto.
2378
2379 2013-06-24  Patrick Gansterer  <paroga@webkit.org>
2380
2381         Build fix for WinCE after r151783.
2382
2383         * rendering/RenderThemeWinCE.cpp:
2384         (WebCore::cssValueIdToSysColorIndex):
2385         (WebCore::RenderThemeWinCE::systemColor):
2386
2387 2013-06-24  Commit Queue  <commit-queue@webkit.org>
2388
2389         Unreviewed, rolling out r151021.
2390         http://trac.webkit.org/changeset/151021
2391         https://bugs.webkit.org/show_bug.cgi?id=117924
2392
2393         caused regressions on Qt and GTK (#117141 and #117688)
2394         (Requested by philn on #webkit).
2395
2396         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2397         (webkit_web_src_init):
2398         (webKitWebSrcFinalize):
2399         (webKitWebSrcSetProperty):
2400         (webKitWebSrcGetProperty):
2401         (webKitWebSrcStop):
2402         (webKitWebSrcStart):
2403         (webKitWebSrcChangeState):
2404         (webKitWebSrcQueryWithParent):
2405         (webKitWebSrcGetUri):
2406         (webKitWebSrcSetUri):
2407         (webKitWebSrcNeedDataMainCb):
2408         (webKitWebSrcEnoughDataMainCb):
2409         (webKitWebSrcSeekMainCb):
2410         (webKitWebSrcSeekDataCb):
2411         (StreamingClient::StreamingClient):
2412         (StreamingClient::~StreamingClient):
2413         (StreamingClient::didReceiveResponse):
2414         (StreamingClient::didReceiveData):
2415         (StreamingClient::didFinishLoading):
2416         (StreamingClient::wasBlocked):
2417         (StreamingClient::cannotShowURL):
2418
2419 2013-06-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2420
2421         Move IDL implements statements to IDL files that implement the interface
2422         https://bugs.webkit.org/show_bug.cgi?id=117921
2423
2424         Reviewed by Kentaro Hara.
2425
2426         Move IDL implements statements to IDL files that implement the interface
2427         so that we can more easily know that a given IDL interface implements
2428         another.
2429
2430         The generator now enforces this as well for consistency.
2431
2432         No new tests, covered by TestImplements.idl.
2433
2434         * bindings/scripts/preprocess-idls.pl:
2435         (getImplementedInterfacesFromIDL):
2436         * bindings/scripts/test/TestImplements.idl:
2437         * bindings/scripts/test/TestInterface.idl:
2438         * dom/CharacterData.idl:
2439         * dom/ChildNode.idl:
2440         * dom/DocumentType.idl:
2441         * dom/Element.idl:
2442
2443 2013-06-24  Zalan Bujtas  <zalan@apple.com>
2444
2445         Hittest finds the truncated text instead of the floating input, when the input is clicked.
2446         https://bugs.webkit.org/show_bug.cgi?id=115675
2447
2448         Reviewed by David Hyatt.
2449
2450         Ignore truncated text on inline textbox and everything beyond the ellipsis box on
2451         the root inlinebox while hittesting. (provided that nodeAtPoint finds no hit for any of
2452         the root inline's children.)
2453
2454         Test: fast/css/text-overflow-ellipsis-and-floating-input-hittest.html
2455
2456         * rendering/InlineFlowBox.cpp:
2457         (WebCore::InlineFlowBox::nodeAtPoint):
2458         * rendering/InlineTextBox.cpp:
2459         (WebCore::InlineTextBox::nodeAtPoint):
2460         (WebCore::InlineTextBox::paint):
2461
2462 2013-06-17  Darin Adler  <darin@apple.com>
2463
2464         Sort all the Xcode project files
2465         https://bugs.webkit.org/show_bug.cgi?id=117696
2466
2467         Reviewed by Anders Carlsson.
2468
2469         * WebCore.xcodeproj/project.pbxproj: Ran the sort-Xcode-project-file script.
2470
2471 2013-06-22  Zalan Bujtas  <zalan@apple.com>
2472
2473         Remove redundant helper from RenderRegion.
2474         https://bugs.webkit.org/show_bug.cgi?id=117915
2475
2476         Reviewed by Andreas Kling.
2477
2478         Minor code cleanup.
2479
2480         * rendering/RenderRegion.cpp:
2481         (WebCore::RenderRegion::regionOversetState):
2482         (WebCore::RenderRegion::setRegionOversetState):
2483         * rendering/RenderRegion.h:
2484
2485 2013-06-22  Mark Rowe  <mrowe@apple.com>
2486
2487         Build fix after r151878.
2488
2489         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
2490         (WebCore::WebCoreAVFResourceLoader::startLoading): Pass the new UseDefaultOriginRestrictionsForType
2491         argument to the ResourceLoaderOptions constructor.
2492
2493 2013-06-22  Simon Fraser  <simon.fraser@apple.com>
2494
2495         Followup from r151877 .
2496         Fix crash in fast/frames/iframe-access-screen-of-deleted.html by null-checking the widget.
2497
2498         * platform/mac/PlatformScreenMac.mm:
2499         (WebCore::screenForWidget):
2500
2501 2013-06-22  Hans Muller  <hmuller@adobe.com>
2502
2503         [CSS Shapes] limit shape image values to same origin
2504         https://bugs.webkit.org/show_bug.cgi?id=117610
2505
2506         Reviewed by Alexey Proskuryakov.
2507
2508         Restrict the image URL values for shape-inside and shape-outside to
2509         the same origin as the document. The alpha channel of image shape values
2510         will be thresholded to produce the shape's boundaries (see bug 116643)
2511         so normal image access rules aren't secure enough.
2512
2513         Added a RequestOriginPolicy ResourceLoaderOption which is used by
2514         StyleResolver::loadPendingShapeImage() to request the additional restriction.
2515         The change should have no other effect although it does enable one to apply
2516         the same restriction to other resources which can currently be loaded from
2517         any origin - see CachedResourceLoader::canRequest().
2518
2519         Test: http/tests/security/shape-inside-image-origin.html
2520
2521         * css/CSSImageValue.cpp:
2522         (WebCore::CSSImageValue::cachedImage): Add an effectively optional ResourceLoaderOptions parameter.
2523         * css/CSSImageValue.h:
2524         (WebCore::CSSImageValue::cachedImage): Ditto.
2525         * css/StyleResolver.cpp:
2526         (WebCore::StyleResolver::loadPendingShapeImage): Load the image with the default CachedResourceLoader options plus RestrictToSameOrigin.
2527         (WebCore::StyleResolver::loadPendingImages): Call loadPendingShapeImage().
2528         * css/StyleResolver.h:
2529         * loader/DocumentLoader.cpp:
2530         (WebCore::DocumentLoader::startLoadingMainResource): Update the ResourceLoaderOptions static variable.
2531         * loader/NetscapePlugInStreamLoader.cpp:
2532         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader): Ditto.
2533         * loader/ResourceLoader.h:
2534         (WebCore::ResourceLoader::options):
2535         * loader/ResourceLoaderOptions.h: Add RequestOriginPolicy enum.
2536         (WebCore::ResourceLoaderOptions::ResourceLoaderOptions):
2537         * loader/SubresourceLoader.cpp:
2538         (WebCore::SubresourceLoader::willSendRequest): Pass ResourceLoaderOptions along to revised CachedResourceLoader::canRequest().
2539         * loader/cache/CachedResourceLoader.cpp:
2540         (WebCore::CachedResourceLoader::requestImage):
2541         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Update load() ResourceLoaderOptions.
2542         (WebCore::CachedResourceLoader::canRequest): Replaced ContentSecurityPolicyCheck parameter with ResourceLoaderOptions.
2543         (WebCore::CachedResourceLoader::requestResource): Pass ResourceLoaderOptions along to revised CachedResourceLoader::canRequest().
2544         (WebCore::CachedResourceLoader::defaultCachedResourceOptions): Added UseDefaultOriginRestrictionsForType initializer.
2545         * loader/cache/CachedResourceLoader.h:
2546         * loader/icon/IconLoader.cpp:
2547         (WebCore::IconLoader::startLoading): Added UseDefaultOriginRestrictionsForType intializer.
2548
2549 2013-06-22  Simon Fraser  <simon.fraser@apple.com>
2550
2551         screen.availWidth always returns width of primary display
2552         https://bugs.webkit.org/show_bug.cgi?id=117863
2553
2554         Reviewed by Geoffrey Garen.
2555
2556         In WebKit2, Widgets have no platformWidget, so trying to get to the
2557         NSScreen via the platform widget's window never succeeded, and we always
2558         fell back on getting info for the main display.
2559
2560         However, we were already pushing the WKView's displayID down to the
2561         WebProcess for the requestAnimationFrame infrastructure, so use that.
2562
2563         Add a virtual function on Widget windowDisplayID(), that is overridden
2564         in FrameView to return the PlatformDisplayID which Page has.
2565
2566         Fix PlatformScreenMac to fall back to Widget::windowDisplayID() when it fails
2567         to get an NSWindow from the Widget.
2568
2569         Add a utility category on NSScreen to get an NSScreen's displayID, and to
2570         find an NSScreen given a displayID.
2571
2572         * WebCore.exp.in:
2573         * WebCore.xcodeproj/project.pbxproj:
2574         * page/FrameView.cpp:
2575         (WebCore::FrameView::windowDisplayID):
2576         * page/FrameView.h:
2577         * platform/Widget.cpp:
2578         (WebCore::Widget::windowDisplayID):
2579         * platform/Widget.h:
2580         * platform/mac/PlatformScreenMac.h: Added.
2581         * platform/mac/PlatformScreenMac.mm:
2582         (+[NSScreen screenForDislayID:]):
2583         (-[NSScreen displayID]):
2584         (WebCore::screenRect):
2585         (WebCore::screenAvailableRect):
2586         * platform/mac/WidgetMac.mm:
2587         (WebCore::Widget::windowDisplayID):
2588
2589 2013-06-21  Geoffrey Garen  <ggaren@apple.com>
2590
2591         Crashes due to NULL dereference beneath WebCore::StyleResolver::loadPendingSVGDocuments and related functions
2592         https://bugs.webkit.org/show_bug.cgi?id=117903
2593         <rdar://problem/14202130>
2594
2595         Reviewed by Darin Adler.
2596
2597         * css/StyleResolver.cpp:
2598         (WebCore::StyleResolver::loadPendingSVGDocuments): Add a NULL check for
2599         RenderStyle here...
2600         (WebCore::StyleResolver::loadPendingResources): ...and here.
2601
2602 2013-06-21  Simon Fraser  <simon.fraser@apple.com>
2603
2604         Occasional crash swiping between pages
2605         https://bugs.webkit.org/show_bug.cgi?id=117902
2606
2607         Reviewed by Beth Dakin.
2608
2609         m_scrollingStateTree->rootStateNode() can be null when quickly swiping between pages,
2610         so check this in ScrollingCoordinatorMac::commitTreeState().
2611
2612         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2613         (WebCore::ScrollingCoordinatorMac::commitTreeState):
2614
2615 2013-06-21  Brent Fulgham  <bfulgham@apple.com>
2616
2617         AX: Title for ListItemRole should consist of concatenated child text elements.
2618         https://bugs.webkit.org/show_bug.cgi?id=117892
2619
2620         Reviewed by Chris Fleizach.
2621
2622         accessibility/listitem-title.html
2623
2624         * accessibility/AccessibilityNodeObject.cpp:
2625         (WebCore::AccessibilityNodeObject::visibleText): Add ListItemRole to set of
2626         elements that concatenate their children for display purposes.
2627         (WebCore::AccessibilityNodeObject::title): Ditto.
2628
2629 2013-06-21  Sergio Correia  <sergio.correia@openbossa.org>
2630
2631         [MediaStream]: Remove ``>= 0'' assertion from a size_t variable
2632         https://bugs.webkit.org/show_bug.cgi?id=117890
2633
2634         Reviewed by Adam Barth.
2635
2636         This patch fixes a strict build by removing the ``>= 0'' assertion from
2637         a size_t (unsigned type) variable in RTCStatsResponse.cpp.
2638
2639         No new tests; build fix.
2640
2641         * Modules/mediastream/RTCStatsResponse.cpp:
2642         (WebCore::RTCStatsResponse::addStatistic): Remove ``>=0''assertion,
2643         since the variable is unsigned and is always >= 0.
2644
2645 2013-06-21  Alex Christensen  <achristensen@apple.com>
2646
2647         GraphicsContext3DNEON.h cannot be found on Windows and does not need to be found.
2648         https://bugs.webkit.org/show_bug.cgi?id=117894
2649
2650         Reviewed by Brent Fulgham.
2651
2652         * platform/graphics/GraphicsContext3D.cpp:
2653         Added #if HAVE(ARM_NEON_INTRINSICS) around #include "GraphicsContext3DNEON.h"
2654
2655 2013-06-21  Robert Hogan  <robert@webkit.org>
2656
2657         Ignoring padding-right of inline elements in containers with undefined width
2658         https://bugs.webkit.org/show_bug.cgi?id=76451
2659
2660         Reviewed by David Hyatt.
2661
2662         Collapsed trailing space on a normal wrap line should not cause a line-break 
2663         if it is the difference between fitting on the line and breaking. Likewise, on a line that
2664         has a mix of auto-wrap and no-wrap inlines we don't want a trailing space at the end of a no-wrap inline
2665         to be the difference between that no-wrap inline fitting or breaking the line. This latter
2666         scenario is covered already by inline-whitespace-wrapping-8.html.
2667
2668         Test: fast/text/whitespace/inline-whitespace-wrapping-9.html
2669
2670         * rendering/RenderBlockLineLayout.cpp:
2671         (WebCore::LineWidth::fitsOnLine):
2672         (WebCore::LineWidth::fitsOnLineIncludingExtraWidth):
2673         (WebCore::LineWidth::fitsOnLineExcludingTrailingWhitespace):
2674         (WebCore::LineWidth::currentWidth):
2675         (WebCore::LineWidth::fitsOnLineExcludingTrailingCollapsedWhitespace):
2676         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2677
2678 2013-06-21  Alex Christensen  <achristensen@apple.com>
2679
2680         Added WebGL source files to Windows build and made Windows build successfully with them.
2681         https://bugs.webkit.org/show_bug.cgi?id=117853
2682
2683         Reviewed by Brent Fulgham.
2684
2685         * WebCore.vcxproj/WebCore.vcxproj: Added WebGL source files.
2686         * WebCore.vcxproj/WebCore.vcxproj.filters: Added platform\graphics\opengl and platform\graphics\gpu filters.
2687         * WebCore.vcxproj/WebCorePreBuild.cmd: Copy ANGLE headers and glext.h before building WebCore (which now uses them).
2688         * platform/graphics/ANGLEWebKitBridge.h: Look in newly copied directory for ShaderLang.h.
2689         * platform/graphics/OpenGLShims.h: Include GL/glext.h.
2690         * platform/graphics/gpu/LoopBlinnShader.cpp: 
2691         (WebCore::LoopBlinnShader::use): Fixed parameter ordering in call to uniformMatrix4fv.
2692         * platform/graphics/opengl/GLPlatformSurface.cpp:
2693         (WebCore::GLPlatformSurface::createOffScreenSurface): Added notImplemented for non-EGL builds for now.
2694
2695 2013-06-21  Eric Carlson  <eric.carlson@apple.com>
2696
2697         Update platform text track menu
2698         https://bugs.webkit.org/show_bug.cgi?id=117884
2699
2700         Reviewed by Jer Noble.
2701
2702         * html/HTMLMediaElement.cpp:
2703         (WebCore::HTMLMediaElement::setSelectedTextTrack):
2704         * html/track/TextTrack.cpp:
2705         (WebCore::TextTrack::platformTextTrack):
2706         * platform/graphics/PlatformTextTrack.h:
2707         (WebCore::PlatformTextTrack::create): 
2708         (WebCore::PlatformTextTrack::uniqueId):
2709         (WebCore::PlatformTextTrack::captionMenuOffItem):
2710         (WebCore::PlatformTextTrack::captionMenuAutomaticItem):
2711         (WebCore::PlatformTextTrack::PlatformTextTrack):
2712
2713 2013-06-21  James Craig  <james@cookiecrook.com>
2714
2715         AX: audio/video playback control timers (elapsed and remaining) should be exposed as ApplicationTimerRole
2716         https://bugs.webkit.org/show_bug.cgi?id=117883
2717
2718         Reviewed by Chris Fleizach.
2719
2720         Some of the media controls were returning the wrong role. Updated existing test coverage.
2721
2722         * accessibility/AccessibilityMediaControls.h:
2723         (WebCore::AccessibilityMediaTimeDisplay::roleValue):
2724
2725 2013-06-21  Alex Christensen  <achristensen@apple.com>
2726
2727         Added glext.h from http://www.opengl.org/registry/oldspecs/glext.h for Windows
2728         This file does not meet WebKit style guidelines.
2729         Part of https://bugs.webkit.org/show_bug.cgi?id=117853
2730         
2731         Reviewed by Brent Fulgham.
2732
2733         * platform/graphics/win/GL: Added.
2734         * platform/graphics/win/GL/glext.h: Added.
2735
2736 2013-06-21  Ruth Fong  <ruth_fong@apple.com>
2737
2738         Fix TextTrackCue::cueIndex() to handle the null case of TextTrack::cues(() properly
2739         https://bugs.webkit.org/show_bug.cgi?id=117815
2740         <rdar://problem/14211041> 
2741
2742         Reviewed by Ryosuke Niwa.
2743
2744         This patch adds assert statements to try to catch when 
2745         track()->cues() returns a null pointer.
2746
2747         * html/track/TextTrackCue.cpp:
2748         (WebCore::TextTrackCue::cueIndex):
2749
2750 2013-06-21  Jer Noble  <jer.noble@apple.com>
2751
2752         [iOS] Hang drawing captions after pressing the home button while playing a video
2753         https://bugs.webkit.org/show_bug.cgi?id=117882
2754
2755         Reviewed by Eric Carlson.
2756
2757         Instead of rendering in a callback on the main thread, pre-render the captions and pass to the main
2758         thread as a CGImage. As such, rename paintTextTrackRepresentation() to createTextTrackRepresentationImage().
2759
2760         * html/shadow/MediaControlElements.cpp:
2761         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage): Renamed from
2762             paintTextTrackRepresentation. Now returns an Image object.
2763         * html/shadow/MediaControlElements.h:
2764         * platform/graphics/MediaPlayer.h:
2765         * platform/graphics/TextTrackRepresentation.h:
2766
2767 2013-06-21  Radu Stavila  <stavila@adobe.com>
2768
2769         [CSS Regions] Move overset compute code from flow thread to named flow thread
2770         https://bugs.webkit.org/show_bug.cgi?id=117835
2771
2772         Reviewed by Andreas Kling.
2773
2774         Moved computeOversetStateForRegions() and overset() methods from RenderFlowThread to RenderNamedFlowThread. 
2775         Added ASSERTS in RenderRegion::regionOversetState and RenderRegion::setRegionOversetState to ensure
2776         the region was created from an element.
2777
2778         * rendering/RenderBlock.cpp:
2779         (WebCore::RenderBlock::computeOverflow):
2780         * rendering/RenderFlowThread.cpp:
2781         (WebCore::RenderFlowThread::RenderFlowThread):
2782         * rendering/RenderFlowThread.h:
2783         * rendering/RenderNamedFlowThread.cpp:
2784         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
2785         (WebCore::RenderNamedFlowThread::computeOversetStateForRegions):
2786         * rendering/RenderNamedFlowThread.h:
2787         (WebCore::RenderNamedFlowThread::overset):
2788         * rendering/RenderRegion.cpp:
2789         (WebCore::RenderRegion::regionOversetState):
2790         (WebCore::RenderRegion::setRegionOversetState):
2791
2792 2013-06-21  Commit Queue  <commit-queue@webkit.org>
2793
2794         Unreviewed, rolling out r151838.
2795         http://trac.webkit.org/changeset/151838
2796         https://bugs.webkit.org/show_bug.cgi?id=117880
2797
2798         Breaks MediaPlayerPrivateQt on Mac (Requested by carewolf on
2799         #webkit).
2800
2801         * html/HTMLMediaElement.h:
2802
2803 2013-06-20  Brent Fulgham  <bfulgham@apple.com>
2804
2805         [Windows] AX: Radio buttons with "tab" role should describe themselves as tabs
2806         https://bugs.webkit.org/show_bug.cgi?id=117837
2807
2808         Reviewed by Chris Fleizach.
2809
2810         accessibility/aria-tab-role-on-buttons.html
2811
2812         * accessibility/AccessibilityNodeObject.cpp:
2813         (WebCore::AccessibilityNodeObject::canSetSelectedAttribute): Indicate that certain accessibility
2814         types (such as Tabs) can be selected.
2815         * accessibility/AccessibilityNodeObject.h: Signature for canSelectAttribute override.
2816
2817 2013-06-21  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2818
2819         Remove unused GesturePinch events
2820         https://bugs.webkit.org/show_bug.cgi?id=117875
2821
2822         Reviewed by Andreas Kling.
2823
2824         The gesturePinch events have not been used for some time, even Chromium
2825         had stop using them before moving out of webkit.
2826
2827         * dom/GestureEvent.cpp:
2828         (WebCore::GestureEvent::create):
2829         * page/EventHandler.cpp:
2830         (WebCore::EventHandler::handleGestureEvent):
2831         * platform/PlatformEvent.h:
2832
2833 2013-06-21  Radu Stavila  <stavila@adobe.com>
2834
2835         Improve the reattaching process while applying the :hover style
2836         https://bugs.webkit.org/show_bug.cgi?id=117590
2837
2838         Reviewed by Andreas Kling.
2839
2840         Changes made:
2841             - context is properly propagated to the element's children and to Shadow DOM elements.
2842             - context is properly set on the lazyReattach method.
2843             - another hit-testing is triggered when needed.
2844             - when a hovered element is detached, it's ancestors are also removed from the hovered state.
2845
2846         Tests: fast/css/hover-display-block-inline.html
2847                fast/css/hover-display-block-none.html
2848
2849         * dom/ContainerNode.cpp:
2850         (WebCore::ContainerNode::attach):
2851         (WebCore::ContainerNode::detach):
2852         * dom/ContainerNode.h:
2853         (WebCore::ContainerNode::attachChildren):
2854         (WebCore::ContainerNode::detachChildrenIfNeeded):
2855         (WebCore::ContainerNode::detachChildren):
2856         * dom/Document.cpp:
2857         (WebCore::Document::recalcStyle):
2858         (WebCore::Document::updateHoverActiveState):
2859         * dom/Element.cpp:
2860         (WebCore::Element::attach):
2861         (WebCore::Element::detach):
2862         * dom/ElementShadow.cpp:
2863         (WebCore::ElementShadow::attach):
2864         (WebCore::ElementShadow::detach):
2865         * dom/ElementShadow.h:
2866         * dom/Node.h:
2867         (WebCore::Node::lazyReattach):
2868
2869 2013-06-21  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2870
2871         HTMLMediaElement should inherit from MediaPlayerClient privately
2872         https://bugs.webkit.org/show_bug.cgi?id=117874
2873
2874         Reviewed by Andreas Kling.
2875
2876         Fixing FIXME: HTMLMediaElement was stuck with public inheritance from
2877         MediaPlayerClient due to the Chromium port.
2878         This can now be fixed to a private inheritance.
2879
2880         * html/HTMLMediaElement.h:
2881
2882 2013-06-21  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2883
2884         Remove Chromium-only TouchDisambiguation
2885         https://bugs.webkit.org/show_bug.cgi?id=117873
2886
2887         Reviewed by Andreas Kling.
2888
2889         * page/TouchDisambiguation.cpp: Removed.
2890         * page/TouchDisambiguation.h: Removed.
2891
2892 2013-06-21  Zalan Bujtas  <zalan@apple.com>
2893
2894         Rollout r150602: Restoring text-overflow vs. floating rendering behaviour.
2895         https://bugs.webkit.org/show_bug.cgi?id=117871
2896
2897         Unreviewed. Rolling out r150602.
2898         Undesirable rendering behaviour.
2899
2900         * rendering/RenderBlockLineLayout.cpp:
2901         (WebCore::RenderBlock::checkLinesForTextOverflow):
2902
2903 2013-06-21  Radu Stavila  <stavila@adobe.com>
2904
2905         Web Inspector: Integrate new regionOversetChange event into inspector
2906         https://bugs.webkit.org/show_bug.cgi?id=117833
2907
2908         Added the new regionOversetChange event to the WebInspector.
2909
2910         Reviewed by Joseph Pecoraro.
2911
2912         Tests:  inspector/styles/protocol-css-regions-commands.html:
2913
2914         * inspector/Inspector.json:
2915         * inspector/InspectorCSSAgent.cpp:
2916         (WebCore::ChangeRegionOversetTask::ChangeRegionOversetTask):
2917         (WebCore::ChangeRegionOversetTask::scheduleFor):
2918         (WebCore::ChangeRegionOversetTask::unschedule):
2919         (WebCore::ChangeRegionOversetTask::reset):
2920         (WebCore::ChangeRegionOversetTask::onTimer):
2921         (WebCore::InspectorCSSAgent::resetNonPersistentData):
2922         (WebCore::InspectorCSSAgent::willRemoveNamedFlow):
2923         (WebCore::InspectorCSSAgent::didChangeRegionOverset):
2924         (WebCore::InspectorCSSAgent::regionOversetChanged):
2925         * inspector/InspectorCSSAgent.h:
2926         * inspector/InspectorInstrumentation.cpp:
2927         (WebCore::InspectorInstrumentation::didChangeRegionOversetImpl):
2928         * inspector/InspectorInstrumentation.h:
2929         (WebCore::InspectorInstrumentation::didChangeRegionOverset):
2930         * inspector/front-end/CSSNamedFlowCollectionsView.js:
2931         (WebInspector.CSSNamedFlowCollectionsView.prototype._regionOversetChanged):
2932         (WebInspector.CSSNamedFlowCollectionsView.prototype.wasShown):
2933         (WebInspector.CSSNamedFlowCollectionsView.prototype.willHide):
2934         * inspector/front-end/CSSStyleModel.js:
2935         (WebInspector.CSSStyleModel.prototype._regionOversetChanged):
2936         (WebInspector.CSSDispatcher.prototype.regionLayoutUpdated):
2937         (WebInspector.CSSDispatcher.prototype.regionOversetChanged):
2938         * rendering/RenderNamedFlowThread.cpp:
2939         (WebCore::RenderNamedFlowThread::dispatchRegionOversetChangeEvent):
2940
2941 2013-06-21  Sergio Correia  <sergio.correia@openbossa.org>
2942
2943         [EFL] NetworkStateNotifierEfl: Use closeWithRetry instead of looping for EINTR on close
2944         https://bugs.webkit.org/show_bug.cgi?id=117872
2945
2946         Reviewed by Christophe Dumez.
2947
2948         closeWithRetry works around the Linux behavior of closing the file descriptor
2949         unconditionally even if the close() call is interrupted.
2950
2951         No new tests, no behavior change.
2952
2953         * platform/network/efl/NetworkStateNotifierEfl.cpp:
2954         (WebCore::NetworkStateNotifier::~NetworkStateNotifier): Use closeWithRetry instead of
2955         looping for EINTR on close.
2956
2957 2013-06-21  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2958
2959         REGRESSION (r150663): Using webkitAudioContext in Inspector makes it undefined everywhere
2960         https://bugs.webkit.org/show_bug.cgi?id=117825
2961
2962         Reviewed by Kentaro Hara.
2963
2964         Partially revert r150663 so that we use Settings to enable WebAudio instead of
2965         RuntimeEnabledFeatures.
2966
2967         Introduce a new [EnabledBySetting] IDL extended attribute which behaves similarly to
2968         the existing [EnabledAtRuntime] but relies on Settings instead of RuntimeEnabledFeatures
2969         to determine if the feature should be enabled. Make use of this new IDL attribute for
2970         webkitAudioContext interface.
2971
2972         No new tests, no behavior change.
2973
2974         * Modules/webaudio/AudioContext.idl:
2975         * WebCore.exp.in:
2976         * WebCore.order:
2977         * bindings/generic/RuntimeEnabledFeatures.cpp:
2978         * bindings/generic/RuntimeEnabledFeatures.h:
2979         * bindings/scripts/CodeGeneratorJS.pm:
2980         (GenerateImplementation):
2981         * bindings/scripts/IDLAttributes.txt:
2982         * bindings/scripts/preprocess-idls.pl:
2983         (GenerateConstructorAttribute):
2984         * bindings/scripts/test/JS/JSTestObj.cpp:
2985         (WebCore::jsTestObjTestSubObjEnabledBySettingConstructor):
2986         (WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor):
2987         * bindings/scripts/test/JS/JSTestObj.h:
2988         * bindings/scripts/test/ObjC/DOMTestObj.h:
2989         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2990         (-[DOMTestObj TestSubObjEnabledBySetting]):
2991         (-[DOMTestObj setTestSubObjEnabledBySetting:]):
2992         * bindings/scripts/test/TestObj.idl:
2993         * page/Settings.in:
2994
2995 2013-06-21  Krzysztof Czech  <k.czech@samsung.com>
2996
2997         [ATK] Added support for aria-required attribute.
2998         https://bugs.webkit.org/show_bug.cgi?id=117730
2999
3000         Reviewed by Chris Fleizach.
3001
3002         Tests: accessibility/aria-required.html
3003                accessibility/html5-required-attribute.html
3004
3005         The aria-required attribute is used to indicate that user input is required on an
3006         element before a form can be submitted.
3007
3008         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3009         (setAtkStateSetFromCoreObject):
3010
3011 2013-06-21  Chris Fleizach  <cfleizach@apple.com>
3012
3013         IndieUI: Add basic IndieUI infrastructure
3014         https://bugs.webkit.org/show_bug.cgi?id=117367
3015
3016         Unreviewed. Revert erroneous file that was included accidentally.
3017
3018         * accessibility/AccessibilityNodeObject.h:
3019
3020 2013-06-21  Chris Fleizach  <cfleizach@apple.com>
3021
3022         IndieUI: Add basic IndieUI infrastructure
3023         https://bugs.webkit.org/show_bug.cgi?id=117367
3024
3025         Reviewed by Ryosuke Niwa.
3026
3027         IndieUI is a new W3C spec that aims to abstract the connection between input and action, so that
3028         a user (possibly using assistive technologies like a screen reader) does not need a specific kind
3029         of device (like a mouse) to interact with an object.
3030         http://www.w3.org/WAI/IndieUI/
3031
3032         This initial patch adds in the basic support for UIRequestEvent and the uiactions attribute.
3033         It modifies the config files to enable and build this feature.
3034
3035         Tests: indieui/create-uirequestevent.html
3036                indieui/uiactions.html
3037
3038         * CMakeLists.txt:
3039         * Configurations/FeatureDefines.xcconfig:
3040         * DerivedSources.make:
3041         * GNUmakefile.am:
3042         * Modules/indieui: Added.
3043         * Modules/indieui/UIRequestEvent.cpp: Added.
3044         (WebCore::UIRequestEventInit::UIRequestEventInit):
3045         (WebCore::UIRequestEvent::create):
3046         (WebCore::UIRequestEvent::UIRequestEvent):
3047         (WebCore::UIRequestEvent::~UIRequestEvent):
3048         (WebCore::UIRequestEvent::interfaceName):
3049         (WebCore::UIRequestEventDispatchMediator::UIRequestEventDispatchMediator):
3050         (WebCore::UIRequestEventDispatchMediator::event):
3051         (WebCore::UIRequestEventDispatchMediator::dispatchEvent):
3052         * Modules/indieui/UIRequestEvent.h: Added.
3053         (WebCore::UIRequestEvent::receiver):
3054         (WebCore::UIRequestEventDispatchMediator::create):
3055         * Modules/indieui/UIRequestEvent.idl: Added.
3056         * WebCore.xcodeproj/project.pbxproj:
3057         * accessibility/AccessibilityNodeObject.h:
3058         * dom/Element.cpp:
3059         (WebCore::Element::setUIActions):
3060         (WebCore::Element::UIActions):
3061         * dom/Element.h:
3062         * dom/Element.idl:
3063         * dom/Event.cpp:
3064         (WebCore::EventInit::EventInit):
3065         * dom/Event.h:
3066         * dom/EventNames.in:
3067         * dom/Node.cpp:
3068         (WebCore::Node::dispatchUIRequestEvent):
3069         * dom/Node.h:
3070         * dom/UIEvent.cpp:
3071         (WebCore::UIEventInit::UIEventInit):
3072         * dom/UIEvent.h:
3073         * html/HTMLAttributeNames.in:
3074
3075 2013-06-20  Ryosuke Niwa  <rniwa@webkit.org>
3076
3077         REGRESSION(r145788): mouse drag on canvas shouldn't start selection
3078         https://bugs.webkit.org/show_bug.cgi?id=117860
3079
3080         Reviewed by Benjamin Poulain.
3081
3082         Like HTMLImageElement, HTMLCanvasElement shouldn't start selection.
3083
3084         Also uninline some virtual function overrides.
3085
3086         Test: fast/events/mosuedrag-on-canvas-should-not-start-selection.html
3087
3088         * html/HTMLCanvasElement.cpp:
3089         (WebCore::HTMLCanvasElement::areAuthorShadowsAllowed):
3090         (WebCore::HTMLCanvasElement::canContainRangeEndPoint):
3091         (WebCore::HTMLCanvasElement::canStartSelection):
3092         * html/HTMLCanvasElement.h:
3093
3094 2013-06-20  Ryosuke Niwa  <rniwa@webkit.org>
3095
3096         REGRESSION(r149652): accessing items in .children via id doesn't work when element is not rooted in DOM tree
3097         https://bugs.webkit.org/show_bug.cgi?id=117836
3098
3099         Reviewed by Benjamin Poulain.
3100
3101         When the root node of a HTML collection is not in the document or in a shadow tree,
3102         we shouldn't use its tree scope's id and name maps to find name getters.
3103
3104         Always use the slow path in such cases.
3105
3106         Test: fast/dom/htmlallcollection-detached-node-children.html
3107
3108         * html/HTMLCollection.cpp:
3109         (WebCore::HTMLCollection::namedItem):
3110
3111 2013-06-20  Alexey Proskuryakov  <ap@apple.com>
3112
3113         https://bugs.webkit.org/show_bug.cgi?id=116495
3114         Fix null-pointer deref in DocumentLoader::responseReceived()
3115
3116         Patch by Nate Chapin, reviewed by Mike West and myself.
3117
3118         Test: http/tests/security/XFrameOptions/x-frame-options-deny-delete-frame-in-load-event.html
3119
3120         * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::responseReceived): Added
3121         a null check.
3122
3123 2013-06-20  Roger Fong  <roger_fong@apple.com>
3124
3125         Unreviewed. Roll out part of r150618.
3126
3127         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3128
3129 2013-06-20  Enrica Casucci  <enrica@apple.com>
3130
3131         Initial advance on the first glyph of the run is not correctly set for rtl text.
3132         https://bugs.webkit.org/show_bug.cgi?id=117839
3133         <rdar://problem/13860717>
3134
3135         Reviewed by Sam Weinig.
3136
3137         We need to set the initial advance to the glyphBuffer, using the
3138         initial advance of the complex run that will be drawn first.
3139         In order to choose the run correctly we must consider the text direction.
3140
3141         Test: fast/text/complex-first-glyph-with-initial-advance.html
3142
3143         * platform/graphics/mac/ComplexTextController.cpp:
3144         (WebCore::ComplexTextController::advance):
3145
3146 2013-06-20  Alex Christensen  <achristensen@apple.com>
3147
3148         Fixed WebGL compile errors on Windows.
3149         https://bugs.webkit.org/show_bug.cgi?id=117805
3150
3151         Reviewed by Brent Fulgham.
3152
3153         * html/canvas/WebGLRenderingContext.cpp: Included CString.h.
3154         Added PLATFORM(WIN) to existing lists of platform macros.
3155         * platform/graphics/ANGLEWebKitBridge.h:
3156         * platform/graphics/GraphicsContext3D.h:
3157         (WebCore::GraphicsContext3D::ShaderSourceEntry::symbolMap):
3158         * platform/graphics/OpenGLESShims.h:
3159
3160 2013-06-20  Simon Fraser  <simon.fraser@apple.com>
3161
3162         FrameView needs to initialize paintsEntireContents on creation
3163         https://bugs.webkit.org/show_bug.cgi?id=117844
3164
3165         Reviewed by Anders Carlsson.
3166
3167         In WebKit1, if the WebView is layer-backed, WebHTMLView gets a layer.
3168         In this mode, FrameView::paintsEntireContents() is true. However,
3169         we would only call setPaintsEntireContents(true) on the FrameView
3170         when the view's layer-backed status changes. FrameView also needs
3171         to fetch this state when it is initialized, because we may be creating
3172         a new FrameView for an already layer-backed WebHTMLView.
3173
3174         * page/ChromeClient.h:
3175         (WebCore::ChromeClient::shouldPaintEntireContents):
3176         * page/FrameView.cpp:
3177         (WebCore::FrameView::init):
3178
3179 2013-06-20  Simon Fraser  <simon.fraser@apple.com>
3180
3181         Sticky elements are missing or misplaced sometimes when reloading a page that scrolls to a named anchor
3182         https://bugs.webkit.org/show_bug.cgi?id=117819
3183
3184         Reviewed by Anders Carlsson.
3185         
3186         At the end of FrameView::performPostLayoutTasks() we call scrollToAnchor() which attempts
3187         to restore the scroll position to a named anchor, even when the document has been
3188         changed by layout. This ends up in a call to ScrollView::scrollTo(), which in turn
3189         calls repaintFixedElementsAfterScrolling(). However, repaintFixedElementsAfterScrolling()
3190         would bail if m_nestedLayoutCount != 0, so we never updated layer positions which
3191         depend on scroll position (but which would not be updated by layout, since their
3192         renderers are not marked for layout when scrolling happens).
3193         
3194         We've solved this problem once before in updateFixedElementsAfterScrolling() which
3195         checks for m_nestedLayoutCount <= 1, so that we do work on the outermost nested layout.
3196         Apply that same fix to repaintFixedElementsAfterScrolling().
3197
3198         Very timing-dependent, so hard to make a test.
3199
3200         * page/FrameView.cpp:
3201         (WebCore::FrameView::repaintFixedElementsAfterScrolling):
3202
3203 2013-06-20  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
3204
3205         HashSet: reverse the order of the template arguments at alternate 'find', 'contains' and 'add' methods
3206         https://bugs.webkit.org/show_bug.cgi?id=117830
3207
3208         Reviewed by Anders Carlsson.
3209
3210         The order of the template arguments at HashSet alternate 'find', 'contains' and
3211         'add' methods is reversed so that callers can just pass the translator
3212         and let the compiler deduce input argument type.
3213
3214         No new tests. No new functionality.
3215
3216         * dom/QualifiedName.cpp:
3217         (WebCore::QualifiedName::QualifiedName):
3218         * platform/graphics/cg/SubimageCacheWithTimer.cpp:
3219         (WebCore::SubimageCacheWithTimer::getSubimage):
3220         * svg/SVGAElement.cpp:
3221         (WebCore::SVGAElement::isSupportedAttribute):
3222         * svg/SVGAnimateMotionElement.cpp:
3223         (WebCore::SVGAnimateMotionElement::isSupportedAttribute):
3224         * svg/SVGAnimateTransformElement.cpp:
3225         (WebCore::SVGAnimateTransformElement::isSupportedAttribute):
3226         * svg/SVGAnimationElement.cpp:
3227         (WebCore::SVGAnimationElement::isSupportedAttribute):
3228         * svg/SVGCircleElement.cpp:
3229         (WebCore::SVGCircleElement::isSupportedAttribute):
3230         * svg/SVGClipPathElement.cpp:
3231         (WebCore::SVGClipPathElement::isSupportedAttribute):
3232         * svg/SVGComponentTransferFunctionElement.cpp:
3233         (WebCore::SVGComponentTransferFunctionElement::isSupportedAttribute):
3234         * svg/SVGCursorElement.cpp:
3235         (WebCore::SVGCursorElement::isSupportedAttribute):
3236         * svg/SVGEllipseElement.cpp:
3237         (WebCore::SVGEllipseElement::isSupportedAttribute):
3238         * svg/SVGFEBlendElement.cpp:
3239         (WebCore::SVGFEBlendElement::isSupportedAttribute):
3240         * svg/SVGFEColorMatrixElement.cpp:
3241         (WebCore::SVGFEColorMatrixElement::isSupportedAttribute):
3242         * svg/SVGFEComponentTransferElement.cpp:
3243         (WebCore::SVGFEComponentTransferElement::isSupportedAttribute):
3244         * svg/SVGFECompositeElement.cpp:
3245         (WebCore::SVGFECompositeElement::isSupportedAttribute):
3246         * svg/SVGFEConvolveMatrixElement.cpp:
3247         (WebCore::SVGFEConvolveMatrixElement::isSupportedAttribute):
3248         * svg/SVGFEDiffuseLightingElement.cpp:
3249         (WebCore::SVGFEDiffuseLightingElement::isSupportedAttribute):
3250         * svg/SVGFEDisplacementMapElement.cpp:
3251         (WebCore::SVGFEDisplacementMapElement::isSupportedAttribute):
3252         * svg/SVGFEDropShadowElement.cpp:
3253         (WebCore::SVGFEDropShadowElement::isSupportedAttribute):
3254         * svg/SVGFEGaussianBlurElement.cpp:
3255         (WebCore::SVGFEGaussianBlurElement::isSupportedAttribute):
3256         * svg/SVGFEImageElement.cpp:
3257         (WebCore::SVGFEImageElement::isSupportedAttribute):
3258         * svg/SVGFELightElement.cpp:
3259         (WebCore::SVGFELightElement::isSupportedAttribute):
3260         * svg/SVGFEMergeNodeElement.cpp:
3261         (WebCore::SVGFEMergeNodeElement::isSupportedAttribute):
3262         * svg/SVGFEMorphologyElement.cpp:
3263         (WebCore::SVGFEMorphologyElement::isSupportedAttribute):
3264         * svg/SVGFEOffsetElement.cpp:
3265         (WebCore::SVGFEOffsetElement::isSupportedAttribute):
3266         * svg/SVGFESpecularLightingElement.cpp:
3267         (WebCore::SVGFESpecularLightingElement::isSupportedAttribute):
3268         * svg/SVGFETileElement.cpp:
3269         (WebCore::SVGFETileElement::isSupportedAttribute):
3270         * svg/SVGFETurbulenceElement.cpp:
3271         (WebCore::SVGFETurbulenceElement::isSupportedAttribute):
3272         * svg/SVGFilterElement.cpp:
3273         (WebCore::SVGFilterElement::isSupportedAttribute):
3274         (WebCore::SVGFilterElement::childShouldCreateRenderer):
3275         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
3276         (WebCore::SVGFilterPrimitiveStandardAttributes::isSupportedAttribute):
3277         * svg/SVGForeignObjectElement.cpp:
3278         (WebCore::SVGForeignObjectElement::isSupportedAttribute):
3279         * svg/SVGGElement.cpp:
3280         (WebCore::SVGGElement::isSupportedAttribute):
3281         * svg/SVGGradientElement.cpp:
3282         (WebCore::SVGGradientElement::isSupportedAttribute):
3283         * svg/SVGImageElement.cpp:
3284         (WebCore::SVGImageElement::isSupportedAttribute):
3285         * svg/SVGLineElement.cpp:
3286         (WebCore::SVGLineElement::isSupportedAttribute):
3287         * svg/SVGLinearGradientElement.cpp:
3288         (WebCore::SVGLinearGradientElement::isSupportedAttribute):
3289         * svg/SVGMPathElement.cpp:
3290         (WebCore::SVGMPathElement::isSupportedAttribute):
3291         * svg/SVGMarkerElement.cpp:
3292         (WebCore::SVGMarkerElement::isSupportedAttribute):
3293         * svg/SVGMaskElement.cpp:
3294         (WebCore::SVGMaskElement::isSupportedAttribute):
3295         * svg/SVGPathElement.cpp:
3296         (WebCore::SVGPathElement::isSupportedAttribute):
3297         * svg/SVGPatternElement.cpp:
3298         (WebCore::SVGPatternElement::isSupportedAttribute):
3299         * svg/SVGPolyElement.cpp:
3300         (WebCore::SVGPolyElement::isSupportedAttribute):
3301         * svg/SVGRadialGradientElement.cpp:
3302         (WebCore::SVGRadialGradientElement::isSupportedAttribute):
3303         * svg/SVGRectElement.cpp:
3304         (WebCore::SVGRectElement::isSupportedAttribute):
3305         * svg/SVGScriptElement.cpp:
3306         (WebCore::SVGScriptElement::isSupportedAttribute):
3307         * svg/SVGStopElement.cpp:
3308         (WebCore::SVGStopElement::isSupportedAttribute):
3309         * svg/SVGStyleElement.cpp:
3310         (WebCore::SVGStyleElement::isSupportedAttribute):
3311         * svg/SVGStyledTransformableElement.cpp:
3312         (WebCore::SVGStyledTransformableElement::isSupportedAttribute):
3313         * svg/SVGSymbolElement.cpp:
3314         (WebCore::SVGSymbolElement::isSupportedAttribute):
3315         * svg/SVGTRefElement.cpp:
3316         (WebCore::SVGTRefElement::isSupportedAttribute):
3317         * svg/SVGTextContentElement.cpp:
3318         (WebCore::SVGTextContentElement::isSupportedAttribute):
3319         * svg/SVGTextElement.cpp:
3320         (WebCore::SVGTextElement::isSupportedAttribute):
3321         * svg/SVGTextPathElement.cpp:
3322         (WebCore::SVGTextPathElement::isSupportedAttribute):
3323         * svg/SVGTextPositioningElement.cpp:
3324         (WebCore::SVGTextPositioningElement::isSupportedAttribute):
3325         * svg/SVGUseElement.cpp:
3326         (WebCore::SVGUseElement::isSupportedAttribute):
3327         (WebCore::isDisallowedElement):
3328         * svg/SVGViewElement.cpp:
3329         (WebCore::SVGViewElement::isSupportedAttribute):
3330         * svg/animation/SVGSMILElement.cpp:
3331         (WebCore::SVGSMILElement::isSupportedAttribute):
3332
3333 2013-06-20  Commit Queue  <commit-queue@webkit.org>
3334
3335         Unreviewed, rolling out r151451.
3336         http://trac.webkit.org/changeset/151451
3337         https://bugs.webkit.org/show_bug.cgi?id=117848
3338
3339         "Broke quite a lot of sites" (Requested by rhogan on #webkit).
3340
3341         * rendering/RenderBox.cpp:
3342         (WebCore::RenderBox::computePositionedLogicalWidth):
3343         (WebCore::RenderBox::computePositionedLogicalHeight):
3344         * rendering/RenderBox.h:
3345         (WebCore::RenderBox::intrinsicSize):
3346         * rendering/RenderButton.h:
3347         * rendering/RenderListBox.cpp:
3348         (WebCore::RenderListBox::RenderListBox):
3349         (WebCore::RenderListBox::computeLogicalHeight):
3350         * rendering/RenderListBox.h:
3351         * rendering/RenderMenuList.h:
3352         * rendering/RenderReplaced.h:
3353         * rendering/RenderTextControl.cpp:
3354         (WebCore::RenderTextControl::RenderTextControl):
3355         (WebCore::RenderTextControl::computeLogicalHeight):
3356         * rendering/RenderTextControl.h:
3357
3358 2013-06-20  Commit Queue  <commit-queue@webkit.org>
3359
3360         Unreviewed, rolling out r151788.
3361         http://trac.webkit.org/changeset/151788
3362         https://bugs.webkit.org/show_bug.cgi?id=117847
3363
3364         "This is the wrong fix" (Requested by rhogan on #webkit).
3365
3366         * rendering/RenderTextControl.cpp:
3367         (WebCore::RenderTextControl::computeLogicalHeight):
3368         (WebCore::RenderTextControl::computePreferredLogicalWidths):
3369
3370 2013-05-24  Balazs Kelemen  <kbalazs@webkit.org>
3371
3372         [Gstreamer] cleanup buffering and state updates
3373         https://bugs.webkit.org/show_bug.cgi?id=116642
3374
3375         Reviewed by Philippe Normand.
3376
3377         Covered by existing media tests, especially the ones that have been unskipped.
3378
3379         Always do download buffering. It should not differ if preload is "none" because
3380         it's about when to start buffering, not about how. Fix a bunch other subtle issues
3381         to make this change go smoothly with the tests. As a bonus some tests that were
3382         failing so far started to pass.
3383         It is possible to further tweak the buffering in a way that will enable us to support
3384         a different and appropriate behavior for preload="metadata" but it should be managed
3385         a bit differently. I will implement it in a follow-up.
3386
3387         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3388         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
3389         (WebCore::MediaPlayerPrivateGStreamer::load): Don't call setDownloadBuffering
3390         yet. Now it also responsible for starting the fill timer and it turned out that
3391         setting the download flag before the pipeline is set to a state has negative
3392         effect on some tests. Most probably GStreamer starts buffering too early if
3393         we set the download flag.
3394         (WebCore::MediaPlayerPrivateGStreamer::commitLoad): Call setDownloadBuffering now.
3395         (WebCore::MediaPlayerPrivateGStreamer::play): Ditto, plus set m_delayingLoad to false
3396         because otherwise setPreload will wrongly assume that the load has not been committed
3397         yet if prepareToPlay is not called before play.
3398         (WebCore::MediaPlayerPrivateGStreamer::pause): Make sure we don't commit a load here
3399         if it was not committed yet by looking in the pipeline state.
3400         (WebCore::MediaPlayerPrivateGStreamer::processBufferingStats): No need to observe the
3401         type of buffering.
3402         (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired): Introduced m_downloadFinished to update
3403         ready and network states in updateStates based on it. The previously used condition
3404         - (maxTimeLoaded() == duration()) - was not correct in the case when duration is not known.
3405         (WebCore::MediaPlayerPrivateGStreamer::maxTimeLoaded): Removed a lie. If the fill timer is not active
3406         it does not necesarily means that download has been finished. This lie was actually ensuring
3407         a lot of tests to pass because it made the condition (maxTimeLoaded() == duration()) true.
3408         Now that state updates has been cleaned up we don't need to lie.
3409         (WebCore::MediaPlayerPrivateGStreamer::updateStates): Merge all the parts that takes part in updating
3410         ready and network states. It was untrackable. Unset download buffering for for live streams early so
3411         we don't need to restart them.
3412         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3413         (MediaPlayerPrivateGStreamer): Removed m_startedBuffering because there is no need for it now.
3414
3415 2013-06-20  Eric Carlson  <eric.carlson@apple.com>
3416
3417         ASSERT removing then adding a <track> element
3418         https://bugs.webkit.org/show_bug.cgi?id=117814
3419
3420         Reviewed by Jer Noble.
3421
3422         Test: media/track/add-and-remove-track.html
3423
3424         * html/HTMLTrackElement.cpp:
3425         (WebCore::HTMLTrackElement::insertedInto): Always call ensureTrack before adding the track
3426             to the parent <video> element.
3427         (WebCore::HTMLTrackElement::ensureTrack): Call m_track->setTrackElement() in case the
3428             parent was cleared after m_track was created.
3429
3430         * html/track/LoadableTextTrack.cpp:
3431         (WebCore::LoadableTextTrack::setTrackElement): New, set m_trackElement.
3432         * html/track/LoadableTextTrack.h:
3433
3434 2013-06-20  Roger Fong  <roger_fong@apple.com>
3435
3436         Unreviewed. Build fix for Apple Windows port.
3437
3438         * rendering/RenderThemeWin.cpp:
3439         (WebCore::cssValueIdToSysColorIndex):
3440
3441 2013-06-20  Alexey Proskuryakov  <ap@apple.com>
3442
3443         [Mac] Downloaded file name encoding is incorrect when download link opens in a new window
3444         https://bugs.webkit.org/show_bug.cgi?id=117818
3445         <rdar://problem/14212635>
3446
3447         Reviewed by Brady Eidson.
3448
3449         No tests added. The machinery we have for logging downloaded file name is very
3450         far from being able to work in a secondary window.
3451
3452         * loader/FrameLoader.cpp: (WebCore::FrameLoader::addExtraFieldsToRequest):
3453         Made a targeted fix - don't update encoding fallback array if we already have one,
3454         there is no chance for it to be more correct. In this case, it's incorrect because
3455         it comes from a new blank window, instead of original referer.
3456         We have a lot of code in addExtraFieldsToRequest() to struggle with this, and we have
3457         a FIXME to try not calling it from policy delegate.
3458
3459 2013-06-18  Robert Hogan  <robert@webkit.org>
3460
3461         REGRESSION (r151451): Text not vertically centered correctly on icloud.com
3462         https://bugs.webkit.org/show_bug.cgi?id=117744
3463
3464         Reviewed by David Hyatt.
3465
3466         The positioned height and width computation adds in the element's border and padding&nb