Fix mac clang build with long long
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-03-05  Alec Flett  <alecflett@chromium.org>
2
3         Fix mac clang build with long long
4         https://bugs.webkit.org/show_bug.cgi?id=111495
5
6         Unreviewed fix for mac build.
7
8         * Modules/indexeddb/IDBBackingStore.cpp:
9         (WebCore::IDBBackingStore::IDBBackingStore):
10
11 2013-03-05  Alec Flett  <alecflett@chromium.org>
12
13         Fix mac clang build with long long
14         https://bugs.webkit.org/show_bug.cgi?id=111495
15
16         Unreviewed fix for mac build.
17
18         * Modules/indexeddb/IDBBackingStore.cpp:
19         (WebCore::IDBBackingStore::IDBBackingStore):
20
21 2013-03-05  Aaron Colwell  <acolwell@chromium.org>
22
23         Add V8Document.h include when the V8 code generator creates a toV8(Document*) call.
24         https://bugs.webkit.org/show_bug.cgi?id=111486
25
26         Reviewed by Adam Barth.
27
28         No new tests. This doesn't change user visible behavior.
29
30         * bindings/scripts/CodeGeneratorV8.pm:
31         (GenerateNamedConstructor):
32         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
33
34 2013-03-05  Shawn Singh  <shawnsingh@chromium.org>
35
36         Fix default background of a dragged image.
37         https://bugs.webkit.org/show_bug.cgi?id=110512
38
39         Reviewed by Tony Chang.
40
41         Transparent background color (particularly visible in the padding
42         of an element) was not being respected. The solution is to
43         initially fill the drag image with transparent instead of white,
44         so that any color background works correctly. This patch does not
45         affect Apple Mac or Win platforms, given that this part of the
46         code is #if guarded from those platforms.
47
48         Manual test added:
49           ManualTests/drag-background-with-padding.html
50
51         Infrastructure for retrieving the drag image for pixel testing
52         does not yet exist.
53
54         * page/Frame.cpp:
55         (WebCore::Frame::nodeImage):
56
57 2013-03-05  Emil A Eklund  <eae@chromium.org>
58
59         ASSERTION FAILED: i < size(), UNKNOWN in WebCore::RenderTableSection::layout
60         https://bugs.webkit.org/show_bug.cgi?id=108838
61
62         Reviewed by Levi Weintraub.
63         
64         Ensure that RenderTable::recalcSections is called when moving a
65         TableSection by calling setNeedsSectionRecalc in addChild for
66         TableSections.
67
68         Test: fullscreen/full-screen-table-section.html
69
70         * rendering/RenderTable.cpp:
71         (WebCore::RenderTable::addChild):
72
73 2013-03-05  Kenneth Russell  <kbr@google.com>
74
75         Upgrade ANGLE to r1987
76         https://bugs.webkit.org/show_bug.cgi?id=111381
77
78         Reviewed by Dean Jackson.
79
80         Covered by existing tests. Ran WebGL conformance tests in Safari
81         to ensure correct operation of patch.
82
83         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
84         (WebCore::GraphicsContext3D::GraphicsContext3D):
85         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
86         (WebCore::GraphicsContext3D::GraphicsContext3D):
87         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
88         (WebCore::GraphicsContext3D::GraphicsContext3D):
89         * platform/graphics/mac/GraphicsContext3DMac.mm:
90         (WebCore::GraphicsContext3D::GraphicsContext3D):
91         * platform/graphics/qt/GraphicsContext3DQt.cpp:
92         (WebCore::GraphicsContext3DPrivate::initializeANGLE):
93             Changed all ports to query for highp support in fragment
94             shaders and conditionally enable it in ANGLE shader translator.
95
96 2013-03-05  Alec Flett  <alecflett@chromium.org>
97
98         IndexedDB: Add IDBBackingStoreTest
99         https://bugs.webkit.org/show_bug.cgi?id=111233
100
101         Reviewed by Adam Barth.
102
103         These are tweaks to make IDBBackingStore more easily testable.
104
105         * Modules/indexeddb/IDBBackingStore.cpp:
106         (WebCore::IDBBackingStore::IDBBackingStore): Allow use without a backing store.
107
108 2013-03-04  James Robinson  <jamesr@chromium.org>
109
110         [chromium] Move check for threaded compositing from WebCompositorSupport to Platform
111         https://bugs.webkit.org/show_bug.cgi?id=111386
112
113         Reviewed by Adrienne Walker.
114
115         This moves checks for whether threaded compositing is enabled from WebCompositorSupport
116         to Platform. In the case of Canvas2DLayerBridge, the check is moved completely out of
117         the class to make it easier for tests to specify the threaded configuration to use in the test.
118
119         * platform/graphics/chromium/Canvas2DLayerBridge.cpp:
120         (WebCore::Canvas2DLayerBridge::Canvas2DLayerBridge):
121         * platform/graphics/chromium/Canvas2DLayerBridge.h:
122         (WebCore::Canvas2DLayerBridge::create):
123         (Canvas2DLayerBridge):
124         * platform/graphics/chromium/DrawingBufferChromium.cpp:
125         (WebCore::DrawingBuffer::DrawingBuffer):
126         * platform/graphics/skia/ImageBufferSkia.cpp:
127         (WebCore::createAcceleratedCanvas):
128
129 2013-03-05  Anders Carlsson  <andersca@apple.com>
130
131         Split up the storage event dispatch functions further
132         https://bugs.webkit.org/show_bug.cgi?id=111482
133
134         Reviewed by Beth Dakin.
135
136         Add new functions for dispatching storage events to a set of frames.
137
138         * storage/StorageAreaImpl.cpp:
139         (WebCore::StorageAreaImpl::dispatchStorageEvent):
140         * storage/StorageEventDispatcher.cpp:
141         (WebCore::StorageEventDispatcher::dispatchSessionStorageEvents):
142         (WebCore::StorageEventDispatcher::dispatchLocalStorageEvents):
143         (WebCore):
144         (WebCore::StorageEventDispatcher::dispatchSessionStorageEventsToFrames):
145         (WebCore::StorageEventDispatcher::dispatchLocalStorageEventsToFrames):
146         * storage/StorageEventDispatcher.h:
147         (WebCore):
148         (StorageEventDispatcher):
149
150 2013-03-05  Stephen Chenney  <schenney@chromium.org>
151
152         Crash when ImageLoader deletes Element inside SVGImageElement
153         https://bugs.webkit.org/show_bug.cgi?id=111085
154
155         Reviewed by Abhishek Arya.
156
157         Elements with ImageLoader objects associated with them may have their
158         final reference held by the ImageLoader (to allow events to be sent
159         and handled). Any call on Element that causes the ImageLoader to
160         dispatch events might then result in the final deref of the Element
161         itself, thus leaving all the Element's "this" pointers up the stack
162         pointing to invalid memory.
163
164         This change puts the deref of the Element on a timer so that, if the
165         deref is called via a method on Element, the call stack will unwind
166         before the deref occurs.
167
168         Test: svg/custom/image-with-attr-change-after-delete-crash.html
169
170         * loader/ImageLoader.cpp:
171         (WebCore::ImageLoader::ImageLoader): Initialize a timer
172         (WebCore::ImageLoader::updatedHasPendingEvent): Put deref of the
173           element on a oneShotTimer, with appropriate assertions and checks to
174           ensure we only ref/deref once.
175         (WebCore::ImageLoader::timerFired): Deref the element when the timer fires.
176         * loader/ImageLoader.h:
177         (ImageLoader): Define a timer for controlling deref of the element.
178
179 2013-03-05  Antoine Quint  <graouts@apple.com>
180
181         Web Inspector: identify reflection layers in LayerTreeAgent
182         https://bugs.webkit.org/show_bug.cgi?id=111419
183
184         We add a new property "isReflection" to the Layer objects returned
185         to the front-end to indicate whether the layer was created to host
186         the reflection for an element. When this new property is true, the
187         "nodeId" property is set to point to the reflected element's node
188         id, since there is no node per-se directly associated with this layer.
189         We also change the "bounds" property to return absolute page coordinates
190         such that the front-end can use this information to highlight that
191         region in the page since metrics would otherwise be unavailable.
192
193         Reviewed by Dean Jackson.
194
195         Test: inspector-protocol/layers/layers-reflected-content.html
196
197         * inspector/Inspector.json:
198         * inspector/InspectorLayerTreeAgent.cpp:
199         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
200
201 2013-03-05  peavo@outlook.com  <peavo@outlook.com>
202
203         [WinCairo] Compile fix after r144024.
204         https://bugs.webkit.org/show_bug.cgi?id=111306
205
206         Reviewed by James Robinson.
207
208         * page/scrolling/ScrollingCoordinator.cpp: Added guard for USE(ACCELERATED_COMPOSITING).
209         * page/scrolling/ScrollingCoordinator.h: Added guard for USE(ACCELERATED_COMPOSITING).
210
211 2013-03-05  James Weatherall  <wez@chromium.org>
212
213         keydown and keyup events have zero keycode for some numeric pad keys under Chromium on Linux
214         https://bugs.webkit.org/show_bug.cgi?id=85642
215
216         Add missing key mappings for GDK_KP_Begin, GDK_KP_Insert, GDK_KP_Delete and GDK_ISO_Level3_Shift.
217
218         Reviewed by Ojan Vafai.
219
220         * platform/chromium/KeyCodeConversionGtk.cpp:
221         (WebCore::windowsKeyCodeForKeyEvent):
222
223 2013-03-05  Alec Flett  <alecflett@chromium.org>
224
225         IndexedDB: Properly refactor frontend/backend code by #includes
226         https://bugs.webkit.org/show_bug.cgi?id=110653
227
228         Reviewed by Dimitri Glazkov.
229
230         IndexedDB has a distinct backend and frontend, with well defined
231         *Interface / *Callbacks classes distinguishing them, respectively.
232         
233         This makes sure that the frontend and backend do not include each
234         other and fixes build problems that occurred as a result.
235
236         Specifically this moves enums out of IDBCursor and IDBTransaction
237         into IndexedDB.h in a new WebCore::IndexedDB namespace.
238
239         No new tests, as this is just a refactor.
240
241 2013-03-05  Jeffrey Pfau  <jpfau@apple.com>
242
243         Clear associated cache partitions when deleting origins' cache
244         https://bugs.webkit.org/show_bug.cgi?id=111383
245
246         Reviewed by Maciej Stachowiak.
247
248         Clear the cache partitions associated with the origin being cleared.
249
250         Not possible to test with current automated test tools, must be tested manually.
251
252         * loader/cache/MemoryCache.cpp:
253         (WebCore::MemoryCache::removeResourcesWithOrigin):
254
255 2013-03-04  Ojan Vafai  <ojan@chromium.org>
256
257         Inline min/maxInstrinsicLogicalWidth functions
258         https://bugs.webkit.org/show_bug.cgi?id=111399
259
260         Reviewed by Tony Chang.
261
262         Turns out these functions don't need to be public and only
263         have one caller. This patch is in preparation for supporting
264         intrinsic widths on tables, which will need to pass in the
265         border and padding width as an argument.
266
267         * rendering/RenderBox.cpp:
268         (WebCore::RenderBox::fillAvailableMeasure):
269         (WebCore::RenderBox::computeIntrinsicLogicalWidthUsing):
270         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
271         * rendering/RenderBox.h:
272
273 2013-03-05  Victor Carbune  <vcarbune@chromium.org>
274
275         Cue line-height property shouldn't be inherited from the video element
276         https://bugs.webkit.org/show_bug.cgi?id=111262
277
278         Reviewed by Eric Carlson.
279
280         Test: media/track/track-cue-rendering-on-resize.html
281
282         * css/mediaControls.css:
283         (video::-webkit-media-text-track-container): Set the default font size
284         and family using the "font" property to also reset the line-height property.
285
286 2013-03-05  Joshua Bell  <jsbell@chromium.org>
287
288         IndexedDB: Remove some unused binding code
289         https://bugs.webkit.org/show_bug.cgi?id=111463
290
291         Reviewed by Adam Barth.
292
293         IDBRequest got a custom V8 getter for |request| to help diagnose an issue, but the
294         root cause was found/fixed (http://wkbug.com/110916 and http://wkbug.com/110206) so
295         remove it. Also, IDBKey was marked ScriptWrappable but it is now explicitly converted
296         to a ScriptValue before it gets anywhere near the binding code, so remove that too.
297         Finally, createIDBKeyFromValue doesn't need to be exposed from IDBBindingUtilities.
298
299         No new tests - just removing dead code.
300
301         * Modules/indexeddb/IDBKey.h: No need for ScriptWrappable.
302         * Modules/indexeddb/IDBRequest.idl: Remove custom binding (root cause of bug found).
303         * WebCore.gypi: Ditto.
304         * bindings/js/IDBBindingUtilities.h: Don't expose internal createIDBKeyFromValue().
305         * bindings/v8/IDBBindingUtilities.h: Ditto.
306         * bindings/v8/custom/V8IDBRequestCustom.cpp: Removed.
307
308 2013-03-05  Sheriff Bot  <webkit.review.bot@gmail.com>
309
310         Unreviewed, rolling out r144798.
311         http://trac.webkit.org/changeset/144798
312         https://bugs.webkit.org/show_bug.cgi?id=111478
313
314         "broke chromium windows build" (Requested by dpranke on
315         #webkit).
316
317         * GNUmakefile.list.am:
318         * Modules/indexeddb/IDBBackingStore.cpp:
319         (WebCore::IDBBackingStore::Cursor::continueFunction):
320         (WebCore::objectStoreCursorOptions):
321         (WebCore::indexCursorOptions):
322         (WebCore::IDBBackingStore::openObjectStoreCursor):
323         (WebCore::IDBBackingStore::openObjectStoreKeyCursor):
324         (WebCore::IDBBackingStore::openIndexKeyCursor):
325         (WebCore::IDBBackingStore::openIndexCursor):
326         * Modules/indexeddb/IDBBackingStore.h:
327         (IDBBackingStore):
328         * Modules/indexeddb/IDBCursor.cpp:
329         (WebCore::IDBCursor::create):
330         (WebCore::IDBCursor::IDBCursor):
331         (WebCore::IDBCursor::continueFunction):
332         (WebCore::IDBCursor::stringToDirection):
333         (WebCore::IDBCursor::directionToString):
334         * Modules/indexeddb/IDBCursor.h:
335         (IDBCursor):
336         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
337         (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
338         (WebCore::IDBCursorBackendImpl::deleteFunction):
339         (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::perform):
340         * Modules/indexeddb/IDBCursorBackendImpl.h:
341         (WebCore::IDBCursorBackendImpl::create):
342         (WebCore::IDBCursorBackendImpl::value):
343         (IDBCursorBackendImpl):
344         * Modules/indexeddb/IDBCursorBackendInterface.h:
345         (WebCore):
346         * Modules/indexeddb/IDBCursorWithValue.cpp:
347         (WebCore::IDBCursorWithValue::create):
348         (WebCore::IDBCursorWithValue::IDBCursorWithValue):
349         * Modules/indexeddb/IDBCursorWithValue.h:
350         (IDBCursorWithValue):
351         * Modules/indexeddb/IDBDatabase.cpp:
352         (WebCore::IDBDatabase::transaction):
353         * Modules/indexeddb/IDBDatabase.h:
354         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
355         (WebCore::GetOperation::create):
356         (WebCore::GetOperation::GetOperation):
357         (GetOperation):
358         (WebCore::OpenCursorOperation::create):
359         (WebCore::OpenCursorOperation::OpenCursorOperation):
360         (OpenCursorOperation):
361         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
362         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
363         (WebCore::IDBDatabaseBackendImpl::createIndex):
364         (WebCore::IDBDatabaseBackendImpl::deleteIndex):
365         (WebCore::IDBDatabaseBackendImpl::get):
366         (WebCore::GetOperation::perform):
367         (WebCore::IDBDatabaseBackendImpl::put):
368         (WebCore::PutOperation::perform):
369         (WebCore::IDBDatabaseBackendImpl::setIndexKeys):
370         (WebCore::IDBDatabaseBackendImpl::openCursor):
371         (WebCore::OpenCursorOperation::perform):
372         (WebCore::CountOperation::perform):
373         (WebCore::IDBDatabaseBackendImpl::deleteRange):
374         (WebCore::DeleteRangeOperation::perform):
375         (WebCore::IDBDatabaseBackendImpl::clear):
376         (WebCore::IDBDatabaseBackendImpl::transactionStarted):
377         (WebCore::IDBDatabaseBackendImpl::transactionFinished):
378         (WebCore::IDBDatabaseBackendImpl::transactionFinishedAndAbortFired):
379         (WebCore::IDBDatabaseBackendImpl::transactionFinishedAndCompleteFired):
380         (WebCore::IDBDatabaseBackendImpl::createTransaction):
381         (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
382         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
383         (IDBDatabaseBackendImpl):
384         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
385         * Modules/indexeddb/IDBFactory.h:
386         * Modules/indexeddb/IDBIndex.cpp:
387         (WebCore):
388         (WebCore::IDBIndex::openCursor):
389         (WebCore::IDBIndex::openKeyCursor):
390         * Modules/indexeddb/IDBObjectStore.cpp:
391         (WebCore):
392         (WebCore::IDBObjectStore::openCursor):
393         * Modules/indexeddb/IDBRequest.cpp:
394         (WebCore::IDBRequest::IDBRequest):
395         (WebCore::IDBRequest::setCursorDetails):
396         (WebCore::IDBRequest::setResultCursor):
397         (WebCore::IDBRequest::onSuccess):
398         * Modules/indexeddb/IDBRequest.h:
399         (IDBRequest):
400         * Modules/indexeddb/IDBTransaction.cpp:
401         (WebCore::IDBTransaction::create):
402         (WebCore::IDBTransaction::IDBTransaction):
403         (WebCore::IDBTransaction::stringToMode):
404         (WebCore::IDBTransaction::modeToString):
405         * Modules/indexeddb/IDBTransaction.h:
406         (WebCore::IDBTransaction::isReadOnly):
407         (WebCore::IDBTransaction::isVersionChange):
408         (IDBTransaction):
409         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
410         (WebCore::IDBTransactionBackendImpl::create):
411         (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
412         * Modules/indexeddb/IDBTransactionBackendImpl.h:
413         (IDBTransactionBackendImpl):
414         (WebCore::IDBTransactionBackendImpl::mode):
415         * Modules/indexeddb/IDBTransactionCoordinator.cpp:
416         (WebCore::IDBTransactionCoordinator::processStartedTransactions):
417         (WebCore::IDBTransactionCoordinator::canRunTransaction):
418         * Modules/indexeddb/IndexedDB.h: Removed.
419         * Target.pri:
420         * WebCore.gypi:
421
422 2013-03-05  Tommy Widenflycht  <tommyw@google.com>
423
424         MediaStream API: Allow local and remote descriptions to be accessed after close
425         https://bugs.webkit.org/show_bug.cgi?id=111437
426
427         Reviewed by Adam Barth.
428
429         It's quite clear in the standard that the getters should still return the old value.
430         Also overhauling the state setters a bit to check if the new state is different.
431
432         Existing tests expanded to cover patch.
433
434         * Modules/mediastream/RTCPeerConnection.cpp:
435         (WebCore::RTCPeerConnection::localDescription):
436         (WebCore::RTCPeerConnection::remoteDescription):
437         (WebCore::RTCPeerConnection::changeSignalingState):
438         (WebCore::RTCPeerConnection::changeIceGatheringState):
439         (WebCore::RTCPeerConnection::changeIceConnectionState):
440
441 2013-03-05  Charlie Reis  <creis@chromium.org>
442
443         Add FrameLoaderClient::didAccessInitialDocument
444         https://bugs.webkit.org/show_bug.cgi?id=107963
445
446         Notifies the FrameLoaderClient if another page accesses the
447         initial empty document of a main frame.  In this case, it is
448         no longer safe to display the provisional URL.
449
450         Only takes effect for PLATFORM(CHROMIUM), since no other platforms
451         listen to the notification.
452
453         Reviewed by Adam Barth.
454
455         * bindings/v8/V8DOMWindowShell.cpp:
456         (WebCore::V8DOMWindowShell::setSecurityToken):
457             Use default token for initial document.
458         * bindings/v8/custom/V8DOMWindowCustom.cpp:
459             Notify loader if initial document is accessed.
460         (WebCore::V8DOMWindow::namedSecurityCheck):
461         (WebCore::V8DOMWindow::indexedSecurityCheck):
462         * loader/FrameLoader.cpp:
463         (WebCore::FrameLoader::FrameLoader):
464         (WebCore::FrameLoader::didAccessInitialDocument):
465         (WebCore):
466         * loader/FrameLoader.h:
467         (FrameLoader):
468         * loader/FrameLoaderClient.h:
469         (FrameLoaderClient):
470         (WebCore::FrameLoaderClient::didAccessInitialDocument):
471
472 2013-03-05  Otto Derek Cheung  <otcheung@rim.com>
473
474         [BlackBerry] Fix assertion in CookieManager::getBackingStoreCookies
475         https://bugs.webkit.org/show_bug.cgi?id=111468
476
477         Reviewed by Rob Buis.
478         Internally reviewed by Konrad Piascik.
479
480         The assert in getBackingStoreCookies could be giving out false positives now
481         that we have our fixes for cookie loading in PR 286189. The cookie store could
482         be half loaded if the first cookie get/set call happens before the db is fully loaded.
483         A full webkit sync call to reload the database will cause the assert to be hit.
484
485         Safer to flush everything out and try again.
486
487         * platform/blackberry/CookieManager.cpp:
488         (WebCore::CookieManager::getBackingStoreCookies):
489
490 2013-03-05  Tony Gentilcore  <tonyg@chromium.org>
491
492         CompactHTMLToken does not need an XSSInfo pointer
493         https://bugs.webkit.org/show_bug.cgi?id=111423
494
495         Reviewed by Eric Seidel.
496
497         The CompactHTMLToken should remain as small as possible because it is copied. This shrinks the size by one pointer
498         by moving a relatively uncommon attribute out to its own Vector.
499
500         No new tests because no new functionality.
501
502         * html/parser/BackgroundHTMLParser.cpp:
503         (WebCore::checkThatXSSInfosAreSafeToSendToAnotherThread):
504         (WebCore):
505         (WebCore::BackgroundHTMLParser::pumpTokenizer):
506         (WebCore::BackgroundHTMLParser::sendTokensToMainThread):
507         * html/parser/BackgroundHTMLParser.h:
508         (BackgroundHTMLParser):
509         * html/parser/CompactHTMLToken.cpp:
510         (SameSizeAsCompactHTMLToken):
511         (WebCore::CompactHTMLToken::isSafeToSendToAnotherThread):
512         * html/parser/CompactHTMLToken.h:
513         (WebCore):
514         (CompactHTMLToken):
515         * html/parser/HTMLDocumentParser.cpp:
516         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
517         * html/parser/HTMLDocumentParser.h:
518         (ParsedChunk):
519         * html/parser/XSSAuditorDelegate.h:
520         (XSSInfo):
521         (WebCore):
522
523 2013-03-05  Anders Carlsson  <andersca@apple.com>
524
525         Split StorageEventDispatcher::dispatch into two functions
526         https://bugs.webkit.org/show_bug.cgi?id=111464
527
528         Reviewed by Beth Dakin.
529
530         Split StorageEventDispatcher::dispatch into dispatchSessionStorageEvent and
531         dispatchLocalStorageEvent and make StorageAreaImpl::dispatchStorageEvent call
532         the right function based on the storage area type.
533
534         * storage/StorageAreaImpl.cpp:
535         (WebCore::StorageAreaImpl::dispatchStorageEvent):
536         * storage/StorageEventDispatcher.cpp:
537         (WebCore::StorageEventDispatcher::dispatchSessionStorageEvent):
538         (WebCore):
539         (WebCore::StorageEventDispatcher::dispatchLocalStorageEvent):
540         * storage/StorageEventDispatcher.h:
541         (StorageEventDispatcher):
542
543 2013-03-05  Brent Fulgham  <bfulgham@webkit.org>
544
545         [WinCairo] Unreviewed build fix after r144024.
546
547         * page/scrolling/ScrollingCoordinator.cpp:
548         (WebCore::ScrollingCoordinator::scrollLayerForScrollableArea): Handle
549         case of not using Accelerated Compositing
550         (WebCore::ScrollingCoordinator::horizontalScrollbarLayerForScrollableArea):
551         (WebCore::ScrollingCoordinator::verticalScrollbarLayerForScrollableArea): Ditto.
552
553 2013-03-05  Alec Flett  <alecflett@chromium.org>
554
555         IndexedDB: Properly refactor frontend/backend code by #includes
556         https://bugs.webkit.org/show_bug.cgi?id=110653
557
558         Reviewed by Dimitri Glazkov.
559
560         IndexedDB has a distinct backend and frontend, with well defined
561         *Interface / *Callbacks classes distinguishing them, respectively.
562         
563         This makes sure that the frontend and backend do not include each
564         other and fixes build problems that occurred as a result.
565
566         Specifically this moves enums out of IDBCursor and IDBTransaction
567         into IndexedDB.h in a new WebCore::IndexedDB namespace.
568
569         No new tests, as this is just a refactor.
570
571 2013-03-05  James Robinson  <jamesr@chromium.org>
572
573         ContainerNode::setActive should not sleep for 100ms on platforms that do not implement synchronous repaint(true) semantics
574         https://bugs.webkit.org/show_bug.cgi?id=87054
575
576         Reviewed by Darin Adler.
577
578         Adds a new ChromeClient function to query if the platform supports the immediate parameter
579         to the invalidation APIs and guards the synchronous repaint logic in ContainerNode::setActive()
580         with it.
581
582         * dom/ContainerNode.cpp:
583         (WebCore::ContainerNode::setActive):
584         * page/ChromeClient.h:
585         (WebCore::ChromeClient::supportsImmediateInvalidation):
586
587 2013-03-05  Anders Carlsson  <andersca@apple.com>
588
589         Simplify storage event dispatch somewhat
590         https://bugs.webkit.org/show_bug.cgi?id=111461
591
592         Reviewed by Beth Dakin.
593
594         Add a StorageAreaImpl::dispatchStorageEvent to avoid replicating the calls to
595         StorageEventDispatcher::dispatch there times. This is in preparation for changing the
596         interface of StorageEventDispatcher so it can be used by WebKit2.
597
598         * storage/StorageAreaImpl.cpp:
599         (WebCore::StorageAreaImpl::setItem):
600         (WebCore::StorageAreaImpl::removeItem):
601         (WebCore::StorageAreaImpl::clear):
602         (WebCore::StorageAreaImpl::dispatchStorageEvent):
603
604         * storage/StorageAreaImpl.h:
605         Reindent.
606
607 2013-03-05  Tony Chang  <tony@chromium.org>
608
609         Fix some crashes in render sliders
610         https://bugs.webkit.org/show_bug.cgi?id=111458
611
612         Reviewed by Ojan Vafai.
613
614         Fix some cases where we assumed the renderer is a renderBox.
615
616         Test: fast/forms/range/slider-inline-crash.html
617
618         * html/shadow/SliderThumbElement.cpp:
619         (WebCore::RenderSliderContainer::layout): Use renderBox() which will return 0 if the renderer is not a RenderBox.
620         (WebCore::SliderThumbElement::setPositionFromPoint): Bail out early if renderBox() is 0.
621
622 2013-03-04  Andrew Scherkus  <scherkus@chromium.org>
623
624         REGRESSION(r142191): Fix closed caption buttons for ports still using the painting path.
625         https://bugs.webkit.org/show_bug.cgi?id=111109
626
627         Reviewed by Eric Carlson.
628
629         Covered by following tests:
630         media/track/track-cue-rendering-horizontal.html
631         media/track/track-cue-rendering-vertical.html
632
633         * rendering/RenderTheme.cpp:
634         (WebCore::RenderTheme::paint):
635         * rendering/RenderTheme.h:
636         (WebCore::RenderTheme::paintMediaToggleClosedCaptionsButton):
637
638 2013-03-05  Gwang Yoon Hwang  <ryumiel@company100.net>
639
640         Coordinated Graphics: CoordinatedGraphicsLayer makes CoordinatedGraphicsScene perform via CoordinatedGraphicsState.
641         https://bugs.webkit.org/show_bug.cgi?id=108294
642
643         Reviewed by Anders Carlsson.
644
645         CoordinatedLayerTreeHostProxy has too many IPC messages (e.g. SyncCanvas and
646         CreateTile), and there is a long function chain from CoordinatedGraphicsLayer to
647         CoordinatedGraphicsScene (4 classes).
648         If we want to add a new message, we need to add similar functions into 4 classes.
649
650         Now CoordinatedLayerTreeHost has only one IPC message for CoordinatedGraphicsLayer:
651         CommitCoordinatedGraphicsState.
652         CoordinatedGraphicsLayer makes CoordinatedGraphicsScene run as follows:
653         1. CoordinatedGraphicsLayer makes a CoordinatedGraphicsLayerState.
654         2. CoordinatedLayerTreeHost stores all LayerStates.
655         3. CoordinatedLayerTreeHost sends GraphicsState includes LayerStates to CoordinatedLayerTreeHostProxy
656         at the moment of flushing via CommitCoordinatedGraphicsState message.
657         4. CoordinatedGraphicsScene applies all state changes to layers.
658
659         There is one big behavior change. All states changes (e.g.
660         UpdateTiles, SetLayerChildren, and etc..) are performed at the same time, when
661         CoordinatedGraphicsScene::commitCoordinatedGraphicsState is called.
662
663         This patch is based on Dongsung Huang, and Noam's work in
664         https://bugs.webkit.org/show_bug.cgi?id=108294
665
666         No new tests, covered by existing tests.
667
668         * Target.pri:
669         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
670         (WebCore::CoordinatedGraphicsLayer::setPosition):
671         (WebCore::CoordinatedGraphicsLayer::setAnchorPoint):
672         (WebCore::CoordinatedGraphicsLayer::setSize):
673         (WebCore::CoordinatedGraphicsLayer::setTransform):
674         (WebCore::CoordinatedGraphicsLayer::setChildrenTransform):
675         (WebCore::CoordinatedGraphicsLayer::setPreserves3D):
676         (WebCore::CoordinatedGraphicsLayer::setMasksToBounds):
677         (WebCore::CoordinatedGraphicsLayer::setDrawsContent):
678         (WebCore::CoordinatedGraphicsLayer::setContentsVisible):
679         (WebCore::CoordinatedGraphicsLayer::setContentsOpaque):
680         (WebCore::CoordinatedGraphicsLayer::setBackfaceVisibility):
681         (WebCore::CoordinatedGraphicsLayer::setOpacity):
682         (WebCore::CoordinatedGraphicsLayer::setContentsRect):
683         (WebCore::CoordinatedGraphicsLayer::setFilters):
684         (WebCore::CoordinatedGraphicsLayer::setContentsToSolidColor):
685         (WebCore::CoordinatedGraphicsLayer::setShowDebugBorder):
686         (WebCore::CoordinatedGraphicsLayer::setShowRepaintCounter):
687         (WebCore::CoordinatedGraphicsLayer::setMaskLayer):
688         (WebCore::CoordinatedGraphicsLayer::setReplicatedByLayer):
689         (WebCore::CoordinatedGraphicsLayer::setFixedToViewport):
690         (WebCore::CoordinatedGraphicsLayer::syncChildren):
691         (WebCore::CoordinatedGraphicsLayer::syncFilters):
692         (WebCore::CoordinatedGraphicsLayer::syncImageBacking):
693         (WebCore::CoordinatedGraphicsLayer::syncLayerState):
694         (WebCore::CoordinatedGraphicsLayer::setDebugBorder):
695         (WebCore::CoordinatedGraphicsLayer::syncAnimations):
696         (WebCore::CoordinatedGraphicsLayer::syncCanvas):
697         (WebCore::CoordinatedGraphicsLayer::destroyCanvasIfNeeded):
698         (WebCore::CoordinatedGraphicsLayer::createCanvasIfNeeded):
699         (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
700         (WebCore::CoordinatedGraphicsLayer::resetLayerState):
701         (WebCore):
702         (WebCore::CoordinatedGraphicsLayer::releaseImageBackingIfNeeded):
703         (WebCore::CoordinatedGraphicsLayer::setRootLayer):
704         (WebCore::CoordinatedGraphicsLayer::tiledBackingStorePaintEnd):
705         (WebCore::CoordinatedGraphicsLayer::createTile):
706         (WebCore::CoordinatedGraphicsLayer::updateTile):
707         (WebCore::CoordinatedGraphicsLayer::removeTile):
708         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
709         (CoordinatedGraphicsLayerClient):
710         (CoordinatedGraphicsLayer):
711         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
712         (WebCore::CoordinatedGraphicsScene::createCanvasIfNeeded):
713         (WebCore::CoordinatedGraphicsScene::syncCanvasIfNeeded):
714         (WebCore::CoordinatedGraphicsScene::destroyCanvasIfNeeded):
715         (WebCore::CoordinatedGraphicsScene::setLayerRepaintCountIfNeeded):
716         (WebCore::CoordinatedGraphicsScene::setLayerChildrenIfNeeded):
717         (WebCore::CoordinatedGraphicsScene::setLayerFiltersIfNeeded):
718         (WebCore::CoordinatedGraphicsScene::setLayerState):
719         (WebCore::CoordinatedGraphicsScene::deleteLayer):
720         (WebCore::CoordinatedGraphicsScene::createTilesIfNeeded):
721         (WebCore::CoordinatedGraphicsScene::removeTilesIfNeeded):
722         (WebCore::CoordinatedGraphicsScene::updateTilesIfNeeded):
723         (WebCore::CoordinatedGraphicsScene::assignImageBackingToLayer):
724         (WebCore::CoordinatedGraphicsScene::commitSceneState):
725         (WebCore::CoordinatedGraphicsScene::setLayerAnimationsIfNeeded):
726         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
727         (WebCore):
728         (CoordinatedGraphicsScene):
729         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h: Added.
730         (WebCore):
731         (TileUpdateInfo):
732         (TileCreationInfo):
733         (WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
734         (CoordinatedGraphicsLayerState):
735         (CoordinatedGraphicsState):
736         * platform/graphics/texmap/coordinated/CoordinatedImageBacking.h:
737         * platform/graphics/texmap/coordinated/CoordinatedLayerInfo.h: Removed.
738         * platform/graphics/texmap/coordinated/SurfaceUpdateInfo.h:
739
740 2013-03-05  Roger Fong  <roger_fong@apple.com>
741
742         Unreviewed. AppleWin VS2010 build fix.
743
744         * WebCore.vcxproj/WebCore.vcxproj:
745         * WebCore.vcxproj/WebCore.vcxproj.filters:
746         * rendering/RenderingAllInOne.cpp:
747
748 2013-03-05  Bem Jones-Bey  <bjonesbe@adobe.com>
749
750         [CSS Exclusions] shape-outside on floats for polygon shapes
751         https://bugs.webkit.org/show_bug.cgi?id=98676
752
753         Reviewed by David Hyatt.
754
755         Implement support for polygonal shape-outside on floats. The basic
756         tack taken here is to keep using the bounding box of the shape to
757         position the float, but to compute the offset (caused by the shape)
758         from the bounding box for each line when creating and positioning
759         other inline content.
760
761         Test: fast/exclusions/shape-outside-floats/shape-outside-floats-simple-polygon.html
762
763         * rendering/ExclusionShapeInfo.cpp:
764         (WebCore):
765         (WebCore::::computedShape): Add new template parameter.
766         (WebCore::::logicalTopOffset): Add new template parameter.
767         (WebCore::::computeSegmentsForLine): Move here from
768             ExclusionShapeInsideInfo, since ExclusionShapeOutsideInfo needs it
769             as well. Make virtual since there is slightly different behavior
770             between each class even though the vast majority of the code is
771             common.
772         * rendering/ExclusionShapeInfo.h:
773         (WebCore):
774         (WebCore::ExclusionShapeInfo::~ExclusionShapeInfo): Since
775             computeSegmentsForLine is virtual, the destructor must be virtual
776             as well.
777         (ExclusionShapeInfo): Add new data members to support
778             computeSegmentsForLine.
779         (WebCore::ExclusionShapeInfo::shapeLogicalRight): Fix bug, the logical
780             right is based off of maxX, not y. (it's a logical bounding box!)
781         (WebCore::ExclusionShapeInfo::logicalLineTop): Moved from
782             ExclusionShapeInsideInfo for use by computeSegmentsForLine and
783             lineOverlapsShapeBounds.
784         (WebCore::ExclusionShapeInfo::logicalLineBottom): Moved from
785             ExclusionShapeInsideInfo for use by computeSegmentsForLine and
786             lineOverlapsShapeBounds.
787         (WebCore::ExclusionShapeInfo::lineOverlapsShapeBounds): Moved from
788             ExclusionShapeInsideInfo for use by computeSegmentsForLine.
789         * rendering/ExclusionShapeInsideInfo.cpp: Moved common code from
790             computeSegmentsForLine into ExclusionShapeInfo.
791         * rendering/ExclusionShapeInsideInfo.h:
792         (WebCore): Moved some methods to ExclusionShapeInfo.
793         (ExclusionShapeInsideInfo): Update for new template parameter.
794         (WebCore::ExclusionShapeInsideInfo::compyteSegmentsForLine): Override
795             superclass method to clear the segment ranges. Segement ranges
796             aren't used by shape outside, and have some complex dependencies
797             that make it very hard to try and move up into ExclusionShapeInfo.
798         (WebCore::ExclusionShapeInsideInfo::ExclusionShapeInsideInfo): Update
799             for new template parameter.
800         * rendering/ExclusionShapeOutsideInfo.cpp:
801         (WebCore::ExclusionShapeOutsideInfo::isEnabledFor): Add polygons as a
802             supported shape.
803         (WebCore::ExclusionShapeOutsideInfo::computeSegmentsForLine): Override
804             superclass method to not recompute if it isn't needed (this isn't
805             straightfoward for shape inside, which is why it isn't common),
806             and to save the left and right offsets caused by the shape
807             outside, since that's all that is needed to properly do layout in
808             the case of floats.
809         * rendering/ExclusionShapeOutsideInfo.h:
810         (WebCore::ExclusionShapeOutsideInfo::shapeLogicalOffset): Reformat to
811             be on a single line, like most other methods of it's type in
812             WebKit headers.
813         (ExclusionShapeOutsideInfo): Update for new template parameter.
814         (WebCore::ExclusionShapeOutsideInfo::logicalLeftOffsetForLine):
815             Accessor method to get the left offset between the shape and the
816             shape's bounding box.
817         (WebCore::ExclusionShapeOutsideInfo::logicalRightOffsetForLine):
818             Accessor method to get the left offset between the shape and the
819             shape's bounding box.
820         (WebCore::ExclusionShapeOutsideInfo::ExclusionShapeOutsideInfo):
821             Update for new template parameter.
822         * rendering/RenderBlock.cpp:
823         (WebCore::::collectIfNeeded): Save the last float encountered so that
824             the shape outside offset can be accounted for.
825         (WebCore::RenderBlock::logicalLeftOffsetForLine): Account for the
826             shape outside offset on the outermost float.
827         (WebCore::RenderBlock::logicalRightOffsetForLine): Account for the
828             shape outside offset on the outermost float.
829         * rendering/RenderBlock.h:
830         (WebCore::RenderBlock::FloatIntervalSearchAdapter::FloatIntervalSearchAdapter):
831             Initialize the lastFloat member.
832         (WebCore::RenderBlock::FloatIntervalSearchAdapter::lastFloat): Get the
833             last float encountered.
834         (FloatIntervalSearchAdapter): Add a pointer to the last float
835             encountered. Note that the variable is mutable because
836             collectIfNeeded is declared as a const method even though it isn't
837             (it uses loopholes to update m_offset and m_heightRemaining).
838             Instead of trying to come up with a hack to stick with the
839             loopholes, I decided to be explicit about it.
840         * rendering/RenderBlockLineLayout.cpp:
841         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Take
842             into account the offset from any polygonal shape outside.
843         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak): Add a FIXME
844             because the current code will not work properly with stacked
845             floats that have polygonal shape outside.
846
847 2013-03-04  David Hyatt  <hyatt@apple.com>
848
849         [New Multicolumn] Autogenerate regions for columns.
850         https://bugs.webkit.org/show_bug.cgi?id=111363
851
852         Reviewed by Dean Jackson.
853
854         In CSS Regions, we lay out the regions first, and then
855         we put the flow thread into the regions. This model doesn't
856         really work for multicolumn layout, which needs to be able
857         to auto-generate new regions lazily in response to the flow
858         thread asking for regions at particular offsets.
859
860         With the multi-column model, where the regions can't just occur
861         anywhere, its ok not to lay them out before the flow thread, as
862         long as we have at least given them the correct size.
863         
864         This patch changes the layout algorithm for columns to:
865         (1) Size any existing regions (without worrying about placement).
866         (2) Lay out the flow thread (generating and sizing regions lazily
867         that need to be created).
868         (3) Lay out the regions (to give them correct placement and to
869         compute overflow correctly for the multi-column block that contains
870         the regions).
871
872         There are no new tests, since there are no behavioral changes. This
873         is just groundwork for being able to add new sets in response to
874         spans, balancing, and nested pagination contexts.
875
876         * rendering/RenderBlock.cpp:
877         (WebCore::RenderBlock::determineLogicalLeftPositionForChild):
878         (WebCore::RenderBlock::layoutBlockChild):
879         * rendering/RenderBlock.h:
880         (RenderBlock):
881         Since we want to be able to call determineLogicalLeftPositionForChild
882         to place the flow thread properly, and we don't want to apply a layout
883         delta (flow threads repaint themselves), we parameterize the method
884         here so that it can be called without applying a layout delta.
885         
886         * rendering/RenderFlowThread.cpp:
887         (WebCore::RenderFlowThread::addRegionToThread):
888         (WebCore::RenderFlowThread::removeRegionFromThread):
889         These methods are only used by RenderMultiColumnFlowThread, since
890         RenderNamedFlowThread overrides them. Remove the code that invalidates
891         the flow threads region set as regions come and go, since that is now
892         going to be expected with auto-generation.
893
894         (WebCore::RenderFlowThread::validateRegions):
895         Refactor the code in RenderFlowThread::layout that validates the regions
896         into its own method, so that we can re-validate regions at any time
897         after generating new ones.
898         
899         (WebCore::RenderFlowThread::layout):
900         Changed to move the region validation code into its own function that is
901         now called from here.
902
903         (WebCore::RenderFlowThread::updateLogicalWidth):
904         Don't assert if a region set needs layout.
905
906         (WebCore::RenderFlowThread::computeLogicalHeight):
907         Ditto. Don't assert if a region set needs layout. That's expected now.
908
909         (WebCore::RenderFlowThread::regionAtBlockOffset):
910         Add code to regionAtBlockOffset to auto-generate regions up to
911         the offset. This ensures the region that is being asked for
912         exists.
913
914         (WebCore::RenderFlowThread::pageLogicalTopForOffset):
915         (WebCore::RenderFlowThread::pageLogicalWidthForOffset):
916         (WebCore::RenderFlowThread::pageLogicalHeightForOffset):
917         (WebCore::RenderFlowThread::pageRemainingLogicalHeightForOffset):
918         These functions are no longer const, since the act of asking for
919         pagination offsets can cause us to generate new regions.
920
921         (WebCore::RenderFlowThread::mapFromFlowToRegion):
922         Modified to turn auto-generation off, since this is not really
923         a "layout-time" function.
924
925         (WebCore::RenderFlowThread::logicalWidthChangedInRegions):
926         Modified to not assert if a region set needs layout, since that is
927         expected now.
928
929         * rendering/RenderFlowThread.h:
930         Changes to remove const from the methods that can trigger region
931         auto-generation.
932
933         * rendering/RenderMultiColumnBlock.cpp:
934         (WebCore::RenderMultiColumnBlock::styleDidChange):
935         Make sure to propagate style changes down into the regions. I don't know
936         of any correctness bugs around this, but I figured I'd be thorough.
937
938         (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
939         We no longer build a column set aggressively. We wait for the flow thread
940         to ask us for a region at a particular offset, and only then do we
941         build the set.
942         
943         (WebCore::RenderMultiColumnBlock::addChild):
944         Now that we lay out the flow thread as a special excluded child, we don't
945         care about the ordering of it relative to the region children.
946
947         (WebCore::RenderMultiColumnBlock::layoutSpecialExcludedChild):
948         We now lay out the flow thread as a special excluded child (like the legend
949         of a fieldset).
950
951         * rendering/RenderMultiColumnBlock.h:
952         (RenderMultiColumnBlock):
953         Add new overrides like layoutSpecialExcludedChild.
954         
955         * rendering/RenderMultiColumnFlowThread.cpp:
956         (WebCore::RenderMultiColumnFlowThread::initialLogicalWidth):
957         Set the flow thread to the initial column width even when no regions exist
958         yet. This way we ensure the width is right even when we don't have any
959         regions yet.
960
961         (WebCore::RenderMultiColumnFlowThread::autoGenerateRegionsToBlockOffset):
962         This method handles autogenerating the new region for a given offset.
963         Right now it's simplistic, since we only have one column set. This method
964         will be enhanced in future patches when we start supporting multiple column
965         sets.
966
967         * rendering/RenderMultiColumnFlowThread.h:
968         (RenderMultiColumnFlowThread):
969         Adding new method declarations like autoGenerateRegionsToBlockOffset.
970
971         * rendering/RenderMultiColumnSet.cpp:
972         (WebCore::RenderMultiColumnSet::updateLogicalWidth):
973         Since regions lay out after flow threads, we don't need to make 
974         setFlowThreadPortionRect virtual any longer. We can just get our column set's
975         width correct immediately. This is the same logic, just moved into updateLogicalWidth().
976
977         * rendering/RenderMultiColumnSet.h:
978         Remove setFlowThreadPortionRect override, since the function can just be simple
979         and non-virtual in RenderRegion now.
980
981         * rendering/RenderRegion.cpp:
982         (WebCore::RenderRegion::layoutBlock):
983         Don't ever invalidate region sets in response to our size changing during layout. Since
984         our size is always determined outside of layout now, we don't need to do any of
985         these checks.
986
987         * rendering/RenderRegion.h:
988         (WebCore::RenderRegion::setFlowThreadPortionRect):
989         Changed to be non-virtual now that RenderMultiColumnSet doesn't need to override.
990
991 2013-03-04  Alexey Proskuryakov  <ap@apple.com>
992
993         Make AsyncFileReader work without ScriptExecutionContext
994         https://bugs.webkit.org/show_bug.cgi?id=111376
995
996         Reviewed by Anders Carlsson.
997
998         * WebCore.xcodeproj/project.pbxproj: Added MainThreadTask.h.
999
1000         * dom/ScriptExecutionContext.cpp:
1001         * dom/ScriptExecutionContext.h:
1002         Removed fileThread(). Creating a thread for every context that acesses files appears
1003         wasteful and unnecessary.
1004
1005         * fileapi/AsyncFileStream.h:
1006         * fileapi/AsyncFileStream.cpp:
1007         (WebCore::createFileThread): FileThread is now a singleton.
1008         (WebCore::fileThread): Ditto.
1009         (WebCore::AsyncFileStream::AsyncFileStream):
1010         (WebCore::AsyncFileStream::create):
1011         (WebCore::didStart):
1012         (WebCore::AsyncFileStream::startOnFileThread):
1013         (WebCore::AsyncFileStream::stop):
1014         (WebCore::derefProxyOnMainThread):
1015         (WebCore::AsyncFileStream::stopOnFileThread):
1016         (WebCore::didGetSize):
1017         (WebCore::AsyncFileStream::getSizeOnFileThread):
1018         (WebCore::didOpen):
1019         (WebCore::AsyncFileStream::openForReadOnFileThread):
1020         (WebCore::AsyncFileStream::openForWriteOnFileThread):
1021         (WebCore::didRead):
1022         (WebCore::AsyncFileStream::readOnFileThread):
1023         (WebCore::didWrite):
1024         (WebCore::AsyncFileStream::writeOnFileThread):
1025         (WebCore::didTruncate):
1026         (WebCore::AsyncFileStream::truncateOnFileThread):
1027         Use callOnMainThread() instead of posting messages through a context. We never used
1028         other threads, and don't plan to.
1029
1030         * loader/ResourceLoader.cpp:
1031         * loader/ResourceLoader.h:
1032         We no longer need this pseudo-client call to create an AsyncFileStream, now that
1033         we don't need to get a ScriptExecutionContext somewhere.
1034
1035         * platform/MainThreadTask.h: Added. This implements callOnMainThread with multiple
1036         strongly typed arguments. Closely based on CrossThreadTask.h.
1037
1038         * platform/network/BlobResourceHandle.cpp:
1039         (WebCore::BlobResourceHandle::BlobResourceHandle): Create AsyncFileStream directly.
1040
1041         * platform/network/ResourceHandleClient.h: Removed createAsyncFileStream().
1042
1043 2013-03-05  Jessie Berlin  <jberlin@apple.com>
1044
1045         Update the localizable strings file.
1046
1047         Rubber-stamped by Anders Carlsson.
1048
1049         * English.lproj/Localizable.strings:
1050
1051 2013-03-05  Chris Fleizach  <cfleizach@apple.com>
1052
1053         AX: aria-label does not override text content on iOS
1054         https://bugs.webkit.org/show_bug.cgi?id=111222
1055
1056         Reviewed by David Kilzer.
1057
1058         Make iOS use the same text alternative computation that Mac is using. The main difference
1059         is that description and title need to be concatenated, because iOS doesn't have two attributes
1060         to return those values.
1061
1062         Test: platform/iphone-simulator/accessibility/aria-label-with-internal-text.html
1063
1064         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1065         (-[WebAccessibilityObjectWrapper stringValueShouldBeUsedInLabel]):
1066         (-[WebAccessibilityObjectWrapper accessibilityLabel]):
1067         (-[WebAccessibilityObjectWrapper accessibilityHint]):
1068         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
1069
1070 2013-03-05  David Kilzer  <ddkilzer@apple.com>
1071
1072         BUILD FIX (r144698): Only enable SPEECH_SYNTHESIS for Mac
1073         <http://webkit.org/b/106742>
1074
1075         Fixes the following build failures:
1076
1077             Undefined symbols for architecture i386:
1078               "__ZTVN7WebCore25PlatformSpeechSynthesizerE", referenced from:
1079                   __ZN7WebCore25PlatformSpeechSynthesizerC2EPNS_31PlatformSpeechSynthesizerClientE in PlatformSpeechSynthesizer.o
1080               NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
1081               "__ZN7WebCore25PlatformSpeechSynthesizer19initializeVoiceListEv", referenced from:
1082                   __ZN7WebCore25PlatformSpeechSynthesizerC2EPNS_31PlatformSpeechSynthesizerClientE in PlatformSpeechSynthesizer.o
1083             ld: symbol(s) not found for architecture i386
1084
1085         * Configurations/FeatureDefines.xcconfig:
1086         - Only set ENABLE_SPEECH_SYNTHESIS for the macosx platform.
1087
1088 2013-03-05  Dmitry Zvorygin  <zvorygin@chromium.org>
1089
1090         Web Inspector: registered new MIME type application/font-woff for WOFF fonts.
1091         https://bugs.webkit.org/show_bug.cgi?id=111418
1092
1093         The WOFF MIME Type was formally registered as application/font-woff (FINALLY):
1094         http://www.iana.org/assignments/media-types/application/font-woff
1095
1096         Reviewed by Pavel Feldman.
1097
1098         * inspector/front-end/NetworkManager.js:
1099         (WebInspector.NetworkManager):
1100         (WebInspector.NetworkDispatcher.prototype._updateNetworkRequestWithResponse):
1101
1102 2013-03-05  Julien Chaffraix  <jchaffraix@webkit.org>
1103
1104         [CSS Grid Layout] Add parsing for grid-{end|after}
1105         https://bugs.webkit.org/show_bug.cgi?id=111372
1106
1107         Reviewed by Tony Chang.
1108
1109         Test: fast/css-grid-layout/grid-item-end-after-get-set.html
1110
1111         This change adds the proper support for grid-{end|after}. It doesn't update
1112         grid-{row|column} to be a shorthand for both grid-{before|start} and grid-{after|end}
1113         though.
1114
1115         * css/CSSComputedStyleDeclaration.cpp:
1116         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1117         Added the new properties to our known properties. Also added
1118         support for getComputedStyle.
1119
1120         * css/CSSParser.cpp:
1121         (WebCore::CSSParser::parseValue):
1122         Added parsing for the new properties.
1123
1124         * css/CSSProperty.cpp:
1125         (WebCore::CSSProperty::isInheritedProperty):
1126         The new properties are not inherited.
1127
1128         * css/CSSPropertyNames.in:
1129         Added the new properties.
1130
1131         * css/StyleResolver.cpp:
1132         (WebCore::StyleResolver::applyProperty):
1133         Added code to handle applying them to our style.
1134
1135         * rendering/style/RenderStyle.h:
1136         * rendering/style/StyleGridItemData.cpp:
1137         (WebCore::StyleGridItemData::StyleGridItemData):
1138         * rendering/style/StyleGridItemData.h:
1139         (WebCore::StyleGridItemData::operator==):
1140         (StyleGridItemData):
1141         Updated our representation to store the new properties.
1142
1143 2013-03-05  Andrey Kosyakov  <caseq@chromium.org>
1144
1145         Unreviewed follow-up to r144756, fix broken inspector-less build.
1146
1147         * inspector/InspectorInstrumentation.h:
1148         (WebCore::InspectorInstrumentation::willWriteHTML):
1149
1150 2013-03-05  Mark Lam  <mark.lam@apple.com>
1151
1152         Improve robustness of WebSQL quota management.
1153         https://bugs.webkit.org/show_bug.cgi?id=110600.
1154
1155         Reviewed by Geoffrey Garen.
1156
1157         1. Introduced the OriginLock for synchronizing write access to the
1158            database origin directory. This allows us to more accurately
1159            compute the disk usage.
1160
1161            The OriginLock uses a mutex to provide mutual exclusion between
1162            threads and a file lock for mutual exclusion between processes.
1163            The file lock part is conditional on USE(FILE_LOCK).
1164
1165            The mutex mutual exclusion also serves to ensure that only 1 thread
1166            can write to a sqlite database at one time.
1167
1168         2. Change the SQLTransactionCoordinator to only allow one write
1169            transaction to an origin instead of one write transaction per
1170            database. This is needed in order to accurately compute the
1171            disk usage. It is also necessary so that the OriginLock does not
1172            deadlock itself (as would be the case if concurrent write transactions
1173            to different databases in the same origin are allowed).
1174
1175         3. Fix DatabaseTracker::getMaxSizeForDatabase() to check for when
1176            disk usage may exceed the quota, and ensure that we will return
1177            an appropriate max database size.
1178
1179            Disk usage can exceed the usage if it is already near the quota limit
1180            but have not exceeded it yet. If a new database is opened in that
1181            origin, it may bump the usage above the quota, but should not
1182            continually repeat this. Subsequent attempts to open a database
1183            will find that the quota is already exhausted and fail.
1184
1185            There is still a race condition pertaining to the tracker database
1186            getting out of sync that may still enable runaway growth in the
1187            database sizes. That issue only manifest in a multi-process
1188            environment, and will be fixed in another changeset.
1189
1190         4. Fixed a bug in SQLStatement to check if the errorCallback exists
1191            before invoking it.
1192
1193         No new layout tests. A quota-test.html was attached to bugzilla for manual
1194         testing of multi-tab concurrent consumption of storage resource, and also
1195         to test handling situations when the user deletes the database files while
1196         the script is still using the database.
1197
1198         * CMakeLists.txt:
1199         * GNUmakefile.list.am:
1200         * Modules/webdatabase/DatabaseTracker.cpp:
1201         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
1202         (WebCore::DatabaseTracker::originLockFor):
1203         (WebCore::DatabaseTracker::deleteOriginLockFor):
1204         (WebCore::DatabaseTracker::deleteOrigin):
1205         * Modules/webdatabase/DatabaseTracker.h:
1206         * Modules/webdatabase/OriginLock.cpp: Added.
1207         (WebCore::OriginLock::lockFileNameForPath):
1208         (WebCore::OriginLock::OriginLock):
1209         (WebCore::OriginLock::~OriginLock):
1210         (WebCore::OriginLock::lock):
1211         (WebCore::OriginLock::unlock):
1212         * Modules/webdatabase/OriginLock.h: Added.
1213         * Modules/webdatabase/SQLStatement.cpp:
1214         (WebCore::SQLStatement::performCallback):
1215         * Modules/webdatabase/SQLTransactionBackend.cpp:
1216         (WebCore::SQLTransactionBackend::doCleanup):
1217         (WebCore::SQLTransactionBackend::computeNextStateAndCleanupIfNeeded):
1218         (WebCore::SQLTransactionBackend::openTransactionAndPreflight):
1219         (WebCore::SQLTransactionBackend::postflightAndCommit):
1220         (WebCore::SQLTransactionBackend::cleanupAfterTransactionErrorCallback):
1221         (WebCore::SQLTransactionBackend::acquireOriginLock):
1222         (WebCore::SQLTransactionBackend::releaseOriginLockIfNeeded):
1223         * Modules/webdatabase/SQLTransactionBackend.h:
1224         (SQLTransactionBackend):
1225         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
1226         (WebCore::getDatabaseIdentifier):
1227         * Target.pri:
1228         * WebCore.gypi:
1229         * WebCore.vcproj/WebCore.vcproj:
1230         * WebCore.vcxproj/WebCore.vcxproj:
1231         * WebCore.vcxproj/WebCore.vcxproj.filters:
1232         * WebCore.xcodeproj/project.pbxproj:
1233         * config.h:
1234         * platform/FileSystem.h:
1235         * platform/posix/FileSystemPOSIX.cpp:
1236         (WebCore::lockFile):
1237         (WebCore::unlockFile):
1238
1239 2013-03-05  Ilya Tikhonovsky  <loislo@chromium.org>
1240
1241         Web Inspector: move PopoverContentHelper from TimelinePresentationModel.js to Popover.js.
1242         https://bugs.webkit.org/show_bug.cgi?id=111431
1243
1244         Reviewed by Yury Semikhatsky.
1245
1246         class WebInspector.TimelinePresentationModel.PopoverContentHelper was renamed to WebInspector.PopoverContentHelper.
1247         Style names were changed accordingly.
1248
1249         * inspector/front-end/Popover.js:
1250         (WebInspector.PopoverContentHelper):
1251         (WebInspector.PopoverContentHelper.prototype.contentTable):
1252         (WebInspector.PopoverContentHelper.prototype._createCell):
1253         (WebInspector.PopoverContentHelper.prototype.appendTextRow):
1254         (WebInspector.PopoverContentHelper.prototype.appendElementRow):
1255         (WebInspector.PopoverContentHelper.prototype.appendStackTrace):
1256         * inspector/front-end/TimelinePresentationModel.js:
1257         (WebInspector.TimelinePresentationModel.prototype.generateMainThreadBarPopupContent):
1258         (WebInspector.TimelinePresentationModel.Record.prototype._generatePopupContentWithImagePreview):
1259         (WebInspector.TimelinePresentationModel.generatePopupContentForFrame):
1260         (WebInspector.TimelinePresentationModel.generatePopupContentForFrameStatistics):
1261         * inspector/front-end/popover.css:
1262         (.popover-details):
1263         (.popover-function-name):
1264         (.popover-stacktrace-title):
1265         (.popover-details-row-title):
1266         (.popover-details-row-data):
1267         (.popover-details-title):
1268         * inspector/front-end/timelinePanel.css:
1269
1270 2013-03-05  Yury Semikhatsky  <yurys@chromium.org>
1271
1272         Web Inspector: remove "Live native memory chart" experiment
1273         https://bugs.webkit.org/show_bug.cgi?id=111432
1274
1275         Reviewed by Alexander Pavlov.
1276
1277         Removed support for live native memory chart.
1278
1279         * English.lproj/localizedStrings.js:
1280         * inspector/front-end/NativeMemorySnapshotView.js:
1281         * inspector/front-end/ProfileLauncherView.js:
1282         (WebInspector.ProfileLauncherView):
1283         * inspector/front-end/ProfilesPanel.js:
1284         (WebInspector.ProfilesPanel):
1285         * inspector/front-end/Settings.js:
1286         (WebInspector.ExperimentsSettings):
1287         * inspector/front-end/nativeMemoryProfiler.css:
1288
1289 2013-03-05  Andrey Kosyakov  <caseq@chromium.org>
1290
1291         Web Inspector: remove length parameter from Parse HTML timeline event
1292         https://bugs.webkit.org/show_bug.cgi?id=111421
1293
1294         Reviewed by Yury Semikhatsky.
1295
1296         - remove length parameter in all instrumentation methods used to emit ParseHTML timeline event;
1297         - drive-by style fixes.
1298
1299         * html/parser/HTMLDocumentParser.cpp:
1300         (WebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser):
1301         (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
1302         (WebCore::HTMLDocumentParser::pumpTokenizer):
1303         * inspector/InspectorInstrumentation.cpp:
1304         (WebCore):
1305         (WebCore::InspectorInstrumentation::willWriteHTMLImpl):
1306         (WebCore::InspectorInstrumentation::didWriteHTMLImpl):
1307         * inspector/InspectorInstrumentation.h:
1308         (InspectorInstrumentation):
1309         (WebCore::InspectorInstrumentation::willWriteHTML):
1310         (WebCore::InspectorInstrumentation::didWriteHTML):
1311         * inspector/InspectorTimelineAgent.cpp:
1312         (WebCore::InspectorTimelineAgent::willWriteHTML):
1313         (WebCore::InspectorTimelineAgent::didWriteHTML):
1314         * inspector/InspectorTimelineAgent.h:
1315         (InspectorTimelineAgent):
1316         * inspector/TimelineRecordFactory.cpp:
1317         (WebCore::TimelineRecordFactory::createParseHTMLData):
1318         * inspector/TimelineRecordFactory.h:
1319         (TimelineRecordFactory):
1320
1321 2013-03-05  Alexei Filippov  <alph@chromium.org>
1322
1323         Web Inspector: allow each profiler panel to have own landing page
1324         https://bugs.webkit.org/show_bug.cgi?id=111298
1325
1326         Reviewed by Yury Semikhatsky.
1327
1328         Refactor profiler landing page to allow different profiler panels to have own landing pages.
1329           - MultiProfileLauncherView is inherited from ProfileLauncherView
1330           - Native memory distribution profiler has got a custom page.
1331
1332         No new tests: code refactoring.
1333
1334         * inspector/front-end/HeapSnapshotView.js:
1335         (WebInspector.HeapSnapshotView.prototype.get profile):
1336         (WebInspector.HeapSnapshotView.prototype.get baseProfile):
1337         (WebInspector.HeapSnapshotView.prototype._profiles):
1338         * inspector/front-end/NativeMemorySnapshotView.js:
1339         * inspector/front-end/ProfileLauncherView.js:
1340         (WebInspector.ProfileLauncherView):
1341         (WebInspector.ProfileLauncherView.prototype.addProfileType):
1342         (WebInspector.ProfileLauncherView.prototype._controlButtonClicked):
1343         (WebInspector.ProfileLauncherView.prototype._updateControls):
1344         (WebInspector.ProfileLauncherView.prototype.profileStarted):
1345         (WebInspector.ProfileLauncherView.prototype.profileFinished):
1346         (WebInspector.MultiProfileLauncherView):
1347         (WebInspector.MultiProfileLauncherView.prototype.addProfileType):
1348         (WebInspector.MultiProfileLauncherView.prototype._profileTypeChanged):
1349         (WebInspector.NativeProfileLauncherView):
1350         * inspector/front-end/ProfilesPanel.js:
1351         (WebInspector.ProfilesPanel):
1352         (WebInspector.ProfilesPanel.prototype._createLauncherView):
1353         (WebInspector.CPUProfilerPanel):
1354         (WebInspector.CSSSelectorProfilerPanel):
1355         (WebInspector.HeapProfilerPanel):
1356         (WebInspector.CanvasProfilerPanel):
1357         (WebInspector.MemoryChartProfilerPanel):
1358         (WebInspector.MemoryChartProfilerPanel.prototype._createLauncherView):
1359         (WebInspector.NativeMemoryProfilerPanel):
1360         * inspector/front-end/profilesPanel.css:
1361         (.panel-enabler-view.profile-launcher-view button:not(.status-bar-item)):
1362
1363 2013-03-05  Eugene Klyuchnikov  <eustas@chromium.org>
1364
1365         Web Inspector: Clarify some StylesSidebarPanel and CSSMetadata JSDocs.
1366         https://bugs.webkit.org/show_bug.cgi?id=111427
1367
1368         Reviewed by Alexander Pavlov.
1369
1370         Goal: reflect in JSDoc that non-null array is passed to completionsReady callback.
1371
1372         * inspector/front-end/CSSMetadata.js:
1373         Added JSDocs, avoided possible NPEs.
1374         * inspector/front-end/StylesSidebarPane.js:
1375         Fixed JSDocs, removed unused assignment.
1376
1377 2013-03-05  David Kilzer  <ddkilzer@apple.com>
1378
1379         BUILD FIX (r144727): Change type of columnRange and rowRange to pair<unsigned, unsigned>
1380         <http://webkit.org/b/110050>
1381
1382         Fixes the following build failures:
1383
1384             Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:741:30: error: non-const lvalue reference to type 'pair<unsigned int, unsigned int>' cannot bind to a value of unrelated type 'pair<int, int>'
1385                 tableCell->rowIndexRange(rowRange);
1386                                          ^~~~~~~~
1387             In file included from Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:33:
1388             Source/WebCore/accessibility/AccessibilityTableCell.h:47:58: note: passing argument to parameter 'rowRange' here
1389                 virtual void rowIndexRange(pair<unsigned, unsigned>& rowRange);
1390                                                                      ^
1391             Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:742:33: error: non-const lvalue reference to type 'pair<unsigned int, unsigned int>' cannot bind to a value of unrelated type 'pair<int, int>'
1392                 tableCell->columnIndexRange(columnRange);
1393                                             ^~~~~~~~~~~
1394             In file included from Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:33:
1395             Source/WebCore/accessibility/AccessibilityTableCell.h:49:61: note: passing argument to parameter 'columnRange' here
1396                 virtual void columnIndexRange(pair<unsigned, unsigned>& columnRange);
1397                                                                         ^
1398             Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:804:30: error: non-const lvalue reference to type 'pair<unsigned int, unsigned int>' cannot bind to a value of unrelated type 'pair<int, int>'
1399                 tableCell->rowIndexRange(rowRange);
1400                                          ^~~~~~~~
1401             In file included from Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:33:
1402             Source/WebCore/accessibility/AccessibilityTableCell.h:47:58: note: passing argument to parameter 'rowRange' here
1403                 virtual void rowIndexRange(pair<unsigned, unsigned>& rowRange);
1404                                                                      ^
1405             Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:818:33: error: non-const lvalue reference to type 'pair<unsigned int, unsigned int>' cannot bind to a value of unrelated type 'pair<int, int>'
1406                 tableCell->columnIndexRange(columnRange);
1407                                             ^~~~~~~~~~~
1408             In file included from Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:33:
1409             Source/WebCore/accessibility/AccessibilityTableCell.h:49:61: note: passing argument to parameter 'columnRange' here
1410                 virtual void columnIndexRange(pair<unsigned, unsigned>& columnRange);
1411                                                             ^
1412             4 errors generated.
1413
1414         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1415         (-[WebAccessibilityObjectWrapper accessibilityHeaderElements]):
1416         (-[WebAccessibilityObjectWrapper accessibilityRowRange]):
1417         (-[WebAccessibilityObjectWrapper accessibilityColumnRange]):
1418
1419 2013-03-04  Andrey Kosyakov  <caseq@chromium.org>
1420
1421         Web Inspector: [refactoring] set frame identifiers in timeline records early, do not keep them in event stack
1422         https://bugs.webkit.org/show_bug.cgi?id=111345
1423
1424         Reviewed by Pavel Feldman.
1425
1426         * inspector/InspectorTimelineAgent.cpp:
1427         (WebCore::InspectorTimelineAgent::pushGCEventRecords):
1428         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
1429         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
1430         (WebCore::InspectorTimelineAgent::setFrameIdentifier):
1431         (WebCore):
1432         (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
1433         (WebCore::InspectorTimelineAgent::appendRecord):
1434         (WebCore::InspectorTimelineAgent::pushCurrentRecord):
1435         (WebCore::InspectorTimelineAgent::commitFrameRecord):
1436         * inspector/InspectorTimelineAgent.h:
1437         (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
1438         (TimelineRecordEntry):
1439         (InspectorTimelineAgent):
1440
1441 2013-03-05  Tommy Widenflycht  <tommyw@google.com>
1442
1443         MediaStream API: Add the getStreamById method on RTCPeerConnection
1444         https://bugs.webkit.org/show_bug.cgi?id=111311
1445
1446         Reviewed by Adam Barth.
1447
1448         Adding the missing method on RTCPeerConnection defined here:
1449         http://dev.w3.org/2011/webrtc/editor/webrtc.html#widl-RTCPeerConnection-getStreamById-MediaStream-DOMString-streamId
1450
1451         Existing tests have been extended to cover patch.
1452
1453         * Modules/mediastream/RTCPeerConnection.cpp:
1454         (WebCore::RTCPeerConnection::getStreamById):
1455         (WebCore):
1456         * Modules/mediastream/RTCPeerConnection.h:
1457         (RTCPeerConnection):
1458         * Modules/mediastream/RTCPeerConnection.idl:
1459         * platform/chromium/support/WebMediaStream.cpp:
1460         (WebKit::WebMediaStream::initialize):
1461         (WebKit):
1462         * platform/mediastream/MediaStreamSource.cpp:
1463         (WebCore::MediaStreamSource::setReadyState):
1464
1465 2013-03-05  Antoine Quint  <graouts@apple.com>
1466
1467         Web Inspector: allow retrieval of composited layers in a given DOM subtree
1468         https://bugs.webkit.org/show_bug.cgi?id=111312
1469
1470         Introduce the LayerTreeAgent.layersForNode(node) method allowing the front-end
1471         to gather all composited layers associated with nodes in the subtree of which
1472         the provided node is the root.
1473
1474         In order to gather the layers in the subtree, we first traverse the node's
1475         renderer's RenderObject hierarchy and whenever we encounter a RenderObject
1476         that has a RenderLayer, we then traverse that renderLayer's RenderLayer
1477         hierarchy. This allows for a quick path through the relevant objects we're
1478         gathering.
1479
1480         Layers gathered will push the node to which they're associated, allowing a
1481         nodeId for this layer to be listed in the Layer object sent to the front-end.
1482         It is crucial to be able to provide a nodeId as well as a layerId for a Layer
1483         object in order to be able to correctly assess mutations in the layer tree.
1484         For instance, it is expected that a node's layer be replaced by a new layer
1485         to represent a slightly different rendering of its content, but the front-end
1486         should be able to represent this layer as an object for which only certain
1487         attributes have changed (like the "paintCount" property).
1488
1489         Layer objects also indicate whether they're associated to a node hosted in a
1490         shadow tree (the optional "isInShadowTree" property) in order for the front-end
1491         to be able to only show this layer if the option to show nodes hosted in shadow
1492         tree is enabled.
1493
1494         Finally, since we're only gathering composited layers, we're removing the
1495         "isLayerComposited" property and removing the optional flag on the "paintCount",
1496         "memory" and "compositedBounds" properties.
1497
1498         Reviewed by Simon Fraser.
1499
1500         Test: inspector-protocol/layers/layers-for-node.html
1501
1502         * inspector/Inspector.json:
1503         * inspector/InspectorLayerTreeAgent.cpp:
1504         (WebCore::InspectorLayerTreeAgent::layersForNode):
1505         (WebCore):
1506         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
1507         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderLayerHierarchy):
1508         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
1509         (WebCore::InspectorLayerTreeAgent::idForNode):
1510         * inspector/InspectorLayerTreeAgent.h:
1511         (InspectorLayerTreeAgent):
1512
1513 2013-03-04  Andrey Kosyakov  <caseq@chromium.org>
1514
1515         Web Inspector: use timestamps consistent with rest of Timeline in WebSocket events.
1516         https://bugs.webkit.org/show_bug.cgi?id=111344
1517
1518         - create web socket related records in a manner consistent with the rest of timeline.
1519
1520         Reviewed by Pavel Feldman.
1521
1522         * inspector/InspectorTimelineAgent.cpp:
1523         (WebCore::InspectorTimelineAgent::didCreateWebSocket):
1524         (WebCore::InspectorTimelineAgent::willSendWebSocketHandshakeRequest):
1525         (WebCore::InspectorTimelineAgent::didReceiveWebSocketHandshakeResponse):
1526         (WebCore::InspectorTimelineAgent::didDestroyWebSocket):
1527         * inspector/InspectorTimelineAgent.h:
1528         (InspectorTimelineAgent):
1529
1530 2013-03-05  Andrei Bucur  <abucur@adobe.com>
1531
1532         [CSS Regions] Crash when MathML used in CSS Regions
1533         https://bugs.webkit.org/show_bug.cgi?id=110686
1534
1535         Reviewed by David Hyatt.
1536
1537         The MathML blocks trigger a children layout when computing the preferred widths. This happens to determine the preferred
1538         logical heights of the children. When the layout reaches the line boxes computation the preferred width of the containing block
1539         is requested. Because it wasn't computed, the layout of the children is started again to determine the preferred logical heights.
1540         This causes an infinite recursion and triggers a stack overflow.
1541
1542         The patch introduces a new RAII utility class that disables fragmentation when the constructor is called and restores it
1543         on the destructor. This class is used when computing the preferred height for the children of a MathML block.
1544
1545         Test: fast/regions/mathml-crash.html
1546
1547         * rendering/RenderObject.cpp:
1548         (WebCore::RenderObject::setFlowThreadStateIncludingDescendants): Do not cross RenderFlowThread boundaries when updating the flow thread
1549         state flag. The innermost flow threads need to manage their descendants flag values.
1550         * rendering/RenderView.cpp:
1551         (WebCore::FragmentationDisabler::FragmentationDisabler):
1552         (WebCore):
1553         (WebCore::FragmentationDisabler::~FragmentationDisabler):
1554         * rendering/RenderView.h:
1555         (FragmentationDisabler):
1556         (WebCore):
1557         * rendering/mathml/RenderMathMLBlock.cpp:
1558         (WebCore::RenderMathMLBlock::computeChildrenPreferredLogicalHeights):
1559
1560 2013-03-05  Mike West  <mkwst@chromium.org>
1561
1562         Cleanup: Move HitTestLocation and HitTestResult into separate files.
1563         https://bugs.webkit.org/show_bug.cgi?id=111294
1564
1565         Reviewed by Allan Sandfeld Jensen.
1566
1567         HitTestLocation and HitTestResult currently both live in
1568         HitTestResult.h. That makes things more difficult to understand than
1569         they should be, and violates the one-class-one-file principle that
1570         WebKit generally follows. Happily, it's fairly trivial to fix.
1571
1572         This should have no visible change; it's strictly an internal
1573         refactoring. It doesn't even touch any implementation code: we're
1574         just moving bits from one place to another.
1575
1576         * CMakeLists.txt:
1577         * GNUmakefile.list.am:
1578         * Target.pri:
1579         * WebCore.gypi:
1580         * WebCore.vcproj/WebCore.vcproj:
1581         * WebCore.xcodeproj/project.pbxproj:
1582             Hey, look: a new file! Let's add it to six different build systems! :)
1583         * rendering/HitTestLocation.cpp: Added.
1584         (WebCore):
1585         (WebCore::HitTestLocation::HitTestLocation):
1586         (WebCore::HitTestLocation::~HitTestLocation):
1587         (WebCore::HitTestLocation::operator=):
1588         (WebCore::HitTestLocation::move):
1589         (WebCore::HitTestLocation::intersectsRect):
1590         (WebCore::HitTestLocation::intersects):
1591         (WebCore::HitTestLocation::rectForPoint):
1592         * rendering/HitTestLocation.h: Added.
1593         (WebCore):
1594         (HitTestLocation):
1595         (WebCore::HitTestLocation::point):
1596         (WebCore::HitTestLocation::roundedPoint):
1597         (WebCore::HitTestLocation::region):
1598         (WebCore::HitTestLocation::isRectBasedTest):
1599         (WebCore::HitTestLocation::isRectilinear):
1600         (WebCore::HitTestLocation::boundingBox):
1601         (WebCore::HitTestLocation::topPadding):
1602         (WebCore::HitTestLocation::rightPadding):
1603         (WebCore::HitTestLocation::bottomPadding):
1604         (WebCore::HitTestLocation::leftPadding):
1605         (WebCore::HitTestLocation::transformedPoint):
1606         (WebCore::HitTestLocation::transformedRect):
1607         * rendering/HitTestResult.cpp:
1608         * rendering/HitTestResult.h:
1609             Move all this code from HitTestResult.* to HitTestLocation.*.
1610         * rendering/RenderBlock.cpp:
1611             Include HitTestLocation.h.
1612
1613 2013-03-05  Jochen Eisinger  <jochen@chromium.org>
1614
1615         Refactor UserGestureIndicator::Token to be a top-level class
1616         https://bugs.webkit.org/show_bug.cgi?id=111412
1617
1618         Reviewed by Nico Weber.
1619
1620         This will allow for forward declaring the class in a public WebKit
1621         API header. The goal is to enable the embedder to hold on to a
1622         UserGestureToken.
1623
1624         * dom/UserGestureIndicator.cpp:
1625         (WebCore::UserGestureIndicator::UserGestureIndicator):
1626         (WebCore::UserGestureIndicator::currentToken):
1627         * dom/UserGestureIndicator.h:
1628         (UserGestureToken):
1629         (WebCore::UserGestureToken::~UserGestureToken):
1630         (WebCore):
1631         (UserGestureIndicator):
1632         * page/DOMTimer.h:
1633         (DOMTimer):
1634         * page/EventHandler.h:
1635
1636 2013-03-05  Mike West  <mkwst@chromium.org>
1637
1638         Remove redundant code in Document::updateHoverActiveState.
1639         https://bugs.webkit.org/show_bug.cgi?id=111303
1640
1641         Reviewed by Darin Adler.
1642
1643         Document::updateHoverActiveState currently looks for touchrelease events
1644         and explictly clears out the hover state for all nodes between the
1645         currently hovered node and the top of the hover chain. This is actually
1646         redundant with the logic in the rest of the function; we can simplify by
1647         setting the Element* we're working with to 0, which causes the later
1648         loops to do the necessary work.
1649
1650         There should be no web-visible effect from this change; it should simply
1651         make this function less complex.
1652
1653         Extracted from Allan Sandfeld Jensen's original patch to wkbug.com/98168
1654
1655         * dom/Document.cpp:
1656         (WebCore::Document::updateHoverActiveState):
1657             Set innerElementInDocument to 0 rather than walking the hover chain
1658             and clearing it when we see a touchrelease event. The rest of the
1659             code in this function will have the same effect.
1660
1661 2013-03-05  Koji Hara  <kojih@chromium.org>
1662
1663         [V8] Remove unused custom indexedPropertyGetter
1664         https://bugs.webkit.org/show_bug.cgi?id=111409
1665
1666         Reviewed by Kentaro Hara.
1667
1668         Remove unused custom indexedPropertyGetter.
1669         There are 9 custom indexedPropertyGetter, including an unused one(NamedNodeMap).
1670         This commit assures all existing custom indexedPropertyGetter(for V8) are used.
1671
1672         No new tests. Simple refactoring.
1673
1674         * bindings/v8/custom/V8NamedNodeMapCustom.cpp: Remove indexedPropertyGetter
1675
1676 2013-03-05  Hajime Morrita  <morrita@google.com>
1677
1678         ShadowRoot needs guardRef() and guardDeref()
1679         https://bugs.webkit.org/show_bug.cgi?id=109777
1680
1681         Reviewed by Dimitri Glazkov.
1682
1683         This change moves m_guardRefCount from Document to TreeScope,
1684         which allows ShadowRoot to be guarded by guardRef() mechanism as
1685         Document. After r137524, Node referes TreeScope instead of
1686         Document. This is natural consequence of the change: It no longer
1687         makes sense to guardRef() Document pointer from Node.
1688
1689         Detail:
1690
1691         - Document::m_guardRefCount and related funcdtions are moved to TreeScope
1692         - Document::removedLastRef is factored out into TreeScope::removedLastRefToScope(),
1693           TreeScope::dispose() and Docuent::dispose(). ShadowRoot also got its own dispose() implementation.
1694         - Moved guardRef() and guardDeref() calls to TreeScope and Node.
1695           Note that there are two "guarded" TreeScope references. One is
1696           Node::m_treeScope and another is TreeScope::m_parentTreeScope.
1697           The guarded-ref management is now encapsulated in these two classes.
1698
1699         No new tests. Covered by existing tests.
1700
1701         * WebCore.exp.in:
1702         * dom/Document.cpp:
1703         (WebCore::Document::Document):
1704         (WebCore::Document::~Document):
1705         (WebCore::Document::dispose): Extracted from removedLastRef()
1706         * dom/Document.h:
1707         (WebCore::Node::isTreeScope):
1708         (WebCore::Node::Node):
1709         * dom/DocumentFragment.cpp:
1710         (WebCore::DocumentFragment::DocumentFragment): Remove ASSERT() and move it to ...
1711         (WebCore::DocumentFragment::create): ... here, to allow NULL document from ShadowRoot.
1712         * dom/Node.cpp:
1713         (WebCore::Node::~Node):
1714         (WebCore::Node::removedLastRef):
1715         * dom/Node.h:
1716         (WebCore::Node::setTreeScope):
1717         * dom/Element.cpp:
1718         (WebCore::Element::ensureAttr): This has been wrong and is fixed in this revision since the incorrectness is unveiled by this change.
1719         * dom/ShadowRoot.cpp:
1720         (WebCore::ShadowRoot::ShadowRoot): Passed NULL document to superclass. This aligns what Document is doing.
1721         (WebCore::ShadowRoot::dispose): Added.
1722         * dom/ShadowRoot.h:
1723         (ShadowRoot):
1724         * dom/TreeScope.cpp:
1725         (SameSizeAsTreeScope):
1726         (WebCore::TreeScope::TreeScope):
1727         (WebCore::TreeScope::~TreeScope):
1728         (WebCore::TreeScope::dispose): Added.
1729         (WebCore::TreeScope::setParentTreeScope):
1730         (WebCore::TreeScope::deletionHasBegun):
1731         (WebCore::TreeScope::beginDeletion):
1732         (WebCore::TreeScope::refCount): Added.
1733         * dom/TreeScope.h: Turned m_rootNode to Node* from ContainerNode* for Node::isTreeScope to be inlined.
1734         (WebCore::TreeScope::guardRef): Pulled up from Document.
1735         (WebCore::TreeScope::guardDeref): Ditto.
1736         (WebCore::TreeScope::hasGuardRefCount): Added to hide m_guardRefCount.
1737         (WebCore::TreeScope::deletionHasBegun): Added.
1738         (WebCore::TreeScope::beginDeletion): Added.
1739         (WebCore::TreeScope::removedLastRefToScope): Pulled up from Document.
1740         * dom/TreeScopeAdopter.cpp:
1741         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
1742         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
1743
1744 2013-03-04  Uday Kiran  <udaykiran@motorola.com>
1745
1746         getPropertyValue for -webkit-text-stroke returns null, should compute the shorthand value
1747         https://bugs.webkit.org/show_bug.cgi?id=111018
1748
1749         Reviewed by Alexander Pavlov.
1750
1751         Test: fast/css/getPropertyValue-webkit-text-stroke.html
1752
1753         * css/StylePropertySet.cpp:
1754         (WebCore::StylePropertySet::getPropertyValue):
1755
1756 2013-03-04  Uday Kiran  <udaykiran@motorola.com>
1757
1758         getPropertyValue for -webkit-columns returns null, should compute the shorthand value
1759         https://bugs.webkit.org/show_bug.cgi?id=111011
1760
1761         Reviewed by Alexander Pavlov.
1762
1763         Test: fast/css/getPropertyValue-columns.html
1764
1765         * css/StylePropertySet.cpp:
1766         (WebCore::StylePropertySet::getPropertyValue):
1767
1768 2013-03-04  Vsevolod Vlasov  <vsevik@chromium.org>
1769
1770         Web Inspector: Do not accumulate file system files, add them to workspace immediately
1771         https://bugs.webkit.org/show_bug.cgi?id=111325
1772
1773         Reviewed by Pavel Feldman.
1774
1775         * inspector/front-end/FileSystemProjectDelegate.js:
1776         (WebInspector.FileSystemProjectDelegate.prototype.populate.fileLoaded):
1777         (WebInspector.FileSystemProjectDelegate.prototype.populate):
1778         * inspector/front-end/IsolatedFileSystem.js:
1779         (WebInspector.IsolatedFileSystem.prototype.innerCallback):
1780         (WebInspector.IsolatedFileSystem.prototype.requestFilesRecursive):
1781
1782 2013-03-04  Kinuko Yasuda  <kinuko@chromium.org>
1783
1784         Unreviewed Windows build fix attempt.
1785
1786         floor method is ambigious so explicitly specify the type.
1787
1788         * html/canvas/WebGLRenderingContext.cpp:
1789         (WebCore::WebGLRenderingContext::validateCompressedTexFuncData):
1790
1791 2013-03-04  Chris Fleizach  <cfleizach@apple.com>
1792
1793         AX: cellForColumnAndRow fails for tables with hidden table cells
1794         https://bugs.webkit.org/show_bug.cgi?id=110050
1795
1796         Reviewed by Tim Horton.
1797
1798         If a table had hidden cells, then accessibility code was being confused in a few ways.
1799         1) The cellForColumnAndRow method would return the wrong information since that was
1800            using the RenderTableSection to retrieve a cell, which did not have the same data as the AXTable
1801         2) The way we were adding children made it impossible to determine column and row range because we 
1802            would skip rows that had hidden children
1803         3) AccessibilityARIAGrid and AccessibilityTable were using different methods for cellForColumnAndRow
1804
1805         The fix does a few things to make things right:
1806         1) Always add an accessibility row, even if there are no visible cells in that row.
1807         2) Have one method for AXTable and AXARIAGrid for cellForColumnAndRow.
1808         3) Change cellForColumnAndRow to query the accessibility children rather than the RenderTableSection in determining the row, col info.
1809         4) cellForColumnAndRow should use unsigned values instead of int values.
1810
1811         Test: accessibility/table-with-hidden-head-section.html
1812
1813         * accessibility/AccessibilityARIAGrid.cpp:
1814         (WebCore):
1815         * accessibility/AccessibilityARIAGrid.h:
1816         (AccessibilityARIAGrid):
1817         * accessibility/AccessibilityARIAGridCell.cpp:
1818         (WebCore::AccessibilityARIAGridCell::rowIndexRange):
1819         (WebCore::AccessibilityARIAGridCell::columnIndexRange):
1820         * accessibility/AccessibilityARIAGridCell.h:
1821         (AccessibilityARIAGridCell):
1822         * accessibility/AccessibilityTable.cpp:
1823         (WebCore::AccessibilityTable::addChildren):
1824         (WebCore::AccessibilityTable::cellForColumnAndRow):
1825         * accessibility/AccessibilityTable.h:
1826         (WebCore):
1827         (AccessibilityTable):
1828         * accessibility/AccessibilityTableCell.cpp:
1829         (WebCore::AccessibilityTableCell::rowIndexRange):
1830         (WebCore::AccessibilityTableCell::columnIndexRange):
1831         * accessibility/AccessibilityTableCell.h:
1832         (AccessibilityTableCell):
1833         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
1834         (webkitAccessibleTableGetColumnAtIndex):
1835         (webkitAccessibleTableGetRowAtIndex):
1836         (webkitAccessibleTableGetColumnExtentAt):
1837         (webkitAccessibleTableGetRowExtentAt):
1838         (webkitAccessibleTableGetColumnHeader):
1839         (webkitAccessibleTableGetRowHeader):
1840         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1841         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1842         * rendering/RenderTableSection.h:
1843         (RenderTableSection):
1844         (WebCore::RenderTableSection::rowRendererAt):
1845
1846 2013-03-04  Arpita Bahuguna  <a.bah@samsung.com>
1847
1848         getAttribute does not behave correctly for mixed-case attributes on HTML elements
1849         https://bugs.webkit.org/show_bug.cgi?id=105713
1850
1851         Reviewed by Andreas Kling.
1852
1853         getAttribute() and getAttributeNode() APIs do not convert the
1854         passed attribute name to lowercase before comparing against the
1855         existing attributes.
1856         The specification however states that the passed name should
1857         be converted to ASCII lowercase before checking for the existence
1858         of the given attribute. [www.w3.org/TR/domcore/#dom-element-getattribute]
1859
1860         Test: fast/dom/Element/getAttribute-case-insensitivity.html
1861
1862         * dom/Element.h:
1863         (WebCore::ElementData::getAttributeItemIndex):
1864         getAttributeItemIndex() accepts a bool param 'shouldIgnoreAttributeCase'
1865         which specifies whether the attribute's case should be ignored
1866         before comparison. But inspite of this param's value we still carry
1867         out a case sensitive search.
1868         Have modified the same to convert the passed attribute's name to
1869         lowercase if 'shouldIgnoreAttributeCase' is true.
1870
1871 2013-03-04  Kunihiko Sakamoto  <ksakamoto@chromium.org>
1872
1873         [Chromium] Add runtime flag for font load events
1874         https://bugs.webkit.org/show_bug.cgi?id=111296
1875
1876         Reviewed by Kent Tamura.
1877
1878         Add a runtime feature flag for FontLoader interface (disabled by default),
1879         and enable ENABLE_FONT_LOAD_EVENTS build flag for chromium.
1880
1881         * bindings/generic/RuntimeEnabledFeatures.cpp:
1882         (WebCore):
1883         * bindings/generic/RuntimeEnabledFeatures.h:
1884         (RuntimeEnabledFeatures):
1885         (WebCore::RuntimeEnabledFeatures::setFontLoadEventsEnabled):
1886         (WebCore::RuntimeEnabledFeatures::fontLoadEventsEnabled):
1887
1888 2013-03-04  Brandon Jones  <bajones@google.com>
1889
1890         WEBGL_compressed_texture_atc implementation
1891         https://bugs.webkit.org/show_bug.cgi?id=110496
1892
1893         Reviewed by Kenneth Russell.
1894
1895         Test: webgl/conformance/extensions/webgl-compressed-texture-atc.html
1896
1897         Exposes the WEBGL_compressed_texture_atc extension, but is unverified since no desktop hardware supports
1898         the format that I am aware of. Should enable mobile ports to expose the format, however.
1899
1900         * CMakeLists.txt:
1901         * DerivedSources.make:
1902         * DerivedSources.pri:
1903         * GNUmakefile.list.am:
1904         * Target.pri:
1905         * WebCore.gypi:
1906         * WebCore.xcodeproj/project.pbxproj:
1907         * bindings/js/JSWebGLRenderingContextCustom.cpp:
1908         (WebCore::toJS):
1909         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
1910         (WebCore::toV8Object):
1911         * html/canvas/WebGLCompressedTextureATC.cpp: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
1912         (WebCore):
1913         (WebCore::WebGLCompressedTextureATC::WebGLCompressedTextureATC):
1914         (WebCore::WebGLCompressedTextureATC::~WebGLCompressedTextureATC):
1915         (WebCore::WebGLCompressedTextureATC::getName):
1916         (WebCore::WebGLCompressedTextureATC::create):
1917         (WebCore::WebGLCompressedTextureATC::supported):
1918         * html/canvas/WebGLCompressedTextureATC.h: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
1919         (WebCore):
1920         (WebGLCompressedTextureATC):
1921         * html/canvas/WebGLCompressedTextureATC.idl: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
1922         * html/canvas/WebGLExtension.h:
1923         * html/canvas/WebGLRenderingContext.cpp:
1924         (WebCore):
1925         (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas):
1926         (WebCore::WebGLRenderingContext::getExtension):
1927         (WebCore::WebGLRenderingContext::getSupportedExtensions):
1928         (WebCore::WebGLRenderingContext::validateCompressedTexFuncData):
1929         * html/canvas/WebGLRenderingContext.h:
1930         (WebCore):
1931         (WebGLRenderingContext):
1932         * platform/graphics/Extensions3D.h:
1933
1934
1935 2013-03-04  Eugene Klyuchnikov  <eustas@chromium.org>
1936
1937         Web Inspector: Exceptions when WebInspector run in hosted mode.
1938         https://bugs.webkit.org/show_bug.cgi?id=111326
1939
1940         Reviewed by Pavel Feldman.
1941
1942         There is bug in commands code generation in InspectorBackend.js
1943         As a consequence all protocol enums have wrong names and cause
1944         exception when refererenced.
1945
1946         Currently protocol enums are referenced only from NetworkManager.
1947
1948         Test: inspector/inspector-backend-commands-generation.html
1949
1950         * inspector/front-end/InspectorBackend.js:
1951         (InspectorBackendClass.prototype.loadFromJSONIfNeeded):
1952         Use static method to generate code.
1953         (InspectorBackendClass._generateCommands):
1954         Extracted from loadFromJSONIfNeeded. Typo fixed.
1955
1956 2013-03-04  Chris Rogers  <crogers@google.com>
1957
1958         Add audio hardware support for multi-channel output by implementing AudioDestinationNode.maxChannelCount
1959         https://bugs.webkit.org/show_bug.cgi?id=111385
1960
1961         Reviewed by James Robinson.
1962         
1963         See specification details for .maxChannelCount:
1964         https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioDestinationNode
1965         
1966         * Modules/webaudio/AudioDestinationNode.h:
1967         (WebCore::AudioDestinationNode::maxChannelCount):
1968         * Modules/webaudio/AudioDestinationNode.idl:
1969         * Modules/webaudio/AudioNode.h:
1970         Implement .maxChannelCount attribute.
1971         
1972         (AudioNode):
1973         * Modules/webaudio/DefaultAudioDestinationNode.h:
1974         * Modules/webaudio/DefaultAudioDestinationNode.cpp:
1975         (WebCore::DefaultAudioDestinationNode::initialize):
1976         (WebCore::DefaultAudioDestinationNode::createDestination):
1977         (WebCore::DefaultAudioDestinationNode::enableInput):
1978         Call to createDestination() now takes no argument.
1979         Instead we maintain a member variable for the input device ID.
1980         (WebCore::DefaultAudioDestinationNode::maxChannelCount):
1981         (WebCore::DefaultAudioDestinationNode::setChannelCount):
1982         Check port-specific hardware support for maxChannelCount(),
1983         and allow setting the channel count based on what the hardware
1984         supports.
1985         
1986         * platform/audio/AudioDestination.h:
1987         (AudioDestination):
1988         * platform/audio/chromium/AudioDestinationChromium.cpp:
1989         (WebCore::AudioDestination::maxChannelCount):
1990         (WebCore::AudioDestinationChromium::render):
1991         Call into chromium WebKit API: audioHardwareOutputChannels().
1992
1993         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
1994         (WebCore::AudioDestination::maxChannelCount):
1995         Add basic implementation for maxChannelCount() only supporting stereo output.
1996
1997         * platform/audio/mac/AudioDestinationMac.cpp:
1998         (WebCore::AudioDestination::maxChannelCount):
1999         Add basic implementation for maxChannelCount() only supporting stereo output.
2000         Later, the mac port can support more than this with some small improvements to AudioDestinationMac.
2001
2002 2013-03-04  Adam Barth  <abarth@webkit.org>
2003
2004         Background HTML parser can rewind the tokenizer after end-of-file
2005         https://bugs.webkit.org/show_bug.cgi?id=111365
2006
2007         Reviewed by Eric Seidel.
2008
2009         Prior to this patch, it was possible to call didFailSpeculation after
2010         processing the end-of-file token because checkForSpeculationFailure
2011         didn't zero out m_tokenizer in some control paths.
2012
2013         This patch renames checkForSpeculationFailure to validateSpeculations
2014         and ensures that it always takes ownership of the main thread's
2015         HTMLTokenizer.
2016
2017         This patch also adds a number of ASSERTs to make sure the parser state
2018         machine stays in the correct configuration (e.g., that we don't have a
2019         main thread tokenizer while we're supposed to be tokenizing on the
2020         background thread).
2021
2022         Test: fast/parser/document-write-fighting-eof.html
2023
2024         * html/parser/BackgroundHTMLInputStream.cpp:
2025         (WebCore::BackgroundHTMLInputStream::rewindTo):
2026         * html/parser/BackgroundHTMLParser.cpp:
2027         (WebCore::BackgroundHTMLParser::append):
2028         * html/parser/HTMLDocumentParser.cpp:
2029         (WebCore::HTMLDocumentParser::validateSpeculations):
2030         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
2031         (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
2032         (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
2033         * html/parser/HTMLDocumentParser.h:
2034         (HTMLDocumentParser):
2035
2036 2013-03-04  Tim 'mithro' Ansell  <mithro@mithis.com>
2037
2038         Make sure that clearOwnerNode also clears StyleResolver references (via didMutate).
2039         https://bugs.webkit.org/show_bug.cgi?id=109446
2040
2041         Reviewed by Eric Seidel.
2042
2043         Test: fast/css/stylesheet.innerHTML-calls-didmutate.html
2044
2045         * css/CSSStyleSheet.h:
2046
2047 2013-03-04  Kentaro Hara  <haraken@chromium.org>
2048
2049         Unreviewd build fix after r144701.
2050
2051         * platform/EventTracer.cpp:
2052         (WebCore::EventTracer::initialize):
2053
2054 2013-03-04  Min Qin  <qinmin@chromium.org>
2055
2056         Fix some style issues in RenderLayerCompositor
2057         https://bugs.webkit.org/show_bug.cgi?id=111369
2058
2059         Reviewed by Simon Fraser.
2060
2061         Just style fix, no test needed
2062
2063         * rendering/RenderLayerCompositor.cpp:
2064         (WebCore::RenderLayerCompositor::frameViewDidScroll):
2065         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2066
2067 2013-03-04  Terry Anderson  <tdanderson@chromium.org>
2068
2069         Revert changes to RenderLayer::scrollByRecursively() that were added for gesture-scrolling
2070         https://bugs.webkit.org/show_bug.cgi?id=111007
2071
2072         Reviewed by Simon Fraser.
2073
2074         Due to http://trac.webkit.org/changeset/144519 landing, the changes made to RenderLayer in
2075         http://trac.webkit.org/changeset/142057,
2076         http://trac.webkit.org/changeset/140177, and  
2077         http://trac.webkit.org/changeset/142195
2078         are no longer necessary (as RenderLayer::scrollByRecursively() is not used for
2079         gesture-scrolling) and should be reverted.
2080
2081         No change in behavior, so no new tests needed.
2082
2083         * rendering/RenderLayer.cpp:
2084         (WebCore::RenderLayer::scrollByRecursively):
2085         * rendering/RenderLayer.h:
2086
2087 2013-03-04  Kentaro Hara  <haraken@chromium.org>
2088
2089         Unreviewed build fix after r144701.
2090
2091         * platform/EventTracer.cpp:
2092         (WebCore::EventTracer::initialize):
2093
2094 2013-03-04  Christian Biesinger  <cbiesinger@chromium.org>
2095
2096         REGRESSION (r143643): Buttons containing floats render differently
2097         https://bugs.webkit.org/show_bug.cgi?id=110933
2098
2099         Reviewed by Ojan Vafai.
2100
2101         Test: fast/forms/button-with-float.html
2102
2103         * rendering/RenderBlock.cpp:
2104         (WebCore::RenderBlock::expandsToEncloseOverhangingFloats):
2105         Also include new flexbox as a renderer that needs to enclose
2106         overhanging floats. Flex boxes establish a block formatting context,
2107         so they need to contain floats:
2108         http://dev.w3.org/csswg/css3-flexbox/#flex-items
2109
2110 2013-03-04  Chris Fleizach  <cfleizach@apple.com>
2111
2112         Support WebSpeech - Speech Synthesis
2113         https://bugs.webkit.org/show_bug.cgi?id=106742
2114
2115         Build fix.
2116
2117         * Modules/speech/SpeechSynthesis.cpp:
2118
2119 2013-03-04  Rafael Weinstein  <rafaelw@chromium.org>
2120
2121         Unreviewed, rolling out r144595.
2122         http://trac.webkit.org/changeset/144595
2123         https://bugs.webkit.org/show_bug.cgi?id=90341
2124
2125         Causing multiple crashes in fast/dom/Element/* tests (hits
2126         assert in Attr.cp:215)
2127
2128         * dom/Element.cpp:
2129         (WebCore::Element::setAttributeNode):
2130
2131 2013-02-26  Kentaro Hara  <haraken@chromium.org>
2132
2133         [chromium] Implement TRACE_EVENT macros for sampling profiling
2134         https://bugs.webkit.org/show_bug.cgi?id=110932
2135
2136         Reviewed by Adam Barth.
2137
2138         We are implementing TRACE_EVENT macros for sampling profiling.
2139         It works in the following mechanism:
2140
2141         - Chromium defines global state variables for sampling profiling.
2142         (i.e. g_trace_state0, g_trace_state1, g_trace_state2 in trace_event.h)
2143
2144         - WebKit gets the addresses of the global state variables at the
2145         initialization step. (i.e. EventTracer::initialize())
2146
2147         - WebKit updates the global states by using TRACE_EVENT_SAMPLING_STATE()
2148         macros every time WebKit changes its state. (e.g. DOM attribute
2149         getters/setters/methods)
2150
2151         - A sampling thread running in Chrome reads the global states
2152         periodically and visualizes the profiling results into about://tracing.
2153
2154         This patch implements (1) a WebKit API to get the addresses of
2155         the global states and (2) the TRACE_EVENT_SAMPLING_STATE() macro.
2156
2157         No tests. The sampling profiler is not enabled in Chrome by default.
2158         I manually inserted TRACE_EVENT_SAMPLING_STATE() macros and
2159         confirmed that the sampling profiling is working as expected.
2160
2161         * platform/EventTracer.cpp:
2162         (WebCore::EventTracer::initialize):
2163         (WebCore::EventTracer::getTraceCategoryEnabledFlag):
2164         (WebCore):
2165         * platform/EventTracer.h:
2166         (WebCore):
2167         (EventTracer):
2168         * platform/chromium/EventTracerChromium.cpp:
2169         (WebCore):
2170         (WebCore::EventTracer::initialize):
2171         * platform/chromium/TraceEvent.h:
2172
2173 2013-03-04  Chris Fleizach  <cfleizach@apple.com>
2174
2175         Support WebSpeech - Speech Synthesis
2176         https://bugs.webkit.org/show_bug.cgi?id=106742
2177
2178         Reviewed by Simon Fraser.
2179
2180         Enable speech synthesis for the Mac.
2181
2182         * Configurations/FeatureDefines.xcconfig:
2183
2184 2013-03-04  Ruslan Abdikeev  <aruslan@chromium.org>
2185
2186         <link rel="apple-touch-icon"> tag is not honored on CNN.com, workflowy.com etc
2187         https://bugs.webkit.org/show_bug.cgi?id=109061
2188
2189         Reviewed by Adam Barth.
2190
2191         Test: fast/dom/icon-url-list-apple-touch.html
2192
2193         Added iconTypes parameter to Document::iconURLs().
2194         Added Document::shortcutIconURLs() with original semantics of iconURLs().
2195         Fixed IconController.cpp to provide iconTypesMask to iconURLs().
2196         Renamed iconTypes to iconTypesMask to make the meaning clearer.
2197
2198         * WebCore.exp.in:
2199         * dom/Document.cpp:
2200         (WebCore::Document::shortcutIconURLs):
2201         (WebCore):
2202         (WebCore::Document::iconURLs):
2203         * dom/Document.h:
2204         (Document):
2205         * loader/icon/IconController.cpp:
2206         (WebCore::IconController::iconURL):
2207         (WebCore::IconController::urlsForTypes):
2208         * testing/Internals.cpp:
2209         (WebCore::Internals::iconURLs):
2210         (WebCore::Internals::shortcutIconURLs):
2211         (WebCore):
2212         (WebCore::Internals::allIconURLs):
2213         * testing/Internals.h:
2214         * testing/Internals.idl:
2215
2216 2013-02-27  Jeffrey Pfau  <jpfau@apple.com>
2217
2218         Cache partitioning does not affect iframe MainResources
2219         https://bugs.webkit.org/show_bug.cgi?id=111022
2220
2221         Reviewed by David Kilzer.
2222
2223         Set the partition of a main resource request if in a subframe.
2224
2225         Test: http/tests/cache/partitioned-cache-iframe.html
2226
2227         * loader/FrameLoader.cpp:
2228         (WebCore::FrameLoader::loadURL):
2229
2230 2013-03-04  Chris Fleizach  <cfleizach@apple.com>
2231
2232         AX: user agent shadow roots for plugins should be 'accessible'
2233         https://bugs.webkit.org/show_bug.cgi?id=111339
2234
2235         Reviewed by Tim Horton.
2236
2237         If a plugin element uses a user agent shadow element, we should make that shadow element
2238         into a button with the title and subtitle put together, and use that as the label. This 
2239         will probably be the best accessibility experience.
2240
2241         * html/HTMLPlugInImageElement.cpp:
2242         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
2243
2244 2013-03-04  Alok Priyadarshi  <alokp@chromium.org>
2245
2246         [chromium] Form controls on composited layers are not painted properly
2247         https://bugs.webkit.org/show_bug.cgi?id=111366
2248
2249         Reviewed by James Robinson.
2250
2251         Set PlatformContextSkia::m_drawingToImageBuffer which is used as a hint to properly blend GDI-painted bitmap.
2252
2253         * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp:
2254         (WebCore::OpaqueRectTrackingContentLayerDelegate::paintContents):
2255
2256 2013-03-04  Simon Fraser  <simon.fraser@apple.com>
2257
2258         Give ViewportConstraints classes copy constructors
2259         https://bugs.webkit.org/show_bug.cgi?id=111367
2260
2261         Reviewed by Beth Dakin.
2262         
2263         Downstream code requires that ViewportConstraints objects have
2264         copy constructors, so add them.
2265         
2266         Also clean up some redundant initialization of stack objects
2267         in RenderLayerCompositor.
2268
2269         No behavior change.
2270
2271         * page/scrolling/ScrollingConstraints.h:
2272         (WebCore::ViewportConstraints::ViewportConstraints):
2273         (ViewportConstraints):
2274         (WebCore::FixedPositionViewportConstraints::FixedPositionViewportConstraints):
2275         (FixedPositionViewportConstraints):
2276         (WebCore::StickyPositionViewportConstraints::StickyPositionViewportConstraints):
2277         (StickyPositionViewportConstraints):
2278         * rendering/RenderLayerCompositor.cpp:
2279         (WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
2280         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
2281
2282 2013-03-04  Roger Fong  <roger_fong@apple.com>
2283
2284         Unreviewed. AppleWin build fix.
2285
2286         * html/parser/XSSAuditor.cpp:
2287         (WebCore::isSemicolonSeparatedAttribute):
2288
2289 2013-03-04  Andreas Kling  <akling@apple.com>
2290
2291         CSSParser: Avoid temporary String when parsing hex colors.
2292         <http://webkit.org/b/111341>
2293
2294         Reviewed by Anders Carlsson.
2295
2296         Templatize CSSParser::fastParseColor() so we can pass a CSSParserString as the color name.
2297         This avoids creating a temporary WTF::String from the parser string.
2298
2299         * css/CSSParser.cpp:
2300         (WebCore::CSSParser::fastParseColor):
2301         * css/CSSParser.h:
2302         * css/CSSParserValues.h:
2303         (CSSParserString):
2304
2305 2013-03-04  Julien Chaffraix  <jchaffraix@webkit.org>
2306
2307         [CSS Grid Layout] Add parsing for grid-{start|before}
2308         https://bugs.webkit.org/show_bug.cgi?id=110988
2309
2310         Reviewed by Tony Chang.
2311
2312         Test: fast/css-grid-layout/grid-item-start-before-get-set.html
2313
2314         Refactored how we store internally grid-{row|column} to be based on grid-{before|start}.
2315         This is required as grid-{row|column} are shorthands for resp. grid-{before|after} and grid-{start|end}
2316         in the specification and will also be in the code. That means a lot of methods were renamed to be more
2317         aligned with the new design.
2318
2319         * css/CSSComputedStyleDeclaration.cpp:
2320         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2321         * css/CSSParser.cpp:
2322         (WebCore::CSSParser::parseValue):
2323         * css/CSSProperty.cpp:
2324         (WebCore::CSSProperty::isInheritedProperty):
2325         * css/CSSPropertyNames.in:
2326         * css/StyleResolver.cpp:
2327         (WebCore::StyleResolver::applyProperty):
2328         Added the code to parse, apply and get back the new properties. Also
2329         some renaming after the internal naming change below.
2330
2331         * rendering/RenderGrid.cpp:
2332         (WebCore::RenderGrid::maximumIndexInDirection):
2333         (WebCore::RenderGrid::placeItemsOnGrid):
2334         (WebCore::RenderGrid::autoPlacementMajorAxisPositionForChild):
2335         (WebCore::RenderGrid::autoPlacementMinorAxisPositionForChild):
2336         * rendering/style/RenderStyle.h:
2337         * rendering/style/StyleGridItemData.cpp:
2338         (WebCore::StyleGridItemData::StyleGridItemData):
2339         * rendering/style/StyleGridItemData.h:
2340         (WebCore::StyleGridItemData::operator==):
2341         Updated the naming now that we manipulate grid-{before|start} instead of grid-{row|column}.
2342
2343 2013-03-04  Chris Fleizach  <cfleizach@apple.com>
2344
2345         WebSpeech: change voiceURI to voice
2346         https://bugs.webkit.org/show_bug.cgi?id=110773
2347
2348         Reviewed by Tim Horton.
2349
2350         Change the voiceURI property to a voice property that takes a SpeechSynthesisVoice.
2351         This was recently added to the errata of the WebSpeech spec.
2352
2353         Test: platform/mac/fast/speechsynthesis/speech-synthesis-utterance-uses-voice.html
2354
2355         * Modules/speech/SpeechSynthesisUtterance.cpp:
2356         (WebCore):
2357         (WebCore::SpeechSynthesisUtterance::voice):
2358         (WebCore::SpeechSynthesisUtterance::setVoice):
2359         * Modules/speech/SpeechSynthesisUtterance.h:
2360         (SpeechSynthesisUtterance):
2361         * Modules/speech/SpeechSynthesisUtterance.idl:
2362         * Modules/speech/SpeechSynthesisVoice.h:
2363         (WebCore::SpeechSynthesisVoice::platformVoice):
2364         (SpeechSynthesisVoice):
2365         * platform/PlatformSpeechSynthesisUtterance.cpp:
2366         (WebCore::PlatformSpeechSynthesisUtterance::PlatformSpeechSynthesisUtterance):
2367         * platform/PlatformSpeechSynthesisUtterance.h:
2368         (WebCore::PlatformSpeechSynthesisUtterance::voice):
2369         (WebCore::PlatformSpeechSynthesisUtterance::setVoice):
2370         (PlatformSpeechSynthesisUtterance):
2371         * platform/mac/PlatformSpeechSynthesizerMac.mm:
2372         (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
2373
2374 2013-03-04  Victor Costan <costan@gmail.com>
2375
2376         Filename passed to FormData.append() takes precedence over filename in
2377         File.
2378         https://bugs.webkit.org/show_bug.cgi?id=111255
2379
2380         Reviewed by Alexey Proskuryakov.
2381
2382         Test: http/tests/local/formdata/send-form-data-with-filename.html
2383
2384         * platform/network/FormData.cpp:
2385         (WebCore::FormData::appendKeyValuePairItems): changed to implement the
2386         behavior in the XMLHttpRequest W3C spec.
2387
2388 2013-03-04  Alexis Hetu  <sugoi@chromium.org>
2389
2390         Canvas and DOM go out of sync
2391         https://bugs.webkit.org/show_bug.cgi?id=107701
2392
2393         Reviewed by Simon Fraser.
2394
2395         Test: fast/canvas/canvas-overflow-hidden-animation.html
2396
2397         Added an update of the current compositor from the layer's stacking
2398         container when the layer itself isn't a stacking container.
2399
2400         * rendering/RenderLayerBacking.cpp:
2401         (WebCore::RenderLayerBacking::updateAfterLayout):
2402         Added an update of the stacking container of the owning layer of the
2403         layer backing when the owning layer isn't a stacking container itself.
2404
2405 2013-03-04  Alexey Proskuryakov  <ap@apple.com>
2406
2407         Small BlobResourceHandle cleanup
2408         https://bugs.webkit.org/show_bug.cgi?id=111352
2409
2410         Reviewed by Sam Weinig.
2411
2412         1. Don't use PassRefPtr<BlobStorageData> when ownership is not being passed.
2413         2. Added OVERRIDE to some functions.
2414         3. Added const to ResourceHandle::firstRequest().
2415
2416         * platform/network/BlobRegistryImpl.cpp:
2417         (WebCore::loadResourceSynchronously):
2418         (WebCore::BlobRegistryImpl::createResourceHandle):
2419         (WebCore::BlobRegistryImpl::getBlobDataFromURL):
2420         * platform/network/BlobRegistryImpl.h:
2421         (BlobRegistryImpl):
2422         * platform/network/BlobResourceHandle.cpp:
2423         (WebCore::BlobResourceHandle::createAsync):
2424         (WebCore::BlobResourceHandle::loadResourceSynchronously):
2425         * platform/network/BlobResourceHandle.h:
2426         (BlobResourceHandle):
2427         * platform/network/FormData.cpp:
2428         (WebCore::appendBlobResolved):
2429         * platform/network/ResourceHandle.cpp:
2430         (WebCore::ResourceHandle::firstRequest):
2431         * platform/network/ResourceHandle.h:
2432         (ResourceHandle):
2433
2434 2013-03-04  Vsevolod Vlasov  <vsevik@chromium.org>
2435
2436         Web Inspector: Introduce WebInspector.EventTarget interface for interfaces that dispatch events.
2437         https://bugs.webkit.org/show_bug.cgi?id=111320
2438
2439         Reviewed by Pavel Feldman.
2440
2441         * inspector/front-end/Object.js:
2442         (WebInspector.EventTarget):
2443         (WebInspector.EventTarget.prototype.addEventListener):
2444         (WebInspector.EventTarget.prototype.removeEventListener):
2445         (WebInspector.EventTarget.prototype.removeAllListeners):
2446         (WebInspector.EventTarget.prototype.hasEventListeners):
2447         (WebInspector.EventTarget.prototype.dispatchEventToListeners):
2448         * inspector/front-end/ResourceScriptMapping.js:
2449         * inspector/front-end/UISourceCode.js:
2450         * inspector/front-end/Workspace.js:
2451         (WebInspector.ProjectDelegate.prototype.searchInFileContent):
2452
2453 2013-03-04  Tom Sepez  <tsepez@chromium.org>
2454
2455         XSSAuditor bypass with --> comment syntax.
2456         https://bugs.webkit.org/show_bug.cgi?id=111349
2457
2458         Reviewed by Adam Barth.
2459
2460         Test: http/tests/security/xssAuditor/open-iframe-src-03.html
2461
2462         * html/parser/XSSAuditor.cpp:
2463         (WebCore::isTerminatingCharacter):
2464         Adds ">" to the list of terminating characters, so that comments of
2465         the form --> end the snippet we seek to match.
2466
2467 2013-03-04  Vsevolod Vlasov  <vsevik@chromium.org>
2468
2469         Web Inspector: Modal dialogs sometimes lose focus.
2470         https://bugs.webkit.org/show_bug.cgi?id=111317
2471
2472         Reviewed by Pavel Feldman.
2473
2474         setCurrentFocusElement doesn't give focus to an element anymore
2475         if modal glass pane is shown and element is not inside it.
2476
2477         * inspector/front-end/Dialog.js:
2478         (WebInspector.Dialog):
2479         (WebInspector.Dialog.prototype._hide):
2480         * inspector/front-end/InspectorView.js:
2481         (WebInspector.InspectorView.prototype.defaultFocusedElement):
2482         * inspector/front-end/ScriptsPanel.js:
2483         (WebInspector.ScriptsPanel.prototype.defaultFocusedElement):
2484         * inspector/front-end/UIUtils.js:
2485         (WebInspector.GlassPane):
2486         (WebInspector.GlassPane.prototype.dispose):
2487         (WebInspector.setCurrentFocusElement):
2488         * inspector/front-end/dialog.css:
2489
2490 2013-03-04  Roger Fong  <roger_fong@apple.com>
2491
2492         Unreviewed. AppleWin build fix.
2493
2494         * WebCore.vcxproj/WebCore.vcxproj:
2495
2496 2013-03-04  Dan Carney  <dcarney@google.com>
2497
2498         [v8] add isolate parameter to heap statistics calls
2499         https://bugs.webkit.org/show_bug.cgi?id=111308
2500
2501         Reviewed by Jochen Eisinger.
2502
2503         No new tests.
2504
2505         * bindings/v8/ScriptGCEvent.cpp:
2506         (WebCore::ScriptGCEvent::getHeapSize):
2507         (WebCore::ScriptGCEvent::getUsedHeapSize):
2508         * bindings/v8/V8AdaptorFunction.cpp:
2509         (WebCore::V8AdaptorFunction::getTemplate):
2510         * bindings/v8/V8GCController.cpp:
2511         (WebCore::V8GCController::checkMemoryUsage):
2512
2513 2013-03-04  Jochen Eisinger  <jochen@chromium.org>
2514
2515         [chromium] remove deprecated hyphenation methods from Platform
2516         https://bugs.webkit.org/show_bug.cgi?id=111101
2517
2518         Reviewed by Adam Barth.
2519
2520         * platform/text/chromium/Hyphenation.cpp:
2521         (WebCore::canHyphenate):
2522         (WebCore::lastHyphenLocation):
2523
2524 2013-03-04  Benjamin Poulain  <benjamin@webkit.org>
2525
2526         Use initialization from literal for MediaFeatureNames
2527         https://bugs.webkit.org/show_bug.cgi?id=111283
2528
2529         Reviewed by Andreas Kling.
2530
2531         * css/MediaFeatureNames.cpp:
2532         (WebCore::MediaFeatureNames::init):
2533         Initialization from literal is faster and use less memory. The names are
2534         defined statically in MediaFeatureNames.h.
2535
2536         Also use the NotNull placement new to avoid a branch on silly allocators.
2537
2538 2013-03-04  Joshua Bell  <jsbell@chromium.org>
2539
2540         [V8] Unreviewed. Rebaselined run-bindings-tests following r144617
2541
2542         * bindings/scripts/test/V8/V8Float64Array.cpp:
2543         (WebCore::ConfigureV8Float64ArrayTemplate):
2544         (WebCore::V8Float64Array::GetTemplate):
2545         * bindings/scripts/test/V8/V8Float64Array.h:
2546         (V8Float64Array):
2547         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
2548         (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
2549         (WebCore::TestActiveDOMObjectV8Internal::TestActiveDOMObjectDomainSafeFunctionSetter):
2550         (WebCore::ConfigureV8TestActiveDOMObjectTemplate):
2551         (WebCore::V8TestActiveDOMObject::GetTemplate):
2552         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
2553         (V8TestActiveDOMObject):
2554         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
2555         (WebCore::ConfigureV8TestCustomNamedGetterTemplate):
2556         (WebCore::V8TestCustomNamedGetter::GetTemplate):
2557         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
2558         (V8TestCustomNamedGetter):
2559         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
2560         (WebCore::ConfigureV8TestEventConstructorTemplate):
2561         (WebCore::V8TestEventConstructor::GetTemplate):
2562         * bindings/scripts/test/V8/V8TestEventConstructor.h:
2563         (V8TestEventConstructor):
2564         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
2565         (WebCore::ConfigureV8TestEventTargetTemplate):
2566         (WebCore::V8TestEventTarget::GetTemplate):
2567         * bindings/scripts/test/V8/V8TestEventTarget.h:
2568         (V8TestEventTarget):
2569         * bindings/scripts/test/V8/V8TestException.cpp:
2570         (WebCore::ConfigureV8TestExceptionTemplate):
2571         (WebCore::V8TestException::GetTemplate):
2572         * bindings/scripts/test/V8/V8TestException.h:
2573         (V8TestException):
2574         * bindings/scripts/test/V8/V8TestInterface.cpp:
2575         (WebCore::ConfigureV8TestInterfaceTemplate):
2576         (WebCore::V8TestInterface::GetTemplate):
2577         * bindings/scripts/test/V8/V8TestInterface.h:
2578         (V8TestInterface):
2579         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
2580         (WebCore::ConfigureV8TestMediaQueryListListenerTemplate):
2581         (WebCore::V8TestMediaQueryListListener::GetTemplate):
2582         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
2583         (V8TestMediaQueryListListener):
2584         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2585         (WebCore::V8TestNamedConstructorConstructor::GetTemplate):
2586         (WebCore::ConfigureV8TestNamedConstructorTemplate):
2587         (WebCore::V8TestNamedConstructor::GetTemplate):
2588         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
2589         (V8TestNamedConstructorConstructor):
2590         (V8TestNamedConstructor):
2591         * bindings/scripts/test/V8/V8TestNode.cpp:
2592         (WebCore::ConfigureV8TestNodeTemplate):
2593         (WebCore::V8TestNode::GetTemplate):
2594         * bindings/scripts/test/V8/V8TestNode.h:
2595         (V8TestNode):
2596         * bindings/scripts/test/V8/V8TestObj.cpp:
2597         (WebCore::ConfigureV8TestObjTemplate):
2598         (WebCore::V8TestObj::GetTemplate):
2599         (WebCore::V8TestObj::installPerContextPrototypeProperties):
2600         * bindings/scripts/test/V8/V8TestObj.h:
2601         (V8TestObj):
2602         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
2603         (WebCore::ConfigureV8TestOverloadedConstructorsTemplate):
2604         (WebCore::V8TestOverloadedConstructors::GetTemplate):
2605         * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
2606         (V8TestOverloadedConstructors):
2607         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2608         (WebCore::ConfigureV8TestSerializedScriptValueInterfaceTemplate):
2609         (WebCore::V8TestSerializedScriptValueInterface::GetTemplate):
2610         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
2611         (V8TestSerializedScriptValueInterface):
2612         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
2613         (WebCore::ConfigureV8TestTypedefsTemplate):
2614         (WebCore::V8TestTypedefs::GetTemplate):
2615         * bindings/scripts/test/V8/V8TestTypedefs.h:
2616         (V8TestTypedefs):
2617
2618 2013-03-04  Tony Chang  <tony@chromium.org>
2619
2620         Unreviewed, rolling out r144562.
2621         http://trac.webkit.org/changeset/144562
2622         https://bugs.webkit.org/show_bug.cgi?id=85642
2623
2624         Caused KeyPadInsert faluires in webkit_unittests
2625
2626         * platform/chromium/KeyCodeConversionGtk.cpp:
2627         (WebCore::windowsKeyCodeForKeyEvent):
2628
2629 2013-03-04  Uday Kiran  <udaykiran@motorola.com>
2630
2631         getComputedStyle not implemented for -webkit-columns shorthand
2632         https://bugs.webkit.org/show_bug.cgi?id=111236
2633
2634         Reviewed by Alexis Menard.
2635
2636         Implement getComputedStyle for -webkit-columns shorthand.
2637
2638         Test: fast/css/getComputedStyle/getComputedStyle-webkit-columns-shorthand.html
2639
2640         * css/CSSComputedStyleDeclaration.cpp:
2641         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2642
2643 2013-03-04  Levi Weintraub  <leviw@chromium.org>
2644
2645         Add support for 8 bit TextRuns on Chromium Linux & Mac
2646         https://bugs.webkit.org/show_bug.cgi?id=99393
2647
2648         Reviewed by Eric Seidel.
2649
2650         Adding support for 8 bit TextRuns for Mac and Linux Chromium. To accomplish this,
2651         8 bit text runs are upconverted to 16 bit in the complex text path during string
2652         normalization, as HarfBuzz operates on UChars.
2653
2654         Windows has platfom assumptions that TextRuns are 16 bit that need to be addressed
2655         before enabling this optimization.
2656
2657         No new tests. No change in behavior.
2658
2659         (WebCore::HarfBuzzShaperBase::setNormalizedBuffer):
2660         * platform/graphics/harfbuzz/HarfBuzzShaperBase.h:
2661         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
2662         (WebCore::normalizeCharacters):
2663         (WebCore::HarfBuzzShaper::HarfBuzzShaper):
2664
2665 2013-03-04  Alexis Menard  <alexis@webkit.org>
2666
2667         transition-property property and transition shorthand property doesn't accept "all, all".
2668         https://bugs.webkit.org/show_bug.cgi?id=111201
2669
2670         Reviewed by Simon Fraser.
2671
2672         Relax the parsing of transition-property to allow all, all as a value.
2673         It is not very useful per say but it is possible by the spec and we
2674         align with Firefox, IE and Opera.
2675
2676         Test: LayoutTests/transitions/transitions-parsing.html
2677
2678         * css/CSSParser.cpp:
2679         (WebCore::CSSParser::parseAnimationProperty):
2680
2681 2013-03-04  Min Qin  <qinmin@chromium.org>
2682
2683         Don't apply page scale to clipRect if applyPageScaleFactorInCompositor is set to true
2684         https://bugs.webkit.org/show_bug.cgi?id=111229
2685
2686         Reviewed by Simon Fraser.
2687
2688         If applyPageScaleFactorInCompositor is set to true, webcore should use css coordinates.
2689         As a result, we shouldn't apply page scale to clipRect in RenderLayerCompositor.
2690         Layout tests set the flag to false, so we don't have anything to test against.
2691
2692         * rendering/RenderLayerCompositor.cpp:
2693         (WebCore::RenderLayerCompositor::addToOverlapMap):
2694
2695 2013-03-04  Ian Vollick  <vollick@chromium.org>
2696
2697         ASSERTION FAILED: m_clipRectsCache->m_respectingOverflowClip[clipRectsType] == (clipRectsContext.respectOverflowClip == RespectOverflowClip) in RenderLayer.
2698         https://bugs.webkit.org/show_bug.cgi?id=108257
2699
2700         Reviewed by David Hyatt.
2701
2702         With composited scrolling we paint both with and without respecting
2703         overflow clip. To prevent collisions in the clip cache, and to prevent
2704         throwing away cached clips unnecessarily, we keep two copies of the
2705         clip cache -- one for when overflow clip is respected, and one for
2706         when it isn't.
2707
2708         No new tests. Covered by existing tests (in debug):
2709           compositing/overflow/automatically-opt-into-composited-scrolling.html
2710           compositing/overflow/composited-scrolling-creates-a-stacking-container.html
2711
2712         * rendering/RenderLayer.cpp:
2713         (WebCore::RenderLayer::updateClipRects):
2714           No longer asserts that our 'respect overflow clip' status is
2715           consistent. It also gets and sets the clip cache using the clip rect
2716           context rather than just the clip rect type.
2717         (WebCore::RenderLayer::calculateClipRects):
2718         (WebCore::RenderLayer::parentClipRects):
2719         (WebCore::RenderLayer::clearClipRects):
2720         (WebCore::ClipRectsCache::ClipRectsCache):
2721         (WebCore::ClipRectsCache::getClipRects):
2722         (WebCore::ClipRectsCache::setClipRects):
2723         (WebCore::ClipRectsCache::getIndex):
2724           Get and set the cached clip rects using the context rather than
2725           type.
2726         (WebCore::RenderLayer::clipRects):
2727           We now cache twice as many clip rects.
2728         * rendering/RenderLayerBacking.cpp:
2729         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2730           ShouldRespectOverflowClip was moved out of RenderLayer.
2731
2732         * rendering/RenderLayer.cpp:
2733         (WebCore::RenderLayer::updateClipRects):
2734         (WebCore::RenderLayer::calculateClipRects):
2735         (WebCore::RenderLayer::parentClipRects):
2736         (WebCore::RenderLayer::clearClipRects):
2737         * rendering/RenderLayer.h:
2738         (WebCore::ClipRectsCache::ClipRectsCache):
2739         (WebCore::ClipRectsCache::getClipRects):
2740         (WebCore::ClipRectsCache::setClipRects):
2741         (ClipRectsCache):
2742         (WebCore::ClipRectsCache::getIndex):
2743         (WebCore::RenderLayer::clipRects):
2744         * rendering/RenderLayerBacking.cpp:
2745         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2746
2747 2013-03-04  Aaron Colwell  <acolwell@chromium.org>
2748
2749         Remove unused return value from SourceBufferPrivate::abort() and WebSourceBuffer::abort().
2750         https://bugs.webkit.org/show_bug.cgi?id=111195
2751
2752         Reviewed by Adam Barth.
2753
2754         No new tests. No user visible behavior changed.
2755
2756         * platform/graphics/SourceBufferPrivate.h:
2757         (SourceBufferPrivate):
2758
2759 2013-03-04  David Hyatt  <hyatt@apple.com>
2760
2761         [New Multicolumn] Eliminate the unique multicolumn flow thread style creation function
2762         https://bugs.webkit.org/show_bug.cgi?id=111338
2763
2764         Reviewed by Allan Jensen.
2765
2766         There is nothing special about a multi-column flow thread style now, so we can just
2767         use the existing anonymous style creation function.
2768
2769         * rendering/RenderMultiColumnBlock.cpp:
2770         (WebCore):
2771         (WebCore::RenderMultiColumnBlock::addChild):
2772
2773 2013-03-04  Mario Sanchez Prada  <mario.prada@samsung.com>
2774
2775         [GTK] WebCore::returnString is unsafe and should be removed!
2776         https://bugs.webkit.org/show_bug.cgi?id=110423
2777
2778         Reviewed by Martin Robinson.
2779
2780         Remove returnString() and replace it in callers with a new
2781         function that will cache and return the values of string
2782         properties for ATK interfaces in the private section of the
2783         wrapper AtkObject WebKitAccessible.
2784
2785         * accessibility/atk/WebKitAccessibleUtil.cpp: Remove returnString().
2786         * accessibility/atk/WebKitAccessibleUtil.h: Ditto.
2787
2788         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2789         (_WebKitAccessiblePrivate): New private structure to store cached
2790         values of string property for the different ATK interfaces.
2791         (cacheAndReturnAtkProperty): New helper function to make sure the
2792         returned const gchar* value is previously cached in the private
2793         section of the wrapper AtkObject.
2794         (webkitAccessibleGetName): Use the new helper function.
2795         (webkitAccessibleGetDescription): Ditto.
2796         (webkitAccessibleInit): Initialize pointer to private structure.
2797         (webkitAccessibleFinalize): Remove unneeded code.
2798         (webkitAccessibleClassInit): Add private struct to class type/
2799         * accessibility/atk/WebKitAccessibleWrapperAtk.h:
2800         (_WebKitAccessible): New member pointing to the private structure,
2801         made the new helper function cacheAndReturnAtkProperty() available
2802         to external callers (implementation files for ATK interfaces).
2803         (AtkCachedProperty): New enum to allow reusing code when calling
2804         cacheAndReturnAtkProperty() to cache and return different properties.
2805
2806         * accessibility/atk/WebKitAccessibleInterfaceAction.cpp:
2807         (webkitAccessibleActionGetKeybinding): Replace calls to returnString()
2808         with calls to the new helper function cacheAndReturnAtkProperty().
2809         (webkitAccessibleActionGetName): Ditto.
2810         * accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:
2811         (documentAttributeValue): Ditto.
2812         (webkitAccessibleDocumentGetLocale): Ditto.
2813         * accessibility/atk/WebKitAccessibleInterfaceImage.cpp:
2814         (webkitAccessibleImageGetImageDescription): Ditto.
2815
2816         Remove returnString() from WebKitAccessibleHyperlink (which is not
2817         an AtkObject, but a GObject) as well, replacing it in callers with
2818         simple code that will cache and return the required values in the
2819         private section of these kind of objects.
2820
2821         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
2822         (_WebKitAccessibleHyperlinkPrivate): Added two new fields to cache
2823         string values for the key binding and name properties from the
2824         AtkAction interface, which is implemented by AtkHyperlink.
2825         (webkitAccessibleHyperlinkActionGetKeybinding): Cache the string
2826         value for the key binding before returning a const gchar* pointer.
2827         (webkitAccessibleHyperlinkActionGetName): Ditto.
2828         (webkitAccessibleHyperlinkGetURI): Do not cache the URI here, as
2829         this function returns a gchar* that will be owned by the caller.
2830
2831 2013-03-04  peavo@outlook.com  <peavo@outlook.com>
2832
2833         [Curl] Compile fix after r144216
2834         https://bugs.webkit.org/show_bug.cgi?id=111305
2835
2836         Reviewed by Brent Fulgham.
2837
2838         * platform/network/curl/ResourceRequest.h:
2839         (WebCore::ResourceRequest::cfURLRequest): Added new parameter.
2840
2841 2013-03-03  David Hyatt  <hyatt@apple.com>
2842
2843         [New Multicolumn] Make sure region styling works for columns inside regions.
2844         https://bugs.webkit.org/show_bug.cgi?id=111276
2845
2846         Reviewed by Sam Weinig.
2847
2848         Test: fast/regions/region-styling-in-columns.html
2849
2850         * rendering/RenderFlowThread.cpp:
2851         (WebCore::CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer):
2852         (WebCore::CurrentRenderFlowThreadMaintainer::~CurrentRenderFlowThreadMaintainer):
2853         * rendering/RenderFlowThread.h:
2854         (CurrentRenderFlowThreadMaintainer):
2855         Fix the CurrentRenderFlowThreadMaintainer so that it saves off the old render flow thread
2856         and restores it when done. This effectively makes flow thread layout a push/pop stack,
2857         since with in-flow threads, this is allowed. We assert that a nested flow thread is
2858         in-flow to preserve the invariant that you can't nest CSS Regions flow thread.
2859
2860         * rendering/RenderRegion.cpp:
2861         (WebCore::RenderRegion::computeChildrenStyleInRegion):
2862         Add isInFlowRenderFlowThread() to the anonymous check to make sure a style gets made
2863         for the nested flow thread.
2864
2865 2013-03-04  Andrey Lushnikov  <lushnikov@chromium.org>
2866
2867         Web Inspector: WebInspector.AceTextEditor throws a warning
2868         https://bugs.webkit.org/show_bug.cgi?id=111315
2869
2870         Reviewed by Pavel Feldman.
2871
2872         Add WebInspector.AceTextEditor to externs.js to suppress closure
2873         compilation warning.
2874
2875         No new tests: no change in behaviour.
2876
2877         * inspector/front-end/externs.js:
2878         (WebInspector.AceTextEditor):
2879
2880 2013-03-04  Antoine Quint  <graouts@apple.com>
2881
2882         Fix debug build under certain configurations, cause was
2883         http://trac.webkit.org/changeset/144624.
2884
2885         * inspector/InspectorController.cpp:
2886         (WebCore::InspectorController::InspectorController):
2887         * inspector/InspectorLayerTreeAgent.cpp:
2888         (WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent):
2889         * inspector/InspectorLayerTreeAgent.h:
2890         (WebCore):
2891         (WebCore::InspectorLayerTreeAgent::create):
2892         (InspectorLayerTreeAgent):
2893
2894 2013-03-04  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2895
2896         [Qt] REGRESSION(r141240) Crash in PluginPackage::fetchInfo
2897         https://bugs.webkit.org/show_bug.cgi?id=111322
2898
2899         Reviewed by Simon Hausmann.
2900
2901         Do not try to load blacklisted plugins.
2902
2903         * plugins/qt/PluginPackageQt.cpp:
2904         (WebCore::PluginPackage::fetchInfo):
2905
2906 2013-03-04  Alexis Menard  <alexis@webkit.org>
2907
2908         transition properties can't be found in CSSStyleDeclaration
2909         https://bugs.webkit.org/show_bug.cgi?id=110011
2910
2911         Reviewed by Antti Koivisto.
2912
2913         The previous approach for handling the unprefixing was to alias the
2914         unprefixed properties with the prefixed ones in CSSPropertyNames.in.
2915         Unfortunately it will alias the properties in the parsing code which will just
2916         identically parse the two versions. This means that when we populate StylePropertySet
2917         we do not have information whether we just parsed the prefixed, the
2918         unprefixed properties or we parsed both. The patch takes another
2919         approach by creating two distinct sets of properties (unprefixed and
2920         prefixed). Each properties have their own id and we now handle them in
2921         the parsing code as disctints properties and add both versions to the
2922         declared style. In order to avoid properties getting out of sync, 
2923         this patch adds few facilities to StylePropertySet to update the
2924         prefixed and the unprefixed entries. Finally the style resolution
2925         happens only for the prefixed version (to limit the size of this patch)
2926         and the unprefixed versions are not resolved. This is to avoid creating
2927         the animation objects twice for the resolved style.
2928
2929         Test : transitions/transitions-parsing.html
2930
2931         * css/CSSComputedStyleDeclaration.cpp:
2932         (WebCore):
2933         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2934         * css/CSSParser.cpp:
2935         (WebCore::CSSParser::addPropertyWithPrefixingVariant): Always add the
2936         prefixed and the unprefixed property even if only one is specified.
2937         (WebCore):
2938         (WebCore::CSSParser::parseValue):
2939         (WebCore::CSSParser::parseTransitionShorthand): Add both prefixed and
2940         unprefixed longhands to the declarated style.
2941         (WebCore::CSSParser::parseAnimationProperty):
2942         * css/CSSParser.h:
2943         (CSSParser):
2944         * css/CSSProperty.cpp:
2945         (WebCore::CSSProperty::isInheritedProperty):
2946         * css/CSSProperty.h:
2947         (WebCore:: prefixingVariantForPropertyId): This function takes a given
2948         property id and returns its prefixed or unprefixed id if it exists. If
2949         not it returns the same id.
2950         (WebCore):
2951         * css/CSSPropertyNames.in:
2952         * css/StylePropertySet.cpp:
2953         (WebCore::StylePropertySet::getPropertyValue):
2954         (WebCore::StylePropertySet::removeShorthandProperty):
2955         (WebCore::StylePropertySet::removeProperty):
2956         (WebCore::StylePropertySet::removeProperty): Remove
2957         also the prefixed or unprefixed shorthand if it exists.
2958         (WebCore):
2959         (WebCore::StylePropertySet::setProperty):
2960         (WebCore::StylePropertySet:: appendPrefixingVariantProperty):
2961         (WebCore::StylePropertySet::setPrefixingVariantProperty): If it
2962         exists a unprefixed or prefixed counterpart of the property we're
2963         trying to set, then we update the other one.
2964         (WebCore::StylePropertySet::asText):
2965         (WebCore::StylePropertySet::mergeAndOverrideOnConflict):
2966         * css/StylePropertySet.h:
2967         (StylePropertySet):
2968         * css/StylePropertyShorthand.cpp:
2969         (WebCore::transitionShorthand):
2970         (WebCore):
2971         (WebCore::shorthandForProperty): Define the transitions unprefixed
2972         longhands.
2973         * css/StylePropertyShorthand.h:
2974         (WebCore):
2975         * css/StyleResolver.cpp:
2976         (WebCore::StyleResolver::applyProperty): StyleBuilder will handle the
2977         resolution and the creation of the animations for the style. As the
2978         declarated style now contains declarations for the prefixed and
2979         unprefixed property we do not want to resolve two times and create duplicate animations.
2980         Therefore when we try to resolve the unprefixed version we just bail out.
2981
2982 2013-03-04  Ilya Tikhonovsky  <loislo@chromium.org>
2983
2984         Web Inspector: CPU Flame Chart: reveal profiler DataGrid node when user clicks on a FlameChart item.
2985         https://bugs.webkit.org/show_bug.cgi?id=111309
2986
2987         Reviewed by Yury Semikhatsky.
2988
2989         * inspector/front-end/CPUProfileView.js:
2990         (WebInspector.CPUProfileView.prototype._revealProfilerNode):
2991         * inspector/front-end/FlameChart.js:
2992         (WebInspector.FlameChart):
2993         (WebInspector.FlameChart.prototype._onClick):
2994
2995 2013-03-04  Antoine Quint  <graouts@apple.com>
2996
2997         Web Inspector: remove existing LayerTreeAgent protocol APIs
2998         https://bugs.webkit.org/show_bug.cgi?id=111251
2999
3000         In order to eventually provide a more useful API for the LayerTreeAgent
3001         that will be done in followup bugs, we remove the current API exposed by
3002         the agent providing a clean slate that will make future patches easier
3003         to read. Additionally, we remove the "childLayers" property on the Layer
3004         object since we will no longer be providing a hierarchy of layers, but
3005         rather a flat list of layers attached to a node and its descendants.
3006
3007         No new tests since we're removing the APIs exposed by the LayerTreeAgent.
3008         Subsequent patches will add tests as new APIs are added.
3009
3010         Reviewed by Timothy Hatcher.
3011
3012         * inspector/Inspector.json:
3013         * inspector/InspectorDOMAgent.cpp:
3014         * inspector/InspectorDOMAgent.h:
3015         * inspector/InspectorLayerTreeAgent.cpp:
3016         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
3017         * inspector/InspectorLayerTreeAgent.h:
3018         (InspectorLayerTreeAgent):
3019
3020 2013-03-04  Li Yin  <li.yin@intel.com>
3021
3022         MediaStream.ended must return true when it is created with ended tracks.
3023         https://bugs.webkit.org/show_bug.cgi?id=111293
3024
3025         Reviewed by Kentaro Hara.
3026
3027         Spec: http://dev.w3.org/2011/webrtc/editor/getusermedia.html#MediaStream-ended
3028         When a MediaStream object is created, its ended attribute must be set to false,
3029         unless it is being created using the MediaStream() constructor whose arguments
3030         are lists of MediaStreamTrack objects that are all ended, in which case the
3031         MediaStream object must be created with its ended attribute set to true.
3032
3033         Test: fast/mediastream/MediaStreamConstructor.html
3034
3035         * platform/mediastream/MediaStreamDescriptor.h:
3036         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
3037
3038 2013-03-04  Alexander Pavlov  <apavlov@chromium.org>
3039
3040         Web Inspector: Adding new rules broken if a <style> tag is added to document dynamically
3041         https://bugs.webkit.org/show_bug.cgi?id=111299
3042
3043         Reviewed by Pavel Feldman.
3044
3045         The CSSStyleSheet instance should be retrieved directly from the HTMLStyleElement just created,
3046         not from the document.styleSheets list.
3047
3048         Test: inspector/styles/add-new-rule-with-style-after-body.html
3049
3050         * inspector/InspectorCSSAgent.cpp:
3051         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
3052
3053 2013-03-04  Ilya Tikhonovsky  <loislo@chromium.org>
3054
3055         Web Inspector: Unreviewed. Fix for closure type annotations.
3056
3057         * inspector/front-end/FlameChart.js:
3058
3059 2013-03-04  Kondapally Kalyan  <kalyan.kondapally@intel.com>
3060
3061         [EFL] Build fix when compiling with GLES2 support enabled.
3062         https://bugs.webkit.org/show_bug.cgi?id=111291
3063
3064         Reviewed by Kenneth Rohde Christiansen.
3065
3066         This patch fixes build issues when compiling with GLES2
3067         support. As part of the fix the patch removes Evas specific
3068         workaround of using GLX with EGL in PlatformContext as GLES2 
3069         is the main target with EGL.
3070
3071         * platform/graphics/OpenGLESShims.h:
3072         * platform/graphics/opengl/GLPlatformContext.cpp:
3073         (WebCore::GLCurrentContextWrapper::GLCurrentContextWrapper):
3074         * platform/graphics/texmap/TextureMapper.h:
3075
3076 2013-03-04  Ilya Tikhonovsky  <loislo@chromium.org>
3077
3078         Web Inspector: implement Flame Chart for CPU profiler.
3079         https://bugs.webkit.org/show_bug.cgi?id=111162
3080
3081         Reviewed by Yury Semikhatsky.
3082
3083         It is an initial implementation. The next step is to provide
3084         function names and other stats about the hovered item.
3085
3086         * WebCore.gypi:
3087         * WebCore.vcproj/WebCore.vcproj:
3088         * WebCore.vcxproj/WebCore.vcxproj:
3089         * WebCore.vcxproj/WebCore.vcxproj.filters:
3090         * inspector/compile-front-end.py:
3091         * inspector/front-end/CPUProfileView.js:
3092         (WebInspector.CPUProfileView.prototype._getCPUProfileCallback):
3093         * inspector/front-end/FlameChart.js: Added.
3094         (WebInspector.FlameChart):
3095         (WebInspector.FlameChart.prototype._onMouseMove):
3096         (WebInspector.FlameChart.prototype.findNodeCallback):
3097         (WebInspector.FlameChart.prototype._coordinatesToNode):
3098         (WebInspector.FlameChart.prototype.onResize):
3099         (WebInspector.FlameChart.prototype._rootNodes):
3100         (WebInspector.FlameChart.prototype.draw):
3101         (WebInspector.FlameChart.prototype._drawNode):
3102         (WebInspector.FlameChart.prototype._forEachNode):
3103         (WebInspector.FlameChart.prototype._drawBar):
3104         (WebInspector.FlameChart.prototype.update):
3105         * inspector/front-end/Settings.js:
3106         (WebInspector.ExperimentsSettings):
3107         * inspector/front-end/WebKit.qrc:
3108         * inspector/front-end/flameChart.css: Added.
3109         (.flame-chart):
3110
3111 2013-03-04  Marja Hölttä  <marja@chromium.org>
3112
3113         [V8] Add a "context type" parameter to GetTemplate and ConfigureV8SomethingTemplate functions
3114         https://bugs.webkit.org/show_bug.cgi?id=110875
3115
3116         The parameter will later be used for generating specialized V8
3117         bindings for the 3 different world types (main world, isolated
3118         work, worker).
3119
3120         Reviewed by Kentaro Hara.
3121
3122         No new tests (no changes in behavior yet).
3123
3124         * bindings/scripts/CodeGeneratorV8.pm:
3125         (GenerateHeader):
3126         (GenerateDomainSafeFunctionGetter):
3127         (GenerateDomainSafeFunctionSetter):
3128         (GenerateNormalAttrGetter):
3129         (GenerateNamedConstructor):
3130         (GenerateImplementation):
3131         * bindings/v8/DOMDataStore.cpp:
3132         (WebCore::DOMDataStore::DOMDataStore):
3133         * bindings/v8/DOMDataStore.h:
3134         (DOMDataStore):
3135         * bindings/v8/DOMWrapperWorld.cpp:
3136         (WebCore):
3137         (WebCore::DOMWrapperWorld::setInitializingWindow):
3138         (WebCore::DOMWrapperWorld::DOMWrapperWorld):
3139         (WebCore::DOMWrapperWorld::contextHasCorrectPrototype):
3140         * bindings/v8/DOMWrapperWorld.h:
3141         (DOMWrapperWorld):
3142         (WebCore::DOMWrapperWorld::getWorld):
3143         * bindings/v8/Dictionary.cpp:
3144         (WebCore::Dictionary::get):
3145         * bindings/v8/PageScriptDebugServer.cpp:
3146         (WebCore::retrieveFrameWithGlobalObjectCheck):
3147         * bindings/v8/V8AdaptorFunction.cpp:
3148         (WebCore::V8AdaptorFunction::getTemplate):
3149         (WebCore::V8AdaptorFunction::wrap):
3150         * bindings/v8/V8AdaptorFunction.h:
3151         (V8AdaptorFunction):
3152         * bindings/v8/V8Binding.cpp:
3153         (WebCore::toDOMWindow):
3154         (WebCore::toScriptExecutionContext):
3155         (WebCore::worldType):
3156         (WebCore):
3157         (WebCore::worldTypeInMainThread):
3158         * bindings/v8/V8Binding.h:
3159         (WebCore):
3160         * bindings/v8/V8DOMWindowShell.cpp:
3161         (WebCore::V8DOMWindowShell::clearForNavigation):
3162         (WebCore::V8DOMWindowShell::installDOMWindow):
3163         * bindings/v8/V8DOMWrapper.cpp:
3164         (WebCore::V8DOMWrapper::createWrapper):
3165         * bindings/v8/V8Initializer.cpp:
3166         (WebCore::findFrame):
3167         * bindings/v8/V8PerContextData.cpp:
3168         (WebCore::V8PerContextData::constructorForTypeSlowCase):
3169         * bindings/v8/WorkerScriptController.cpp:
3170         (WebCore::WorkerScriptController::WorkerScriptController):
3171         (WebCore::WorkerScriptController::controllerForContext):
3172         * bindings/v8/WrapperTypeInfo.h:
3173         (WebCore::WrapperTypeInfo::getTemplate):
3174         * bindings/v8/custom/V8DOMWindowCustom.cpp:
3175         (WebCore::V8DOMWindow::eventAttrGetterCustom):
3176         (WebCore::V8DOMWindow::eventAttrSetterCustom):
3177         (WebCore::V8DOMWindow::toStringMethodCustom):
3178         (WebCore::V8DOMWindow::namedSecurityCheck):
3179         (WebCore::V8DOMWindow::indexedSecurityCheck):
3180         (WebCore::toV8):
3181         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
3182         (WebCore::V8HTMLDocument::wrapInShadowObject):
3183         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
3184         (WebCore::V8HTMLImageElementConstructor::GetTemplate):
3185         * bindings/v8/custom/V8HTMLImageElementConstructor.h:
3186         (V8HTMLImageElementConstructor):
3187         * bindings/v8/custom/V8InjectedScriptManager.cpp:
3188         (WebCore::createInjectedScriptHostV8Wrapper):
3189         (WebCore::InjectedScriptManager::canAccessInspectedWindow):
3190         * bindings/v8/custom/V8LocationCustom.cpp:
3191         (WebCore::V8Location::reloadAttrGetterCustom):
3192         (WebCore::V8Location::replaceAttrGetterCustom):
3193         (WebCore::V8Location::assignAttrGetterCustom):
3194         * bindings/v8/custom/V8MessageEventCustom.cpp:
3195         (WebCore::V8MessageEvent::initMessageEventMethodCustom):
3196
3197 2013-03-04  Andrey Lushnikov  <lushnikov@chromium.org>
3198
3199         Web Inspector: add Ace editor experiment
3200         https://bugs.webkit.org/show_bug.cgi?id=111191
3201
3202         Reviewed by Pavel Feldman.
3203
3204         No new tests.
3205
3206         Add Ace text editor experiment.
3207
3208         * WebCore.gypi:
3209         * inspector/front-end/AceTextEditor.js: Added.
3210         * inspector/front-end/Settings.js:
3211         (WebInspector.ExperimentsSettings):
3212         * inspector/front-end/SourceFrame.js:
3213         (WebInspector.SourceFrame):
3214         * inspector/front-end/ace/ace.js: Added.
3215         * inspector/front-end/ace/acedevtools.css: Added.
3216         * inspector/front-end/ace/mode_css.js: Added.
3217         * inspector/front-end/ace/mode_html.js: Added.
3218         * inspector/front-end/ace/mode_javascript.js: Added.
3219         * inspector/front-end/ace/theme_textmate.js: Added.
3220         * inspector/front-end/ace/LICENSE.txt: Added.
3221
3222 2013-03-04  Kunihiko Sakamoto  <ksakamoto@chromium.org>
3223
3224         Add build flag for FontLoader
3225         https://bugs.webkit.org/show_bug.cgi?id=111289
3226
3227         Reviewed by Benjamin Poulain.
3228
3229         Add ENABLE_FONT_LOAD_EVENTS build flag (disabled by default).
3230
3231         * Configurations/FeatureDefines.xcconfig:
3232
3233 2013-03-04  Mike West  <mkwst@chromium.org>
3234
3235         XSSAuditor should strip dangerous attributes from SMIL animation elements.
3236         https://bugs.webkit.org/show_bug.cgi?id=111071
3237
3238         Reviewed by Adam Barth.
3239
3240         SMIL animation elements can, amusingly enough, animate the 'href' of a
3241         link. This patch teaches XSSAuditor how to deal with the
3242         semicolon-separated 'animation[values]' attribute in order to ensure
3243         that it doesn't contain JavaScript URLs that could be animated into
3244         place for an unsuspecting user to click on.
3245
3246         Test: http/tests/security/xssAuditor/svg-animate.html
3247
3248         * html/parser/XSSAuditor.cpp:
3249         (WebCore::isSemicolonSeparatedAttribute): Added.
3250             This returns true if the given attribute is SVGNames::valuesAttr,
3251             but makes it possible to easily extend the list with additional
3252             attributes with this strange property.
3253         (WebCore::semicolonSeparatedValueContainsJavaScriptURL): Added.
3254             Given a semicolon-separated string, determine if it contains any
3255             JavaScript URLs.
3256         (WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
3257             When looking for dangerousness, determine whether or not we should
3258             be comparing against each member of a semicolon-separated list.
3259
3260 2013-03-04  Arvid Nilsson  <anilsson@rim.com>
3261
3262         [BlackBerry] New files for BlackBerry::Platform::Graphics::GraphicsContext integration
3263         https://bugs.webkit.org/show_bug.cgi?id=111153
3264
3265         Reviewed by Rob Buis.
3266
3267         BlackBerry PR 293208
3268
3269         This patch contains contributions from many members of the BlackBerry
3270         WebKit team:
3271
3272         Rob Buis
3273         Robin Cao
3274         Eli Fidler
3275         Mike Lattanzio
3276         Yong Li
3277         Maxim Mogilnitsky
3278         Joshua Netterfield
3279         Arvid Nilsson
3280         Jakob Petsovits
3281         Konrad Piascik
3282         Jeff Rogers
3283         Artem Simonov
3284         Filip Spacek
3285         George Staikos
3286
3287         Covered by existing tests.
3288
3289         * platform/graphics/blackberry/FontBlackBerry.cpp: Added.
3290         (FSFixedToFloat):
3291         (FloatToFSFixed):
3292         (WebCore):
3293         (WebCore::Font::drawComplexText):
3294         (WebCore::Font::floatWidthForComplexText):
3295         (WebCore::Font::offsetForPositionForComplexText):
3296         (WebCore::Font::selectionRectForComplexText):
3297         (WebCore::Font::drawGlyphs):
3298         (WebCore::Font::canReturnFallbackFontsForComplexText):
3299         (WebCore::Font::drawEmphasisMarksForComplexText):
3300         (WebCore::Font::canExpandAroundIdeographsInComplexText):
3301         * platform/graphics/blackberry/FontCacheBlackBerry.cpp: Added.
3302         (WebCore):
3303         (WebCore::FontCache::platformInit):
3304         (WebCore::FontCache::getFontDataForCharacters):
3305         (WebCore::FontCache::getSimilarFontPlatformData):
3306         (WebCore::FontCache::getLastResortFallbackFont):
3307         (WebCore::FontCache::getTraitsInFamily):
3308         (WebCore::getFamilyNameStringFromFontDescriptionAndFamily):
3309         (WebCore::fontWeightToFontconfigWeight):
3310         (WebCore::FontCache::createFontPlatformData):
3311         * platform/graphics/blackberry/FontCustomPlatformData.h: Added.
3312         (WebCore):
3313         (FontCustomPlatformData):
3314         * platform/graphics/blackberry/FontCustomPlatformDataBlackBerry.cpp: Added.
3315         (WebCore):
3316         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
3317         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
3318         (WebCore::FontCustomPlatformData::fontPlatformData):
3319         (WebCore::FontCustomPlatformData::supportsFormat):
3320         (WebCore::createFontCustomPlatformData):
3321         * platform/graphics/blackberry/FontPlatformDataBlackBerry.cpp: Added.
3322         (WebCore):
3323         (WebCore::FontPlatformData::FontPlatformData):
3324         (WebCore::FontPlatformData::~FontPlatformData):
3325         (WebCore::FontPlatformData::name):
3326         (WebCore::FontPlatformData::applyState):
3327         (WebCore::FontPlatformData::platformDataInit):
3328         (WebCore::FontPlatformData::platformDataAssign):
3329         (WebCore::FontPlatformData::platformIsEqual):
3330         (WebCore::FontPlatformData::description):
3331         (WebCore::FontPlatformData::harfbuzzFace):
3332         (WebCore::FontPlatformData::scaledFont):
3333         (WebCore::FontPlatformData::setFakeBold):
3334         (WebCore::FontPlatformData::setFakeItalic):
3335         (WebCore::FontPlatformData::platformFontHandle):
3336         (WebCore::FontPlatformData::isFixedPitch):
3337         * platform/graphics/blackberry/GlyphPageTreeNodeBlackBerry.cpp: Added.
3338         (WebCore):
3339         (WorldTypeScopedPtr):
3340         (WebCore::WorldTypeScopedPtr::WorldTypeScopedPtr):
3341         (WebCore::WorldTypeScopedPtr::~WorldTypeScopedPtr):
3342         (WebCore::WorldTypeScopedPtr::get):
3343         (WebCore::GlyphPage::fill):
3344         * platform/graphics/blackberry/GradientBlackBerry.cpp: Added.
3345         (WebCore):
3346         (WebCore::totalStopsNeeded):
3347         (WebCore::fillStops):
3348         (WebCore::Gradient::platformGradient):
3349         (WebCore::Gradient::platformDestroy):
3350         (WebCore::Gradient::fill):
3351         (WebCore::Gradient::setPlatformGradientSpaceTransform):
3352         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp: Added.
3353         (WebCore):
3354         (GraphicsContextPlatformPrivate):
3355         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
3356         (WebCore::GraphicsContext::platformInit):
3357         (WebCore::GraphicsContext::platformDestroy):
3358         (WebCore::GraphicsContext::platformContext):
3359         (WebCore::GraphicsContext::savePlatformState):
3360         (WebCore::GraphicsContext::restorePlatformState):
3361         (WebCore::GraphicsContext::setIsAcceleratedContext):
3362         (WebCore::GraphicsContext::isAcceleratedContext):
3363         (WebCore::GraphicsContext::getCTM):
3364         (WebCore::GraphicsContext::concatCTM):
3365         (WebCore::GraphicsContext::setCTM):
3366         (WebCore::GraphicsContext::scale):
3367         (WebCore::GraphicsContext::rotate):
3368         (WebCore::GraphicsContext::translate):
3369         (WebCore::GraphicsContext::drawEllipse):
3370         (WebCore::GraphicsContext::strokeArc):
3371         (WebCore::GraphicsContext::drawConvexPolygon):
3372         (WebCore::GraphicsContext::drawRect):
3373         (WebCore::GraphicsContext::fillRect):
3374         (WebCore::GraphicsContext::clearRect):
3375         (WebCore::GraphicsContext::strokeRect):
3376         (WebCore::GraphicsContext::fillRoundedRect):
3377         (WebCore::GraphicsContext::roundToDevicePixels):
3378         (WebCore::GraphicsContext::setPlatformShadow):
3379         (WebCore::GraphicsContext::clearPlatformShadow):
3380         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
3381         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
3382         (WebCore::GraphicsContext::supportsTransparencyLayers):
3383         (WebCore::GraphicsContext::setLineCap):
3384         (WebCore::GraphicsContext::setLineDash):
3385         (WebCore::GraphicsContext::setLineJoin):
3386         (WebCore::GraphicsContext::setMiterLimit):
3387         (WebCore::GraphicsContext::setAlpha):
3388         (WebCore::GraphicsContext::clip):
3389         (WebCore::GraphicsContext::clipOut):
3390         (WebCore::GraphicsContext::clipConvexPolygon):
3391         (WebCore::GraphicsContext::addRoundedRectClip):
3392         (WebCore::GraphicsContext::clipOutRoundedRect):
3393         (WebCore::GraphicsContext::clipBounds):
3394         (WebCore::GraphicsContext::addInnerRoundedRectClip):
3395         (WebCore::GraphicsContext::setURLForRect):
3396         (WebCore::GraphicsContext::setPlatformTextDrawingMode):
3397         (WebCore::GraphicsContext::setPlatformStrokeColor):
3398         (WebCore::GraphicsContext::setPlatformStrokeStyle):
3399         (WebCore::GraphicsContext::setPlatformStrokeThickness):
3400         (WebCore::GraphicsContext::setPlatformFillColor):
3401         (WebCore::GraphicsContext::setPlatformCompositeOperation):
3402         (WebCore::GraphicsContext::setPlatformShouldAntialias):
3403         (WebCore::GraphicsContext::setImageInterpolationQuality):
3404         (WebCore::GraphicsContext::imageInterpolationQuality):
3405         * platform/graphics/blackberry/ITypeUtils.h: Added.
3406         (floatToITypeFixed):
3407         (intToITypeFixed):
3408         (iTypeFixedToFloat):
3409         * platform/graphics/blackberry/ImageBufferBlackBerry.cpp: Added.
3410         (WebCore):
3411         (WebCore::makeBufferCurrent):
3412         (WebCore::getImageDataInternal):
3413         (WebCore::ImageBufferData::getImageData):
3414         (WebCore::flushAndDraw):
3415         (WebCore::ImageBufferData::draw):
3416         (WebCore::ImageBuffer::ImageBuffer):
3417         (WebCore::ImageBuffer::~ImageBuffer):
3418         (WebCore::ImageBuffer::context):
3419         (WebCore::ImageBuffer::platformLayer):
3420         (WebCore::ImageBuffer::copyImage):
3421         (WebCore::ImageBuffer::clip):
3422         (WebCore::ImageBuffer::draw):
3423         (WebCore::ImageBuffer::drawPattern):
3424         (WebCore::ImageBuffer::platformTransformColorSpace):
3425         (WebCore::ImageBuffer::getUnmultipliedImageData):
3426         (WebCore::ImageBuffer::getPremultipliedImageData):
3427         (WebCore::ImageBuffer::putByteArray):
3428         (WebCore::ImageBuffer::toDataURL):
3429         * platform/graphics/blackberry/ImageBufferDataBlackBerry.h: Added.
3430         (WebCore):
3431         (ImageBufferData):
3432         * platform/graphics/blackberry/PathBlackBerry.cpp: Added.
3433         (WebCore):
3434         (WebCore::scratchContext):
3435         (WebCore::Path::Path):
3436         (WebCore::Path::~Path):
3437         (WebCore::Path::operator=):
3438         (WebCore::Path::currentPoint):
3439         (WebCore::Path::contains):