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