el.getAttribute('type') returns 'null' when setting el.type to null
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-06-14  Edaena Salinas Jasso  <edaena@apple.com>
2
3         el.getAttribute('type') returns 'null' when setting el.type to null
4         https://bugs.webkit.org/show_bug.cgi?id=89030
5
6         Reviewed by Alexey Proskuryakov.
7
8         Test: fast/dom/HTMLButtonElement/change-type.html
9
10         * html/HTMLButtonElement.cpp:
11         (WebCore::HTMLButtonElement::setType): Changed parameter to be AtomicString to 
12         address an unrelated review comment from bug 14439 for slightly better performance.
13         * html/HTMLButtonElement.h:
14         (HTMLButtonElement): Changed parameter to be AtomicString to address an unrelated 
15         review comment from bug 14439 for slightly better performance.
16         * html/HTMLButtonElement.idl: Specified TreatNullAs NullString for the type attribute.
17
18 2012-06-14  Alec Flett  <alecflett@chromium.org>
19
20         IndexedDB: Creating a transaction from within a transaction callback should fail
21         https://bugs.webkit.org/show_bug.cgi?id=80547
22
23         Reviewed by Tony Chang.
24
25         Prevent creation of a transaction, via IDBDatabase.transaction()
26         or IDBDatabase.setVersion(), from inside a setVersion()
27         transaction, as per spec. Update many tests to deal with this.
28
29         Test restructuring uncovered some inconsistencies in transaction
30         mode handling. So also do some minor cleanup in the way the
31         transaction mode is passed between the frontend and backend
32         transaction objects, and add additional asserts.
33
34         * Modules/indexeddb/IDBCursor.cpp:
35         (WebCore::IDBCursor::update):
36         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
37         (WebCore::IDBCursorBackendImpl::update):
38         * Modules/indexeddb/IDBDatabase.cpp:
39         (WebCore::IDBDatabase::setVersion):
40         (WebCore::IDBDatabase::transaction):
41         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
42         (WebCore::IDBObjectStoreBackendImpl::putInternal):
43         * Modules/indexeddb/IDBRequest.cpp:
44         (WebCore::IDBRequest::onSuccess):
45         * Modules/indexeddb/IDBTransaction.cpp:
46         (WebCore::IDBTransaction::create):
47         (WebCore::IDBTransaction::IDBTransaction):
48         (WebCore::IDBTransaction::stringToMode):
49         (WebCore::IDBTransaction::modeToString):
50         * Modules/indexeddb/IDBTransaction.h:
51         (IDBTransaction):
52
53 2012-06-14  Li Yin  <li.yin@intel.com>
54
55         [WebSocket] WebSocket object in Worker Context should fire error event when it fails connection.
56         https://bugs.webkit.org/show_bug.cgi?id=88744
57
58         Reviewed by Kent Tamura.
59
60         Spec:http://dev.w3.org/html5/websockets/#feedback-from-the-protocol
61         The behavior of firing error event in Document has been implemented in Committed r117944.
62         WebSocket in WorkerContext is also required to fire error event.
63
64         Test: http/tests/websocket/tests/hybi/workers/close.html
65
66         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
67         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
68         (WebCore):
69         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageErrorCallback):
70         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
71         (ThreadableWebSocketChannelClientWrapper):
72         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
73         (WebCore::workerContextDidReceiveMessageError):
74         (WebCore):
75         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
76         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
77         (Peer):
78
79 2012-06-13  Kinuko Yasuda  <kinuko@chromium.org>
80
81         Unreviewed build fix attempt for r120285
82
83         * Modules/filesystem/DOMFileSystemBase.cpp:
84         (WebCore):
85
86 2012-06-13  MORITA Hajime <morrita@google.com>
87
88         Unreviewed expectation update.
89
90         * bindings/scripts/test/V8/V8Float64Array.cpp:
91         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
92         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
93         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
94         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
95         * bindings/scripts/test/V8/V8TestException.cpp:
96         * bindings/scripts/test/V8/V8TestInterface.cpp:
97         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
98         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
99         * bindings/scripts/test/V8/V8TestNode.cpp:
100         * bindings/scripts/test/V8/V8TestObj.cpp:
101         (WebCore::V8TestObj::installPerContextProperties):
102         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
103
104 2012-06-13  Kinuko Yasuda  <kinuko@chromium.org>
105
106         Move isolated file system code out of chromium-specific directory
107         https://bugs.webkit.org/show_bug.cgi?id=88997
108
109         Reviewed by Adam Barth.
110
111         The code does not need to be chromium-specific.  Any platforms that
112         have file system implementation and manage mappings from file system
113         id to a set of files should share the code.
114
115         No new tests as this has no functional/behavioral changes.
116
117         * Modules/filesystem/DOMFileSystem.cpp:
118         (WebCore::DOMFileSystem::createIsolatedFileSystem):
119         (WebCore):
120         * Modules/filesystem/DOMFileSystem.h:
121         (DOMFileSystem):
122         * Modules/filesystem/DOMFileSystemBase.h:
123         (DOMFileSystemBase):
124         * Modules/filesystem/FileSystemType.h:
125         * Modules/filesystem/chromium/DOMFileSystemChromium.cpp:
126         * Modules/filesystem/chromium/DOMFileSystemChromium.h: Removed.
127         * Modules/filesystem/chromium/DraggedIsolatedFileSystem.cpp:
128         (WebCore::DraggedIsolatedFileSystem::getDOMFileSystem):
129         * WebCore.gypi:
130
131 2012-06-07  Kinuko Yasuda  <kinuko@chromium.org>
132
133         File::lastModifiedDate should use NaN or separate boolean flag for null Date value
134         https://bugs.webkit.org/show_bug.cgi?id=87826
135
136         Reviewed by Kent Tamura.
137
138         Test: http/tests/local/fileapi/file-last-modified-after-delete.html
139
140         * fileapi/File.cpp:
141         (WebCore::File::File):
142         (WebCore::File::captureSnapshot):
143         (WebCore::File::lastModifiedDate):
144         (WebCore::File::lastModifiedDateForBinding): Removed.
145         * fileapi/File.h:
146         (File):
147         * fileapi/File.idl:
148         * platform/FileMetadata.h:
149         (WebCore::FileMetadata::FileMetadata):
150         * platform/FileSystem.h:
151         * platform/FileStream.cpp:
152         (WebCore::FileStream::getSize):
153         * platform/chromium/support/WebHTTPBody.cpp:
154         (WebKit::WebHTTPBody::elementAt):
155         * platform/network/BlobData.h:
156         (WebCore::BlobDataItem::doNotCheckFileChange): Removed.
157         * platform/network/BlobData.cpp:
158         * platform/network/cf/FormDataStreamCFNet.cpp:
159         (WebCore::advanceCurrentStream):
160         * platform/network/soup/ResourceHandleSoup.cpp:
161         (WebCore::blobIsOutOfDate):
162
163 2012-06-13  Eli Fidler  <efidler@rim.com>
164
165         Fix CMake build with SMOOTH_SCROLLING enabled
166         https://bugs.webkit.org/show_bug.cgi?id=89032
167
168         Reviewed by Antonio Gomes.
169
170         SMOOTH_SCROLLING pulls in ScrollAnimatorNone.cpp, which has
171         dependencies on platform/ActivePlatformGestureAnimation.cpp and
172         platform/TouchpadFlingPlatformGestureCurve.cpp
173
174         * CMakeLists.txt:
175
176 2012-06-13  Mihai Balan  <mibalan@adobe.com>
177
178         Touched CSSPropertyNames.in to trigger a proper rebuild
179
180         [CSS Regions] Adding feature defines for CSS Regions & exclusions for Windows
181         https://bugs.webkit.org/show_bug.cgi?id=88645
182
183         Reviewed by Sam Weinig.
184
185         Previous work on #87442 added feature defines to allow proper disabling of CSS Regions and
186         exclusions (previously even with the feature disabled, parsing still worked). However, the
187         feature defines were enabled on Mac only - they were broken on Windows. This
188         patch adds the feature defines to (re)enable regions and exclusions on Windows.
189
190         * css/CSSPropertyNames.in: Touched to trigger a proper rebuild. Incremental builds were broken on Windows.
191
192 2012-06-13  Arnaud Renevier  <arno@renevier.net>
193
194         make sure headers are included only once per file
195         https://bugs.webkit.org/show_bug.cgi?id=88931
196
197         Reviewed by Darin Adler.
198
199         * Modules/indexeddb/IDBDatabase.cpp:
200         * WebCorePrefix.h:
201         * bindings/js/JSHTMLAllCollectionCustom.cpp:
202         * bindings/v8/V8Utilities.cpp:
203         * bindings/v8/custom/V8LocationCustom.cpp:
204         * bridge/NP_jsobject.cpp:
205         * editing/Editor.cpp:
206         * html/HTMLMediaElement.cpp:
207         * platform/graphics/cairo/PlatformContextCairo.cpp:
208         * rendering/InlineFlowBox.cpp:
209
210 2012-06-13  MORITA Hajime  <morrita@google.com>
211
212         Unreviewed typo fix.
213
214         * platform/RefCountedSupplement.h:
215
216 2012-06-13  Sheriff Bot  <webkit.review.bot@gmail.com>
217
218         Unreviewed, rolling out r120268.
219         http://trac.webkit.org/changeset/120268
220         https://bugs.webkit.org/show_bug.cgi?id=89060
221
222         WebCompositor::setPerTilePaintingEnabled hits an assertion in
223         DEBUG (Requested by dominicc|work on #webkit).
224
225         * WebCore.gypi:
226         * page/Settings.cpp:
227         (WebCore::Settings::Settings):
228         * page/Settings.h:
229         (WebCore::Settings::setPerTileDrawingEnabled):
230         (WebCore::Settings::perTileDrawingEnabled):
231         (Settings):
232         (WebCore::Settings::setPartialSwapEnabled):
233         (WebCore::Settings::partialSwapEnabled):
234         (WebCore::Settings::setThreadedAnimationEnabled):
235         (WebCore::Settings::threadedAnimationEnabled):
236         * platform/graphics/chromium/ContentLayerChromium.cpp:
237         (WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded):
238         * platform/graphics/chromium/LayerChromium.cpp:
239         (WebCore::LayerChromium::addAnimation):
240         * platform/graphics/chromium/LayerRendererChromium.cpp:
241         (WebCore::LayerRendererChromium::initialize):
242         * platform/graphics/chromium/TiledLayerChromium.cpp:
243         (WebCore::TiledLayerChromium::updateTileSizeAndTilingOption):
244         * platform/graphics/chromium/cc/CCDebugRectHistory.cpp:
245         (WebCore::CCDebugRectHistory::enabled):
246         (WebCore::CCDebugRectHistory::saveDebugRectsForCurrentFrame):
247         * platform/graphics/chromium/cc/CCDebugRectHistory.h:
248         (WebCore):
249         (CCDebugRectHistory):
250         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
251         (WebCore::CCHeadsUpDisplay::enabled):
252         (WebCore::CCHeadsUpDisplay::showPlatformLayerTree):
253         (WebCore::CCHeadsUpDisplay::showDebugRects):
254         (WebCore::CCHeadsUpDisplay::draw):
255         (WebCore::CCHeadsUpDisplay::drawHudContents):
256         (WebCore::CCHeadsUpDisplay::drawDebugRects):
257         * platform/graphics/chromium/cc/CCHeadsUpDisplay.h:
258         (WebCore):
259         (CCHeadsUpDisplay):
260         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
261         (WebCore::CCLayerTreeHost::create):
262         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
263         (WebCore::CCLayerTreeHost::animateLayers):
264         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
265         (WebCore::CCSettings::CCSettings):
266         (CCSettings):
267         (CCLayerTreeHost):
268         (WebCore::CCLayerTreeHost::settings):
269         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
270         (WebCore::CCLayerTreeHostImpl::create):
271         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
272         (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList):
273         (WebCore::CCLayerTreeHostImpl::animateLayers):
274         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
275         (CCLayerTreeHostImpl):
276         * platform/graphics/chromium/cc/CCRenderer.h:
277         (CCRendererClient):
278         (WebCore::CCRenderer::settings):
279         * platform/graphics/chromium/cc/CCSettings.cpp: Removed.
280         * platform/graphics/chromium/cc/CCSettings.h: Removed.
281         * testing/InternalSettings.cpp:
282         (WebCore::InternalSettings::setPerTileDrawingEnabled):
283         (WebCore):
284         * testing/InternalSettings.h:
285         (InternalSettings):
286
287 2012-06-13  Ian Vollick  <vollick@chromium.org>
288
289         [chromium] Certain settings in CCSettings could be global
290         https://bugs.webkit.org/show_bug.cgi?id=88384
291
292         Reviewed by James Robinson.
293
294         No new tests. No new functionality.
295
296         * WebCore.gypi:
297         * page/Settings.cpp:
298         (WebCore::Settings::Settings):
299         * page/Settings.h:
300         (Settings):
301         * platform/graphics/chromium/ContentLayerChromium.cpp:
302         (WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded):
303         * platform/graphics/chromium/LayerChromium.cpp:
304         (WebCore::LayerChromium::addAnimation):
305         * platform/graphics/chromium/LayerRendererChromium.cpp:
306         (WebCore::LayerRendererChromium::initialize):
307         * platform/graphics/chromium/TiledLayerChromium.cpp:
308         (WebCore::TiledLayerChromium::updateTileSizeAndTilingOption):
309         * platform/graphics/chromium/cc/CCDebugRectHistory.cpp:
310         (WebCore::CCDebugRectHistory::enabled):
311         (WebCore::CCDebugRectHistory::saveDebugRectsForCurrentFrame):
312         * platform/graphics/chromium/cc/CCDebugRectHistory.h:
313         (WebCore):
314         (CCDebugRectHistory):
315         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
316         (WebCore::CCHeadsUpDisplay::enabled):
317         (WebCore::CCHeadsUpDisplay::showPlatformLayerTree):
318         (WebCore::CCHeadsUpDisplay::showDebugRects):
319         (WebCore::CCHeadsUpDisplay::draw):
320         (WebCore::CCHeadsUpDisplay::drawHudContents):
321         (WebCore::CCHeadsUpDisplay::drawDebugRects):
322         * platform/graphics/chromium/cc/CCHeadsUpDisplay.h:
323         (WebCore):
324         (CCHeadsUpDisplay):
325         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
326         (WebCore::CCLayerTreeHost::create):
327         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
328         (WebCore::CCLayerTreeHost::animateLayers):
329         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
330         (WebCore::CCLayerTreeSettings::CCLayerTreeSettings):
331         (CCLayerTreeSettings):
332         (CCLayerTreeHost):
333         (WebCore::CCLayerTreeHost::settings):
334         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
335         (WebCore::CCLayerTreeHostImpl::create):
336         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
337         (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList):
338         (WebCore::CCLayerTreeHostImpl::animateLayers):
339         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
340         (CCLayerTreeHostImpl):
341         * platform/graphics/chromium/cc/CCRenderer.h:
342         (CCRendererClient):
343         (WebCore::CCRenderer::settings):
344         * platform/graphics/chromium/cc/CCSettings.cpp: Added.
345         (WebCore):
346         (WebCore::CCSettings::perTilePaintingEnabled):
347         (WebCore::CCSettings::setPerTilePaintingEnabled):
348         (WebCore::CCSettings::partialSwapEnabled):
349         (WebCore::CCSettings::setPartialSwapEnabled):
350         (WebCore::CCSettings::acceleratedAnimationEnabled):
351         (WebCore::CCSettings::setAcceleratedAnimationEnabled):
352         (WebCore::CCSettings::reset):
353         * platform/graphics/chromium/cc/CCSettings.h: Added.
354         (WebCore):
355         (CCSettings):
356         * testing/InternalSettings.cpp:
357         * testing/InternalSettings.h:
358         (InternalSettings):
359
360 2012-06-13  Crystal Zhang  <haizhang@rim.com>
361
362         [BlackBerry] Apply New Style and JS for Select Popup
363         https://bugs.webkit.org/show_bug.cgi?id=89020
364
365         Reviewed by Rob Buis.
366
367         PR 162854
368
369         Use new python script for data generating, as the old one is too simple and problematic.
370
371         * PlatformBlackBerry.cmake:
372
373 2012-06-13  Dana Jansens  <danakj@chromium.org>
374
375         [chromium] Assert if iterating an invalid RenderSurfaceLayerList, where a layer in the list has no RenderSurface
376         https://bugs.webkit.org/show_bug.cgi?id=89004
377
378         Reviewed by Adrienne Walker.
379
380         A RenderSurfaceLayerList expects that all layers in the list own a
381         RenderSurface. If an invalid RSLL is iterated over, the
382         CCLayerIterator class will now ASSERT in debug mode, as well as
383         considering the list empty in release mode.
384
385         We will be adding code to CCLayerTreeHostImpl to save a RSLL across
386         frames, so adding a clearRenderSurfaces() method with a FIXME comment
387         to make it clear that we should clear the RSLL when we remove
388         RenderSurfaces from the layers in the saved RSLL.
389
390         * platform/graphics/chromium/cc/CCLayerIterator.h:
391         (WebCore::CCLayerIterator::CCLayerIterator):
392         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
393         (WebCore::CCLayerTreeHostImpl::~CCLayerTreeHostImpl):
394         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
395         (WebCore::clearRenderSurfacesOnCCLayerImplRecursive):
396         (WebCore::CCLayerTreeHostImpl::clearRenderSurfaces):
397         (WebCore):
398         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
399         (CCLayerTreeHostImpl):
400
401 2012-06-13  Yael Aharon  <yael.aharon@nokia.com>
402
403         Remove redundant code from RenderView and RenderBlock
404         https://bugs.webkit.org/show_bug.cgi?id=89019
405
406         Reviewed by Abhishek Arya.
407
408         As pointed out in https://bugs.webkit.org/show_bug.cgi?id=83981#c7 , RenderView::insertFixedPositionedObject()
409         is redundant and should be removed.
410         No new tests.
411
412         * rendering/RenderBlock.cpp:
413         (WebCore::RenderBlock::insertPositionedObject):
414         (WebCore::RenderBlock::removePositionedObject):
415         * rendering/RenderView.cpp:
416         (WebCore):
417         * rendering/RenderView.h:
418         (RenderView):
419
420 2012-06-13  Dana Jansens  <danakj@chromium.org>
421
422         [chromium] Create a CCStreamVideoDrawQuad used for StreamTexture video output
423         https://bugs.webkit.org/show_bug.cgi?id=88826
424
425         Reviewed by Adrienne Walker.
426
427         Remove the matrix from the CCVideoDrawQuad, and create a new quad
428         specifically for StreamTexture video decoder output. This quad
429         contains only the fields needed for display - textureId and the
430         matrix to be applied to texture coords.
431
432         Removes the (0, 0, 1, 1) "transform" from the shader used for these
433         quads, as it was a no-op.
434
435         No new tests, no change in behaviour.
436
437         * WebCore.gypi:
438         * platform/graphics/chromium/LayerRendererChromium.cpp:
439         (WebCore::LayerRendererChromium::drawQuad):
440         (WebCore::LayerRendererChromium::drawStreamVideoQuad):
441         (WebCore::LayerRendererChromium::drawVideoQuad):
442         * platform/graphics/chromium/LayerRendererChromium.h:
443         (WebCore):
444         (LayerRendererChromium):
445         * platform/graphics/chromium/ShaderChromium.cpp:
446         (WebCore::VertexShaderVideoTransform::VertexShaderVideoTransform):
447         (WebCore::VertexShaderVideoTransform::init):
448         (WebCore::VertexShaderVideoTransform::getShaderString):
449         * platform/graphics/chromium/ShaderChromium.h:
450         (VertexShaderVideoTransform):
451         * platform/graphics/chromium/cc/CCDrawQuad.cpp:
452         (WebCore::CCDrawQuad::toStreamVideoDrawQuad):
453         (WebCore):
454         * platform/graphics/chromium/cc/CCDrawQuad.h:
455         (WebCore):
456         (CCDrawQuad):
457         * platform/graphics/chromium/cc/CCStreamVideoDrawQuad.cpp: Added.
458         (WebCore):
459         (WebCore::CCStreamVideoDrawQuad::create):
460         (WebCore::CCStreamVideoDrawQuad::CCStreamVideoDrawQuad):
461         * platform/graphics/chromium/cc/CCStreamVideoDrawQuad.h: Added.
462         (WebCore):
463         (CCStreamVideoDrawQuad):
464         (WebCore::CCStreamVideoDrawQuad::textureId):
465         (WebCore::CCStreamVideoDrawQuad::matrix):
466         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
467         (WebCore::CCVideoLayerImpl::appendQuads):
468
469 2012-06-13  Martin Robinson  <mrobinson@igalia.com>
470
471         [GTK] Add an accelerated compositing implementation for WebKit2
472         https://bugs.webkit.org/show_bug.cgi?id=86037
473
474         Reviewed by Alejandro G. Castro.
475
476         No new tests. These changes are covered by the compositing tests, which
477         we will gradually try to turn on for the bots.
478
479         Add a new GLContext method for getting to current default framebuffer size, which
480         is quite useful for preventing composited content quivering while resizing.
481
482         * platform/graphics/cairo/GLContext.h:
483         * platform/graphics/glx/GLContextGLX.cpp:
484         (WebCore::GLContextGLX::defaultFrameBufferSize): Added this implementation for X11
485         which asks the X server for the window size.
486         * platform/graphics/glx/GLContextGLX.h:
487
488 2012-06-13  Shawn Singh  <shawnsingh@chromium.org>
489
490         [chromium] Implement hit-testing for impl-side input handling in accelerated compositor
491         https://bugs.webkit.org/show_bug.cgi?id=88972
492
493         Reviewed by Adrienne Walker.
494
495         The original hit testing code by Sami Kyostila.
496
497         This patch implements a simple impl-side hit-testing helper
498         function. At this time, the main motivation for this is so that
499         composited scrollable layers can be scrolled by the impl thread --
500         and a prerequisite for that is the ability to hit-test on the impl
501         thread, to determine where the scrolling action should be applied.
502
503         To implement the actual hit test, it's possible to compute the hit
504         test in two equivalent ways: (a) inverse-project the point into
505         local space, or (b) forward-transform the rect to screen space
506         It's not obvious which one would perform better, or which one
507         would be more robust to w < 0 homogeneous clipping issues. For
508         this patch, we simply opt for the inverse-projection approach.
509
510         10 unit tests added to CCLayerTreeHostCommonTest.cpp:
511           CCLayerTreeHostCommonTest.verifyHitTestingForEmptyLayerList
512           CCLayerTreeHostCommonTest.verifyHitTestingForSingleLayer
513           CCLayerTreeHostCommonTest.verifyHitTestingForSinglePositionedLayer
514           CCLayerTreeHostCommonTest.verifyHitTestingForSingleRotatedLayer
515           CCLayerTreeHostCommonTest.verifyHitTestingForSinglePerspectiveLayer
516           CCLayerTreeHostCommonTest.verifyHitTestingForSingleLayerWithScaledContents
517           CCLayerTreeHostCommonTest.verifyHitTestingForSimpleClippedLayer
518           CCLayerTreeHostCommonTest.verifyHitTestingForMultiClippedRotatedLayer
519           CCLayerTreeHostCommonTest.verifyHitTestingForMultipleLayers
520           CCLayerTreeHostCommonTest.verifyHitTestingForMultipleLayerLists
521         
522         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
523         (WebCore::pointHitsRect):
524         (WebCore):
525         (WebCore::pointIsClippedBySurfaceOrClipRect):
526         (WebCore::CCLayerTreeHostCommon::findLayerThatIsHitByPoint):
527         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h:
528         (CCLayerTreeHostCommon):
529         * platform/graphics/chromium/cc/CCMathUtil.cpp:
530         (WebCore::projectHomogeneousPoint):
531         (WebCore::mapHomogeneousPoint):
532         (WebCore::CCMathUtil::mapClippedRect):
533         (WebCore::CCMathUtil::projectClippedRect):
534         (WebCore::CCMathUtil::mapClippedQuad):
535         (WebCore::CCMathUtil::mapQuad):
536         (WebCore::CCMathUtil::projectPoint):
537         (WebCore):
538         * platform/graphics/chromium/cc/CCMathUtil.h:
539         (WebCore):
540         (CCMathUtil):
541
542 2012-06-13  Charles Wei  <charles.wei@torchmobile.com.cn>
543
544         Need customized toDOMStringList for IndexedDB JSC binding.
545         https://bugs.webkit.org/show_bug.cgi?id=87965
546
547         Reviewed by Kentaro Hara.
548
549         IndexedDB database interface uses DOMStringList as the input parameter.
550         The generated toDOMStringList() can't convert an JSArray of Strings to
551         native DOMStringList. We need a custom function to do this.
552
553         Because this patch adds one new file (JSDOMStringList.cpp), all build systems
554         are updated accordingly to pick up this file.
555
556          Tests: Corresponding bindings/scripts/test/JS files have been updated accordingly.
557
558         * GNUmakefile.list.am:
559         * Target.pri:
560         * UseJSC.cmake:
561         * WebCore.gypi:
562         * WebCore.vcproj/WebCore.vcproj:
563         * WebCore.xcodeproj/project.pbxproj:
564         * bindings/js/JSBindingsAllInOne.cpp:
565         * bindings/js/JSDOMStringListCustom.cpp: Added.
566         (WebCore):
567         (WebCore::toDOMStringList):
568         * bindings/scripts/CodeGeneratorJS.pm:
569         (IndexGetterReturnsStrings):
570         (GenerateHeader):
571         (GetNativeType):
572         (GetNativeTypeForCallbacks):
573         (JSValueToNative):
574         * bindings/scripts/test/JS/JSTestCallback.cpp:
575         (WebCore::JSTestCallback::callbackWithStringList):
576         * bindings/scripts/test/JS/JSTestCallback.h:
577         (JSTestCallback):
578         * bindings/scripts/test/JS/JSTestObj.cpp:
579         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
580         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
581         * dom/DOMStringList.idl:
582
583 2012-06-13  Jeffrey Pfau  <jpfau@apple.com>
584
585         Padding and borders can cause integer overflow in block layouts
586         https://bugs.webkit.org/show_bug.cgi?id=88820
587         <rdar://problem/11328762>
588
589         Reviewed by Tony Chang.
590
591         Tests: fast/block/block-size-integer-overflow.html
592                fast/flexbox/box-size-integer-overflow.html
593                fast/table/table-size-integer-overflow.html
594
595         * rendering/AutoTableLayout.cpp: Decreased max int.
596         (WebCore::AutoTableLayout::computePreferredLogicalWidths):
597         * rendering/FixedTableLayout.cpp: Use shared constant.
598         (WebCore::FixedTableLayout::computePreferredLogicalWidths):
599         * rendering/RenderBlock.cpp: Removed unused constant.
600         * rendering/TableLayout.h: Add shared constant.
601         (TableLayout):
602
603 2012-06-13  Gregg Tavares  <gman@google.com>
604
605         Refactor WebGLFramebuffer to handle texture attachments
606         https://bugs.webkit.org/show_bug.cgi?id=88697
607
608         Reviewed by Adrienne Walker.
609         
610         In order to add support for depth textures WebGLFramebuffer
611         needed to be refactored to handle textures as attachments.
612
613         No new tests as no new functionality. 
614
615         * html/canvas/WebGLFramebuffer.cpp:
616         (WebCore::WebGLFramebuffer::WebGLAttachment::WebGLAttachment):
617         (WebCore):
618         (WebCore::WebGLFramebuffer::WebGLAttachment::~WebGLAttachment):
619         (WebCore::WebGLFramebuffer::WebGLFramebuffer):
620         (WebCore::WebGLFramebuffer::setAttachmentForBoundFramebuffer):
621         (WebCore::WebGLFramebuffer::attach):
622         (WebCore::WebGLFramebuffer::getAttachmentObject):
623         (WebCore::WebGLFramebuffer::getAttachment):
624         (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):
625         (WebCore::WebGLFramebuffer::getColorBufferWidth):
626         (WebCore::WebGLFramebuffer::getColorBufferHeight):
627         (WebCore::WebGLFramebuffer::getColorBufferFormat):
628         (WebCore::WebGLFramebuffer::checkStatus):
629         (WebCore::WebGLFramebuffer::onAccess):
630         (WebCore::WebGLFramebuffer::hasStencilBuffer):
631         (WebCore::WebGLFramebuffer::deleteObjectImpl):
632         (WebCore::WebGLFramebuffer::initializeAttachments):
633         * html/canvas/WebGLFramebuffer.h:
634         (WebGLAttachment):
635         (WebGLFramebuffer):
636         * html/canvas/WebGLRenderingContext.cpp:
637         (WebCore):
638         (WebCore::WebGLRenderingContext::framebufferRenderbuffer):
639         (WebCore::WebGLRenderingContext::reattachDepthStencilAttachments):
640         (WebCore::WebGLRenderingContext::framebufferTexture2D):
641         (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter):
642         * html/canvas/WebGLRenderingContext.h:
643         (WebGLRenderingContext):
644
645 2012-06-13  Konrad Piascik  <kpiascik@rim.com>
646
647         Remove return statement in void method
648         https://bugs.webkit.org/show_bug.cgi?id=88998
649
650         Reviewed by Andreas Kling
651
652         * html/HTMLInputElement.cpp:
653         (WebCore::HTMLInputElement::collectStyleForAttribute):
654
655 2012-06-13  Benjamin Poulain  <benjamin@webkit.org>
656
657         Implement the simple constructors WTFURL's KURL
658         https://bugs.webkit.org/show_bug.cgi?id=85724
659
660         Reviewed by Adam Barth.
661
662         This patch implement the correct initialization of KURL from an absolute URL.
663         The URL correctness is also relaxed in order to have KURLWTFURL works similarily to KURL.
664
665         * platform/KURLWTFURL.cpp:
666         (WebCore::KURL::KURL):
667         (WebCore::KURL::isValid):
668         (WebCore::KURL::string):
669         (WebCore::KURL::protocol):
670         (WebCore::KURL::host):
671         (WebCore::KURL::port): Fix a bug where invalidPortNumber was returned if no port was defined.
672         (WebCore::KURL::hasFragmentIdentifier):
673         (WebCore::KURL::fragmentIdentifier):
674         (WebCore::KURL::protocolIs):
675         (WebCore::KURL::removeFragmentIdentifier):
676         (WebCore):
677         (WebCore::KURL::print):
678         * platform/cf/KURLCFNet.cpp:
679         (WebCore::KURL::KURL):
680         (WebCore::KURL::createCFURL):
681         (WebCore):
682         * platform/mac/KURLMac.mm:
683         (WebCore::KURL::KURL):
684         (WebCore::KURL::createCFURL):
685         (WebCore):
686         Use the code of KURL to make the conversion from WTFURL to NSURL.
687
688 2012-06-12  Vincent Scheib  <scheib@chromium.org>
689
690         Remove duplicate webkitpointerlockchange events when unlocking.
691         https://bugs.webkit.org/show_bug.cgi?id=88917
692
693         Reviewed by Dimitri Glazkov.
694
695         Subsequent patches adding the new API for entering and exiting
696         pointer lock would be burdened by handling multiple change events
697         when the lock target is changed. This change introduces
698         temporary code to suppress duplicate change events.
699
700         Existing tests simplified by removing the duplicate change events.
701
702         * page/PointerLockController.cpp:
703         (WebCore::PointerLockController::requestPointerLock):
704         (WebCore::PointerLockController::didLosePointerLock):
705         * page/PointerLockController.h:
706         (PointerLockController):
707
708 2012-06-13  Silvia Pfeiffer  <silviapf@chromium.org>
709
710         Update range sliders rendering for volume and playback position of new Chrome video controls.
711         https://bugs.webkit.org/show_bug.cgi?id=88623
712
713         Reviewed by Eric Carlson.
714
715         No new tests, final patch will contain the rebaselined tests.
716
717         The Chrome video controls are receiving a visual update. This patch contains updates to the
718         rendering of the range sliders for the playback position and the volume. This includes the
719         creation of a shadowPseudoId to be able to style the range sliders via CSS, the rendering
720         of the slider background and the highlighted ranges.
721
722         * css/mediaControlsChromium.css:
723         (input[type="range"]::-webkit-media-slider-container):
724         Adjust the styling of the slider container backgrounds.
725         (input[type="range"]::-webkit-media-slider-thumb):
726         Adjust the styling of the slider thumbs.
727         * html/shadow/SliderThumbElement.cpp:
728         (WebCore::sliderThumbShadowPseudoId):
729         Add an accessor function for the slider thumb shadowPseudoId.
730         (WebCore::mediaSliderThumbShadowPseudoId):
731         Add an accessor function for the media slider thumb shadowPseudoId.
732         (WebCore::SliderThumbElement::shadowPseudoId):
733         Add a different CSS pseudo-class name to the media slider thumbs.
734         (WebCore::TrackLimiterElement::shadowPseudoId):
735         Add a different CSS pseudo-class name to the media slider thumbs.
736         (WebCore::SliderContainerElement::shadowPseudoId):
737         Add a different CSS pseudo-class name to the media slider background container.
738         * rendering/RenderMediaControlsChromium.cpp:
739         (WebCore::paintRoundedSliderBackground):
740         Add function to draw rounded background of sliders in a dark color.
741         (WebCore::paintSliderRangeHighlight):
742         Add function to draw a highlighted grey region on the sliders, which is rounded only at
743         its ends.
744         (WebCore::paintMediaSlider):
745         Update the background and buffered range renderings on the playback position slider by making
746         use of the new helper functions.
747         (WebCore::paintMediaVolumeSlider):
748         Update the background and buffered range renderings on the volume slider by making
749         use of the new helper functions.
750
751 2012-06-13  Christopher Hutten-Czapski  <chutten@rim.com>
752
753         2012-06-13  Christopher Hutten-Czapski  <chutten@rim.com>
754
755         [BlackBerry] Update Select Popup's styling
756         https://bugs.webkit.org/show_bug.cgi?id=89005
757
758         Reviewed by Rob Buis.
759
760         Add in some nicely-styled CSS and JS for the BlackBerry port's <select>
761
762         * Resources/blackberry/popupControlBlackBerry.css:
763         (body):
764         (.popup-area):
765         (.popup-area>:first-child):
766         (.popup-buttons):
767         (.popup-button-divider):
768         (.popup-button):
769         (.popup-button:active):
770         (.popup-button:first-child:active):
771         (.popup-button:last-child:active):
772         (.popup-button:only-child:active):
773         * Resources/blackberry/selectControlBlackBerry.css: Added.
774         (.select-area):
775         (.select-area:last-child):
776         (.option):
777         (.optgroup:last-child):
778         (.selected):
779         (.optgroup):
780         (.optgroup .option):
781         * Resources/blackberry/selectControlBlackBerry.js: Added.
782
783 2012-06-13  Alec Flett  <alecflett@chromium.org>
784
785         [V8] IndexedDB: Cursor value modifications should be preserved until cursor iterates
786         https://bugs.webkit.org/show_bug.cgi?id=83526
787
788         Reviewed by Kentaro Hara.
789
790         Cache the 'value' attribute of IDBCursorWithValue with policy
791         determined by IDBCursor.cpp, to follow spec behavior of keeping a
792         consistent script object until the cursor advances. See
793         http://www.w3.org/TR/IndexedDB/#widl-IDBCursorWithValueSync-value
794         for details.
795
796         Test: storage/indexeddb/cursor-value.html
797
798         * Modules/indexeddb/IDBCursor.cpp:
799         (WebCore::IDBCursor::IDBCursor):
800         (WebCore::IDBCursor::value):
801         (WebCore::IDBCursor::setValueReady):
802         * Modules/indexeddb/IDBCursor.h:
803         (IDBCursor):
804         (WebCore::IDBCursor::valueIsDirty):
805         * Modules/indexeddb/IDBCursorWithValue.idl:
806         * WebCore.gypi:
807         * bindings/v8/IDBCustomBindings.cpp: Added.
808         (WebCore):
809         (WebCore::V8IDBCursorWithValue::valueAccessorGetter):
810
811 2012-06-13  Silvia Pfeiffer  <silviapf@chromium.org>
812
813         Code cleanup from bug 88881 to share the SliderVerticalPart code.
814         https://bugs.webkit.org/show_bug.cgi?id=88930
815
816         Reviewed by Eric Carlson.
817
818         No new tests - this is just code cleanup.
819
820         * html/shadow/SliderThumbElement.cpp:
821         (WebCore::hasVerticalAppearance):
822         Avoid having two ifdef-ed returns in the code depending on ENABLE(VIDEO).
823
824 2012-06-13  Mark Mentovai  <mark@chromium.org>
825
826         [chromium mac] Don't include things in subframeworks of
827         ApplicationServices.framework.
828
829         A CoreText #include (with quotes instead of brackets, even) sprung up
830         in r120506, bug 69826.
831
832         https://bugs.webkit.org/show_bug.cgi?id=88569
833
834         Reviewed by Stephen White.
835
836         No new tests.
837
838         * platform/graphics/harfbuzz/ng/HarfBuzzFaceCoreText.cpp:
839
840 2012-06-13  Eriq Augustine  <eaugusti@chromium.org>
841
842         Removing an extra HandleScope in V8Proxy::evaluateInIsolatedWorld
843         https://bugs.webkit.org/show_bug.cgi?id=88451
844
845         Reviewed by Adam Barth.
846
847         Any values retuned by the evaluation will get destroyed with the extra
848         HandleScope.
849
850         I was unable to cause a test failure, however this feature is tested by:
851         platform/chromium/http/tests/misc/execute-and-return-value.html
852
853         * bindings/v8/V8Proxy.cpp:
854         (WebCore::V8Proxy::evaluateInIsolatedWorld):
855
856 2012-06-13  Zan Dobersek  <zandobersek@gmail.com>
857
858         [Gtk] Enable link prefetch support in the developer builds
859         https://bugs.webkit.org/show_bug.cgi?id=89011
860
861         Reviewed by Martin Robinson.
862
863         Handle the ENABLE_LINK_PREFETCH conditional in standard way.
864
865         No new tests - covered by existing link prefetch tests.
866
867         * GNUmakefile.am:
868
869 2012-06-13  Amy Ousterhout  <aousterh@chromium.org>
870
871         Rename currentDeviceMotion to lastMotion in DeviceMotionClient
872         https://bugs.webkit.org/show_bug.cgi?id=88854
873
874         Reviewed by Adam Barth.
875
876         Rename the function currentDeviceMotion to lastMotion in DeviceMotionClient.
877         This makes it consistent with the similar function lastOrientation in DeviceOrientationClient.
878
879         Just a rename, so does not require any new tests.
880
881         * dom/DeviceMotionClient.h:
882         (DeviceMotionClient):
883         * dom/DeviceMotionController.cpp:
884         (WebCore::DeviceMotionController::timerFired):
885         (WebCore::DeviceMotionController::addListener):
886         * loader/EmptyClients.h:
887         (WebCore::EmptyDeviceMotionClient::lastMotion):
888         * platform/qt/DeviceMotionClientQt.cpp:
889         (WebCore::DeviceMotionClientQt::lastMotion):
890         * platform/qt/DeviceMotionClientQt.h:
891         (DeviceMotionClientQt):
892         * platform/qt/DeviceMotionProviderQt.h:
893         (WebCore::DeviceMotionProviderQt::lastMotion):
894
895 2012-06-13  Vsevolod Vlasov  <vsevik@chromium.org>
896
897         Web Inspector: Breakpoint's _uiLocationRemoved() method is never called.
898         https://bugs.webkit.org/show_bug.cgi?id=89003
899
900         Reviewed by Pavel Feldman.
901
902         * inspector/front-end/BreakpointManager.js:
903         (WebInspector.BreakpointManager.prototype.breakpointLocationsForUISourceCode):
904         (WebInspector.BreakpointManager.Breakpoint):
905         (WebInspector.BreakpointManager.Breakpoint.prototype._locationUpdated):
906         (WebInspector.BreakpointManager.Breakpoint.prototype._resetLocations):
907         (WebInspector.BreakpointManager.Breakpoint.prototype._fakeBreakpointAtPrimaryLocation):
908         * inspector/front-end/FileSystemModel.js: Drive by compilation fix.
909         (WebInspector.FileSystemModel):
910
911 2012-06-13  David Grogan  <dgrogan@chromium.org>
912
913         IndexedDB: Add tests, an assert, and some comments around open/close/setVersion call sequencing
914         https://bugs.webkit.org/show_bug.cgi?id=88829
915
916         Reviewed by Tony Chang.
917
918         Test: storage/indexeddb/three-setversion-calls.html
919
920         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
921         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
922
923 2012-06-09  Vsevolod Vlasov  <vsevik@chromium.org>
924
925         Web Inspector: Errors when pending console messages are attached to JavaScriptSourceFrame.
926         https://bugs.webkit.org/show_bug.cgi?id=88712
927
928         Reviewed by Pavel Feldman.
929
930         * inspector/front-end/PresentationConsoleMessageHelper.js:
931         (WebInspector.PresentationConsoleMessageHelper):
932         (WebInspector.PresentationConsoleMessageHelper.prototype._addPendingConsoleMessage):
933         (WebInspector.PresentationConsoleMessageHelper.prototype._parsedScriptSource):
934
935 2012-06-13  Alexander Pavlov  <apavlov@chromium.org>
936
937         Web Inspector: Support user attributes in DOMNode
938         https://bugs.webkit.org/show_bug.cgi?id=88706
939
940         Reviewed by Pavel Feldman.
941
942         This change allows clients to store arbitrary properties on DOMNodes and know if there are descendants
943         (and how many of them) having a certain property set.
944
945         Test: inspector/elements/user-attributes.html
946
947         * inspector/front-end/DOMAgent.js:
948         (WebInspector.DOMNode.prototype._removeChild):
949         (WebInspector.DOMNode.prototype._updateChildUserPropertyCountsOnRemoval):
950         (WebInspector.DOMNode.prototype._updateDescendantUserPropertyCount):
951         (WebInspector.DOMNode.prototype.setUserProperty):
952         (WebInspector.DOMNode.prototype.removeUserProperty):
953         (WebInspector.DOMNode.prototype.getUserProperty):
954         (WebInspector.DOMNode.prototype.descendantUserPropertyCount):
955
956 2012-06-13  Vineet Chaudhary  <vineet.chaudhary@motorola.com>
957
958         REGRESSION:Bindings sequence<T> in Console.idl, Internals.idl and ScriptProfileNode.idl should be T[]
959         https://bugs.webkit.org/show_bug.cgi?id=84863
960
961         Reviewed by Kentaro Hara.
962
963         With reference to http://www.w3.org/TR/WebIDL/#idl-sequence
964         "Sequences must not be used as the type of an attribute, constant or exception field."
965         So we should use T[] instead of sequence<T>.
966
967         Tests: bindings/scripts/test/TestObj.idl
968                fast/harness/user-preferred-language.html
969                inspector/profiler/cpu-profiler-profiling-without-inspector.html
970                media/track/track-language-preference.html
971
972         * bindings/scripts/CodeGenerator.pm:
973         (GetSequenceType): Getter for getting sequence type.
974         (GetArrayType): Getter for getting array type.
975         (AssertNotSequenceType): Check sequences must not be used as the type of an attribute,
976         constant or exception field.
977         * bindings/scripts/CodeGeneratorCPP.pm:
978         (SkipFunction): Exclude bindings code for type sequence.
979         (SkipAttribute): Check for sequences must not be used as the type of an attribute,
980         constant or exception field.
981         (AddIncludesForType): Exclude header inclusion code for type array/sequence.
982         * bindings/scripts/CodeGeneratorGObject.pm:
983         (SkipAttribute): Check for sequences must not be used as the type of an attribute,
984         constant or exception field.
985         (SkipFunction): Exclude bindings code for type sequence.
986         * bindings/scripts/CodeGeneratorJS.pm:
987         (AddIncludesForType): Exclude header inclusion code for type array/sequence.
988         (GenerateImplementation):  Check for sequences must not be used as the type of an attribute,
989         constant or exception field.
990         (GetNativeType):
991         (JSValueToNative):
992         (NativeToJSValue):
993         * bindings/scripts/CodeGeneratorObjC.pm:
994         (SkipFunction): Exclude bindings code for type sequence.
995         (SkipAttribute): Exclude bindings code for type array.
996         (AddForwardDeclarationsForType):
997         (AddIncludesForType):
998         * bindings/scripts/CodeGeneratorV8.pm:
999         (GenerateNormalAttrGetter):
1000         (GetNativeType):
1001         (JSValueToNative):
1002         (CreateCustomSignature):
1003         (NativeToJSValue):
1004         * bindings/scripts/test/JS/JSTestObj.cpp: Updated code from run-bindings-tests.
1005         (WebCore):
1006         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
1007         * bindings/scripts/test/JS/JSTestObj.h: Updated code from run-bindings-tests.
1008         (WebCore):
1009         * bindings/scripts/test/TestObj.idl: Tests.
1010         * bindings/scripts/test/V8/V8TestObj.cpp:  Updated code from run-bindings-tests.
1011         (TestObjV8Internal):
1012         (WebCore::TestObjV8Internal::methodWithSequenceArgCallback):
1013         (WebCore):
1014         * inspector/ScriptProfileNode.idl: Using sequence<T> for children().
1015         * page/Console.idl: Using Array[T] for profiles attribute.
1016         * testing/Internals.idl: Using sequence<T> for userPreferredLanguages().
1017
1018 2012-06-13  Simon Hausmann  <simon.hausmann@nokia.com>
1019
1020         [Qt] Remove dependency to QtScript for the Qt 5 build
1021         https://bugs.webkit.org/show_bug.cgi?id=88993
1022
1023         Reviewed by Kenneth Rohde Christiansen.
1024
1025         Replace the use of QScriptEngine::ValueOwnership with an enum local
1026         to the class where it is used (QtInstance).
1027
1028         * Target.pri:
1029         * bindings/js/ScriptControllerQt.cpp:
1030         (WebCore::ScriptController::createScriptInstanceForWidget):
1031         * bridge/qt/qt_instance.cpp:
1032         (JSC::Bindings::QtInstance::QtInstance):
1033         (JSC::Bindings::QtInstance::~QtInstance):
1034         (JSC::Bindings::QtInstance::getQtInstance):
1035         * bridge/qt/qt_instance.h:
1036         (QtInstance):
1037         (JSC::Bindings::QtInstance::create):
1038         * bridge/qt/qt_runtime.cpp:
1039         (JSC::Bindings::convertQVariantToValue):
1040         * bridge/qt/qt_runtime_qt4.cpp:
1041         (JSC::Bindings::convertQVariantToValue):
1042
1043 2012-06-13  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1044
1045         [Qt] Save a JSGlobalContextRef instead of a JSContextRef in QtConnectionObject
1046         https://bugs.webkit.org/show_bug.cgi?id=88905
1047
1048         Make QtConnectionObject use JSContextGetGlobalContext and store the
1049         JSGlobalContextRef. Previous code was working but saving JSContextRef was wrong in terms of
1050         API.
1051
1052         There's an assumption that JSGlobalContextRef will outlive the connection objects, and
1053         because of it no JSGlobalContextRetain/Release calls were added.
1054
1055         Reviewed by Noam Rosenthal.
1056
1057         * bridge/qt/qt_runtime.cpp:
1058         (JSC::Bindings::QtRuntimeConnectionMethod::call):
1059         (JSC::Bindings::QtConnectionObject::QtConnectionObject):
1060         * bridge/qt/qt_runtime.h:
1061         (QtConnectionObject):
1062         * bridge/qt/qt_runtime_qt4.cpp:
1063         (JSC::Bindings::QtRuntimeConnectionMethod::call):
1064         (JSC::Bindings::QtConnectionObject::QtConnectionObject):
1065
1066 2012-06-13  David Barr  <davidbarr@chromium.org>
1067
1068         Add dpi to css3-images image-resolution
1069         https://bugs.webkit.org/show_bug.cgi?id=85439
1070
1071         Reviewed by Tony Chang.
1072
1073         No new tests; extended fast/css/image-resolution/image-resolution.html
1074
1075         * css/CSSGrammar.y:
1076         * css/CSSParser.cpp:
1077         (WebCore::CSSParser::validUnit):
1078         (WebCore::CSSParser::createPrimitiveNumericValue):
1079         (WebCore::unitFromString):
1080         (WebCore::CSSParser::parseValidPrimitive):
1081         (WebCore::CSSParser::detectNumberToken):
1082         * css/CSSPrimitiveValue.cpp:
1083         (WebCore::isValidCSSUnitTypeForDoubleConversion):
1084         (WebCore::unitCategory):
1085         (WebCore::conversionToCanonicalUnitsScaleFactor):
1086         (WebCore::CSSPrimitiveValue::customCssText):
1087         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
1088         * css/CSSPrimitiveValue.h:
1089
1090 2012-06-13  Li Yin  <li.yin@intel.com>
1091
1092         FileAPI: type should be converted to be lower case in Blob constructor.
1093         https://bugs.webkit.org/show_bug.cgi?id=88696
1094
1095         Reviewed by Kentaro Hara.
1096
1097         Spec: http://dev.w3.org/2006/webapi/FileAPI/#dfn-BlobPropertyBag
1098         Spec: http://dev.w3.org/2006/webapi/FileAPI/#attributes-blob
1099         The ASCII-encoded string in lower case representing the media type of the Blob.
1100
1101         Test: fast/files/blob-constructor.html
1102
1103         * bindings/js/JSBlobCustom.cpp:
1104         (WebCore::JSBlobConstructor::constructJSBlob):
1105         * bindings/v8/custom/V8BlobCustom.cpp:
1106         (WebCore::V8Blob::constructorCallback):
1107
1108 2012-06-13  Robin Cao  <robin.cao@torchmobile.com.cn>
1109
1110         [BlackBerry] Enable MEDIA_STREAM by default
1111         https://bugs.webkit.org/show_bug.cgi?id=88849
1112
1113         Reviewed by Antonio Gomes.
1114
1115         Covered by existing test cases.
1116
1117         * CMakeLists.txt:
1118         * PlatformBlackBerry.cmake:
1119         * platform/mediastream/blackberry/DeprecatedPeerConnectionHandler.cpp: Added.
1120         (WebCore):
1121         (WebCore::DeprecatedPeerConnectionHandler::create):
1122         (WebCore::DeprecatedPeerConnectionHandler::DeprecatedPeerConnectionHandler):
1123         (WebCore::DeprecatedPeerConnectionHandler::~DeprecatedPeerConnectionHandler):
1124         (WebCore::DeprecatedPeerConnectionHandler::produceInitialOffer):
1125         (WebCore::DeprecatedPeerConnectionHandler::handleInitialOffer):
1126         (WebCore::DeprecatedPeerConnectionHandler::processSDP):
1127         (WebCore::DeprecatedPeerConnectionHandler::processPendingStreams):
1128         (WebCore::DeprecatedPeerConnectionHandler::sendDataStreamMessage):
1129         (WebCore::DeprecatedPeerConnectionHandler::stop):
1130         * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp: Added.
1131         (WebCore):
1132         (WebCore::MediaStreamCenter::instance):
1133         (WebCore::MediaStreamCenterBlackBerry::MediaStreamCenterBlackBerry):
1134         (WebCore::MediaStreamCenterBlackBerry::~MediaStreamCenterBlackBerry):
1135         (WebCore::MediaStreamCenterBlackBerry::queryMediaStreamSources):
1136         (WebCore::MediaStreamCenterBlackBerry::didSetMediaStreamTrackEnabled):
1137         (WebCore::MediaStreamCenterBlackBerry::didStopLocalMediaStream):
1138         (WebCore::MediaStreamCenterBlackBerry::didCreateMediaStream):
1139         (WebCore::MediaStreamCenterBlackBerry::constructSDP):
1140         * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h: Added.
1141         (WebCore):
1142         (MediaStreamCenterBlackBerry):
1143
1144 2012-06-13  Pavel Feldman  <pfeldman@chromium.org>
1145
1146         Web Inspector: working copy should be committed even if domain binding returns error.
1147         https://bugs.webkit.org/show_bug.cgi?id=88884
1148
1149         Reviewed by Vsevolod Vlasov.
1150
1151         Committing working copy is about saving file. It should always succeed.
1152
1153         * inspector/front-end/UISourceCode.js:
1154         (WebInspector.UISourceCode.prototype.commitWorkingCopy):
1155
1156 2012-06-12  Pavel Feldman  <pfeldman@chromium.org>
1157
1158         Web Inspector: show revisions of all modified files in local modifications view
1159         https://bugs.webkit.org/show_bug.cgi?id=88864
1160
1161         Reviewed by Vsevolod Vlasov.
1162
1163         This change allows all local modifications to be seen in a single view. View is now
1164         singleton, listening to all revisions being added. Revert captions were reworked
1165         (see the screenshot).
1166
1167         * English.lproj/localizedStrings.js:
1168         * inspector/front-end/Resource.js:
1169         * inspector/front-end/RevisionHistoryView.js:
1170         (WebInspector.RevisionHistoryView.populateRevisions):
1171         (WebInspector.RevisionHistoryView):
1172         (WebInspector.RevisionHistoryView.showHistory):
1173         (WebInspector.RevisionHistoryView.reset):
1174         (WebInspector.RevisionHistoryView.prototype._createResourceItem.clearHistory):
1175         (WebInspector.RevisionHistoryView.prototype._createResourceItem):
1176         (WebInspector.RevisionHistoryView.prototype._revisionAdded.get if):
1177         (WebInspector.RevisionHistoryView.prototype._revisionAdded):
1178         (WebInspector.RevisionHistoryView.prototype._revealResource.get if):
1179         (WebInspector.RevisionHistoryView.prototype._revealResource):
1180         (WebInspector.RevisionHistoryView.prototype._reset):
1181         (WebInspector.RevisionHistoryTreeElement):
1182         (WebInspector.RevisionHistoryTreeElement.prototype.onattach):
1183         (WebInspector.RevisionHistoryTreeElement.prototype.oncollapse):
1184         * inspector/front-end/ScriptsPanel.js:
1185         (WebInspector.ScriptsPanel.prototype._reset):
1186         (WebInspector.ScriptsPanel.prototype._editorSelected):
1187         * inspector/front-end/revisionHistory.css:
1188         (.revision-history-link-row):
1189         (.revision-history-drawer li.revision-history-revision):
1190
1191 2012-06-13  Pavel Feldman  <pfeldman@chromium.org>
1192
1193         Web Inspector: Make "Go to source and line" possible with "go to file" dialog
1194         https://bugs.webkit.org/show_bug.cgi?id=88740
1195
1196         Reviewed by Vsevolod Vlasov.
1197
1198         Selection dialog now allows search query rewrite and uses line number
1199         suffix to go to a particular line.
1200
1201         * inspector/front-end/FilteredItemSelectionDialog.js:
1202         (WebInspector.FilteredItemSelectionDialog.prototype.onEnter):
1203         (WebInspector.FilteredItemSelectionDialog.prototype._createSearchRegExp):
1204         (WebInspector.SelectionDialogContentProvider.prototype.selectItem):
1205         (WebInspector.SelectionDialogContentProvider.prototype.rewriteQuery):
1206         (WebInspector.JavaScriptOutlineDialog.prototype.selectItem):
1207         (WebInspector.JavaScriptOutlineDialog.prototype.rewriteQuery):
1208         (WebInspector.OpenResourceDialog.prototype.selectItem):
1209         (WebInspector.OpenResourceDialog.prototype.rewriteQuery):
1210         * inspector/front-end/ScriptsPanel.js:
1211         (WebInspector.ScriptsPanel.prototype.showUISourceCode):
1212         * inspector/front-end/StylesPanel.js:
1213         (WebInspector.StyleSheetOutlineDialog.prototype.selectItem):
1214         (WebInspector.StyleSheetOutlineDialog.prototype.rewriteQuery):
1215
1216 2012-06-12  Hans Wennborg  <hans@chromium.org>
1217
1218         Speech JavaScript API: Add test for constructing SpeechRecognitionError events
1219         https://bugs.webkit.org/show_bug.cgi?id=88868
1220
1221         Reviewed by Adam Barth.
1222
1223         This adds a test for constructing SpeechRecognitionError events, and
1224         code to make it work.
1225
1226         Test: fast/events/constructors/speech-recognition-error-constructor.html
1227
1228         * Modules/speech/SpeechRecognitionError.cpp:
1229         (WebCore::SpeechRecognitionError::create):
1230         (WebCore):
1231         (WebCore::SpeechRecognitionError::SpeechRecognitionError):
1232         (WebCore::SpeechRecognitionErrorInit::SpeechRecognitionErrorInit):
1233         * Modules/speech/SpeechRecognitionError.h:
1234         (SpeechRecognitionErrorInit):
1235         (WebCore):
1236         (SpeechRecognitionError):
1237         (WebCore::SpeechRecognitionError::code):
1238         * Modules/speech/SpeechRecognitionError.idl:
1239
1240 2012-06-13  Taiju Tsuiki  <tzik@chromium.org>
1241
1242         Implement InspectorFileSystemAgent::readDirectory for FileSystem support.
1243         https://bugs.webkit.org/show_bug.cgi?id=87724
1244
1245         Reviewed by Vsevolod Vlasov.
1246
1247         Test: http/tests/inspector/filesystem/read-directory.html
1248
1249         * inspector/Inspector.json:
1250         * inspector/InspectorController.cpp:
1251         (WebCore::InspectorController::InspectorController):
1252         * inspector/InspectorFileSystemAgent.cpp:
1253         (InspectorFileSystemAgent::FrontendProvider):
1254         (WebCore):
1255         (WebCore::InspectorFileSystemAgent::create):
1256         (WebCore::InspectorFileSystemAgent::readDirectory):
1257         (WebCore::InspectorFileSystemAgent::InspectorFileSystemAgent):
1258         * inspector/InspectorFileSystemAgent.h:
1259         (WebCore):
1260         (InspectorFileSystemAgent):
1261
1262 2012-06-13  Silvia Pfeiffer  <silviapf@chromium.org>
1263
1264         Change the styling of the Chromium video controls.
1265         https://bugs.webkit.org/show_bug.cgi?id=88297
1266
1267         Reviewed by Eric Carlson.
1268
1269         No new tests, final patch will contain the rebaselined tests.
1270
1271         The Chrome video controls are receiving a visual update. This patch includes CSS changes,
1272         the removal of the now no longer needed controls background div, and the introduction of
1273         new images for the buttons.
1274
1275         * css/mediaControlsChromium.css:
1276         (audio):
1277         Adjust height of audio controls.
1278         (::-webkit-media-controls):
1279         Use flexbox on media controls shadow DOM.
1280         (audio::-webkit-media-controls-enclosure, video::-webkit-media-controls-enclosure):
1281         Adjust height, max-width, text-indent and box-sizing, and reset padding to 0.
1282         (video::-webkit-media-controls-enclosure):
1283         Use 5px padding only for video controls and adjust height accordingly.
1284         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
1285         Use flexbox on panel, adjust bottom alignment, height, background color and border radius.
1286         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
1287         Display buttons inline with fixed width and height, vertically centered, no padding and
1288         6px space to next controls element (this will be 15px incl the space in the image).
1289         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
1290         Display buttons inline with fixed width and height, vertically centered, no padding and
1291         9px space to next controls element (this will be 15px incl the space in the image).
1292         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
1293         Display text as block, without broder, adjusted height, font-family, font-size and 9px space
1294         to next controls element (this will be 15px incl the space in the image).
1295         (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
1296         Adjust height, padding, background-color, min-wdith and 15px space to next controls element.
1297         (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
1298         Adjust height, max- and min-width, background-color and 15px space to next controls element.
1299         * html/shadow/MediaControlRootElementChromium.cpp:
1300         (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
1301         Remove timeline container, which is not necessary any longer because of the use of flexbox.
1302         (WebCore::MediaControlRootElementChromium::create):
1303         Remove timeline container, which is not necessary any longer because of the use of flexbox.
1304         (WebCore::MediaControlRootElementChromium::setMediaController):
1305         Remove timeline container, which is not necessary any longer because of the use of flexbox.
1306         (WebCore::MediaControlRootElementChromium::reset):
1307         Show the timeline instead of the timeline container when resetting.
1308         (WebCore::MediaControlRootElementChromium::reportedError):
1309         Hide the timeline instead of the timeline container when running into an error.
1310         * rendering/RenderMediaControlsChromium.cpp:
1311         (WebCore::paintMediaMuteButton):
1312         Introduce new image resources for the mute button and adjust it based on volume levels.
1313         (WebCore::paintMediaPlayButton):
1314         Introduce new image resources for the play button.
1315         (WebCore::getMediaSliderThumb):
1316         Introduce new image resources for the position slider thumb.
1317         (WebCore::paintMediaVolumeSliderThumb):
1318         Introduce new image resources for the volume slider thumb.
1319         Remove timeline container rendering.
1320         (WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
1321         Add timeline container painting to the "not reached" elements.
1322         (WebCore):
1323         Provide size settings for the position and volume sliders.
1324         (WebCore::RenderMediaControlsChromium::adjustMediaSliderThumbSize):
1325         Calculate correct width and height settings for the new image resources of the position and volume
1326         slider thumbs.
1327         * rendering/RenderThemeChromiumMac.h:
1328         (RenderThemeChromiumMac):
1329         Remove timeline container rendering (i.e. the media controls background).
1330         * rendering/RenderThemeChromiumMac.mm:
1331         Remove timeline container rendering (i.e. the media controls background).
1332         * rendering/RenderThemeChromiumSkia.cpp:
1333         Remove timeline container rendering (i.e. the media controls background).
1334         * rendering/RenderThemeChromiumSkia.h:
1335         (RenderThemeChromiumSkia):
1336         Remove timeline container rendering (i.e. the media controls background).
1337
1338 2012-06-13  Kinuko Yasuda  <kinuko@chromium.org>
1339
1340         Unreviewed, fixing English nits suggested by review for r120165.
1341
1342         * fileapi/Blob.cpp:
1343         (WebCore::Blob::webkitSlice):
1344         * fileapi/Blob.h:
1345         (Blob):
1346
1347 2012-06-13  MORITA Hajime  <morrita@google.com>
1348
1349         REGRESSION(r118098): <content> element does not render distributed children when cloned from another document
1350         https://bugs.webkit.org/show_bug.cgi?id=88148
1351
1352         Reviewed by Dimitri Glazkov.
1353
1354         The shadow DOM availability was decided through FrameLoaderClient.
1355         But there are documents which don't have any associated frames, in
1356         which any shadow DOM related elements cannot be constructed.  That
1357         resulsted the regression.
1358
1359         This change introduces a Page-based client called
1360         ContextFeaturesClient which takes the role from FrameLoaderClient
1361         to decide the feature availability, and ContextFeatures which is a
1362         proxy of ContextFeaturesClient.  ContextEnabledFeatures is is
1363         replaced with ContextFeatures.
1364
1365         Each ContextFeatures object is owned by a Page, and is attached to
1366         each Document in the page even if the page itself has no referenct
1367         to Frames or Pages. With ContextFeatures, each Document can decide
1368         the feature availability even if it cannot reach Page or Frame.
1369
1370         On RefCountedSupplement: Document instance can live longer than a
1371         Page where it is shwon. This means that ContextFeatures instance
1372         needs to survive after owner Page destruction because it's
1373         referenced from possibly surviving Documents. RefCountedSupplement
1374         is introduced to cover this scenario: It allows supplement classes
1375         to live after Page's destruction.
1376
1377         RefCountedSupplement::hostDestroyed() is notified when the hosting
1378         page is gone. ContextFeatures clears its reference to the client
1379         using this notification.
1380
1381         Test: fast/dom/shadow/elements-in-frameless-document.html
1382
1383         * CMakeLists.txt:
1384         * GNUmakefile.list.am:
1385         * Target.pri:
1386         * WebCore.gypi:
1387         * WebCore.vcproj/WebCore.vcproj:
1388         * WebCore.xcodeproj/project.pbxproj:
1389         * bindings/scripts/CodeGeneratorV8.pm:
1390         (GenerateImplementation):
1391         * css/StyleResolver.cpp:
1392         (WebCore::StyleResolver::determineScope):
1393         * dom/ContextFeatures.cpp: Added.
1394         (WebCore):
1395         (WebCore::ContextFeaturesClient::empty):
1396         (WebCore::ContextFeatures::supplementName):
1397         (WebCore::ContextFeatures::defaultSwitch):
1398         (WebCore::ContextFeatures::shadowDOMEnabled):
1399         (WebCore::ContextFeatures::styleScopedEnabled):
1400         (WebCore::ContextFeatures::pagePopupEnabled):
1401         (WebCore::provideContextFeaturesTo):
1402         (WebCore::provideContextFeaturesToDocumentFrom):
1403         * dom/ContextFeatures.h: Added.
1404         (WebCore):
1405         (ContextFeatures):
1406         (WebCore::ContextFeatures::ContextFeatures):
1407         (WebCore::ContextFeatures::hostDestroyed):
1408         (ContextFeaturesClient):
1409         (WebCore::ContextFeaturesClient::~ContextFeaturesClient):
1410         (WebCore::ContextFeaturesClient::isEnabled):
1411         (WebCore::ContextFeatures::create):
1412         (WebCore::ContextFeatures::isEnabled):
1413         * dom/DOMAllInOne.cpp:
1414         * dom/DOMImplementation.cpp:
1415         (WebCore::DOMImplementation::createDocument):
1416         (WebCore::DOMImplementation::createHTMLDocument):
1417         * dom/Document.h:
1418         (WebCore::Document::contextFeatures):
1419         * dom/Document.cpp:
1420         (WebCore::Document::Document):
1421         (WebCore::Document::setContextFeatures):
1422         * dom/Position.cpp:
1423         (WebCore::Position::Position):
1424         (WebCore::Position::findParent):
1425         * dom/TreeScope.cpp:
1426         (WebCore::TreeScope::getSelection):
1427         * dom/make_names.pl:
1428         (printConstructorInterior):
1429         (printFactoryCppFile):
1430         (printWrapperFunctions):
1431         (printWrapperFactoryCppFile):
1432         * editing/markup.cpp:
1433         (WebCore::createFragmentFromMarkupWithContext):
1434         * html/HTMLStyleElement.cpp:
1435         (WebCore::HTMLStyleElement::registerWithScopingNode):
1436         (WebCore::HTMLStyleElement::unregisterWithScopingNode):
1437         * html/shadow/HTMLContentElement.cpp:
1438         (WebCore::contentTagName):
1439         * inspector/DOMPatchSupport.cpp:
1440         (WebCore::DOMPatchSupport::patchDocument):
1441         * loader/FrameLoaderClient.h:
1442         * platform/RefCountedSupplement.h: Copied from Source/WebCore/platform/Supplementable.h.
1443         (WebCore):
1444         (RefCountedSupplement):
1445         (WebCore::RefCountedSupplement::hostDestroyed):
1446         (Wrapper):
1447         (WebCore::RefCountedSupplement::Wrapper::Wrapper):
1448         (WebCore::RefCountedSupplement::Wrapper::~Wrapper):
1449         (WebCore::RefCountedSupplement::Wrapper::wrapped):
1450         (WebCore::RefCountedSupplement::provideTo):
1451         (WebCore::RefCountedSupplement::from):
1452         * platform/Supplementable.h:
1453         (WebCore::Supplement::isRefCountedWrapper):
1454         * xml/XMLHttpRequest.cpp:
1455         (WebCore::XMLHttpRequest::responseXML):
1456
1457 2012-06-11  Kinuko Yasuda  <kinuko@chromium.org>
1458
1459         Unprefix Blob.webkitSlice
1460         https://bugs.webkit.org/show_bug.cgi?id=78111
1461
1462         Reviewed by Adam Barth.
1463
1464         Add unprefixed Blob.slice and start showing a deprecation message when webkitSlice is called.
1465
1466         No new tests: existing tests that call webkitSlice() are converted to slice(). They should keep running.
1467
1468         * bindings/gobject/WebKitDOMCustom.cpp:
1469         (webkit_dom_blob_slice): Removed.
1470         (webkit_dom_blob_webkit_slice): Added.
1471         * fileapi/Blob.cpp:
1472         (WebCore::Blob::slice):
1473         (WebCore):
1474         (WebCore::Blob::webkitSlice):
1475         (WebCore::Blob::sliceInternal): Added.
1476         * fileapi/Blob.h:
1477         (WebCore):
1478         (Blob):
1479         * fileapi/Blob.idl:
1480
1481 2012-06-12  Sheriff Bot  <webkit.review.bot@gmail.com>
1482
1483         Unreviewed, rolling out r120036.
1484         http://trac.webkit.org/changeset/120036
1485         https://bugs.webkit.org/show_bug.cgi?id=88965
1486
1487         "assert failed in debug build" (Requested by maryw on
1488         #webkit).
1489
1490         * platform/network/blackberry/NetworkJob.cpp:
1491         (WebCore::NetworkJob::handleNotifyDataReceived):
1492
1493 2012-06-12  Wei James  <james.wei@intel.com>
1494
1495         webcore should depend on webcore_arm_neon for only arm target_arch
1496         https://bugs.webkit.org/show_bug.cgi?id=88839
1497
1498         Reviewed by Adam Barth.
1499
1500         * WebCore.gyp/WebCore.gyp:
1501
1502 2012-06-12  Edaena Salinas Jasso  <edaena@apple.com>
1503
1504         Can't set el.type on a <button> element
1505         https://bugs.webkit.org/show_bug.cgi?id=14439
1506
1507         Reviewed by Darin Adler.
1508
1509         Test: fast/dom/HTMLButtonElement/change-type.html
1510
1511         * bindings/objc/PublicDOMInterfaces.h:
1512         * html/HTMLButtonElement.cpp:
1513         (WebCore::HTMLButtonElement::setType): Added implementation of setType method.
1514         (WebCore):
1515         * html/HTMLButtonElement.h:
1516         (HTMLButtonElement): Added setType method.
1517         * html/HTMLButtonElement.idl: Removed readonly restriction to the type variable.
1518
1519 2012-06-12  Kenichi Ishibashi  <bashi@chromium.org>
1520
1521         [Chromium] Implement font shaping with font-feature-settings on Mac
1522         https://bugs.webkit.org/show_bug.cgi?id=69826
1523
1524         Reviewed by Tony Chang.
1525
1526         Add HarfBuzz-ng text shaper.
1527         Chromium mac port uses it as secondary text shaper to support OpenType features.
1528         HarfBuzz-ng is only used when -webkit-font-feature-settings is specified and
1529         corresponding font is not an AAT font.
1530
1531         No new tests. css3/font-feature-settings-rendering.html should pass on Chromium mac port.
1532
1533         * WebCore.gyp/WebCore.gyp: Added harfbuzz-ng dependencies.
1534         * WebCore.gypi: Added harfbuzz-ng files.
1535         * platform/graphics/FontPlatformData.h:
1536         (FontPlatformData): Added m_harfbuzzFace.
1537         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1538         (WebCore::FontPlatformData::platformDataInit): Copy m_harfbuzzFace.
1539         (WebCore::FontPlatformData::platformDataAssign): Ditto.
1540         (WebCore):
1541         (WebCore::isAATFont):
1542         (WebCore::FontPlatformData::harfbuzzFace):
1543         * platform/graphics/harfbuzz/ng/HarfBuzzFace.cpp: Added.
1544         (WebCore):
1545         (WebCore::harfbuzzFaceCache):
1546         (WebCore::HarfBuzzFace::HarfBuzzFace):
1547         (WebCore::HarfBuzzFace::~HarfBuzzFace):
1548         * platform/graphics/harfbuzz/ng/HarfBuzzFace.h: Added.
1549         (WebCore):
1550         (HarfBuzzFace):
1551         (WebCore::HarfBuzzFace::create):
1552         * platform/graphics/harfbuzz/ng/HarfBuzzFaceCoreText.cpp: Added.
1553         (WebCore):
1554         (WebCore::floatToHarfBuzzPosition):
1555         (WebCore::getGlyph):
1556         (WebCore::getGlyphHorizontalAdvance):
1557         (WebCore::getGlyphHorizontalOrigin):
1558         (WebCore::getGlyphExtents):
1559         (WebCore::harfbuzzCoreTextGetFontFuncs):
1560         (WebCore::releaseTableData):
1561         (WebCore::harfbuzzCoreTextGetTable):
1562         (WebCore::HarfBuzzFace::createFace):
1563         (WebCore::HarfBuzzFace::createFont):
1564         (WebCore::HarfBuzzShaper::createGlyphBufferAdvance):
1565         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp: Added.
1566         (WebCore):
1567         (WebCore::harfbuzzPositionToFloat):
1568         (WebCore::HarfBuzzShaper::HarfBuzzRun::HarfBuzzRun):
1569         (WebCore::HarfBuzzShaper::HarfBuzzRun::setGlyphAndPositions):
1570         (WebCore::HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition):
1571         (WebCore::HarfBuzzShaper::HarfBuzzRun::xPositionForOffset):
1572         (WebCore::HarfBuzzShaper::HarfBuzzShaper):
1573         (WebCore::HarfBuzzShaper::~HarfBuzzShaper):
1574         (WebCore::HarfBuzzShaper::setFontFeatures):
1575         (WebCore::HarfBuzzShaper::shape):
1576         (WebCore::HarfBuzzShaper::setupHarfBuzzRun):
1577         (WebCore::HarfBuzzShaper::shapeHarfBuzzRun):
1578         (WebCore::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun):
1579         (WebCore::HarfBuzzShaper::offsetForPosition):
1580         (WebCore::HarfBuzzShaper::selectionRect):
1581         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h: Added.
1582         (WebCore):
1583         (HarfBuzzShaper):
1584         (WebCore::HarfBuzzShaper::totalWidth):
1585         (HarfBuzzRun):
1586         (WebCore::HarfBuzzShaper::HarfBuzzRun::create):
1587         (WebCore::HarfBuzzShaper::HarfBuzzRun::setWidth):
1588         (WebCore::HarfBuzzShaper::HarfBuzzRun::numCharacters):
1589         (WebCore::HarfBuzzShaper::HarfBuzzRun::numGlyphs):
1590         (WebCore::HarfBuzzShaper::HarfBuzzRun::width):
1591         (WebCore::HarfBuzzShaper::HarfBuzzRun::rtl):
1592         * platform/graphics/mac/FontComplexTextMac.cpp:
1593         (WebCore):
1594         (WebCore::preferHarfBuzz): Added.
1595         (WebCore::Font::selectionRectForComplexText): Use HarfBuzzShaper if font-feature-settings exists.
1596         (WebCore::Font::drawComplexText): Ditto.
1597         (WebCore::Font::floatWidthForComplexText): Ditto.
1598         (WebCore::Font::offsetForPositionForComplexText): Ditto.
1599
1600 2012-06-12  Luke Macpherson  <macpherson@chromium.org>
1601
1602         WIP: Implement CSS Variables Standard.
1603         https://bugs.webkit.org/show_bug.cgi?id=85580
1604
1605         Reviewed by Ojan Vafai.
1606
1607         Implement CSS Variables Module Level 1. (See http://www.w3.org/TR/css-variables/)
1608
1609         A HashMap of properties is referenced by RenderStyle, and used to store variables as strings.
1610         That HashMap is copy-on-write, and unless new variables are defined is simply a pointer to the
1611         parent's definitions. At usage time the variable's value is parsed according to the CSS property
1612         where it is used.
1613         Variables can:
1614                Define lists of values (ie. entire shorthand values).
1615                Define individual values.
1616                Refer to other variables. (Cycle detection is implemented).
1617         Please see the supplied test cases for example usage.
1618
1619         Missing features:
1620                CSS variables cannot yet be used inside some functions such as -webkit-calc.
1621
1622         Covered by existing test suite under fast/css/variables.
1623
1624         * GNUmakefile.list.am:
1625         * Target.pri:
1626         * WebCore.gypi:
1627         * WebCore.vcproj/WebCore.vcproj:
1628         * WebCore.xcodeproj/project.pbxproj:
1629         * css/CSSComputedStyleDeclaration.cpp:
1630         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1631         * css/CSSGrammar.y:
1632         * css/CSSParser.cpp:
1633         (WebCore):
1634         (WebCore::filterProperties):
1635         (WebCore::CSSParser::createStylePropertySet):
1636         (WebCore::CSSParser::validUnit):
1637         (WebCore::CSSParser::createPrimitiveNumericValue):
1638         (WebCore::CSSParser::parseValue):
1639         (WebCore::CSSParser::storeVariableDeclaration):
1640         (WebCore::CSSParser::detectDashToken):
1641         (WebCore::CSSParser::lex):
1642         * css/CSSParser.h:
1643         (CSSParser):
1644         * css/CSSParserValues.cpp:
1645         (WebCore::CSSParserValue::createCSSValue):
1646         * css/CSSPrimitiveValue.cpp:
1647         (WebCore::isValidCSSUnitTypeForDoubleConversion):
1648         (WebCore::CSSPrimitiveValue::getStringValue):
1649         (WebCore::CSSPrimitiveValue::customSerializeResolvingVariables):
1650         (WebCore):
1651         * css/CSSPrimitiveValue.h:
1652         (CSSPrimitiveValue):
1653         (WebCore::CSSPrimitiveValue::isVariableName):
1654         * css/CSSProperty.cpp:
1655         (WebCore::CSSProperty::isInheritedProperty):
1656         * css/CSSValue.cpp:
1657         (WebCore::CSSValue::serializeResolvingVariables):
1658         (WebCore):
1659         (WebCore::CSSValue::destroy):
1660         * css/CSSValue.h:
1661         (CSSValue):
1662         (WebCore::CSSValue::isVariableValue):
1663         * css/CSSValueList.cpp:
1664         (WebCore):
1665         (WebCore::CSSValueList::customSerializeResolvingVariables):
1666         * css/CSSValueList.h:
1667         (CSSValueList):
1668         * css/CSSVariableValue.h: Added.
1669         (WebCore):
1670         (CSSVariableValue):
1671         (WebCore::CSSVariableValue::create):
1672         (WebCore::CSSVariableValue::name):
1673         (WebCore::CSSVariableValue::value):
1674         (WebCore::CSSVariableValue::CSSVariableValue):
1675         * css/StyleResolver.cpp:
1676         (WebCore::StyleResolver::collectMatchingRulesForList):
1677         * css/StyleResolver.h:
1678         * css/WebKitCSSTransformValue.cpp:
1679         (WebCore):
1680         (WebCore::WebKitCSSTransformValue::customSerializeResolvingVariables):
1681         * css/WebKitCSSTransformValue.h:
1682         (WebKitCSSTransformValue):
1683         * css/makeprop.pl:
1684         * rendering/style/RenderStyle.h:
1685         * rendering/style/StyleVariableData.h: Added.
1686         (WebCore):
1687         (StyleVariableData):
1688         (WebCore::StyleVariableData::create):
1689         (WebCore::StyleVariableData::copy):
1690         (WebCore::StyleVariableData::operator==):
1691         (WebCore::StyleVariableData::operator!=):
1692         (WebCore::StyleVariableData::setVariable):
1693         (WebCore::StyleVariableData::StyleVariableData):
1694
1695 2012-06-12  MORITA Hajime  <morrita@google.com>
1696
1697         Shadow Pseudo ID should be able to nest to point nested shadow DOM.
1698         https://bugs.webkit.org/show_bug.cgi?id=62218
1699
1700         Reviewed by Dimitri Glazkov.
1701
1702         - updateSpecifiersWithElementName() didn't take nesting into account.
1703           tag history can contain selector entries which isn't marked as ShadowDescendant yet.
1704           such entry can be found by investigating isUnknownPseudoElement().
1705         - SelectorChecker::checkSelector() was too strict. Unknown pseudo elements are essentially a kind of class or id
1706           in implementation perspective. For such, rejecting by missing elementStyle doesn't make sense:
1707           It isn't a pseudo but a real element for WebCore after all.
1708         - Added Internals::setShadowPseudoId() to create a test harness whose DOM tree contains pseudo shadow ids.
1709
1710         Before this change, following selecdtor chain is created for "p::-shadow-child::-nested-shadow-child":
1711
1712           [both tag name and -shadow-id are set] <-(ShadowDescendant)- [-nested-shadow-id]
1713
1714         What we want, which is created by this change is:
1715
1716           [tag] <-(ShadowDescendant)- [-shadow-id is set] <-(ShadowdescenDant)- [-nested-shadow-id]
1717
1718         Test: fast/dom/shadow/shadow-nested-pseudo-id.html
1719
1720         * WebCore.exp.in:
1721         * css/CSSParser.cpp:
1722         (WebCore::CSSParser::updateSpecifiersWithElementName):
1723         * css/SelectorChecker.cpp:
1724         (WebCore::SelectorChecker::checkOneSelector):
1725         * testing/Internals.cpp:
1726         (WebCore::Internals::setShadowPseudoId):
1727         (WebCore):
1728         * testing/Internals.h:
1729         (Internals):
1730         * testing/Internals.idl:
1731
1732 2012-06-12  Christophe Dumez  <christophe.dumez@intel.com>
1733
1734         [soup] Prevent setting or editing httpOnly cookies from JavaScript
1735         https://bugs.webkit.org/show_bug.cgi?id=88760
1736
1737         Reviewed by Gustavo Noronha Silva.
1738
1739         Prevent setting or overwriting httpOnly cookies from JavaScript.
1740         Fix setCookies() so that it parses all the cookies and not just
1741         the first one.
1742
1743         Test: http/tests/cookies/js-get-and-set-http-only-cookie.html
1744
1745         * platform/network/soup/CookieJarSoup.cpp:
1746         (WebCore::httpOnlyCookieExists):
1747         (WebCore):
1748         (WebCore::setCookies):
1749
1750 2012-06-12  Christophe Dumez  <christophe.dumez@intel.com>
1751
1752         [EFL] Enable SHADOW_DOM flag
1753         https://bugs.webkit.org/show_bug.cgi?id=87732
1754
1755         Reviewed by Kentaro Hara.
1756
1757         Test: fast/dom/shadow/shadow-root-innerHTML.html
1758
1759         * dom/ShadowRoot.idl: Add JSGenerateToJSObject extended attribute so
1760         that the ShadowRoot properties are accessible on JS side.
1761         * testing/Internals.idl: Fix SHADOW_DOM ifdef check.
1762
1763 2012-06-12  Leo Yang  <leo.yang@torchmobile.com.cn>
1764
1765         Dynamic hash table in DOMObjectHashTableMap is wrong in multiple threads
1766         https://bugs.webkit.org/show_bug.cgi?id=87334
1767
1768         Reviewed by Geoffrey Garen.
1769
1770         Adapt to JSC::HashTable::copy to avoid copy dynamic table member of a HashTable.
1771         The dynamic table may be allocated on other thread and contains thread specific
1772         identifiers. For example, a hash table of JSEntryArray was first initialized on a
1773         worker thread, and then the user reloaded the page, another worker thread is
1774         created due to reload, the dynamic allocated table in *staticTable* is specific
1775         to the first worker thread which has died. If the user reload the page again,
1776         the dynamic table will be freed and memory corruption will occur.
1777
1778         No functionalities changed, no new tests.
1779
1780         * bindings/js/DOMObjectHashTableMap.h:
1781         (WebCore::DOMObjectHashTableMap::get):
1782
1783 2012-06-12  James Robinson  <jamesr@chromium.org>
1784
1785         [chromium] Port Canvas2DLayerBridge over to WebExternalTextureLayer
1786         https://bugs.webkit.org/show_bug.cgi?id=88597
1787
1788         Reviewed by Adrienne Walker.
1789
1790         This converts Canvas2DLayerBridge to using public WebLayer API types instead of LayerChromium types.
1791
1792         * platform/graphics/chromium/Canvas2DLayerBridge.cpp:
1793         (WebCore::AcceleratedDeviceContext::AcceleratedDeviceContext):
1794         (WebCore::AcceleratedDeviceContext::prepareForDraw):
1795         (AcceleratedDeviceContext):
1796         (WebCore::Canvas2DLayerBridge::Canvas2DLayerBridge):
1797         (WebCore::Canvas2DLayerBridge::~Canvas2DLayerBridge):
1798         (WebCore::Canvas2DLayerBridge::skCanvas):
1799         (WebCore::Canvas2DLayerBridge::prepareTexture):
1800         (WebCore::Canvas2DLayerBridge::context):
1801         (WebCore::Canvas2DLayerBridge::layer):
1802         (WebCore::Canvas2DLayerBridge::contextAcquired):
1803         * platform/graphics/chromium/Canvas2DLayerBridge.h:
1804         (WebCore):
1805         (Canvas2DLayerBridge):
1806
1807 2012-06-12  Alexis Menard  <alexis.menard@openbossa.org>
1808
1809         Fix packing in StyleBoxData for Windows.
1810         https://bugs.webkit.org/show_bug.cgi?id=88858
1811
1812         Reviewed by Tony Chang.
1813
1814         MSVC doesn't pack bitfields if the types are mixed.
1815         We can safely change the bool type to an unsigned so
1816         the packing will happen. I have added a compile assert
1817         for future regressions.
1818
1819         No new tests : we should not see any regressions.
1820
1821         * rendering/style/StyleBoxData.h:
1822         * rendering/style/StyleBoxData.cpp:
1823         (StyleBoxData):
1824
1825 2012-06-12  Adrienne Walker  <enne@google.com>
1826
1827         [chromium] Paint scrollbars on WebKit thread and composite those textures
1828         https://bugs.webkit.org/show_bug.cgi?id=88145
1829
1830         Reviewed by James Robinson.
1831
1832         Scrollbars were previously painted and uploaded on the compositor
1833         thread. This isn't possible to do for many scrollbar themes. This
1834         patch changes ScrollbarLayerChromium to paint the scrollbar into two
1835         parts: the thumb, and everything else. These are uploaded into
1836         textures and synced over to the CCScrollbarImpl where they are
1837         composited and drawn.
1838
1839         Mac and overlay scrollbars are still not enabled to have compositor
1840         thread-updated scrollbars.
1841
1842         As a bonus, fix LayerRendererChromium::drawTextureQuad to draw quads
1843         that do not fill the entire layer bounds.
1844
1845         Tested by existing layout and unit tests by removing the condition
1846         that these scrollbar layers are only created when the threaded proxy
1847         exists.
1848
1849         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
1850         (WebCore::scrollbarLayerDidChange):
1851         * platform/ScrollbarThemeComposite.cpp:
1852         (WebCore::ScrollbarThemeComposite::thumbRect):
1853         (WebCore):
1854         * platform/ScrollbarThemeComposite.h:
1855         (ScrollbarThemeComposite):
1856         * platform/graphics/chromium/LayerRendererChromium.cpp:
1857         (WebCore::LayerRendererChromium::drawTextureQuad):
1858         * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
1859         (WebCore::ScrollbarLayerChromium::ScrollbarLayerChromium):
1860         (WebCore::ScrollbarLayerChromium::theme):
1861         (WebCore):
1862         (WebCore::ScrollbarLayerChromium::pushPropertiesTo):
1863         (ScrollbarBackgroundPainter):
1864         (WebCore::ScrollbarBackgroundPainter::create):
1865         (WebCore::ScrollbarBackgroundPainter::paint):
1866         (WebCore::ScrollbarBackgroundPainter::ScrollbarBackgroundPainter):
1867         (ScrollbarThumbPainter):
1868         (WebCore::ScrollbarThumbPainter::create):
1869         (WebCore::ScrollbarThumbPainter::paint):
1870         (WebCore::ScrollbarThumbPainter::ScrollbarThumbPainter):
1871         (WebCore::ScrollbarLayerChromium::setLayerTreeHost):
1872         (WebCore::ScrollbarLayerChromium::createTextureUpdaterIfNeeded):
1873         (WebCore::ScrollbarLayerChromium::updatePart):
1874         (WebCore::ScrollbarLayerChromium::update):
1875         * platform/graphics/chromium/ScrollbarLayerChromium.h:
1876         (WebCore):
1877         (ScrollbarLayerChromium):
1878         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
1879         (WebCore::CCScrollbarLayerImpl::CCScrollbarLayerImpl):
1880         (WebCore::CCScrollbarLayerImpl::appendQuads):
1881         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
1882         (WebCore::CCScrollbarLayerImpl::setBackgroundTextureId):
1883         (WebCore::CCScrollbarLayerImpl::setThumbTextureId):
1884         (CCScrollbarLayerImpl):
1885
1886 2012-06-12  Tony Chang  <tony@chromium.org>
1887
1888         Replaced items in a flexbox should be coerced to display:block
1889         https://bugs.webkit.org/show_bug.cgi?id=87068
1890
1891         Reviewed by Ojan Vafai.
1892
1893         The flexbox spec lists HTML tags that should automatically be converted
1894         to display:block when a flex child. It also says that atomic inline-level
1895         children should become block (e.g., inline-table should be treated as table).
1896         http://dev.w3.org/csswg/css3-flexbox/#flex-items
1897
1898         Test: css3/flexbox/flexitem.html
1899
1900         * css/StyleResolver.cpp:
1901         (WebCore::StyleResolver::collectMatchingRulesForList):
1902
1903 2012-06-12  Joshua Bell  <jsbell@chromium.org>
1904
1905         IndexedDB: ObjectStore/Index shouldn't hold reference to backing store
1906         https://bugs.webkit.org/show_bug.cgi?id=83074
1907
1908         Reviewed by Tony Chang.
1909
1910         We should be able to collect and close the leveldb backing store as soon as the database
1911         connection is closed, but the IDBObjectStoreBackendImpl and IDBIndexBackendImpl were
1912         holding RefPtrs, and those objects are kept alive by script references.
1913
1914         Replaced RefPtrs to the IDBBackingStore with pointers to the IDBDatabase. On the back end,
1915         IDBDatabaseBackendImpl maintains a RefPtr to the IDBObjectStoreBackendImpl object, so
1916         a raw pointer back is safe. On the front end, the IDBObjectStore maintains a RefPtr to
1917         the IDBDatabase so script can navigate upwards. Ditto on both ends for the ObjectStore/Index
1918         relationship. The frontend objects maintain RefPtrs to the backend objects, so the backend
1919         objects and their owners are maintained as long as there's a script reference. To ensure
1920         that all LevelDB objects are destructed in the right order, transactions indirectly track all
1921         open cursors and ensure they are closed when the transaction finishes, and database closing
1922         is explicitly prevented from occurring until transactions are complete.
1923
1924         Also made IDBDatabaseBackendImpl handle a null IDBFactoryBackendImpl pointer, for testing.
1925
1926         Tests: storage/indexeddb/database-close.html
1927                storage/indexeddb/persistence.html
1928                [Chromium] webkit_unit_tests --gtest_filter=IDBDatabaseBackendTest.BackingStoreRetention
1929
1930         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
1931         (WebCore::IDBCursorBackendImpl::close): Release LevelDB resources when closed to allow backing store to close.
1932         * Modules/indexeddb/IDBCursorBackendImpl.h:
1933         (WebCore):
1934         * Modules/indexeddb/IDBDatabase.cpp: Ensure connection close deferred until all transactions are finished.
1935         (WebCore::IDBDatabase::transactionCreated): Accounting.
1936         (WebCore::IDBDatabase::transactionFinished): Accounting.
1937         (WebCore::IDBDatabase::close):
1938         (WebCore):
1939         (WebCore::IDBDatabase::closeConnection):
1940         * Modules/indexeddb/IDBDatabase.h:
1941         (IDBDatabase):
1942         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Track outstanding transactions for forced-close scenarios.
1943         (WebCore::IDBDatabaseBackendImpl::~IDBDatabaseBackendImpl):
1944         (WebCore::IDBDatabaseBackendImpl::createObjectStore): Don't pass in backing store reference.
1945         (WebCore::IDBDatabaseBackendImpl::setVersion): Use transaction() for consistent accounting.
1946         (WebCore::IDBDatabaseBackendImpl::transactionFinished): Accounting.
1947         (WebCore::IDBDatabaseBackendImpl::transaction): Accounting.
1948         (WebCore::IDBDatabaseBackendImpl::close): Unregister from factory when last connection is closed.
1949         (WebCore::IDBDatabaseBackendImpl::loadObjectStores): Don't pass in backing store reference.
1950         (WebCore::IDBDatabaseBackendImpl::removeObjectStoreFromMap):
1951         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
1952         (WebCore):
1953         (IDBDatabaseBackendImpl):
1954         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
1955         (WebCore::IDBFactoryBackendImpl::deleteDatabase): Don't hang on to deleted databases eternally.
1956         * Modules/indexeddb/IDBFactoryBackendImpl.h: Backend map controls IDBDatabaseBackend lifetimes.
1957         (IDBFactoryBackendImpl):
1958         * Modules/indexeddb/IDBIndexBackendImpl.cpp: Don't hold backing store references.
1959         (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl):
1960         * Modules/indexeddb/IDBIndexBackendImpl.h:
1961         (WebCore::IDBIndexBackendImpl::create):
1962         (IDBIndexBackendImpl):
1963         (WebCore::IDBIndexBackendImpl::backingStore):
1964         (WebCore::IDBIndexBackendImpl::databaseId):
1965         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: Don't hold backing store references.
1966         (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl):
1967         (WebCore::IDBObjectStoreBackendImpl::createIndex):
1968         (WebCore::IDBObjectStoreBackendImpl::loadIndexes):
1969         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
1970         (WebCore::IDBObjectStoreBackendImpl::create):
1971         (IDBObjectStoreBackendImpl):
1972         (WebCore::IDBObjectStoreBackendImpl::backingStore):
1973         (WebCore::IDBObjectStoreBackendImpl::databaseId):
1974         * Modules/indexeddb/IDBRequest.cpp:
1975         (WebCore::IDBRequest::onSuccess):
1976         * Modules/indexeddb/IDBTransaction.cpp:
1977         (WebCore::IDBTransaction::IDBTransaction): For IDBDatabase accounting, allow ref during ctor.
1978         (WebCore::IDBTransaction::onAbort): Accounting.
1979         (WebCore::IDBTransaction::onComplete): Accounting.
1980         * Modules/indexeddb/IDBTransaction.h:
1981         (WebCore::IDBTransaction::isVersionChange): Convenience function.
1982         (IDBTransaction):
1983         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
1984         (WebCore::IDBTransactionBackendImpl::abort): Cleanup ordering to allow backing store to close.
1985         (WebCore::IDBTransactionBackendImpl::commit): Cleanup ordering to allow backing store to close.
1986
1987 2012-06-12  Adrienne Walker  <enne@google.com>
1988
1989         [chromium] Don't set visible layer rect in CCLayerTreeHost paint iteration
1990         https://bugs.webkit.org/show_bug.cgi?id=88895
1991
1992         Reviewed by James Robinson.
1993
1994         We should only set visible layer rects during the recursion in
1995         CClayerTreeHostCommon and not while we're painting. This is one last
1996         straggling piece of code that never got moved.
1997
1998         Tested by existing mask-related layout tests.
1999
2000         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2001         (WebCore::CCLayerTreeHost::paintMasksForRenderSurface):
2002         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
2003         (WebCore::calculateVisibleAndScissorRectsInternal):
2004
2005 2012-06-12  Dana Jansens  <danakj@chromium.org>
2006
2007         [chromium] Return empty visibleLayerRect for layers with empty content bounds
2008         https://bugs.webkit.org/show_bug.cgi?id=88901
2009
2010         Reviewed by Adrienne Walker.
2011
2012         This change should only affect tests. Currently if you set up a
2013         CCLayerImpl with some bounds, but don't set the contentBounds, then
2014         they are empty by default. In this case the visibleLayerRect gets
2015         set inappropriately to the layer's target surface contentRect which
2016         in a completely different coordinate space.
2017
2018         Fixed up tests that were passing bogusly and failed after this change.
2019
2020         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
2021         (WebCore::calculateVisibleLayerRect):
2022
2023 2012-06-12  Adrienne Walker  <enne@google.com>
2024
2025         [chromium] ScrollingCoordinator::setScrollLayer should update scroll layer ids
2026         https://bugs.webkit.org/show_bug.cgi?id=88882
2027
2028         Reviewed by James Robinson.
2029
2030         Tested manually, as scrollbar layers are currently only created when
2031         threaded compositing is enabled and none of those layout tests trigger
2032         this bug.
2033
2034         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
2035         (WebCore::ScrollingCoordinatorPrivate::setScrollLayer):
2036         (ScrollingCoordinatorPrivate):
2037         (WebCore::ScrollingCoordinatorPrivate::setHorizontalScrollbarLayer):
2038         (WebCore::ScrollingCoordinatorPrivate::setVerticalScrollbarLayer):
2039         (WebCore::createScrollbarLayer):
2040         (WebCore::ScrollingCoordinator::frameViewHorizontalScrollbarLayerDidChange):
2041         (WebCore::ScrollingCoordinator::frameViewVerticalScrollbarLayerDidChange):
2042         * platform/graphics/chromium/ScrollbarLayerChromium.h:
2043         (WebCore::ScrollbarLayerChromium::setScrollLayerId):
2044         (ScrollbarLayerChromium):
2045         * platform/graphics/chromium/TreeSynchronizer.cpp:
2046         (WebCore::TreeSynchronizer::updateScrollbarLayerPointersRecursive):
2047
2048 2012-06-12  Mark Mentovai  <mark@chromium.org>
2049
2050         [chromium mac] Don't include things in subframeworks of
2051         ApplicationServices.framework.
2052
2053         Subframeworks move around from SDK to SDK and OS release to OS
2054         release, but just using the top-level umbrella framework guarantees
2055         forward compatibility. When building for Chromium Mac, just #include
2056         <ApplicationServices/ApplicationServices.h> instead of reaching in to
2057         subframeworks.
2058
2059         https://bugs.webkit.org/show_bug.cgi?id=88569
2060
2061         Reviewed by Stephen White.
2062
2063         No new tests.
2064
2065         * platform/graphics/GlyphBuffer.h:
2066         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2067         * platform/graphics/skia/GraphicsContextSkia.cpp:
2068
2069 2012-06-12  Igor Oliveira  <igor.o@sisa.samsung.com>
2070
2071         Apply animations and transitions for first-letter element
2072         https://bugs.webkit.org/show_bug.cgi?id=85253
2073
2074         Add animations and transitions support for the first-letter
2075         pseudo element.
2076         Instead of calling RenderOject::node() in the animations code,
2077         now we need to call RenderObject::styledGeneratingNode() because
2078         pseudo elements does not have a Node associated with the
2079         RenderObject.
2080
2081         Initial patch by Simon Fraser
2082
2083         Reviewed by Simon Fraser.
2084
2085         Tests: animations/first-letter-animation.html
2086                animations/first-letter-play-state.html
2087                transitions/first-letter-color-transition.html
2088                transitions/first-letter-transition.html
2089
2090         * page/animation/AnimationBase.cpp:
2091         (WebCore::AnimationBase::updateStateMachine):
2092         * page/animation/AnimationController.cpp:
2093         (WebCore::AnimationControllerPrivate::updateAnimations):
2094         (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
2095         (WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
2096         (WebCore::AnimationController::cancelAnimations):
2097         (WebCore::AnimationController::updateAnimations):
2098         * page/animation/ImplicitAnimation.cpp:
2099         (WebCore::ImplicitAnimation::pauseAnimation):
2100         (WebCore::ImplicitAnimation::sendTransitionEvent):
2101         * page/animation/KeyframeAnimation.cpp:
2102         (WebCore::KeyframeAnimation::KeyframeAnimation):
2103         (WebCore::KeyframeAnimation::pauseAnimation):
2104         (WebCore::KeyframeAnimation::endAnimation):
2105         (WebCore::KeyframeAnimation::sendAnimationEvent):
2106         * rendering/RenderBlock.cpp:
2107         (WebCore::RenderBlock::updateFirstLetterStyle):
2108         (WebCore::RenderBlock::createFirstLetterRenderer):
2109         * rendering/RenderInline.cpp:
2110         (WebCore::RenderInline::clippedOverflowRectForRepaint):
2111         * rendering/RenderObject.cpp:
2112         (WebCore::RenderObject::setAnimatableStyle):
2113         (WebCore::RenderObject::styledGeneratingNode):
2114         (WebCore):
2115         * rendering/RenderObject.h:
2116         (RenderObject):
2117
2118 2012-06-12  Kent Tamura  <tkent@chromium.org>
2119
2120         Checking a radio button doesn't uncheck other buttons in the same group in some cases.
2121         https://bugs.webkit.org/show_bug.cgi?id=88835
2122
2123         Reviewed by Ryosuke Niwa.
2124
2125         This change fixes a bug that checking a radio button in a radio button
2126         group in a form detached from a document tree doesn't uncheck another
2127         checked radio button in the radio button group.
2128
2129         A radio button participates in a radio button group in the following
2130         conditions:
2131         - If it is owned by a form element regardless of the form is in a
2132         document tree or not, or
2133
2134         - If it is not owned by any form elements and it is in a document tree.
2135         A radio button group for the radio button is owned by the document.
2136
2137         For HTMLInputElement::removedFrom():
2138         The old code always unregistered the radio button if it was removed from
2139         the document tree. It was incorrect because we don't need to unregister
2140         it if it has an owner form and the owner form is not changed by
2141         removedFrom().
2142         If the owner form is cleared by removedFrom(), willChangeForm()
2143         unregisters the radio button. So what we should do in removedFrom() is
2144         to unregister the radio button only if the radio button group is owned
2145         by the document.
2146
2147         For HTMLInputElement::insertedInto():
2148         The old code always registered the radio button if it is inserted into
2149         the document tree. It was incorrect because we don't need to register it
2150         if it has an owner form and the owner form is not changed by
2151         insertedInto().
2152         If the owner form is changed by insertedInto(), didChangeForm()
2153         registers the radio button. So We should register the radio button only
2154         if its radio button group will be owned by the document.
2155
2156         Test: Add test cases to fast/forms/radio/radio-group.html
2157
2158         * html/HTMLInputElement.cpp:
2159         (WebCore::HTMLInputElement::insertedInto):
2160         Register this to CheckedRadioButtons only if new group owner is Document.
2161         (WebCore::HTMLInputElement::removedFrom):
2162         Unregister this from CheckedRadioButtons only if old group owner was Document.
2163
2164 2012-06-12  James Robinson  <jamesr@chromium.org>
2165
2166         [chromium] REGRESSION(119769): Canvas2DLayerBridge may go away before its TextureLayerChromium
2167         https://bugs.webkit.org/show_bug.cgi?id=88910
2168
2169         Reviewed by Adrienne Walker.
2170
2171         Unregister the bridge as its TextureLayerChromium client when going away.
2172
2173         Covered by new unit test in Canvas2DLayerBridgeTest.cpp.
2174
2175         * platform/graphics/chromium/Canvas2DLayerBridge.cpp:
2176         (WebCore::Canvas2DLayerBridge::~Canvas2DLayerBridge):
2177
2178 2012-06-12  Alec Flett  <alecflett@chromium.org>
2179
2180         IndexedDB: Error codes, phase two
2181         https://bugs.webkit.org/show_bug.cgi?id=88690
2182
2183         Reviewed by Tony Chang.
2184
2185         Update the next phase of IndexedDB error codes to match the spec.
2186         This update is mostly focused on DATA_ERR vs CONSTRAINT_ERR.
2187
2188         Also moves some of the error checking for the transaction mode
2189         into the frontend and replaces the backend checks with asserts, so that
2190         we can consolidate error checking in one place.
2191
2192         This also removes a few FIXME's that are no longer true (about 
2193         I/O errors - the spec was updated and our implementation was
2194         already correct)
2195
2196         No new tests, existing tests cover changed behavior.
2197
2198         * Modules/indexeddb/IDBCursor.cpp:
2199         (WebCore::IDBCursor::deleteFunction):
2200         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
2201         (WebCore::IDBCursorBackendImpl::deleteFunction):
2202         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2203         (WebCore::IDBDatabaseBackendImpl::setVersionInternal):
2204         * Modules/indexeddb/IDBObjectStore.cpp:
2205         (WebCore::IDBObjectStore::add):
2206         (WebCore::IDBObjectStore::put):
2207         (WebCore::IDBObjectStore::deleteFunction):
2208         (WebCore::IDBObjectStore::clear):
2209         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2210         (WebCore::IDBObjectStoreBackendImpl::put):
2211         (WebCore::IDBObjectStoreBackendImpl::putInternal):
2212         (WebCore::IDBObjectStoreBackendImpl::deleteFunction):
2213         (WebCore::IDBObjectStoreBackendImpl::clear):
2214         * Modules/indexeddb/IDBTransaction.h:
2215         (WebCore::IDBTransaction::enumMode):
2216         * Modules/indexeddb/IDBTransactionBackendImpl.h:
2217
2218 2012-06-12  Min Qin  <qinmin@google.com>
2219
2220         Disable autoplay when user gesture is required for media playback
2221         https://bugs.webkit.org/show_bug.cgi?id=88897
2222
2223         Reviewed by Adam Barth.
2224
2225         When user gesture is required for media playback, we should block autoplay.
2226         Otherwise, people will use autoplay instead of video.play() to bypass the gesture requirement.
2227         Test: media/no-autoplay-with-user-gesture-requirement.html
2228
2229         * html/HTMLMediaElement.cpp:
2230         (WebCore::HTMLMediaElement::setReadyState):
2231
2232 2012-06-12  Shrey Banga  <banga@chromium.org>
2233
2234         HTML parser should yield more to improve perceived page load time
2235         https://bugs.webkit.org/show_bug.cgi?id=86165
2236
2237         Reviewed by Tony Gentilcore.
2238
2239         Test: fast/events/event-yield-timing.html
2240
2241         We want the parser to yield at least every 500ms to keep the page somewhat responsive and allow painting.
2242         Since it would be too expensive to check the time after each token, the previous heuristic was to check every 4,096 tokens.
2243         That works fine for most tokens, but a script may spend an arbitrary amount of time executing.
2244
2245         This patch fixes the issue by causing the parser to check the elapsed time immediately after executing a script.
2246
2247         * html/parser/HTMLParserScheduler.cpp:
2248         (WebCore::HTMLParserScheduler::checkForYieldBeforeScript):
2249         * html/parser/HTMLParserScheduler.h:
2250         (WebCore::PumpSession::PumpSession):
2251         (PumpSession):
2252         (WebCore::HTMLParserScheduler::checkForYieldBeforeToken):
2253
2254 2012-06-12  Sami Kyostila  <skyostil@chromium.org>
2255
2256         [chromium] Don't crash in CCLayerIterator if the root layer doesn't have a render surface
2257         https://bugs.webkit.org/show_bug.cgi?id=88886
2258
2259         Reviewed by James Robinson.
2260
2261         If we are iterating over a render render surface layer list where the
2262         root layer does not have a render surface, fail gracefully instead of
2263         crashing.
2264
2265         Tests: CCLayerIteratorTest.{emptyTree,rootLayerWithoutRenderSurface}
2266
2267         * platform/graphics/chromium/cc/CCLayerIterator.h:
2268         (WebCore::CCLayerIterator::CCLayerIterator):
2269
2270 2012-06-06  Ojan Vafai  <ojan@chromium.org>
2271
2272         Change default for flex-grow back to 0
2273         https://bugs.webkit.org/show_bug.cgi?id=88443
2274
2275         Reviewed by Tony Chang.
2276
2277         * rendering/style/RenderStyle.h:
2278
2279 2012-06-12  Brady Eidson  <beidson@apple.com>
2280
2281         <rdar://problem/11593686> and https://bugs.webkit.org/show_bug.cgi?id=88683
2282         Garbage collection of an <img> element can cause reentrant event dispatch.
2283
2284         Reviewed by Darin Adler.
2285
2286         The most straightforward solution is for ImageLoader to keep its Element alive
2287         with ref/deref any time the Image is actually loading.
2288
2289         ImageLoader should always do this for all Elements, and if those Elements want/need
2290         different behavior for when they are detached then they need to manually stop their
2291         loads.
2292
2293         Tests: http/tests/loading/embed-image-load-outlives-gc-without-crashing.html
2294                http/tests/loading/image-input-type-outlives-gc-without-crashing.html
2295                http/tests/loading/image-load-outlives-gc-without-crashing.html
2296                http/tests/loading/object-image-load-outlives-gc-without-crashing.html
2297                http/tests/loading/svg-image-load-outlives-gc-without-crashing.html
2298                http/tests/loading/video-poster-image-load-outlives-gc-without-crashing.html
2299
2300         * loader/ImageLoader.cpp:
2301         (WebCore::ImageLoader::ImageLoader):
2302         (WebCore::ImageLoader::~ImageLoader):
2303         (WebCore::ImageLoader::setImage):
2304         (WebCore::ImageLoader::updateFromElement):
2305         (WebCore::ImageLoader::notifyFinished):
2306         (WebCore::ImageLoader::updatedHasPendingLoadEvent):
2307         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
2308         (WebCore::ImageLoader::dispatchPendingLoadEvent):
2309         * loader/ImageLoader.h:
2310         (ImageLoader):
2311
2312 2012-06-12  Shawn Singh  <shawnsingh@chromium.org>
2313
2314         [chromium] Make damage tracking more robust to early exits
2315         https://bugs.webkit.org/show_bug.cgi?id=84803
2316
2317         Reviewed by James Robinson.
2318
2319         All CCDamageTrackerTest unit tests updated;
2320         One new unit test added:
2321            CCDamageTrackerTest.verifyDamageAccumulatesUntilReset
2322
2323         Damage tracking inherently needs to be aware of all changes that
2324         occur for every frame. Before this patch, anyone modifying details
2325         of CCLayerTreeHostImpl and the drawing phases of the compositor
2326         needed to be careful to avoid early exiting once draw is
2327         initiated, otherwise running the risk of damage tracking's state
2328         getting out-of-sync from actual changes. This patch makes the
2329         damage tracker API more asynchronous-like, so that damage will
2330         continue to accumulate until it is explicitly notified that
2331         damaged areas have been drawn. This will allow more freedom in
2332         designing and restructuing drawing code in the compositor, without
2333         worrying as much about damage tracking getting out-of-sync.
2334
2335         * platform/graphics/chromium/cc/CCDamageTracker.h:
2336         (WebCore::CCDamageTracker::didDrawDamagedArea):
2337         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2338         (WebCore::CCLayerTreeHostImpl::drawLayers):
2339         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2340         (CCLayerTreeHostImpl):
2341
2342 2012-06-12  Mike West  <mkwst@chromium.org>
2343
2344         Make document.documentURI readonly from JavaScript
2345         https://bugs.webkit.org/show_bug.cgi?id=65187
2346
2347         Reviewed by Alexey Proskuryakov.
2348
2349         The DOM4 working draft marks the documentURI attribute as read only
2350         (http://www.w3.org/TR/dom/#document). Firefox has shipped with this
2351         behavior since https://hg.mozilla.org/mozilla-central/rev/3bc751906409
2352         landed in October 2011, IE9 doesn't support the property, and
2353         Opera throws a NO_MODIFICATION_ALLOWED_ERR. This patch changes WebKit
2354         to silently fail (matching Firefox's behavior) by setting the property
2355         to readonly in the IDL.
2356
2357         Document::setDocumentURI and the m_documentURI property are retained
2358         for compatibility with ObjC clients, and the readonly attribute is
2359         ifdeffed out for ObjC.
2360
2361         This patch adds a single test to verify the behavior, and removes a
2362         variety of tests that depended on the writable behavior. In particular,
2363         potential security issues involving the document.baseURL property are
2364         avoided completely as long as this property can't be changed.
2365
2366         Test: fast/dom/documenturi-readonly.html
2367
2368         * dom/Document.cpp:
2369         (WebCore::Document::setDocumentURI):
2370             Adds a comment explaining that the fallback is necessary only to
2371             support ObjC, not for JS calls.
2372         * dom/Document.cpp:
2373         (WebCore::Document::updateBaseURL):
2374             Ditto.
2375         (Document):
2376         * dom/Document.idl:
2377             Add readonly to the attribute and drop null value when not in
2378             LANGUAGE_OBJECTIVE_C.
2379
2380 2012-06-12  Silvia Pfeiffer  <silviapf@chromium.org>
2381
2382         Support !ENABLE(VIDEO) builds with horizontally layed out video controls.
2383         https://bugs.webkit.org/show_bug.cgi?id=88881
2384
2385         Reviewed by Csaba Osztrogonác.
2386
2387         No new tests as this is a regression from WK87835.
2388
2389         * html/shadow/SliderThumbElement.cpp:
2390         (WebCore::hasVerticalAppearance):
2391         Ifdef out video related functionality, since usesVerticalVolumeSlider
2392         does not exist in that case.
2393
2394 2012-06-12  Pavel Feldman  <pfeldman@chromium.org>
2395
2396         Web Inspector: show revisions of all modified files in local modifications view
2397         https://bugs.webkit.org/show_bug.cgi?id=88864
2398
2399         Reviewed by Vsevolod Vlasov.
2400
2401         This change allows all local modifications to be seen in a single view. View is now
2402         singleton, listening to all revisions being added. Revert captions were reworked
2403         (see the screenshot).
2404
2405         * English.lproj/localizedStrings.js:
2406         * inspector/front-end/Resource.js:
2407         * inspector/front-end/RevisionHistoryView.js:
2408         (WebInspector.RevisionHistoryView.populateRevisions):
2409         (WebInspector.RevisionHistoryView):
2410         (WebInspector.RevisionHistoryView.showHistory):
2411         (WebInspector.RevisionHistoryView.reset):
2412         (WebInspector.RevisionHistoryView.prototype._createResourceItem.clearHistory):
2413         (WebInspector.RevisionHistoryView.prototype._createResourceItem):
2414         (WebInspector.RevisionHistoryView.prototype._revisionAdded.get if):
2415         (WebInspector.RevisionHistoryView.prototype._revisionAdded):
2416         (WebInspector.RevisionHistoryView.prototype._revealResource.get if):
2417         (WebInspector.RevisionHistoryView.prototype._revealResource):
2418         (WebInspector.RevisionHistoryView.prototype._reset):
2419         (WebInspector.RevisionHistoryTreeElement):
2420         (WebInspector.RevisionHistoryTreeElement.prototype.onattach):
2421         (WebInspector.RevisionHistoryTreeElement.prototype.oncollapse):
2422         * inspector/front-end/ScriptsPanel.js:
2423         (WebInspector.ScriptsPanel.prototype._reset):
2424         (WebInspector.ScriptsPanel.prototype._editorSelected):
2425         * inspector/front-end/revisionHistory.css:
2426         (.revision-history-link-row):
2427         (.revision-history-drawer li.revision-history-revision):
2428
2429 2012-06-12  Pavel Feldman  <pfeldman@chromium.org>
2430
2431         Web Inspector: allow clearing revision history.
2432         https://bugs.webkit.org/show_bug.cgi?id=88847
2433
2434         Reviewed by Vsevolod Vlasov.
2435
2436         This change also renames "Revision history" to "Local modifications".
2437         I intend to list modifications to all files in that view in the subsequent change.
2438
2439         * English.lproj/localizedStrings.js:
2440         * inspector/front-end/Resource.js:
2441         (WebInspector.Resource._clearResourceHistory):
2442         * inspector/front-end/RevisionHistoryView.js:
2443         (WebInspector.RevisionHistoryView.else.clearHistory):
2444         (WebInspector.RevisionHistoryView):
2445         (WebInspector.RevisionHistoryView.prototype._revisionAdded):
2446         (WebInspector.RevisionHistoryTreeElement):
2447         (WebInspector.RevisionHistoryTreeElement.prototype._createLine):
2448         (WebInspector.RevisionHistoryTreeElement.prototype.allowRevert):
2449         * inspector/front-end/ScriptsPanel.js:
2450         (WebInspector.ScriptsPanel.prototype.appendApplicableItems):
2451
2452 2012-06-12  Pavel Feldman  <pfeldman@chromium.org>
2453
2454         Web Inspector: use jsdifflib for revision diff calculation.
2455         https://bugs.webkit.org/show_bug.cgi?id=88791
2456
2457         Reviewed by Vsevolod Vlasov.
2458
2459         Present diff calculation is incomplete, it does not properly handle the following case:
2460             [a, b, c, d, e, f, g, h] => [c, d, e, f, g, h, a, b]
2461         We should not be implementing diff by ourselves. I imported jsdifflib from
2462         https://github.com/cemerick/jsdifflib. It has BSD license that is compatible with WebKit.
2463
2464         * WebCore.gypi:
2465         * WebCore.vcproj/WebCore.vcproj:
2466         * inspector/front-end/RevisionHistoryView.js:
2467         (WebInspector.RevisionHistoryTreeElement.prototype.onexpand.step2):
2468         (WebInspector.RevisionHistoryTreeElement.prototype.onexpand):
2469         (WebInspector.RevisionHistoryTreeElement.prototype._createLine.appendLineNumber):
2470         (WebInspector.RevisionHistoryTreeElement.prototype._createLine):
2471         * inspector/front-end/WebKit.qrc:
2472         * inspector/front-end/externs.js:
2473         (difflib.stringAsLines):
2474         (difflib.SequenceMatcher):
2475         (difflib.SequenceMatcher.prototype.get_opcodes):
2476         * inspector/front-end/inspector.html:
2477         * inspector/front-end/jsdifflib.js: Added.
2478         (difflib.defaultJunkFunction):
2479         (difflib.stripLinebreaks):
2480         (difflib.stringAsLines):
2481         (difflib.__reduce):
2482         (difflib.__ntuplecomp):
2483         (difflib.__calculate_ratio):
2484         (difflib.__dictget):
2485         (difflib.SequenceMatcher.this.set_seqs):
2486         (difflib.SequenceMatcher.this.set_seq1):
2487         (difflib.SequenceMatcher.this.set_seq2):
2488         (difflib.SequenceMatcher.this.__chain_b):
2489         (difflib.SequenceMatcher.this.find_longest_match):
2490         (difflib.SequenceMatcher.this.get_matching_blocks):
2491         (difflib.SequenceMatcher.this.get_opcodes):
2492         (difflib.SequenceMatcher.this.get_grouped_opcodes):
2493         (difflib.SequenceMatcher.this.quick_ratio):
2494         (difflib.SequenceMatcher.this.real_quick_ratio):
2495         * inspector/front-end/revisionHistory.css:
2496         (.revision-history-line-separator .webkit-line-number):
2497
2498 2012-06-12  Pavel Feldman  <pfeldman@chromium.org>
2499
2500         Web Inspector: use jsdifflib for revision diff calculation.
2501         https://bugs.webkit.org/show_bug.cgi?id=88791
2502
2503         Reviewed by Vsevolod Vlasov.
2504
2505         Present diff calculation is incomplete, it does not properly handle the following case:
2506             [a, b, c, d, e, f, g, h] => [c, d, e, f, g, h, a, b]
2507         We should not be implementing diff by ourselves. I imported jsdifflib from
2508         https://github.com/cemerick/jsdifflib. It has BSD license that is compatible with WebKit.
2509
2510         * WebCore.gypi:
2511         * WebCore.vcproj/WebCore.vcproj:
2512         * inspector/front-end/RevisionHistoryView.js:
2513         (WebInspector.RevisionHistoryTreeElement.prototype.onexpand.step2):
2514         (WebInspector.RevisionHistoryTreeElement.prototype.onexpand):
2515         (WebInspector.RevisionHistoryTreeElement.prototype._createLine.appendLineNumber):
2516         (WebInspector.RevisionHistoryTreeElement.prototype._createLine):
2517         * inspector/front-end/WebKit.qrc:
2518         * inspector/front-end/externs.js:
2519         (difflib.stringAsLines):
2520         (difflib.SequenceMatcher):
2521         (difflib.SequenceMatcher.prototype.get_opcodes):
2522         * inspector/front-end/inspector.html:
2523         * inspector/front-end/jsdifflib.js: Added.
2524         (difflib.defaultJunkFunction):
2525         (difflib.stripLinebreaks):
2526         (difflib.stringAsLines):
2527         (difflib.__reduce):
2528         (difflib.__ntuplecomp):
2529         (difflib.__calculate_ratio):
2530         (difflib.__dictget):
2531         (difflib.SequenceMatcher.this.set_seqs):
2532         (difflib.SequenceMatcher.this.set_seq1):
2533         (difflib.SequenceMatcher.this.set_seq2):
2534         (difflib.SequenceMatcher.this.__chain_b):
2535         (difflib.SequenceMatcher.this.find_longest_match):
2536         (difflib.SequenceMatcher.this.get_matching_blocks):
2537         (difflib.SequenceMatcher.this.get_opcodes):
2538         (difflib.SequenceMatcher.this.get_grouped_opcodes):
2539         (difflib.SequenceMatcher.this.quick_ratio):
2540         (difflib.SequenceMatcher.this.real_quick_ratio):
2541         * inspector/front-end/revisionHistory.css:
2542         (.revision-history-line-separator .webkit-line-number):
2543
2544 2012-06-12  Christophe Dumez  <christophe.dumez@intel.com>
2545
2546         [GStreamer] http/tests/media/video-buffered-range-contains-currentTime.html is failing
2547         https://bugs.webkit.org/show_bug.cgi?id=87575
2548
2549         Reviewed by Philippe Normand.
2550
2551         When EOS is reached in forward playback, the position does not necessarily
2552         match the duration. This confuses HTMLMediaElement and causes the "ended"
2553         event not to be fired. To avoid this, we synchronize position and duration
2554         values in this case.
2555
2556         Test: http/tests/media/video-buffered-range-contains-currentTime.html
2557
2558         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2559
2560 2012-06-12  Kinuko Yasuda  <kinuko@chromium.org>
2561
2562         Refactor InputType::receiveDroppedFiles to take DragData
2563         https://bugs.webkit.org/show_bug.cgi?id=88860
2564
2565         Reviewed by Kent Tamura.
2566
2567         So that we can centralize the file paths related code into FileInputType
2568         and makes it easier to extract more data from DragData for
2569         <input type=file> (like bug 88293 for directory drag-and-drop).
2570
2571         No new tests as this has no behavioral changes.
2572
2573         * html/FileInputType.cpp:
2574         (WebCore::FileInputType::receiveDroppedFiles):
2575         * html/FileInputType.h:
2576         * html/HTMLInputElement.cpp:
2577         (WebCore::HTMLInputElement::receiveDroppedFiles):
2578         * html/HTMLInputElement.h:
2579         * html/InputType.cpp:
2580         (WebCore::InputType::receiveDroppedFiles):
2581         * html/InputType.h:
2582         * page/DragController.cpp:
2583         (WebCore::DragController::concludeEditDrag):
2584
2585 2012-06-12  Thiago Marcos P. Santos  <thiago.santos@intel.com>
2586
2587         Generate -webkit-box-decoration-break property only when the feature is enabled
2588         https://bugs.webkit.org/show_bug.cgi?id=88861
2589
2590         Reviewed by Alexis Menard.
2591
2592         Otherwise it will hit an assertion if the property is present on the
2593         style but the feature disabled. Also fixes a compilation warning when
2594         the feature is disabled.
2595
2596         * css/CSSPropertyNames.in:
2597         * css/StyleResolver.cpp:
2598         (WebCore::StyleResolver::collectMatchingRulesForList):
2599
2600 2012-06-12  Darin Adler  <darin@apple.com>
2601
2602         Tweaked the Mac export file a bit more, adding more-correct iOS cases.
2603
2604         Reviewed by David Kilzer.
2605
2606         * WebCore.exp.in: Rearrangement.
2607
2608 2012-06-11  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2609
2610         Using extrernal ICU library on case unsensitive drives will not work
2611         https://bugs.webkit.org/show_bug.cgi?id=70913
2612
2613         Reviewed by Csaba Osztrogonác.
2614
2615         * platform/graphics/surfaces/GraphicsSurface.h:
2616
2617 2012-06-11  Dana Jansens  <danakj@chromium.org>
2618
2619         [chromium] Use TextureDrawQuad for video layer output when it produces a single GL texture
2620         https://bugs.webkit.org/show_bug.cgi?id=88814
2621
2622         Reviewed by Adrienne Walker.
2623
2624         When a CCVideLayerImpl produces quads for a frame that is contained
2625         in a single GL texture, then use the TextureDrawQuad instead of the
2626         VideoDrawQuad. Moves the computation for the RGBA(software) and
2627         NativeTexture (hardware) cases from LayerRendererChromium into
2628         CCVideoLayerImpl, so it can embed these values in the TextureDrawQuad.
2629
2630         No new tests, behaviour should be the same.
2631
2632         * platform/graphics/chromium/LayerRendererChromium.cpp:
2633         (WebCore::LayerRendererChromium::drawStreamTexture):
2634         (WebCore::LayerRendererChromium::drawVideoQuad):
2635         * platform/graphics/chromium/LayerRendererChromium.h:
2636         (LayerRendererChromium):
2637         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
2638         (WebCore::CCVideoLayerImpl::appendQuads):
2639
2640 2012-06-12  Silvia Pfeiffer  <silviapf@chromium.org>
2641
2642         Change the volume slider to horizontal rendering for Chrome video controls.
2643         https://bugs.webkit.org/show_bug.cgi?id=87835
2644
2645         Reviewed by Eric Carlson.
2646
2647         No new tests - final patch in the Chrome controls update series will contain rebaselined tests.
2648
2649         The Chrome video controls are receiving a visual update. The volume slider is moved into
2650         the controls with horizontal rendering, the volume slider container is removed. The visual
2651         update itself is in a separate patch.
2652
2653         * css/mediaControlsChromium.css:
2654         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
2655         Removed relative positioning to render all controls elements equally in DOM order.
2656         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
2657         Removed absolute positioning to render all controls elements equally in DOM order.
2658         (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
2659         Removed absolute positioning to render all controls elements equally in DOM order.
2660         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
2661         Removed volume slider container - it's not necessary any more.
2662         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
2663         Remove flexbox and introduce inline display to always display this field.
2664         (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
2665         Removed absolute positioning to render all controls elements equally in DOM order.
2666         * html/shadow/MediaControlRootElementChromium.cpp:
2667         (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
2668         Removed volume slider container - it's not necessary any more.
2669         (WebCore::MediaControlRootElementChromium::create):
2670         Appended the volume slider and the mute button directly to the panel, removed volume slider container.
2671         (WebCore::MediaControlRootElementChromium::setMediaController):
2672         Removed volume slider container.
2673         (WebCore::MediaControlRootElementChromium::reportedError):
2674         Removed volume slider container.
2675         (WebCore::MediaControlRootElementChromium::showVolumeSlider):
2676         Removed volume slider container.
2677         * html/shadow/MediaControlRootElementChromium.h:
2678         (WebCore):
2679         (MediaControlRootElementChromium):
2680         Removed volume slider container.
2681         * html/shadow/SliderThumbElement.cpp:
2682         (WebCore::hasVerticalAppearance):
2683         Allow use of horizontal media volume slider.
2684         (WebCore::RenderSliderThumb::layout):
2685         Reuse hasVerticalAppearance function.
2686         * rendering/RenderMediaControlsChromium.cpp:
2687         (WebCore::RenderMediaControlsChromium::paintMediaVolumeSlider):
2688         Change line drawing from vertical to horizontal.
2689         * rendering/RenderTheme.h:
2690         (WebCore::RenderTheme::usesVerticalVolumeSlider):
2691         Add usesVerticalVolumeSlider function to allow horizontal volume sliders.
2692         * rendering/RenderThemeChromiumMac.h:
2693         (WebCore::RenderThemeChromiumMac::usesVerticalVolumeSlider):
2694         Add usesVerticalVolumeSlider function to allow horizontal volume sliders.
2695         Add usesVerticalVolumeSlider function to allow horizontal volume sliders.
2696         * rendering/RenderThemeChromiumSkia.h:
2697         (WebCore::RenderThemeChromiumSkia::usesVerticalVolumeSlider):
2698         Add usesVerticalVolumeSlider function to allow horizontal volume sliders.
2699
2700 2012-06-12  Andrei Bucur  <abucur@adobe.com>
2701
2702         [CSSRegions]NamedFlow::overset should return true when there's no region chain attached
2703         https://bugs.webkit.org/show_bug.cgi?id=88515
2704
2705         The CSS Regions specifies that the "overset" attribute needs to return true if the content overflows, there's no region attached to the flow
2706         or if the NamedFlow is in the NULL state:
2707         http://www.w3.org/TR/css3-regions/#dom-named-flow-overset
2708
2709         This patch updates WebKit's behavior in the last two situations to match the one in the spec.
2710
2711         Reviewed by Andreas Kling.
2712
2713         Test: fast/regions/webkit-named-flow-overset.html was updated
2714
2715         * rendering/RenderFlowThread.cpp:
2716         (WebCore::RenderFlowThread::RenderFlowThread):
2717         (WebCore::RenderFlowThread::computeOverflowStateForRegions): If the last valid region is null, the flow has not region chain attached or it's in the NULL state.
2718
2719 2012-06-12  Rahul Tiwari  <rahultiwari.cse.iitr@gmail.com>
2720
2721         Web Inspector: Provide context menu for deleting recorded profile on Profiles Panel
2722         https://bugs.webkit.org/show_bug.cgi?id=88286
2723
2724         Added the context menu to delete the selected profile.
2725
2726         Reviewed by Pavel Feldman.
2727
2728         No new tests required as UI related change
2729
2730         * English.lproj/localizedStrings.js: Removed property svn:mime-type.
2731         * inspector/front-end/ProfilesPanel.js:
2732         (WebInspector.ProfileSidebarTreeElement.prototype.handleContextMenuEvent):
2733
2734 2012-06-12  Pavel Feldman  <pfeldman@chromium.org>
2735
2736         Not reviewed: removed svn:mime-type property from English.lproj/localizedStrings.js
2737
2738         * English.lproj/localizedStrings.js
2739
2740 2012-06-12  Dan Bernstein  <mitz@apple.com>
2741
2742         Tried to fix the notification-enabled build after r120044.
2743
2744         * notifications/NotificationController.cpp:
2745         (WebCore::NotificationController::NotificationController):
2746         (WebCore::NotificationController::create):
2747         (WebCore::provideNotification):
2748         * notifications/NotificationController.h:
2749         (NotificationController):
2750
2751 2012-06-12  Huang Dongsung  <luxtella@company100.net>
2752
2753         [Qt][Texmap] Falling leaves demo missing clipping.
2754         https://bugs.webkit.org/show_bug.cgi?id=88704
2755
2756         The bug originated from begining native painting mode of QPainter after enabling
2757         scissor test, because begining native painting mode disables scissor test.
2758
2759         Covered by existing compositing tests.
2760
2761         Reviewed by Noam Rosenthal.
2762
2763         * platform/graphics/texmap/TextureMapperGL.cpp:
2764         (WebCore::TextureMapperGL::beginPainting):
2765
2766 2012-06-12  Csaba Osztrogonác  <ossy@webkit.org>
2767
2768         [Qt][Win] Buildfix related to fromWinHBITMAP
2769         https://bugs.webkit.org/show_bug.cgi?id=88863
2770
2771         Reviewed by Jocelyn Turcotte.
2772
2773         * platform/graphics/qt/GraphicsContextQt.cpp: Add qt_pixmapFromWinHBITMAP and HBitmapFormat enum.
2774         (WebCore):
2775         (WebCore::GraphicsContext::releaseWindowsContext):
2776         * platform/graphics/qt/ImageQt.cpp:
2777         (WebCore): Move qt_pixmapFromWinHBITMAP to outside of WebCore namespace. (Fix after r119924.)
2778
2779 2012-06-12  Takashi Sakamoto  <tasak@google.com>
2780
2781         [Shadow DOM] <style> inside Shadow subtree should be scoped inside the subtree.
2782         https://bugs.webkit.org/show_bug.cgi?id=87805
2783
2784         Modified HTMLStyleElement to be treated as a scoped style independent
2785         of its "scoped" attribute's value if HTMLStyleElement is in shadow
2786         subtree. HTMLStyleElement has the following four cases talking about
2787         "scoped" attribute and whether is in shadow subtree or not:
2788         1, HTMLStyleElement is "scoped" and is in document tree,
2789         2, HTMLStyleElement is "scoped" and is in shadow subtree,
2790         3, HTMLStyleElement is not "scoped" and is in document tree, and
2791         4, HTMLStyleElement is not "scoped" and is in shadow subtree.
2792         The case 1 and 2 are not changed. This patch affected the case 4.
2793         At the case 4, the HTMLStyleElement's scoping node is the shadow root.
2794         This change is the first step for fixing style scope bug,
2795         i.e. HTMLStyleElements in shadow subtree are applied to any element
2796         in document tree.
2797
2798         Reviewed by Dimitri Glazkov.
2799
2800         Test: fast/css/style-scoped/style-scoped-change-scoped-in-shadow.html
2801
2802         * css/StyleResolver.cpp:
2803         (WebCore::StyleResolver::determineScope):
2804         Modified to return a shadow root if a targeted stylesheet owner node is
2805         not scoped but in some shadow DOM subtree.
2806         * html/HTMLStyleElement.cpp:
2807         (WebCore::HTMLStyleElement::HTMLStyleElement):
2808         (WebCore::HTMLStyleElement::parseAttribute):
2809         Modified to use the below scopedAttributeChanged when a changed
2810         attribute's name is "scoped".
2811         (WebCore::HTMLStyleElement::scopedAttributeChanged):
2812         Newly added. According to new scoped value and isInShadowTree,
2813         add or remove style rules to/from scopedAuthorRules via
2814         registerWithScopingNode or unregisterWithScopingNode.
2815         (WebCore::HTMLStyleElement::registerWithScopingNode):
2816         Added one boolean argument to determine whether HTMLStyleElement is
2817         scoped or not. The reason why not using scoped() is the comment:
2818         "We cannot rely on the scoped element already being present when this
2819         method is invoked. Therefore we cannot rely on scoped()"
2820         (WebCore::HTMLStyleElement::unregisterWithScopingNode):
2821         Changed the code for updating m_isRegisteredWithScopingNode. Now
2822         set m_scopedStyleRegistrationState to be NotRegistered.
2823         (WebCore::HTMLStyleElement::insertedInto):
2824         Modified to invoke registerWithScopingNode when an element is not
2825         scoped but in some shadow subtree.
2826         (WebCore::HTMLStyleElement::removedFrom):
2827         Modified to invoke unregisterWithScopingNode when an element is not
2828         scoped but in some shadow subtree.
2829         * html/HTMLStyleElement.h:
2830         (HTMLStyleElement):
2831         Modified the type of m_isRegisteredWithScopingNode from bool to
2832         enum and renamed to m_scopedStyleRegistrationState. Now the member
2833         variable keeps what HTMLStyleElement's scoping node is, i.e.
2834         none (this means, not in shadow subtree and not scoped), shadow root or
2835         parent node.
2836         Added one new method scopedAttributeChanged's declaration and
2837         modified the declaration of registerWithScopingNode.
2838
2839 2012-06-12  Amy Ousterhout  <aousterh@chromium.org>
2840
2841         Removing unused parameter Page
2842         https://bugs.webkit.org/show_bug.cgi?id=88848
2843
2844         Reviewed by Kentaro Hara.
2845
2846         Removed the unused parameter Page* supplied to the create function
2847         and constructor in DeviceOrientationController.
2848
2849         The parameter Page* was previously stored in an instance variable
2850         m_page, but this was removed (see https://bugs.webkit.org/show_bug.cgi?id=88812).
2851
2852         No new tests because the removed parameter was unused and untested.
2853
2854         * dom/DeviceOrientationController.cpp:
2855         (WebCore::DeviceOrientationController::DeviceOrientationController):
2856         (WebCore::DeviceOrientationController::create):
2857         (WebCore::provideDeviceOrientationTo):
2858         * dom/DeviceOrientationController.h:
2859         (DeviceOrientationController):
2860
2861 2012-06-12  Sheriff Bot  <webkit.review.bot@gmail.com>
2862
2863         Unreviewed, rolling out r120051.
2864         http://trac.webkit.org/changeset/120051
2865         https://bugs.webkit.org/show_bug.cgi?id=88852
2866
2867         some tests are crashing (Requested by morrita on #webkit).
2868
2869         * CMakeLists.txt:
2870         * GNUmakefile.list.am:
2871         * Target.pri:
2872         * WebCore.gypi:
2873         * WebCore.vcproj/WebCore.vcproj:
2874         * WebCore.xcodeproj/project.pbxproj:
2875         * bindings/generic/ContextEnabledFeatures.cpp: Renamed from Source/WebKit/chromium/src/ContextFeaturesClientImpl.cpp.
2876         (WebCore):
2877         (WebCore::ContextEnabledFeatures::shadowDOMEnabled):
2878         (WebCore::ContextEnabledFeatures::styleScopedEnabled):
2879         (WebCore::ContextEnabledFeatures::pagePopupEnabled):
2880         * bindings/generic/ContextEnabledFeatures.h: Renamed from Source/WebKit/chromium/src/ContextFeaturesClientImpl.h.
2881         (WebCore):
2882         (ContextEnabledFeatures):
2883         * bindings/scripts/CodeGeneratorV8.pm:
2884         (GenerateImplementation):
2885         * css/StyleResolver.cpp:
2886         (WebCore::StyleResolver::determineScope):
2887         * dom/ContextFeatures.cpp: Removed.
2888         * dom/ContextFeatures.h: Removed.
2889         * dom/DOMAllInOne.cpp:
2890         * dom/DOMImplementation.cpp:
2891         (WebCore::DOMImplementation::createDocument):
2892         (WebCore::DOMImplementation::createHTMLDocument):
2893         * dom/Document.cpp:
2894         (WebCore::Document::Document):
2895         * dom/Document.h:
2896         (WebCore):
2897         (Document):
2898         * dom/Position.cpp:
2899         (WebCore::Position::Position):
2900         (WebCore::Position::findParent):
2901         * dom/TreeScope.cpp:
2902         (WebCore::TreeScope::getSelection):
2903         * dom/make_names.pl:
2904         (printConstructorInterior):
2905         (printFactoryCppFile):
2906         (printWrapperFunctions):
2907         (printWrapperFactoryCppFile):
2908         * editing/markup.cpp:
2909         (WebCore::createFragmentFromMarkupWithContext):
2910         * html/HTMLStyleElement.cpp:
2911         (WebCore::HTMLStyleElement::registerWithScopingNode):
2912         (WebCore::HTMLStyleElement::unregisterWithScopingNode):
2913         * html/shadow/HTMLContentElement.cpp:
2914         (WebCore::contentTagName):
2915         * inspector/DOMPatchSupport.cpp:
2916         (WebCore::DOMPatchSupport::patchDocument):
2917         * loader/FrameLoaderClient.h:
2918         (WebCore::FrameLoaderClient::allowShadowDOM):
2919         (WebCore::FrameLoaderClient::allowStyleScoped):
2920         (FrameLoaderClient):
2921         (WebCore::FrameLoaderClient::allowPagePopup):
2922         * platform/RefCountedSupplement.h: Removed.
2923         * platform/Supplementable.h:
2924         * xml/XMLHttpRequest.cpp:
2925         (WebCore::XMLHttpRequest::responseXML):
2926
2927 2012-06-11  Kaustubh Atrawalkar  <kaustubh@motorola.com>
2928
2929         [DRT] LTC:: counterValueForElementById() could be moved to Internals.
2930         https://bugs.webkit.org/show_bug.cgi?id=84406
2931
2932         Reviewed by Hajime Morita.
2933
2934         Move the counterValueForElementById from LayoutTestCotroller to Internals and
2935         remove the old platform specific implementations as it exclusively tests WebCore functionality.
2936
2937         Covered by existing test cases.
2938
2939         * testing/Internals.cpp:
2940         (WebCore::Internals::counterValue):
2941         (WebCore):
2942         * testing/Internals.h:
2943         (Internals):
2944         * testing/Internals.idl:
2945
2946 2012-06-11  Hans Wennborg  <hans@chromium.org>
2947
2948         Speech JavaScript API: Make SpeechRecognitionError an Event
2949         https://bugs.webkit.org/show_bug.cgi?id=88784
2950
2951         Reviewed by Adam Barth.
2952
2953         Make SpeechRecognitionError an Event. The spec was updated to make it
2954         an event in its own right, rather than an attribute of
2955         SpeechRecognitionEvent.
2956
2957         Test: fast/speech/scripted/speechrecognition-errors.html
2958
2959         * Modules/speech/SpeechRecognition.cpp:
2960         (WebCore::SpeechRecognition::didReceiveError):
2961         * Modules/speech/SpeechRecognitionError.cpp:
2962         (WebCore::SpeechRecognitionError::SpeechRecognitionError):
2963         (WebCore::SpeechRecognitionError::interfaceName):
2964         (WebCore):
2965         * Modules/speech/SpeechRecognitionError.h:
2966         (WebCore::SpeechRecognitionError::create):
2967         (SpeechRecognitionError):
2968         * Modules/speech/SpeechRecognitionError.idl:
2969         * Modules/speech/SpeechRecognitionEvent.cpp:
2970         (WebCore::SpeechRecognitionEvent::SpeechRecognitionEvent):
2971         * Modules/speech/SpeechRecognitionEvent.h:
2972         (SpeechRecognitionEventInit):
2973         (SpeechRecognitionEvent):
2974         * Modules/speech/SpeechRecognitionEvent.idl:
2975         * dom/EventNames.in:
2976
2977 2012-06-12  MORITA Hajime  <morrita@google.com>
2978
2979         REGRESSION(r118098): <content> element does not render distributed children when cloned from another document
2980         https://bugs.webkit.org/show_bug.cgi?id=88148
2981
2982         Reviewed by Dimitri Glazkov.
2983
2984         The shadow DOM availability was decided through FrameLoaderClient.
2985         But there are documents which don't have any associated frames, in
2986         which any shadow DOM related elements cannot be constructed.  That
2987         resulsted the regression.
2988
2989         This change introduces a Page-based client called
2990         ContextFeaturesClient which takes the role from FrameLoaderClient
2991         to decide the feature availability, and ContextFeatures which is a
2992         proxy of ContextFeaturesClient.  ContextEnabledFeatures is is
2993         replaced with ContextFeatures.
2994
2995         Each ContextFeatures object is owned by a Page, and is attached to
2996         each Document in the page even if the page itself has no referenct
2997         to Frames or Pages. With ContextFeatures, each Document can decide
2998         the feature availability even if it cannot reach Page or Frame.
2999
3000         On RefCountedSupplement: Document instance can live longer than a
3001         Page where it is shwon. This means that ContextFeatures instance
3002         needs to survive after owner Page destruction because it's
3003         referenced from possibly surviving Documents. RefCountedSupplement
3004         is introduced to cover this scenario: It allows supplement classes
3005         to live after Page's destruction.
3006
3007         RefCountedSupplement::hostDestroyed() is notified when the hosting
3008         page is gone. ContextFeatures clears its reference to the client
3009         using this notification.
3010
3011         Test: fast/dom/shadow/elements-in-frameless-document.html
3012
3013         * CMakeLists.txt:
3014         * GNUmakefile.list.am:
3015         * Target.pri:
3016         * WebCore.gypi:
3017         * WebCore.vcproj/WebCore.vcproj:
3018         * WebCore.xcodeproj/project.pbxproj:
3019         * bindings/scripts/CodeGeneratorV8.pm:
3020         (GenerateImplementation):
3021         * css/StyleResolver.cpp:
3022         (WebCore::StyleResolver::determineScope):
3023         * dom/ContextFeatures.cpp: Added.
3024         (WebCore):
3025         (WebCore::ContextFeaturesClient::empty):
3026         (WebCore::ContextFeatures::supplementName):
3027         (WebCore::ContextFeatures::defaultSwitch):
3028         (WebCore::ContextFeatures::shadowDOMEnabled):
3029         (WebCore::ContextFeatures::styleScopedEnabled):
3030         (WebCore::ContextFeatures::pagePopupEnabled):
3031         (WebCore::provideContextFeaturesTo):
3032         (WebCore::provideContextFeaturesToDocumentFrom):
3033         * dom/ContextFeatures.h: Added.
3034         (WebCore):
3035         (ContextFeatures):
3036         (WebCore::ContextFeatures::ContextFeatures):
3037         (WebCore::ContextFeatures::hostDestroyed):
3038         (ContextFeaturesClient):
3039         (WebCore::ContextFeaturesClient::~ContextFeaturesClient):
3040         (WebCore::ContextFeaturesClient::isEnabled):
3041         (WebCore::ContextFeatures::create):
3042         (WebCore::ContextFeatures::isEnabled):
3043         * dom/DOMAllInOne.cpp:
3044         * dom/DOMImplementation.cpp:
3045         (WebCore::DOMImplementation::createDocument):
3046         (WebCore::DOMImplementation::createHTMLDocument):
3047         * dom/Document.h:
3048         (WebCore::Document::contextFeatures):
3049         * dom/Document.cpp:
3050         (WebCore::Document::Document):
3051         (WebCore::Document::setContextFeatures):
3052         * dom/Position.cpp:
3053         (WebCore::Position::Position):
3054         (WebCore::Position::findParent):
3055         * dom/TreeScope.cpp:
3056         (WebCore::TreeScope::getSelection):
3057         * dom/make_names.pl:
3058         (printConstructorInterior):
3059         (printFactoryCppFile):
3060         (printWrapperFunctions):
3061         (printWrapperFactoryCppFile):
3062         * editing/markup.cpp:
3063         (WebCore::createFragmentFromMarkupWithContext):
3064         * html/HTMLStyleElement.cpp:
3065         (WebCore::HTMLStyleElement::registerWithScopingNode):
3066         (WebCore::HTMLStyleElement::unregisterWithScopingNode):
3067         * html/shadow/HTMLContentElement.cpp:
3068         (WebCore::contentTagName):
3069         * inspector/DOMPatchSupport.cpp:
3070         (WebCore::DOMPatchSupport::patchDocument):
3071         * loader/FrameLoaderClient.h:
3072         * platform/RefCountedSupplement.h: Copied from Source/WebCore/platform/Supplementable.h.
3073         (WebCore):
3074         (RefCountedSupplement):
3075         (WebCore::RefCountedSupplement::hostDestroyed):
3076         (Wrapper):
3077         (WebCore::RefCountedSupplement::Wrapper::Wrapper):
3078         (WebCore::RefCountedSupplement::Wrapper::~Wrapper):
3079         (WebCore::RefCountedSupplement::Wrapper::wrapped):
3080         (WebCore::RefCountedSupplement::provideTo):
3081         (WebCore::RefCountedSupplement::from):
3082         * platform/Supplementable.h:
3083         (WebCore::Supplement::isRefCountedWrapper):
3084         * xml/XMLHttpRequest.cpp:
3085         (WebCore::XMLHttpRequest::responseXML):
3086
3087 2012-06-12  Kent Tamura  <tkent@chromium.org>
3088
3089         Remove unnecessary functions: setName() and formControlName()
3090         https://bugs.webkit.org/show_bug.cgi?id=88392
3091
3092         Reviewed by Kentaro Hara.
3093
3094         'name' IDL attributes of form-related elements should be [Reflected],
3095         and we don't need to have setName(). We used formControlName() for
3096         name() implementation, and formControlName() is not needed because it
3097         just converts a null attribute to an empty string. Our binding code does it.
3098
3099         We don't remove FormAssociatedElement::name() because many C++ code use it.
3100
3101         FormAssociatedElement::name() is virtual, and HTMLInputElement overrides
3102         it so that it returns a cache of the name attribtue value because
3103         CheckedRadioButtons class needs to know an old name attribute value when
3104         the name attribtue is changed.
3105
3106         References:
3107         http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#dom-object-name
3108         http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#dom-form-name
3109         http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#dom-fe-name
3110
3111         Test: fast/forms/name-attribute.html
3112
3113         * dom/Element.h: Remove formControlName().
3114         * html/FormAssociatedElement.cpp:
3115         (WebCore::FormAssociatedElement::name):
3116         Copied from formControlName() implementation of HTMLFormControlElement.
3117         * html/FormAssociatedElement.h:
3118         (FormAssociatedElement): Make name() virtual, remove formControlName().
3119         * html/FormController.cpp:
3120         (WebCore::FormController::formElementsState):
3121         Use name() instead of formControlName().
3122         * html/HTMLFormControlElement.cpp:
3123         Remove formControlName() and setName().
3124         * html/HTMLFormControlElement.h: ditto.
3125         * html/HTMLInputElement.cpp:
3126         (WebCore::HTMLInputElement::name): Renamed from formControlName().
3127         * html/HTMLInputElement.h:
3128         (HTMLInputElement): Renamed formControlName() to name(), and make it public.
3129         * html/HTMLKeygenElement.idl: Make 'name' [Reflected].
3130         * html/HTMLObjectElement.cpp: Remove formControlName().
3131         * html/HTMLObjectElement.h: ditto.
3132         * html/HTMLSelectElement.cpp:
3133         (WebCore::HTMLSelectElement::appendFormData):
3134         Use name() instead of formControlName().
3135         * html/HTMLSelectElement.idl: Make 'name' [Reflected].
3136         * html/HTMLTextAreaElement.idl: Make 'name' [Reflected].
3137
3138 2012-06-11  Nico Weber  <thakis@chromium.org>
3139
3140         Remove unused member variables found by clang's -Wunused-private-field
3141         https://bugs.webkit.org/show_bug.cgi?id=88812
3142
3143         Reviewed by Anders Carlsson.
3144
3145         Change a few |class|s that were used only to pin down the size of
3146         existing classes to |struct|, so that clang doesn't warn about these
3147         memvars.
3148
3149         No intended behavior change.
3150
3151         * Modules/geolocation/GeolocationController.cpp:
3152         (WebCore::GeolocationController::GeolocationController):
3153         * Modules/geolocation/GeolocationController.h:
3154         (GeolocationController):
3155         * Modules/webaudio/AudioContext.h:
3156         (AudioContext):
3157         * Modules/webaudio/AudioParamTimeline.h:
3158         (AudioParamTimeline):
3159         * accessibility/AccessibilityScrollbar.h:
3160         (AccessibilityScrollbar):
3161         * bindings/v8/ScriptScope.cpp:
3162         (WebCore::ScriptScope::ScriptScope):
3163         * bindings/v8/ScriptScope.h:
3164         (ScriptScope):
3165         * css/CSSValue.cpp:
3166         * css/StylePropertySet.cpp:
3167         * dom/DeviceOrientationController.cpp:
3168         (WebCore::DeviceOrientationController::DeviceOrientationController):
3169         * dom/DeviceOrientationController.h:
3170         (DeviceOrientationController):
3171         * editing/ReplaceSelectionCommand.cpp:
3172         (ReplacementFragment):
3173         (WebCore::ReplacementFragment::ReplacementFragment):
3174         * editing/TextIterator.cpp:
3175         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
3176         * editing/TextIterator.h:
3177         (SimplifiedBackwardsTextIterator):
3178         (BackwardsCharacterIterator):
3179         * html/HTMLFormCollection.cpp:
3180         (WebCore::HTMLFormCollection::HTMLFormCollection):
3181         * html/HTMLFormCollection.h:
3182         (HTMLFormCollection):
3183         * html/shadow/MediaControlElements.cpp:
3184         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement):
3185         * html/shadow/MediaControlElements.h:
3186         (MediaControlFullscreenButtonElement):
3187         * html/shadow/MediaControlRootElementChromium.cpp:
3188         (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
3189         * html/shadow/MediaControlRootElementChromium.h:
3190         (MediaControlRootElementChromium):
3191         * html/track/LoadableTextTrack.cpp:
3192         (WebCore::LoadableTextTrack::LoadableTextTrack):
3193         * html/track/LoadableTextTrack.h:
3194         (LoadableTextTrack):
3195         * inspector/CodeGeneratorInspector.py:
3196         (Generator.go):
3197         * inspector/InspectorCSSAgent.cpp:
3198         (WebCore::InspectorCSSAgent::InspectorCSSAgent):
3199         * inspector/InspectorCSSAgent.h:
3200         (InspectorCSSAgent):
3201         * inspector/InspectorDOMDebuggerAgent.cpp:
3202         (WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
3203         * inspector/InspectorDOMDebuggerAgent.h:
3204         (InspectorDOMDebuggerAgent):
3205         * inspector/InspectorMemoryAgent.cpp:
3206         (WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
3207         * inspector/InspectorMemoryAgent.h:
3208         (InspectorMemoryAgent):
3209         * notifications/NotificationController.cpp:
3210         (WebCore::NotificationController::NotificationController):
3211         * notifications/NotificationController.h:
3212         (NotificationController):
3213         * page/animation/CompositeAnimation.h:
3214         (WebCore::CompositeAnimation::CompositeAnimation):
3215         (CompositeAnimation):
3216         * platform/Length.cpp:
3217         * platform/audio/ReverbConvolver.cpp:
3218         (WebCore::ReverbConvolver::ReverbConvolver):
3219         * platform/audio/ReverbConvolver.h:
3220         (ReverbConvolver):
3221         * platform/audio/ReverbConvolverStage.cpp:
3222         (WebCore::ReverbConvolverStage::ReverbConvolverStage):
3223         * platform/audio/ReverbConvolverStage.h:
3224         (ReverbConvolverStage):
3225         * platform/graphics/TextRun.cpp:
3226         (ExpectedTextRunSize):
3227         * platform/graphics/chromium/cc/CCThreadProxy.h:
3228         (CCThreadProxy):
3229         * platform/graphics/filters/FECustomFilter.cpp:
3230         (WebCore::FECustomFilter::FECustomFilter):
3231         * platform/graphics/filters/FECustomFilter.h:
3232         (FECustomFilter):
3233         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
3234         (JPEGImageReader):
3235         * platform/leveldb/LevelDBTransaction.cpp:
3236         (WebCore::LevelDBTransaction::TreeIterator::next):
3237         * platform/text/TextCodecICU.cpp:
3238         (WebCore::TextCodecICU::TextCodecICU):
3239         * platform/text/TextCodecICU.h:
3240         (TextCodecICU):
3241         * rendering/InlineBox.cpp:
3242         * rendering/InlineFlowBox.cpp:
3243         * rendering/RenderText.cpp:
3244         * rendering/style/KeyframeList.h:
3245         (WebCore::KeyframeList::KeyframeList):
3246         (KeyframeList):
3247         * rendering/svg/RenderSVGTextPath.cpp:
3248         (WebCore::RenderSVGTextPath::RenderSVGTextPath):
3249         * rendering/svg/RenderSVGTextPath.h:
3250         * rendering/svg/SVGInlineTextBox.cpp:
3251         * svg/SVGPathByteStreamSource.cpp:
3252         * svg/SVGPathByteStreamSource.h:
3253         * svg/SVGPathTraversalStateBuilder.cpp:
3254         (WebCore::SVGPathTraversalStateBuilder::SVGPathTraversalStateBuilder):
3255         * svg/SVGPathTraversalStateBuilder.h:
3256         (SVGPathTraversalStateBuilder):
3257         * xml/XSLStyleSheet.h:
3258
3259 2012-06-11  Kinuko Yasuda  <kinuko@chromium.org>
3260
3261         XHR returns size==0 Blob
3262         https://bugs.webkit.org/show_bug.cgi?id=88750
3263
3264         Reviewed by Alexey Proskuryakov.
3265
3266         Response Blob's .size field must have the correct response size.
3267
3268         Test: http/tests/xmlhttprequest/response-blob-size.html
3269
3270         * xml/XMLHttpRequest.cpp:
3271         (WebCore::XMLHttpRequest::responseBlob):
3272
3273 2012-06-11  Silvia Pfeiffer  <silviapf@chromium.org>
3274
3275         Introduce an Enclosure Element for Chromium video controls.
3276         https://bugs.webkit.org/show_bug.cgi?id=87683
3277
3278         Reviewed by Eric Carlson.
3279
3280         Updated tests.
3281
3282         The Chrome video controls are receiving a visual update. A new enclosure div is required
3283         to provide for a offset space from the video's boundaries. The visual update itself is in
3284         a separate patch.
3285
3286         * css/mediaControlsChromium.css:
3287         (video::-webkit-media-controls-enclosure):
3288         Introduce CSS for enclosure div so it doesn't show yet.
3289         * html/shadow/MediaControlRootElementChromium.cpp:
3290         (WebCore::MediaControlChromiumEnclosureElement::MediaControlChromiumEnclosureElement):
3291         Definition of the new enclosure element.
3292         (WebCore::MediaControlChromiumEnclosureElement::create):
3293         Definition of a create operator for the new enclosure element.
3294         (WebCore::MediaControlChromiumEnclosureElement::shadowPseudoId):
3295         Definition of the shadowPseudoId of -webkit-media-controls-enclosure for the enclosure div.
3296         (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
3297         Initialize member element for enclosure div.
3298         (WebCore::MediaControlRootElementChromium::create):
3299         Instantiate enclosure div and add into DOM between controls and panel elements.
3300         (WebCore::MediaControlRootElementChromium::setMediaController):
3301         Set media controller for enclosure div.
3302         (WebCore::MediaControlRootElementChromium::createTextTrackDisplay):
3303         Insert text track display container to enclosure rather than panel.
3304         * html/shadow/MediaControlRootElementChromium.h:
3305         (WebCore):
3306         (MediaControlChromiumEnclosureElement):
3307         (WebCore::MediaControlChromiumEnclosureElement::setMediaController):
3308         (WebCore::MediaControlChromiumEnclosureElement::mediaController):
3309         (WebCore::MediaControlChromiumEnclosureElement::isMediaControlElement):
3310         Add declaration of the new enclosure element and its member functions.
3311         (MediaControlRootElementChromium):
3312         Add member variable to controls root element to hold the enclosure element.
3313
3314 2012-06-11  Elliott Sprehn  <esprehn@gmail.com>
3315
3316         WebKit doesn't allow replacing the document element with a DocumentFragment containing one element
3317         https://bugs.webkit.org/show_bug.cgi?id=88681
3318
3319         Reviewed by Ojan Vafai.
3320
3321         Fix bug where replacing an immediate child of a Document with a DocumentFragment
3322         would throw a HIERARCHY_REQUEST_ERR instead of replacing the node as required by DOM4.
3323         http://www.w3.org/TR/domcore/#mutation-algorithms
3324
3325         * dom/Document.cpp:
3326         (WebCore::Document::canReplaceChild):
3327             When the newChild was a DocumentFragment we incorrectly
3328             iterated over the document's children twice instead of the
3329             fragment when counting the total number of elements and
3330             doctypes to enfoce that there's only one of each.
3331
3332 2012-06-11  Mary Wu  <mary.wu@torchmobile.com.cn>
3333
3334         [BlackBerry] Add handling of notifyDataReceived in NetworkJob even there's no data inside
3335         https://bugs.webkit.org/show_bug.cgi?id=88773
3336
3337         Reviewed by Rob Buis.
3338
3339         Handling notifyDataReceived event even if there is no data inside.
3340         This event was critical because it gives downloadFilterStream a chance
3341         to follow up NetworkStream close event, and it also make pluginView in
3342         FrameLoaderBlackBerry return normal logic.
3343
3344         RIM PR# 164563
3345
3346         Reviewed internally by Leo Yang.
3347
3348         * platform/network/blackberry/NetworkJob.cpp:
3349         (WebCore::NetworkJob::handleNotifyDataReceived):
3350
3351 2012-06-11  Mary Wu  <mary.wu@torchmobile.com.cn>
3352
3353         [BlackBerry] Wrong mimetype for empty file link
3354         https://bugs.webkit.org/show_bug.cgi?id=88642
3355
3356         Reviewed by Rob Buis.
3357
3358         RIM PR# 164164
3359
3360         For empty file link, we shouldn't give "application/octet-stream"
3361         which will lead to download.
3362
3363         Reviewed internally by Charles Wei.
3364
3365         * platform/network/blackberry/NetworkJob.cpp:
3366         (WebCore::NetworkJob::sendResponseIfNeeded):
3367
3368 2012-06-11  Jin Yang  <jin.a.yang@intel.com>
3369
3370         GeneratorGeneratedImage should cache images for the non-tiled case
3371         https://bugs.webkit.org/show_bug.cgi?id=87094
3372
3373         Reviewed by Simon Fraser.
3374
3375         We cache the generated image if generator is not changed. By compared
3376         with generating image on the fly, it will lose a little pixel precision
3377         and several layout tests should be rebaselined. With this patch, the IE test
3378         drive benchmark "Bayou" can gain about 50%.
3379
3380         No new tests. Performance optimization.
3381
3382         * platform/graphics/GeneratorGeneratedImage.cpp:
3383         (WebCore::GeneratorGeneratedImage::draw):
3384
3385 2012-06-11  Vincent Scheib  <scheib@chromium.org>
3386
3387         Add new Pointer Lock spec attribute webkitPointerLockElement.
3388         https://bugs.webkit.org/show_bug.cgi?id=88799
3389
3390         Reviewed by Dimitri Glazkov.
3391
3392         Part of a series of refactoring changes to update pointer lock API to
3393         the fullscreen locking style. https://bugs.webkit.org/show_bug.cgi?id=84402
3394
3395         New attribute webkitPointerLockElement added. Follow up patches
3396         will remove the previous isLocked attribute. Tests updated to use
3397         the new attribute.
3398
3399         * bindings/generic/RuntimeEnabledFeatures.h:
3400         (WebCore::RuntimeEnabledFeatures::webkitPointerLockElementEnabled):
3401         * dom/Document.cpp:
3402         (WebCore):
3403         (WebCore::Document::webkitPointerLockElement):
3404         * dom/Document.h:
3405         (Document):
3406         * dom/Document.idl:
3407         * page/PointerLockController.h:
3408         (WebCore::PointerLockController::element):
3409
3410 2012-06-11  Vincent Scheib  <scheib@chromium.org>
3411
3412         Consolidate Pointer Lock runtime enabled flags to just one.
3413         https://bugs.webkit.org/show_bug.cgi?id=88810
3414
3415         Reviewed by Dimitri Glazkov.
3416
3417         No new tests.
3418
3419         * bindings/generic/RuntimeEnabledFeatures.h:
3420         (WebCore::RuntimeEnabledFeatures::pointerLockEnabled):
3421         (WebCore::RuntimeEnabledFeatures::setPointerLockEnabled):
3422         * dom/MouseEvent.idl:
3423         * page/Navigator.idl:
3424
3425 2012-06-11  Alexis Menard  <alexis.menard@openbossa.org>
3426
3427         [CSS3 Backgrounds and Borders] Protect box-decoration-break behind a feature flag.
3428         https://bugs.webkit.org/show_bug.cgi?id=88804
3429
3430         Reviewed by Tony Chang.
3431
3432         Protect box-decoration-break behind a feature flag enabled by default.
3433
3434         No new tests : no behavior change here.
3435
3436         * Configurations/FeatureDefines.xcconfig:
3437         * GNUmakefile.am:
3438         * css/CSSComputedStyleDeclaration.cpp:
3439         (WebCore):
3440         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3441         * css/CSSParser.cpp:
3442         (WebCore::isValidKeywordPropertyAndValue):
3443         (WebCore::isKeywordPropertyID):
3444         (WebCore::CSSParser::parseValue):
3445         * css/CSSPrimitiveValueMappings.h:
3446         (WebCore):
3447         * css/CSSProperty.cpp:
3448         (WebCore::CSSProperty::isInheritedProperty):
3449         * css/CSSValueKeywords.in:
3450         * css/StyleBuilder.cpp:
3451         (WebCore::StyleBuilder::StyleBuilder):