d5da6ecce627a4cbd57447c81cc03e9ccf32e156
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-09-23  Brady Eidson  <beidson@apple.com>
2
3         Move LevelDB specific IDB files into their own subdirectory.
4         https://bugs.webkit.org/show_bug.cgi?id=121804
5
6         Rubberstamped by Alexey Proskuryakov.
7
8         * CMakeLists.txt:
9         * GNUmakefile.list.am:
10         * WebCore.xcodeproj/project.pbxproj:
11
12         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBBackingStore.cpp.
13         (WebCore::recordInternalError):
14         (WebCore::putBool):
15         (WebCore::getInt):
16         (WebCore::putInt):
17         (WebCore::getVarInt):
18         (WebCore::putVarInt):
19         (WebCore::getString):
20         (WebCore::putString):
21         (WebCore::putIDBKeyPath):
22         (WebCore::compareKeys):
23         (WebCore::compareIndexKeys):
24         (WebCore::Comparator::compare):
25         (WebCore::Comparator::name):
26         (WebCore::isSchemaKnown):
27         (WebCore::setUpMetadata):
28         (WebCore::getMaxObjectStoreId):
29         (WebCore::DefaultLevelDBFactory::openLevelDB):
30         (WebCore::DefaultLevelDBFactory::destroyLevelDB):
31         (WebCore::IDBBackingStore::IDBBackingStore):
32         (WebCore::IDBBackingStore::~IDBBackingStore):
33         (WebCore::IDBBackingStore::open):
34         (WebCore::IDBBackingStore::openInMemory):
35         (WebCore::IDBBackingStore::create):
36         (WebCore::IDBBackingStore::getDatabaseNames):
37         (WebCore::IDBBackingStore::getIDBDatabaseMetaData):
38         (WebCore::getNewDatabaseId):
39         (WebCore::IDBBackingStore::createIDBDatabaseMetaData):
40         (WebCore::IDBBackingStore::updateIDBDatabaseIntVersion):
41         (WebCore::IDBBackingStore::updateIDBDatabaseMetaData):
42         (WebCore::deleteRange):
43         (WebCore::IDBBackingStore::deleteDatabase):
44         (WebCore::checkObjectStoreAndMetaDataType):
45         (WebCore::IDBBackingStore::getObjectStores):
46         (WebCore::setMaxObjectStoreId):
47         (WebCore::IDBBackingStore::createObjectStore):
48         (WebCore::IDBBackingStore::deleteObjectStore):
49         (WebCore::IDBBackingStore::getRecord):
50         (WebCore::getNewVersionNumber):
51         (WebCore::IDBBackingStore::putRecord):
52         (WebCore::IDBBackingStore::clearObjectStore):
53         (WebCore::IDBBackingStore::deleteRecord):
54         (WebCore::IDBBackingStore::getKeyGeneratorCurrentNumber):
55         (WebCore::IDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
56         (WebCore::IDBBackingStore::keyExistsInObjectStore):
57         (WebCore::checkIndexAndMetaDataKey):
58         (WebCore::IDBBackingStore::getIndexes):
59         (WebCore::setMaxIndexId):
60         (WebCore::IDBBackingStore::createIndex):
61         (WebCore::IDBBackingStore::deleteIndex):
62         (WebCore::IDBBackingStore::putIndexDataForRecord):
63         (WebCore::findGreatestKeyLessThanOrEqual):
64         (WebCore::versionExists):
65         (WebCore::IDBBackingStore::findKeyInIndex):
66         (WebCore::IDBBackingStore::getPrimaryKeyViaIndex):
67         (WebCore::IDBBackingStore::keyExistsInIndex):
68         (WebCore::IDBBackingStore::Cursor::Cursor):
69         (WebCore::IDBBackingStore::Cursor::firstSeek):
70         (WebCore::IDBBackingStore::Cursor::advance):
71         (WebCore::IDBBackingStore::Cursor::continueFunction):
72         (WebCore::IDBBackingStore::Cursor::haveEnteredRange):
73         (WebCore::IDBBackingStore::Cursor::isPastBounds):
74         (WebCore::ObjectStoreKeyCursorImpl::create):
75         (WebCore::ObjectStoreKeyCursorImpl::clone):
76         (WebCore::ObjectStoreKeyCursorImpl::value):
77         (WebCore::ObjectStoreKeyCursorImpl::encodeKey):
78         (WebCore::ObjectStoreKeyCursorImpl::ObjectStoreKeyCursorImpl):
79         (WebCore::ObjectStoreKeyCursorImpl::loadCurrentRow):
80         (WebCore::ObjectStoreCursorImpl::create):
81         (WebCore::ObjectStoreCursorImpl::clone):
82         (WebCore::ObjectStoreCursorImpl::value):
83         (WebCore::ObjectStoreCursorImpl::encodeKey):
84         (WebCore::ObjectStoreCursorImpl::ObjectStoreCursorImpl):
85         (WebCore::ObjectStoreCursorImpl::loadCurrentRow):
86         (WebCore::IndexKeyCursorImpl::create):
87         (WebCore::IndexKeyCursorImpl::clone):
88         (WebCore::IndexKeyCursorImpl::value):
89         (WebCore::IndexKeyCursorImpl::primaryKey):
90         (WebCore::IndexKeyCursorImpl::recordIdentifier):
91         (WebCore::IndexKeyCursorImpl::encodeKey):
92         (WebCore::IndexKeyCursorImpl::IndexKeyCursorImpl):
93         (WebCore::IndexKeyCursorImpl::loadCurrentRow):
94         (WebCore::IndexCursorImpl::create):
95         (WebCore::IndexCursorImpl::clone):
96         (WebCore::IndexCursorImpl::value):
97         (WebCore::IndexCursorImpl::primaryKey):
98         (WebCore::IndexCursorImpl::recordIdentifier):
99         (WebCore::IndexCursorImpl::encodeKey):
100         (WebCore::IndexCursorImpl::IndexCursorImpl):
101         (WebCore::IndexCursorImpl::loadCurrentRow):
102         (WebCore::objectStoreCursorOptions):
103         (WebCore::indexCursorOptions):
104         (WebCore::IDBBackingStore::openObjectStoreCursor):
105         (WebCore::IDBBackingStore::openObjectStoreKeyCursor):
106         (WebCore::IDBBackingStore::openIndexKeyCursor):
107         (WebCore::IDBBackingStore::openIndexCursor):
108         (WebCore::IDBBackingStore::Transaction::Transaction):
109         (WebCore::IDBBackingStore::Transaction::begin):
110         (WebCore::IDBBackingStore::Transaction::commit):
111         (WebCore::IDBBackingStore::Transaction::rollback):
112         * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBLevelDBCoding.cpp.
113         (WebCore::IDBLevelDBCoding::encodeByte):
114         (WebCore::IDBLevelDBCoding::decodeByte):
115         (WebCore::IDBLevelDBCoding::maxIDBKey):
116         (WebCore::IDBLevelDBCoding::minIDBKey):
117         (WebCore::IDBLevelDBCoding::encodeBool):
118         (WebCore::IDBLevelDBCoding::decodeBool):
119         (WebCore::IDBLevelDBCoding::encodeInt):
120         (WebCore::IDBLevelDBCoding::decodeInt):
121         (WebCore::IDBLevelDBCoding::compareInts):
122         (WebCore::IDBLevelDBCoding::encodeVarInt):
123         (WebCore::IDBLevelDBCoding::decodeVarInt):
124         (WebCore::IDBLevelDBCoding::encodeString):
125         (WebCore::IDBLevelDBCoding::decodeString):
126         (WebCore::IDBLevelDBCoding::encodeStringWithLength):
127         (WebCore::IDBLevelDBCoding::decodeStringWithLength):
128         (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength):
129         (WebCore::IDBLevelDBCoding::encodeDouble):
130         (WebCore::IDBLevelDBCoding::decodeDouble):
131         (WebCore::IDBLevelDBCoding::encodeIDBKey):
132         (WebCore::IDBLevelDBCoding::decodeIDBKey):
133         (WebCore::IDBLevelDBCoding::extractEncodedIDBKey):
134         (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType):
135         (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys):
136         (WebCore::IDBLevelDBCoding::encodeIDBKeyPath):
137         (WebCore::IDBLevelDBCoding::decodeIDBKeyPath):
138         (WebCore::IDBLevelDBCoding::compare):
139         (WebCore::IDBLevelDBCoding::KeyPrefix::KeyPrefix):
140         (WebCore::IDBLevelDBCoding::KeyPrefix::createWithSpecialIndex):
141         (WebCore::IDBLevelDBCoding::KeyPrefix::isValidDatabaseId):
142         (WebCore::IDBLevelDBCoding::KeyPrefix::isValidObjectStoreId):
143         (WebCore::IDBLevelDBCoding::KeyPrefix::isValidIndexId):
144         (WebCore::IDBLevelDBCoding::KeyPrefix::decode):
145         (WebCore::IDBLevelDBCoding::KeyPrefix::encodeEmpty):
146         (WebCore::IDBLevelDBCoding::KeyPrefix::encode):
147         (WebCore::IDBLevelDBCoding::KeyPrefix::encodeInternal):
148         (WebCore::IDBLevelDBCoding::KeyPrefix::compare):
149         (WebCore::IDBLevelDBCoding::KeyPrefix::type):
150         (WebCore::IDBLevelDBCoding::SchemaVersionKey::encode):
151         (WebCore::IDBLevelDBCoding::MaxDatabaseIdKey::encode):
152         (WebCore::IDBLevelDBCoding::DataVersionKey::encode):
153         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::DatabaseFreeListKey):
154         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::decode):
155         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encode):
156         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encodeMaxKey):
157         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::databaseId):
158         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::compare):
159         (WebCore::IDBLevelDBCoding::DatabaseNameKey::decode):
160         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encode):
161         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encodeMinKeyForOrigin):
162         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encodeStopKeyForOrigin):
163         (WebCore::IDBLevelDBCoding::DatabaseNameKey::compare):
164         (WebCore::IDBLevelDBCoding::DatabaseMetaDataKey::encode):
165         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::ObjectStoreMetaDataKey):
166         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::decode):
167         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encode):
168         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encodeMaxKey):
169         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::objectStoreId):
170         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::metaDataType):
171         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::compare):
172         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::IndexMetaDataKey):
173         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::decode):
174         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encode):
175         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encodeMaxKey):
176         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::compare):
177         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::indexId):
178         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::ObjectStoreFreeListKey):
179         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::decode):
180         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encode):
181         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encodeMaxKey):
182         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::objectStoreId):
183         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::compare):
184         (WebCore::IDBLevelDBCoding::IndexFreeListKey::IndexFreeListKey):
185         (WebCore::IDBLevelDBCoding::IndexFreeListKey::decode):
186         (WebCore::IDBLevelDBCoding::IndexFreeListKey::encode):
187         (WebCore::IDBLevelDBCoding::IndexFreeListKey::encodeMaxKey):
188         (WebCore::IDBLevelDBCoding::IndexFreeListKey::compare):
189         (WebCore::IDBLevelDBCoding::IndexFreeListKey::objectStoreId):
190         (WebCore::IDBLevelDBCoding::IndexFreeListKey::indexId):
191         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::decode):
192         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::encode):
193         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::compare):
194         (WebCore::IDBLevelDBCoding::IndexNamesKey::IndexNamesKey):
195         (WebCore::IDBLevelDBCoding::IndexNamesKey::decode):
196         (WebCore::IDBLevelDBCoding::IndexNamesKey::encode):
197         (WebCore::IDBLevelDBCoding::IndexNamesKey::compare):
198         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::decode):
199         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::encode):
200         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::compare):
201         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::userKey):
202         (WebCore::IDBLevelDBCoding::ExistsEntryKey::decode):
203         (WebCore::IDBLevelDBCoding::ExistsEntryKey::encode):
204         (WebCore::IDBLevelDBCoding::ExistsEntryKey::compare):
205         (WebCore::IDBLevelDBCoding::ExistsEntryKey::userKey):
206         (WebCore::IDBLevelDBCoding::IndexDataKey::IndexDataKey):
207         (WebCore::IDBLevelDBCoding::IndexDataKey::decode):
208         (WebCore::IDBLevelDBCoding::IndexDataKey::encode):
209         (WebCore::IDBLevelDBCoding::IndexDataKey::encodeMinKey):
210         (WebCore::IDBLevelDBCoding::IndexDataKey::encodeMaxKey):
211         (WebCore::IDBLevelDBCoding::IndexDataKey::compare):
212         (WebCore::IDBLevelDBCoding::IndexDataKey::databaseId):
213         (WebCore::IDBLevelDBCoding::IndexDataKey::objectStoreId):
214         (WebCore::IDBLevelDBCoding::IndexDataKey::indexId):
215         (WebCore::IDBLevelDBCoding::IndexDataKey::userKey):
216         (WebCore::IDBLevelDBCoding::IndexDataKey::primaryKey):
217         * Modules/indexeddb/leveldb/IDBLevelDBCoding.h: Renamed from Source/WebCore/Modules/indexeddb/IDBLevelDBCoding.h.
218         (WebCore::IDBLevelDBCoding::encodeIntSafely):
219         (WebCore::IDBLevelDBCoding::KeyPrefix::validIds):
220         (WebCore::IDBLevelDBCoding::DatabaseNameKey::origin):
221         (WebCore::IDBLevelDBCoding::DatabaseNameKey::databaseName):
222         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::metaDataType):
223         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::objectStoreName):
224         (WebCore::IDBLevelDBCoding::IndexNamesKey::indexName):
225
226 2013-09-23  Antti Koivisto  <antti@apple.com>
227
228         Try to fix GTK build.
229         
230         Not reviewed.
231
232         * accessibility/atk/AccessibilityObjectAtk.cpp:
233         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
234         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
235         (textForRenderer):
236
237 2013-09-23  Alexandru Chiculita  <achicu@adobe.com>
238
239         Web Inspector: [CSS Regions] Display CSS Regions flow name in the inspector overlay
240         https://bugs.webkit.org/show_bug.cgi?id=121794
241
242         Reviewed by Joseph Pecoraro.
243
244         No new tests, the previous test for CSS Regions highlighting covers the flow name.
245
246         This patch adds the "Flow" property in the inspector overlay. The region
247         chain is already displayed with numbers, so it makes sense to have the flow 
248         name around when a CSS region is highlighted.
249
250         I've consolidated the flow information into "elementInfo.flowInfo". 
251         Flow info has two properties: "name" and "regions".
252
253         * inspector/InspectorOverlay.cpp:
254         (WebCore::buildObjectForCSSRegionsHighlight):
255         (WebCore::InspectorOverlay::buildObjectForHighlightedNode):
256         * inspector/InspectorOverlayPage.css:
257         (.css-property): Added the CSS property font color that the Inspector uses.
258         * inspector/InspectorOverlayPage.html: Added a new element to be used to display the flow-from property.
259         * inspector/InspectorOverlayPage.js:
260         (_drawElementTitle):
261         (drawNodeHighlight):
262
263 2013-09-23  Simon Fraser  <simon.fraser@apple.com>
264
265         Rapidly loading pages can result in !needsLayout() assertions in FrameView::paintContents() and RenderView::paint()
266         https://bugs.webkit.org/show_bug.cgi?id=121725
267         <rdar://problem/13982161> ASSERT(!needsLayout()) in WebCore::RenderView::paint (121196)
268
269         Reviewed by Dean Jackson.
270         
271         Layout has to be up-to-date before we paint, and when composited we rely on a
272         CFRunLoopObserver owned by LayerFlushScheduler to enforce this. The contract is
273         that changes to GraphicsLayers accumulate in those layers, and are all pushed to
274         CALayers only inside of flushCompositingState(). CALayers must not be touched
275         directly outside of flushCompositingState(), since this may trigger a CA commit
276         and resultant painting without us having updated layout.
277         
278         In addition, we rely on the CA commits only happening after our runloop observer
279         has fired in order for LayerFlushScheduler's suspend/resume to work (these are used
280         for freezing the layer tree during page transitions).
281         
282         However, TileController was violating this contract. It called revalidateTiles()
283         at random times, and on a timer. This would result in CA commits happening when
284         layer flushing was suspended at the LayerFlushScheduler level, and thus before
285         we'd had a chance to do layout.
286         
287         Fix by only ever revalidatingTiles inside of flushCompositingState(). Calls
288         that used to result in revalidateTiles() at other times now just set a bit
289         on GraphicsLayerCA to indicate that revalidation is required, and this triggers
290         a later flush like any other GraphicsLayerCA change.
291         
292         There is one exception to the revalidate-inside-flush rule: when purging
293         files for background tabs on a timer, we are only dealing with an unparented
294         layer tree, so CALayer manipulation is safe at any time.
295
296         Very timing dependent, so hard to test.
297
298         * platform/graphics/TiledBacking.h: Expose revalidateTiles()
299         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Remove
300         platformCALayerDidCreateTiles() override.
301         * platform/graphics/ca/GraphicsLayerCA.h: Keep track of m_isCommittingChanges
302         so we can assert. Add TilingAreaChanged flag.
303         * platform/graphics/ca/GraphicsLayerCA.cpp:
304         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
305         (WebCore::GraphicsLayerCA::recursiveCommitChanges): noteSublayersChanged() is
306         used inside of a commit in some cases to trigger a parent layer to update
307         children after the children have been processed. To avoid trying to pointlessly
308         schedule the flusher inside a flush, and for strong assertions, use a new flag
309         that indicates that flushing is not required in this situation.
310         Set the m_isCommittingChanges flag around committing state.
311         (WebCore::GraphicsLayerCA::platformCALayerSetNeedsToRevalidateTiles): We used
312         to use platformCALayerDidCreateTiles() to ensure that we would flush after adding
313         new tiles to avoid garbage flashes. Now that we only ever create tiles inside
314         a flush, this is no longer necessary.
315         The new platformCALayerSetNeedsToRevalidateTiles() function just sets the
316         TilingAreaChanged flag and triggers a flush.
317         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): After updating
318         visible rect, we look for the TilingAreaChanged flag to tell us whether to
319         revalidate TiledBacking tiles.
320         (WebCore::GraphicsLayerCA::ensureStructuralLayer): Use DontScheduleFlush when 
321         telling a parent layer that it needs to reconsider sublayers.
322         (WebCore::GraphicsLayerCA::updateTiles): The caller of revalidateTiles().
323         (WebCore::GraphicsLayerCA::updateContentsRects): DontScheduleFlush again.
324         (WebCore::GraphicsLayerCA::noteSublayersChanged): Pass scheduleFlush along.
325         (WebCore::GraphicsLayerCA::noteLayerPropertyChanged): Handle scheduleFlush.
326         * platform/graphics/ca/PlatformCALayerClient.h:
327         (WebCore::PlatformCALayerClient::platformCALayerSetNeedsToRevalidateTiles): Added
328         so that TileController can call back out to GraphicsLayerCA.
329         (WebCore::PlatformCALayerClient::isCommittingChanges):
330         * platform/graphics/ca/mac/TileController.h: Need to keep track of secondary
331         coverage rects in m_secondaryTileCoverageRects.
332         * platform/graphics/ca/mac/TileController.mm:
333         (WebCore::TileController::tileCacheLayerBoundsChanged): Just trigger a tile revalidate,
334         which will happen later in this same commit.
335         (WebCore::TileController::setScale): This is called inside the commit. Does an extra
336         revalidate, which is needed to prune tiles. This could be optimized in future.
337         (WebCore::TileController::setVisibleRect): Assert that we're inside a commit,
338         and trigger a revalidate.
339         (WebCore::TileController::setExposedRect): Trigger a revalidate.
340         (WebCore::TileController::setClipsToExposedRect): Ditto.
341         (WebCore::TileController::prepopulateRect): Save the rect and trigger a revalidate.
342         (WebCore::TileController::setIsInWindow): If we're in the window, trigger a revalidate
343         otherwise schedule the timer.
344         (WebCore::TileController::revalidateTiles): Wrapper for the real revalidateTiles().
345         (WebCore::TileController::tileRevalidationTimerFired): If we're in the window,
346         schedule a revalidate. Otherwise our layer tree is disconnected, and it's OK to call revalidateTiles().
347         (WebCore::TileController::setNeedsRevalidateTiles): Call through the client to GraphicsLayerCA
348         which will schedule a layer tree flush.
349         (WebCore::TileController::revalidateTiles):
350         (WebCore::TileController::ensureTilesForRect): Move code from prepopulateRect
351         into here; ensureTilesForRect() for each secondary rect, then clear the rects.
352         No need to call platformCALayerDidCreateTiles() at the end.
353         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: Remove
354         platformCALayerDidCreateTiles() override.
355         * rendering/RenderLayerCompositor.cpp:
356         (WebCore::RenderLayerCompositor::scheduleLayerFlush): This should only be
357         called when we're not inside a flush, otherwise it will fail to schedule
358         another one.
359
360 2013-09-23  Sam Weinig  <sam@webkit.org>
361
362         CTTE: htmlediting.h Element creation function should take a Document&
363         https://bugs.webkit.org/show_bug.cgi?id=121800
364
365         Reviewed by Antti Koivisto.
366
367         Thread the Document&!
368
369 2013-09-23  Jacky Jiang  <zhajiang@blackberry.com>
370
371         [BlackBerry] Poor rendering opening a Google map short link
372         https://bugs.webkit.org/show_bug.cgi?id=121687
373
374         Reviewed by Yong Li.
375         Internally reviewed by Liam Quinn and Joe Mason.
376
377         Fix a regression. It turns out that LayerCompositingThread already has
378         an API named isVisible() which by default returns false. So rename the
379         one in the LayerData to isLayerVisible().
380
381         * platform/graphics/blackberry/LayerData.h:
382         (WebCore::LayerData::isLayerVisible):
383         * platform/graphics/blackberry/LayerRenderer.cpp:
384         (WebCore::LayerRenderer::compositeLayersRecursive):
385
386 2013-09-23  Antti Koivisto  <antti@apple.com>
387
388         Rename RenderObject::first/lastChild to RenderObject::first/lastChildSlow
389         https://bugs.webkit.org/show_bug.cgi?id=121784
390
391         Reviewed by Andreas Kling.
392
393         This will make it obvious in code where typing should be tightened.
394         Handled some simple cases by tightening the code instead of renaming.
395
396 2013-09-23  ChangSeok Oh  <changseok.oh@collabora.com>
397
398         [Texmap] Reloading a webgl page doesn't work
399         https://bugs.webkit.org/show_bug.cgi?id=120593
400
401         Reviewed by Noam Rosenthal.
402
403         Let GraphicsLayerTextureMapper know it needs to detach the platform layer when a GraphicsContext3D is destroyed.
404
405         Test: fast/canvas/webgl/webgl-reload-crash.html
406
407         * platform/graphics/GraphicsContext3DPrivate.cpp:
408         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
409         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
410         * platform/graphics/texmap/TextureMapperPlatformLayer.h:
411
412 2013-09-23  Antti Koivisto  <antti@apple.com>
413
414         Remove RenderObjectChildList
415         https://bugs.webkit.org/show_bug.cgi?id=121771
416
417         Reviewed by Darin Adler.
418
419         Most RenderElement subclasses have m_children member (>90% of instances on typical page). It is not worth optimising
420         for memory for the few cases that don't (RenderImage, RenderLineBreak mostly) in expense of performance.
421         
422         This patch moves child handling to RenderElement. This gets rid of virtual children() calls and simplifies the code.
423
424 2013-09-23  Andreas Kling  <akling@apple.com>
425
426         Document::destroyRenderTree() shouldn't do anything but.
427         <https://webkit.org/b/121786>
428
429         Reviewed by Anders Carlsson.
430
431         Move everything in destroyRenderTree() that doesn't actually destroy
432         render trees to prepareForDestruction() instead.
433
434         Destroying the render tree is now a reparable operation.
435
436 2013-09-23  Allan Sandfeld Jensen  <allan.jensen@digia.com>
437
438         [Qt] Tiled backing-store causes wrong translation
439         https://bugs.webkit.org/show_bug.cgi?id=121789
440
441         Reviewed by Noam Rosenthal.
442
443         Move the translation inside save/restore of the GraphicsContext.
444
445         * platform/graphics/qt/TileQt.cpp:
446         (WebCore::TileQt::updateBackBuffer):
447
448 2013-09-23  Andreas Kling  <akling@apple.com>
449
450         Unify code paths leading to render tree teardown.
451         <https://webkit.org/b/121785>
452
453         Reviewed by Antti Koivisto.
454
455         Make Document::prepareForDestruction() fit all the call sites that were
456         doing destroyRenderTree() + disconnectFromFrame().
457
458         - disconnectDescendantFrames() is already a no-op if there are no frames.
459         - willDetachDocumentFromFrame() will only run if there is a frame.
460
461         This is another step towards making tree rebuild possible.
462
463         Removed some age-old FIXMEs about why we aren't calling willRemove(),
464         a long-gone function.
465
466 2013-09-23  Patrick Gansterer  <paroga@webkit.org>
467
468         Cleanup CMake files in WebCore
469         https://bugs.webkit.org/show_bug.cgi?id=119262
470
471         Reviewed by Gyuyoung Kim.
472
473         Sort files and unify style.
474
475         * CMakeLists.txt:
476         * PlatformBlackBerry.cmake:
477         * PlatformEfl.cmake:
478         * PlatformGTK.cmake:
479         * PlatformWin.cmake:
480         * PlatformWinCE.cmake:
481
482 2013-09-22  Commit Queue  <commit-queue@webkit.org>
483
484         Unreviewed, rolling out r156254.
485         http://trac.webkit.org/changeset/156254
486         https://bugs.webkit.org/show_bug.cgi?id=121779
487
488         Caused assertions in fast/regions tests (Requested by ap on
489         #webkit).
490
491         * CMakeLists.txt:
492         * GNUmakefile.list.am:
493         * Target.pri:
494         * WebCore.vcxproj/WebCore.vcxproj:
495         * WebCore.xcodeproj/project.pbxproj:
496         * rendering/AutoTableLayout.cpp:
497         (WebCore::AutoTableLayout::recalcColumn):
498         * rendering/RenderBlock.cpp:
499         (WebCore::RenderBlock::willBeDestroyed):
500         (WebCore::RenderBlock::addChildToAnonymousColumnBlocks):
501         (WebCore::RenderBlock::splitBlocks):
502         (WebCore::RenderBlock::splitFlow):
503         (WebCore::RenderBlock::makeChildrenAnonymousColumnBlocks):
504         (WebCore::RenderBlock::makeChildrenNonInline):
505         (WebCore::RenderBlock::removeLeftoverAnonymousBlock):
506         (WebCore::RenderBlock::collapseAnonymousBoxChild):
507         (WebCore::RenderBlock::removeChild):
508         (WebCore::RenderBlock::updateFirstLetterStyle):
509         * rendering/RenderBlock.h:
510         (WebCore::RenderBlock::firstChild):
511         (WebCore::RenderBlock::lastChild):
512         * rendering/RenderBox.cpp:
513         (WebCore::RenderBox::splitAnonymousBoxesAroundChild):
514         * rendering/RenderBoxModelObject.cpp:
515         (WebCore::RenderBoxModelObject::moveChildTo):
516         * rendering/RenderElement.cpp:
517         (WebCore::RenderElement::RenderElement):
518         (WebCore::RenderElement::addChild):
519         (WebCore::RenderElement::removeChild):
520         * rendering/RenderElement.h:
521         * rendering/RenderEmbeddedObject.cpp:
522         (WebCore::RenderEmbeddedObject::layout):
523         * rendering/RenderEmbeddedObject.h:
524         * rendering/RenderFrameSet.h:
525         * rendering/RenderInline.cpp:
526         (WebCore::RenderInline::willBeDestroyed):
527         (WebCore::RenderInline::splitInlines):
528         (WebCore::RenderInline::splitFlow):
529         (WebCore::RenderInline::childBecameNonInline):
530         * rendering/RenderInline.h:
531         (WebCore::RenderInline::firstChild):
532         (WebCore::RenderInline::lastChild):
533         * rendering/RenderLayerModelObject.cpp:
534         (WebCore::RenderLayerModelObject::willBeDestroyed):
535         * rendering/RenderLineBreak.h:
536         * rendering/RenderListMarker.h:
537         * rendering/RenderMedia.cpp:
538         (WebCore::RenderMedia::layout):
539         * rendering/RenderMedia.h:
540         (WebCore::RenderMedia::firstChild):
541         (WebCore::RenderMedia::lastChild):
542         * rendering/RenderObject.cpp:
543         (WebCore::RenderObject::handleDynamicFloatPositionChange):
544         (WebCore::RenderObject::willBeDestroyed):
545         (WebCore::RenderObject::removeFromRenderFlowThreadRecursive):
546         * rendering/RenderObject.h:
547         (WebCore::RenderObject::firstChild):
548         (WebCore::RenderObject::lastChild):
549         (WebCore::RenderObject::children):
550         (WebCore::RenderObject::canHaveChildren):
551         * rendering/RenderObjectChildList.cpp: Added.
552         (WebCore::RenderObjectChildList::destroyLeftoverChildren):
553         (WebCore::RenderObjectChildList::removeChildNode):
554         (WebCore::RenderObjectChildList::insertChildNode):
555         * rendering/RenderObjectChildList.h: Copied from Source/WebCore/rendering/RenderMedia.h.
556         (WebCore::RenderObjectChildList::RenderObjectChildList):
557         (WebCore::RenderObjectChildList::firstChild):
558         (WebCore::RenderObjectChildList::lastChild):
559         (WebCore::RenderObjectChildList::setFirstChild):
560         (WebCore::RenderObjectChildList::setLastChild):
561         (WebCore::RenderObjectChildList::appendChildNode):
562         * rendering/RenderReplaced.h:
563         (WebCore::RenderReplaced::canHaveChildren):
564         * rendering/RenderReplica.h:
565         * rendering/RenderRubyBase.cpp:
566         (WebCore::RenderRubyBase::moveInlineChildren):
567         (WebCore::RenderRubyBase::moveBlockChildren):
568         * rendering/RenderTableCol.h:
569         * rendering/RenderTableRow.h:
570         * rendering/RenderTableSection.h:
571         * rendering/RenderText.h:
572         * rendering/RenderingAllInOne.cpp:
573         * rendering/mathml/RenderMathMLOperator.cpp:
574         (WebCore::RenderMathMLOperator::updateFromElement):
575         * rendering/svg/RenderSVGContainer.h:
576         (WebCore::RenderSVGContainer::firstChild):
577         (WebCore::RenderSVGContainer::lastChild):
578         * rendering/svg/RenderSVGGradientStop.h:
579         * rendering/svg/RenderSVGImage.h:
580         * rendering/svg/RenderSVGModelObject.cpp:
581         (WebCore::RenderSVGModelObject::willBeDestroyed):
582         * rendering/svg/RenderSVGRoot.h:
583         * rendering/svg/RenderSVGShape.h:
584
585 2013-09-22  Commit Queue  <commit-queue@webkit.org>
586
587         Unreviewed, rolling out r156253.
588         http://trac.webkit.org/changeset/156253
589         https://bugs.webkit.org/show_bug.cgi?id=121778
590
591         Caused >20 tests to crash with assertion failures (Requested
592         by ap on #webkit).
593
594         * css/CSSAspectRatioValue.h:
595         * css/CSSBorderImageSliceValue.h:
596         * css/CSSCalculationValue.cpp:
597         (WebCore::CSSCalcExpressionNodeParser::parseValue):
598         * css/CSSCalculationValue.h:
599         * css/CSSCrossfadeValue.cpp:
600         (WebCore::subimageKnownToBeOpaque):
601         * css/CSSCrossfadeValue.h:
602         (WebCore::toCSSCrossfadeValue):
603         * css/CSSCursorImageValue.cpp:
604         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
605         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
606         (WebCore::CSSCursorImageValue::cachedImage):
607         (WebCore::CSSCursorImageValue::cachedOrPendingImage):
608         (WebCore::CSSCursorImageValue::isSVGCursor):
609         * css/CSSCursorImageValue.h:
610         * css/CSSFilterImageValue.h:
611         (WebCore::toCSSFilterImageValue):
612         * css/CSSFontSelector.cpp:
613         (WebCore::CSSFontSelector::addFontFaceRule):
614         * css/CSSGradientValue.h:
615         * css/CSSImageGeneratorValue.cpp:
616         (WebCore::CSSImageGeneratorValue::image):
617         (WebCore::CSSImageGeneratorValue::fixedSize):
618         (WebCore::CSSImageGeneratorValue::loadSubimages):
619         (WebCore::CSSImageGeneratorValue::subimageIsPending):
620         (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
621         * css/CSSImageGeneratorValue.h:
622         * css/CSSImageSetValue.cpp:
623         (WebCore::CSSImageSetValue::fillImageSet):
624         * css/CSSImageSetValue.h:
625         * css/CSSImageValue.h:
626         * css/CSSInheritedValue.h:
627         * css/CSSInitialValue.h:
628         * css/CSSLineBoxContainValue.h:
629         * css/CSSParser.cpp:
630         (WebCore::CSSParser::parseColor):
631         (WebCore::CSSParser::addProperty):
632         (WebCore::CSSParser::parse3ValuesFillPosition):
633         (WebCore::CSSParser::parseFillPosition):
634         (WebCore::CSSParser::parseFillRepeat):
635         (WebCore::CSSParser::parseDeprecatedRadialGradient):
636         (WebCore::CSSParser::parseRadialGradient):
637         * css/CSSPrimitiveValue.h:
638         * css/CSSReflectValue.h:
639         * css/CSSToStyleMap.cpp:
640         (WebCore::CSSToStyleMap::mapFillAttachment):
641         (WebCore::CSSToStyleMap::mapFillClip):
642         (WebCore::CSSToStyleMap::mapFillComposite):
643         (WebCore::CSSToStyleMap::mapFillBlendMode):
644         (WebCore::CSSToStyleMap::mapFillOrigin):
645         (WebCore::CSSToStyleMap::mapFillRepeatX):
646         (WebCore::CSSToStyleMap::mapFillRepeatY):
647         (WebCore::CSSToStyleMap::mapFillSize):
648         (WebCore::CSSToStyleMap::mapFillXPosition):
649         (WebCore::CSSToStyleMap::mapFillYPosition):
650         (WebCore::CSSToStyleMap::mapFillMaskSourceType):
651         (WebCore::CSSToStyleMap::mapAnimationDelay):
652         (WebCore::CSSToStyleMap::mapAnimationDirection):
653         (WebCore::CSSToStyleMap::mapAnimationDuration):
654         (WebCore::CSSToStyleMap::mapAnimationFillMode):
655         (WebCore::CSSToStyleMap::mapAnimationIterationCount):
656         (WebCore::CSSToStyleMap::mapAnimationName):
657         (WebCore::CSSToStyleMap::mapAnimationPlayState):
658         (WebCore::CSSToStyleMap::mapAnimationProperty):
659         (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
660         (WebCore::CSSToStyleMap::mapNinePieceImageSlice):
661         (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
662         (WebCore::CSSToStyleMap::mapNinePieceImageRepeat):
663         * css/CSSValue.cpp:
664         (WebCore::CSSValue::destroy):
665         * css/CSSValue.h:
666         (WebCore::CSSValue::isCSSLineBoxContainValue):
667         (WebCore::CSSValue::isCalculationValue):
668         * css/CSSValueList.h:
669         * css/CSSVariableValue.h:
670         * css/DeprecatedStyleBuilder.cpp:
671         (WebCore::ApplyPropertyDefault::applyValue):
672         (WebCore::ApplyPropertyNumber::applyValue):
673         (WebCore::ApplyPropertyAuto::applyValue):
674         (WebCore::ApplyPropertyClip::applyValue):
675         (WebCore::ApplyPropertyColor::applyValue):
676         (WebCore::ApplyPropertyLength::applyValue):
677         (WebCore::ApplyPropertyString::applyValue):
678         (WebCore::ApplyPropertyBorderRadius::applyValue):
679         (WebCore::ApplyPropertyComputeLength::applyValue):
680         (WebCore::ApplyPropertyFont::applyValue):
681         (WebCore::ApplyPropertyFontFamily::applyValue):
682         (WebCore::ApplyPropertyFontSize::applyValue):
683         (WebCore::ApplyPropertyFontWeight::applyValue):
684         (WebCore::ApplyPropertyFontVariantLigatures::applyValue):
685         (WebCore::ApplyPropertyCounter::applyValue):
686         (WebCore::ApplyPropertyCursor::applyValue):
687         (WebCore::ApplyPropertyTextAlign::applyValue):
688         (WebCore::ApplyPropertyTextDecoration::applyValue):
689         (WebCore::ApplyPropertyMarqueeIncrement::applyValue):
690         (WebCore::ApplyPropertyMarqueeRepetition::applyValue):
691         (WebCore::ApplyPropertyMarqueeSpeed::applyValue):
692         (WebCore::ApplyPropertyTextUnderlinePosition::applyValue):
693         (WebCore::ApplyPropertyLineHeight::applyValue):
694         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue):
695         (WebCore::ApplyPropertyPageSize::applyValue):
696         (WebCore::ApplyPropertyTextEmphasisStyle::applyValue):
697         (WebCore::ApplyPropertyResize::applyValue):
698         (WebCore::ApplyPropertyVerticalAlign::applyValue):
699         (WebCore::ApplyPropertyAspectRatio::applyValue):
700         (WebCore::ApplyPropertyZoom::applyValue):
701         (WebCore::ApplyPropertyDisplay::applyValue):
702         (WebCore::ApplyPropertyClipPath::applyValue):
703         (WebCore::ApplyPropertyShape::applyValue):
704         (WebCore::ApplyPropertyImageResolution::applyValue):
705         (WebCore::ApplyPropertyTextIndent::applyValue):
706         * css/FontFeatureValue.h:
707         * css/FontValue.h:
708         * css/MediaList.cpp:
709         (WebCore::reportMediaQueryWarningIfNeeded):
710         * css/MediaQueryEvaluator.cpp:
711         (WebCore::compareAspectRatioValue):
712         (WebCore::numberValue):
713         (WebCore::orientationMediaFeatureEval):
714         (WebCore::evalResolution):
715         (WebCore::device_pixel_ratioMediaFeatureEval):
716         (WebCore::resolutionMediaFeatureEval):
717         (WebCore::computeLength):
718         (WebCore::view_modeMediaFeatureEval):
719         (WebCore::pointerMediaFeatureEval):
720         * css/SVGCSSStyleSelector.cpp:
721         (WebCore::StyleResolver::applySVGProperty):
722         * css/ShadowValue.h:
723         * css/StylePropertySet.cpp:
724         (WebCore::StylePropertySet::getLayeredShorthandValue):
725         * css/StyleResolver.cpp:
726         (WebCore::createGridTrackSize):
727         (WebCore::createGridTrackList):
728         (WebCore::createGridPosition):
729         (WebCore::hasVariableReference):
730         (WebCore::StyleResolver::applyProperty):
731         (WebCore::StyleResolver::styleImage):
732         (WebCore::StyleResolver::generatedOrPendingFromValue):
733         (WebCore::StyleResolver::styleShader):
734         (WebCore::StyleResolver::parseCustomFilterArrayParameter):
735         (WebCore::StyleResolver::parseCustomFilterColorParameter):
736         (WebCore::StyleResolver::parseCustomFilterNumberParameter):
737         (WebCore::StyleResolver::parseCustomFilterParameter):
738         (WebCore::StyleResolver::parseCustomFilterParameterList):
739         (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
740         (WebCore::StyleResolver::createFilterOperations):
741         * css/TransformFunctions.cpp:
742         (WebCore::transformsForValue):
743         * css/ViewportStyleResolver.cpp:
744         (WebCore::ViewportStyleResolver::getViewportArgumentValue):
745         * css/WebKitCSSMatrix.cpp:
746         (WebCore::WebKitCSSMatrix::setMatrixValue):
747         * editing/ApplyStyleCommand.cpp:
748         (WebCore::ApplyStyleCommand::computedFontSize):
749         * editing/EditingStyle.cpp:
750         (WebCore::identifierForStyleProperty):
751         (WebCore::HTMLElementEquivalent::valueIsPresentInStyle):
752         (WebCore::cssValueToRGBA):
753         (WebCore::EditingStyle::extractFontSizeDelta):
754         (WebCore::EditingStyle::textDirection):
755         (WebCore::EditingStyle::prepareToApplyAt):
756         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
757         (WebCore::EditingStyle::legacyFontSize):
758         (WebCore::EditingStyle::textDirectionForSelection):
759         (WebCore::StyleChange::extractTextStyles):
760         (WebCore::fontWeightIsBold):
761         (WebCore::isTransparentColorValue):
762         * editing/markup.cpp:
763         (WebCore::propertyMissingOrEqualToNone):
764         * page/PageSerializer.cpp:
765         (WebCore::PageSerializer::retrieveResourcesForProperties):
766         * rendering/style/StylePendingImage.h:
767         (WebCore::StylePendingImage::data):
768         (WebCore::StylePendingImage::cssImageValue):
769         (WebCore::StylePendingImage::cssImageGeneratorValue):
770         (WebCore::StylePendingImage::cssCursorImageValue):
771         (WebCore::StylePendingImage::cssImageSetValue):
772
773 2013-09-22  Commit Queue  <commit-queue@webkit.org>
774
775         Unreviewed, rolling out r156257.
776         http://trac.webkit.org/changeset/156257
777         https://bugs.webkit.org/show_bug.cgi?id=121777
778
779         The test from this patch fails (Requested by ap on #webkit).
780
781         * rendering/RenderBox.cpp:
782         (WebCore::RenderBox::calculateAutoscrollDirection):
783
784 2013-09-22  Antonio Gomes  <a1.gomes@sisa.samsung.com>
785
786         iframe and scrollbar with "overflow:auto" should support autoscroll with mousedrag
787         https://bugs.webkit.org/show_bug.cgi?id=40981
788
789         Reviewed by Darin Adler.
790
791         RenderBox::calculateAutoscrollDirection does not properly translate
792         inner frames' coordinates in order to determine its auto-scrollability.
793         By coincidence, if the inner frame box it placed near to page's 0, 0 position
794         (upper left corner), it might work.
795
796         Patch fixes it by changing ::calculateAutoscrollDirection algorithm to operate
797         with window coordinates, taking inner frames offset and scroll position into account.
798         The behavior of auto-scrollable non-frame overflow boxes, including divs, still works
799         as it is used to.
800
801         Test: fast/events/drag-and-drop-autoscroll-inner-frame.html
802
803         * rendering/RenderBox.cpp:
804         (WebCore::RenderBox::calculateAutoscrollDirection):
805
806 2013-09-22  Sam Weinig  <sam@webkit.org>
807
808         CTTE: Use references more in ContainerNode, ContainerNodeAlgorithms and related classes
809         https://bugs.webkit.org/show_bug.cgi?id=121772
810
811         Reviewed by Andreas Kling.
812
813         Use references for never null Nodes in ContainerNode and related classes.
814
815 2013-09-22  Antti Koivisto  <antti@apple.com>
816
817         Fix functions calling to RenderObject superclass to call RenderElement instead
818         https://bugs.webkit.org/show_bug.cgi?id=121773
819
820         Reviewed by Andreas Kling.
821
822         The class hierarchy has a new class. Superclass calls should be pointed there instead to
823         avoid future bugs.
824
825         * rendering/RenderBoxModelObject.cpp:
826         (WebCore::RenderBoxModelObject::setSelectionState):
827         * rendering/RenderLayerModelObject.cpp:
828         (WebCore::RenderLayerModelObject::styleWillChange):
829         (WebCore::RenderLayerModelObject::styleDidChange):
830         * rendering/svg/RenderSVGGradientStop.cpp:
831         (WebCore::RenderSVGGradientStop::styleDidChange):
832         * rendering/svg/RenderSVGModelObject.cpp:
833         (WebCore::RenderSVGModelObject::styleWillChange):
834         (WebCore::RenderSVGModelObject::styleDidChange):
835
836 2013-09-22  Antti Koivisto  <antti@apple.com>
837
838         Remove RenderObjectChildList
839         https://bugs.webkit.org/show_bug.cgi?id=121771
840
841         Reviewed by Darin Adler.
842
843         Most RenderElement subclasses have m_children member (>90% of instances on typical page). It is not worth optimising
844         for memory for the few cases that don't (RenderImage, RenderLineBreak mostly) in expense of performance.
845         
846         This patch moves child handling to RenderElement. This gets rid of virtual children() calls and simplifies the code.
847
848 2013-09-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
849
850         Introduce CSS_VALUE_TYPE_CASTS macro in order to cast CSSValue type
851         https://bugs.webkit.org/show_bug.cgi?id=121462
852
853         Reviewed by Andreas Kling.
854
855         As r155429 introduced ELEMENT_TYPE_CASTS, CSS_VALUE_TYPE_CASTS can be used
856         by css value type casting as well. This type cast macros will help to detect
857         bad-cast bugs as well as improve a code readibility.
858
859         This patch adds the following methods,
860
861         - CSSFooValue* toCSSFooValue(CSSValue*)
862         - const CSSFooValue* toCSSFooValue(const CSSValue*)
863
864         To be consistent with other is*Value() naming style, isCSSLineBoxContainValue() and isCalculationValue()
865         are changed with isLineBoxContainValue() and isCalcValue().
866
867         FontValue, FontFeatureValue, ShadowValue have a manual type case function because of different
868         class naming style. So, toFontValue(), toFontFeatureValue() and toShadowValue() are added manually.
869
870         This patch removes unnecessary local variables.
871
872         No new tests, no behavior change.
873
874         * css/CSSAspectRatioValue.h:
875         * css/CSSBorderImageSliceValue.h:
876         * css/CSSCalculationValue.cpp:
877         (WebCore::CSSCalcExpressionNodeParser::parseValue):
878         * css/CSSCalculationValue.h:
879         * css/CSSCrossfadeValue.cpp:
880         (WebCore::subimageKnownToBeOpaque):
881         * css/CSSCrossfadeValue.h:
882         * css/CSSCursorImageValue.cpp:
883         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
884         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
885         (WebCore::CSSCursorImageValue::cachedImage):
886         (WebCore::CSSCursorImageValue::cachedOrPendingImage):
887         (WebCore::CSSCursorImageValue::isSVGCursor):
888         * css/CSSCursorImageValue.h:
889         * css/CSSFilterImageValue.h:
890         * css/CSSFontSelector.cpp:
891         (WebCore::CSSFontSelector::addFontFaceRule):
892         * css/CSSGradientValue.h:
893         * css/CSSImageGeneratorValue.cpp:
894         (WebCore::CSSImageGeneratorValue::image):
895         (WebCore::CSSImageGeneratorValue::fixedSize):
896         (WebCore::CSSImageGeneratorValue::loadSubimages):
897         (WebCore::CSSImageGeneratorValue::subimageIsPending):
898         (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
899         * css/CSSImageGeneratorValue.h:
900         * css/CSSImageSetValue.cpp:
901         (WebCore::CSSImageSetValue::fillImageSet):
902         * css/CSSImageSetValue.h:
903         * css/CSSImageValue.h:
904         * css/CSSInheritedValue.h:
905         * css/CSSInitialValue.h:
906         * css/CSSLineBoxContainValue.h:
907         * css/CSSParser.cpp:
908         (WebCore::CSSParser::parseColor):
909         (WebCore::CSSParser::addProperty):
910         (WebCore::CSSParser::parse3ValuesFillPosition):
911         (WebCore::CSSParser::parseFillPosition):
912         (WebCore::CSSParser::parseFillRepeat):
913         (WebCore::CSSParser::parseDeprecatedRadialGradient):
914         (WebCore::CSSParser::parseRadialGradient):
915         * css/CSSPrimitiveValue.h:
916         * css/CSSReflectValue.h:
917         * css/CSSToStyleMap.cpp:
918         (WebCore::CSSToStyleMap::mapFillAttachment):
919         (WebCore::CSSToStyleMap::mapFillClip):
920         (WebCore::CSSToStyleMap::mapFillComposite):
921         (WebCore::CSSToStyleMap::mapFillBlendMode):
922         (WebCore::CSSToStyleMap::mapFillOrigin):
923         (WebCore::CSSToStyleMap::mapFillRepeatX):
924         (WebCore::CSSToStyleMap::mapFillRepeatY):
925         (WebCore::CSSToStyleMap::mapFillSize):
926         (WebCore::CSSToStyleMap::mapFillXPosition):
927         (WebCore::CSSToStyleMap::mapFillYPosition):
928         (WebCore::CSSToStyleMap::mapFillMaskSourceType):
929         (WebCore::CSSToStyleMap::mapAnimationDelay):
930         (WebCore::CSSToStyleMap::mapAnimationDirection):
931         (WebCore::CSSToStyleMap::mapAnimationDuration):
932         (WebCore::CSSToStyleMap::mapAnimationFillMode):
933         (WebCore::CSSToStyleMap::mapAnimationIterationCount):
934         (WebCore::CSSToStyleMap::mapAnimationName):
935         (WebCore::CSSToStyleMap::mapAnimationPlayState):
936         (WebCore::CSSToStyleMap::mapAnimationProperty):
937         (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
938         (WebCore::CSSToStyleMap::mapNinePieceImageSlice):
939         (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
940         (WebCore::CSSToStyleMap::mapNinePieceImageRepeat):
941         * css/CSSValue.cpp:
942         (WebCore::CSSValue::destroy):
943         * css/CSSValue.h:
944         (WebCore::CSSValue::isLineBoxContainValue):
945         (WebCore::CSSValue::isCalcValue):
946         * css/CSSValueList.h:
947         * css/CSSVariableValue.h:
948         * css/DeprecatedStyleBuilder.cpp:
949         (WebCore::ApplyPropertyDefault::applyValue):
950         (WebCore::ApplyPropertyNumber::applyValue):
951         (WebCore::ApplyPropertyAuto::applyValue):
952         (WebCore::ApplyPropertyClip::applyValue):
953         (WebCore::ApplyPropertyColor::applyValue):
954         (WebCore::ApplyPropertyLength::applyValue):
955         (WebCore::ApplyPropertyString::applyValue):
956         (WebCore::ApplyPropertyBorderRadius::applyValue):
957         (WebCore::ApplyPropertyComputeLength::applyValue):
958         (WebCore::ApplyPropertyFont::applyValue):
959         (WebCore::ApplyPropertyFontFamily::applyValue):
960         (WebCore::ApplyPropertyFontSize::applyValue):
961         (WebCore::ApplyPropertyFontWeight::applyValue):
962         (WebCore::ApplyPropertyFontVariantLigatures::applyValue):
963         (WebCore::ApplyPropertyCounter::applyValue):
964         (WebCore::ApplyPropertyCursor::applyValue):
965         (WebCore::ApplyPropertyTextAlign::applyValue):
966         (WebCore::ApplyPropertyTextDecoration::applyValue):
967         (WebCore::ApplyPropertyMarqueeIncrement::applyValue):
968         (WebCore::ApplyPropertyMarqueeRepetition::applyValue):
969         (WebCore::ApplyPropertyMarqueeSpeed::applyValue):
970         (WebCore::ApplyPropertyTextUnderlinePosition::applyValue):
971         (WebCore::ApplyPropertyLineHeight::applyValue):
972         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue):
973         (WebCore::ApplyPropertyPageSize::applyValue):
974         (WebCore::ApplyPropertyTextEmphasisStyle::applyValue):
975         (WebCore::ApplyPropertyResize::applyValue):
976         (WebCore::ApplyPropertyVerticalAlign::applyValue):
977         (WebCore::ApplyPropertyAspectRatio::applyValue):
978         (WebCore::ApplyPropertyZoom::applyValue):
979         (WebCore::ApplyPropertyDisplay::applyValue):
980         (WebCore::ApplyPropertyClipPath::applyValue):
981         (WebCore::ApplyPropertyShape::applyValue):
982         (WebCore::ApplyPropertyImageResolution::applyValue):
983         (WebCore::ApplyPropertyTextIndent::applyValue):
984         * css/FontFeatureValue.h:
985         (WebCore::toFontFeatureValue):
986         * css/FontValue.h:
987         (WebCore::toFontValue):
988         * css/MediaList.cpp:
989         (WebCore::reportMediaQueryWarningIfNeeded):
990         * css/MediaQueryEvaluator.cpp:
991         (WebCore::compareAspectRatioValue):
992         (WebCore::numberValue):
993         (WebCore::orientationMediaFeatureEval):
994         (WebCore::evalResolution):
995         (WebCore::device_pixel_ratioMediaFeatureEval):
996         (WebCore::resolutionMediaFeatureEval):
997         (WebCore::computeLength):
998         (WebCore::view_modeMediaFeatureEval):
999         (WebCore::pointerMediaFeatureEval):
1000         * css/SVGCSSStyleSelector.cpp:
1001         (WebCore::StyleResolver::applySVGProperty):
1002         * css/ShadowValue.h:
1003         (WebCore::toShadowValue):
1004         * css/StylePropertySet.cpp:
1005         (WebCore::StylePropertySet::getLayeredShorthandValue):
1006         * css/StyleResolver.cpp:
1007         (WebCore::createGridTrackSize):
1008         (WebCore::createGridTrackList):
1009         (WebCore::createGridPosition):
1010         (WebCore::hasVariableReference):
1011         (WebCore::StyleResolver::applyProperty):
1012         (WebCore::StyleResolver::styleImage):
1013         (WebCore::StyleResolver::generatedOrPendingFromValue):
1014         (WebCore::StyleResolver::styleShader):
1015         (WebCore::StyleResolver::parseCustomFilterArrayParameter):
1016         (WebCore::StyleResolver::parseCustomFilterColorParameter):
1017         (WebCore::StyleResolver::parseCustomFilterNumberParameter):
1018         (WebCore::StyleResolver::parseCustomFilterParameter):
1019         (WebCore::StyleResolver::parseCustomFilterParameterList):
1020         (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
1021         (WebCore::StyleResolver::createFilterOperations):
1022         * css/TransformFunctions.cpp:
1023         (WebCore::transformsForValue):
1024         * css/ViewportStyleResolver.cpp:
1025         (WebCore::ViewportStyleResolver::getViewportArgumentValue):
1026         * css/WebKitCSSMatrix.cpp:
1027         (WebCore::WebKitCSSMatrix::setMatrixValue):
1028         * css/WebKitCSSShaderValue.h:
1029         (WebCore::toWebKitCSSShaderValue):
1030         * editing/ApplyStyleCommand.cpp:
1031         (WebCore::ApplyStyleCommand::computedFontSize):
1032         * editing/EditingStyle.cpp:
1033         (WebCore::identifierForStyleProperty):
1034         (WebCore::HTMLElementEquivalent::valueIsPresentInStyle):
1035         (WebCore::cssValueToRGBA):
1036         (WebCore::EditingStyle::extractFontSizeDelta):
1037         (WebCore::EditingStyle::textDirection):
1038         (WebCore::EditingStyle::prepareToApplyAt):
1039         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
1040         (WebCore::EditingStyle::legacyFontSize):
1041         (WebCore::EditingStyle::textDirectionForSelection):
1042         (WebCore::StyleChange::extractTextStyles):
1043         (WebCore::fontWeightIsBold):
1044         (WebCore::isTransparentColorValue):
1045         * editing/markup.cpp:
1046         (WebCore::propertyMissingOrEqualToNone):
1047         * page/PageSerializer.cpp:
1048         (WebCore::PageSerializer::retrieveResourcesForProperties):
1049         * rendering/style/StylePendingImage.h:
1050         (WebCore::StylePendingImage::data):
1051         (WebCore::StylePendingImage::cssImageValue):
1052         (WebCore::StylePendingImage::cssImageGeneratorValue):
1053         (WebCore::StylePendingImage::cssCursorImageValue):
1054         (WebCore::StylePendingImage::cssImageSetValue):
1055
1056 2013-09-22  Arunprasad Rajkumar  <ararunprasad@gmail.com>
1057
1058         Hiding a focused element should unfocus it and fire a blur event
1059         https://bugs.webkit.org/show_bug.cgi?id=29241
1060
1061         Reviewed by Darin Adler.
1062
1063         Test: fast/dom/HTMLDocument/active-element-gets-unfocusable.html
1064
1065         We check whether the current focus element is really focusable after
1066         the style recalculation and layout change. If it is not focusable then schedule a
1067         timer to reset it asynchronously.
1068
1069         * dom/Document.cpp:
1070         (WebCore::Document::Document):
1071         (WebCore::Document::recalcStyle): Check isFocusable() on the focus element after
1072         style recalculation.
1073         (WebCore::Document::updateLayout): Check isFocusable() on the focus element after
1074         layout.
1075         (WebCore::Document::resetHiddenFocusElementSoon):
1076         (WebCore::Document::resetHiddenFocusElementTimer):
1077         * dom/Document.h:
1078
1079 2013-09-22  Sam Weinig  <sam@webkit.org>
1080
1081         CTTE: StaticNodeLists often contain only Elements, we shouldn't store them as Vector<RefPtr<Node>> in those cases
1082         https://bugs.webkit.org/show_bug.cgi?id=121769
1083
1084         Reviewed by Andreas Kling.
1085
1086         Introduces StaticElementList and uses it.
1087
1088         * accessibility/AccessibilityRenderObject.cpp:
1089         (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
1090         * bindings/js/JSHTMLAllCollectionCustom.cpp:
1091         (WebCore::getNamedItems):
1092         * bindings/js/JSHTMLCollectionCustom.cpp:
1093         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
1094         (WebCore::getNamedItems):
1095         * bindings/js/JSHTMLFormElementCustom.cpp:
1096         (WebCore::JSHTMLFormElement::nameGetter):
1097         * dom/SelectorQuery.cpp:
1098         (WebCore::AllElementExtractorSelectorQueryTrait::appendOutputForElement):
1099         (WebCore::SelectorDataList::queryAll):
1100         * dom/StaticNodeList.cpp:
1101         (WebCore::StaticElementList::length):
1102         (WebCore::StaticElementList::item):
1103         (WebCore::StaticElementList::namedItem):
1104         * dom/StaticNodeList.h:
1105         * dom/WebKitNamedFlow.cpp:
1106         (WebCore::WebKitNamedFlow::getRegionsByContent):
1107         (WebCore::WebKitNamedFlow::getRegions):
1108         (WebCore::WebKitNamedFlow::getContent):
1109         (WebCore::WebKitNamedFlow::dispatchRegionLayoutUpdateEvent):
1110         (WebCore::WebKitNamedFlow::dispatchRegionOversetChangeEvent):
1111         * html/HTMLCollection.cpp:
1112         (WebCore::HTMLCollection::namedItems):
1113         * html/HTMLCollection.h:
1114         * html/HTMLFormElement.cpp:
1115         (WebCore::HTMLFormElement::getNamedElements):
1116         * html/HTMLFormElement.h:
1117         * svg/SVGSVGElement.cpp:
1118         (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
1119
1120 2013-09-22  Sam Weinig  <sam@webkit.org>
1121
1122         CTTE: RenderNamedFlowThread and FlowThreadController should operate on Elements, not Nodes
1123         https://bugs.webkit.org/show_bug.cgi?id=121768
1124
1125         Reviewed by Andreas Kling.
1126
1127         * dom/Element.cpp:
1128         (WebCore::Element::unregisterNamedFlowContentElement):
1129         (WebCore::Element::shouldMoveToFlowThread):
1130         (WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
1131         * dom/Element.h:
1132         Update to new names and to pass this as a reference to the FlowThreadController.
1133
1134         * dom/Node.cpp:
1135         * dom/Node.h:
1136         Move isRegisteredWithNamedFlow() to Element.
1137
1138         * dom/WebKitNamedFlow.cpp:
1139         (WebCore::WebKitNamedFlow::getRegionsByContent):
1140         (WebCore::WebKitNamedFlow::getRegions):
1141         (WebCore::WebKitNamedFlow::getContent):
1142         Update for contentNodes() -> contentElements() name change. Modernize the code a bit
1143         as well.
1144
1145         * rendering/FlowThreadController.cpp:
1146         (WebCore::FlowThreadController::registerNamedFlowContentElement):
1147         (WebCore::FlowThreadController::unregisterNamedFlowContentElement):
1148         (WebCore::FlowThreadController::isContentElementRegisteredWithAnyNamedFlow):
1149         * rendering/FlowThreadController.h:
1150         Change the Node* -> RenderNamedFlowThread* map to a Element* -> RenderNamedFlowThread*. Update
1151         functions taking Node*s to take Element&s.
1152
1153         * rendering/RenderNamedFlowThread.cpp:
1154         (WebCore::RenderNamedFlowThread::~RenderNamedFlowThread):
1155         (WebCore::RenderNamedFlowThread::clearContentElements):
1156         (WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
1157         (WebCore::RenderNamedFlowThread::unregisterNamedFlowContentElement):
1158         (WebCore::RenderNamedFlowThread::hasContentElement):
1159         (WebCore::isContainedInElements):
1160         (WebCore::nextNodeInsideContentElement):
1161         (WebCore::RenderNamedFlowThread::getRanges):
1162         * rendering/RenderNamedFlowThread.h:
1163         Change the NamedFlowContent set to store Elements rather than Nodes. Like with FlowThreadController,
1164         update registration functions to take Element&s instead of Node*s, removing asserts.
1165         
1166         * rendering/RenderRegion.cpp:
1167         (WebCore::RenderRegion::setRegionObjectsRegionStyle):
1168         Update for new names.
1169
1170         * style/StyleResolveTree.cpp:
1171         (WebCore::Style::moveToFlowThreadIfNeeded):
1172         Pass the Element and RenderNamedFlowThread as references.
1173
1174 2013-09-22  Andreas Kling  <akling@apple.com>
1175
1176         Give purity hints to compiler to avoid penalizing repeated calls to some functions.
1177         <https://webkit.org/b/121744>
1178
1179         Reviewed by Darin Adler.
1180
1181         Mark the following functions pure:
1182
1183             - gcController()
1184             - cssValuePool()
1185             - threadGlobalData()
1186
1187         I had this idea when I saw Darin's patch to cache cssValuePool() in a local.
1188         We know that this function will always return the same value, so we should just
1189         share this knowledge with the compiler and let it do the cleverness instead.
1190
1191 2013-09-21  Darin Adler  <darin@apple.com>
1192
1193         Fix too-strict type error exceptions introduced in WebGL bindings
1194         https://bugs.webkit.org/show_bug.cgi?id=121759
1195
1196         Reviewed by Alexey Proskuryakov.
1197
1198         * bindings/js/JSWebGLRenderingContextCustom.cpp:
1199         (WebCore::JSWebGLRenderingContext::getAttachedShaders): Allow undefined
1200         or null without throwing type error.
1201         (WebCore::JSWebGLRenderingContext::getProgramParameter): Ditto.
1202         (WebCore::JSWebGLRenderingContext::getUniform): Ditto.
1203         (WebCore::dataFunctionf): Ditto.
1204         (WebCore::dataFunctioni): Ditto.
1205         (WebCore::dataFunctionMatrix): Ditto.
1206
1207 2013-09-21  Sam Weinig  <sam@webkit.org>
1208
1209         Event and EventTarget interfaces don't need to be store as AtomicStrings
1210         https://bugs.webkit.org/show_bug.cgi?id=121751
1211
1212         Reviewed by Andreas Kling.
1213
1214         Convert the Event and EventTarget interface identifiers from AtomicStrings to enums. They
1215         are not extensible and not exposed as Strings anywhere.
1216
1217         * Files elided *
1218
1219 2013-09-21  Darin Adler  <darin@apple.com>
1220
1221         Add ExecState::uncheckedArgument and use where possible to shrink a bit
1222         https://bugs.webkit.org/show_bug.cgi?id=121750
1223
1224         Reviewed by Andreas Kling.
1225
1226         * bindings/js/JSHTMLCanvasElementCustom.cpp:
1227         (WebCore::JSHTMLCanvasElement::probablySupportsContext): Already checked count.
1228         (WebCore::JSHTMLCanvasElement::toDataURL): Ditto.
1229         * bindings/js/JSHTMLDocumentCustom.cpp:
1230         (WebCore::documentWrite): In a loop.
1231         * bindings/js/JSInjectedScriptHostCustom.cpp:
1232         (WebCore::JSInjectedScriptHost::inspectedObject): Already checked count.
1233         (WebCore::JSInjectedScriptHost::internalConstructorName): Ditto.
1234         (WebCore::JSInjectedScriptHost::isHTMLAllCollection): Ditto.
1235         (WebCore::JSInjectedScriptHost::type): Ditto.
1236         (WebCore::JSInjectedScriptHost::functionDetails): Ditto.
1237         (WebCore::JSInjectedScriptHost::getEventListeners): Ditto.
1238         (WebCore::JSInjectedScriptHost::inspect): Ditto.
1239         (WebCore::JSInjectedScriptHost::databaseId): Ditto.
1240         (WebCore::JSInjectedScriptHost::storageId): Ditto.
1241         * bindings/js/JSSQLTransactionSyncCustom.cpp:
1242         (WebCore::JSSQLTransactionSync::executeSql): Ditto.
1243         * bindings/js/JSSVGLengthCustom.cpp:
1244         (WebCore::JSSVGLength::convertToSpecifiedUnits): Ditto.
1245         * bindings/js/JSSharedWorkerCustom.cpp:
1246         (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker): Ditto.
1247
1248         * bindings/js/JSWebGLRenderingContextCustom.cpp:
1249         (WebCore::getObjectParameter): Already checked count.
1250         (WebCore::JSWebGLRenderingContext::getAttachedShaders): Removed tortured code
1251         to triply do the checking that the toWebGLProgram function already does, including
1252         spurious exception checking in code that can't create an exception. Also count is
1253         already checked.
1254         (WebCore::JSWebGLRenderingContext::getExtension): More of the same.
1255         (WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter): Ditto.
1256         (WebCore::JSWebGLRenderingContext::getParameter): Ditto.
1257         (WebCore::JSWebGLRenderingContext::getProgramParameter): Ditto.
1258         (WebCore::JSWebGLRenderingContext::getShaderParameter): Ditto.
1259         (WebCore::JSWebGLRenderingContext::getUniform): Ditto.
1260         (WebCore::dataFunctionf): Ditto.
1261         (WebCore::dataFunctioni): Ditto.
1262         (WebCore::dataFunctionMatrix): Ditto.
1263
1264         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
1265         (WebCore::JSWorkerGlobalScope::importScripts): In a loop.
1266         * bindings/js/JSXMLHttpRequestCustom.cpp:
1267         (WebCore::JSXMLHttpRequest::open): Already checked. Also removed some unneeded
1268         argument count checks.
1269         (WebCore::JSXMLHttpRequest::send): Removed unneeded special case for 0 argument
1270         count that does the same thing as the undefined case, since asking for an
1271         argument past the count yields undefined.
1272
1273         * bindings/js/JSXSLTProcessorCustom.cpp:
1274         (WebCore::JSXSLTProcessor::setParameter): Already checked.
1275         (WebCore::JSXSLTProcessor::getParameter): Already checked.
1276         (WebCore::JSXSLTProcessor::removeParameter): Already checked.
1277
1278         * bindings/js/ScheduledAction.cpp:
1279         (WebCore::ScheduledAction::ScheduledAction): In a loop.
1280         * bindings/js/ScriptCallStackFactory.cpp:
1281         (WebCore::createScriptArguments): Ditto.
1282
1283         * bindings/scripts/CodeGeneratorJS.pm:
1284         (GenerateParametersCheck): Removed some excess argumentCount checks.
1285         Used uncheckedArgument in a few places. More needs to be done, especially for
1286         overloaded functions.
1287
1288         * bridge/c/c_instance.cpp:
1289         (JSC::Bindings::CInstance::invokeMethod): In a loop.
1290         (JSC::Bindings::CInstance::invokeDefaultMethod): Ditto.
1291         * bridge/objc/objc_instance.mm:
1292         (ObjcInstance::invokeObjcMethod): Ditto.
1293         (ObjcInstance::invokeDefaultMethod): Ditto.
1294
1295         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1296         * bindings/scripts/test/JS/JSTestObj.cpp:
1297         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1298         Updated.
1299
1300 2013-09-21  Jon Lee  <jonlee@apple.com>
1301
1302         Fix Obj-C bindings test expectations.
1303         Unreviewed.
1304
1305         Bindings tests failed with r156232, from https://bugs.webkit.org/show_bug.cgi?id=121745.
1306
1307         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1308         (-[DOMTestObj reflectedStringAttr]): Update test expectations.
1309
1310 2013-09-21  Andreas Kling  <akling@apple.com>
1311
1312         Node: FINAL-ize EventTarget overrides.
1313         <https://webkit.org/b/121748>
1314
1315         Reviewed by Darin Adler.
1316
1317         Mark the following Node functions FINAL:
1318
1319             - scriptExecutionContext()
1320             - eventTargetData()
1321             - ensureEventTargetData()
1322
1323         This devirtualizes a myriad of generated calls in the JSC bindings.
1324
1325 2013-09-21  Andreas Kling  <akling@apple.com>
1326
1327         Don't bloat Obj-C bindings with inlined attribute retrieval.
1328         <https://webkit.org/b/121745>
1329
1330         Reviewed by Anders Carlsson.
1331
1332         Hack bindings generator to always use getAttribute() for Objective-C.
1333         Reduces WebCore binary size by 25120 bytes.
1334
1335 2013-09-20  Darin Adler  <darin@apple.com>
1336
1337         Shink attribute event listener code
1338         https://bugs.webkit.org/show_bug.cgi?id=121735
1339
1340         Reviewed by Antti Koivisto.
1341
1342         * GNUmakefile.list.am: Eliminate ScriptEventListener source files.
1343         * Target.pri: Ditto.
1344         * UseJSC.cmake: Ditto.
1345         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
1346         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1347         * WebCore.xcodeproj/project.pbxproj: Ditto.
1348         * bindings/js/JSBindingsAllInOne.cpp: Ditto.
1349
1350         * bindings/js/JSDOMGlobalObject.h: Removed unneeded forward declarations
1351         of JSEventListener and JSLazyEventListener.
1352
1353         * bindings/js/JSLazyEventListener.cpp:
1354         (WebCore::JSLazyEventListener::JSLazyEventListener): Changed type to
1355         ContainerNode because the node pointer is only ever used for elements
1356         and documents.
1357         (WebCore::eventParameterName): Moved this function here from
1358         ScriptEventListener.cpp, but also rewrote to use NeverDestroyed.
1359         (WebCore::JSLazyEventListener::createForNode): Moved this function
1360         here from ScriptEventListener.cpp, cleaned up a bit.
1361         (WebCore::JSLazyEventListener::createForDOMWindow): Ditto.
1362
1363         * bindings/js/JSLazyEventListener.h: Replaced the old create function
1364         with two new create functions we can use directly. Also used some
1365         OVERRIDE, some FINAL, and a bit of WTF_DELETED_FUNCTION so we don't
1366         accidentally call create and create a non-lazy listener.
1367
1368         * bindings/js/ScriptEventListener.cpp: Removed.
1369         * bindings/js/ScriptEventListener.h: Removed.
1370
1371         * dom/ContainerNode.cpp:
1372         (WebCore::ContainerNode::setAttributeEventListener): Added.
1373         Calls JSLazyEventListener::createForNode and then calls the other
1374         overload of setAttributeEventListener, to obviate having more code
1375         at the call site.
1376         * dom/ContainerNode.h: Added overload of setAttributeEventListener
1377         for convenient use in Document and Element implementations.
1378
1379         * dom/Document.cpp:
1380         (WebCore::Document::prepareForDestruction): Use m_domWindow instead
1381         of the domWindow() function.
1382         (WebCore::Document::removeAllEventListeners): Ditto.
1383         (WebCore::Document::errorEventTarget): Ditto.
1384         (WebCore::Document::takeDOMWindowFrom): Ditto.
1385         (WebCore::Document::setWindowAttributeEventListener): Ditto. Also
1386         added an overload that calls JSLazyEventListener::createForDOMWindow.
1387         (WebCore::Document::getWindowAttributeEventListener): Use m_domWindow.
1388         (WebCore::Document::dispatchWindowEvent): Ditto.
1389         (WebCore::Document::dispatchWindowLoadEvent): Ditto.
1390         (WebCore::Document::enqueueWindowEvent): Ditto.
1391         (WebCore::Document::enqueuePopstateEvent): Ditto.
1392         * dom/Document.h: Added overload of setWindowAttributeEventListener.
1393
1394         * html/HTMLBodyElement.cpp: Removed unnneded include.
1395         (WebCore::HTMLBodyElement::parseAttribute): Removed all the calls to
1396         createAttributeEventListener, and use the setAttributeEventListener
1397         overloads instead.
1398         * html/HTMLButtonElement.cpp: Ditto.
1399         * html/HTMLElement.cpp:
1400         (WebCore::HTMLElement::parseAttribute): Ditto.
1401         * html/HTMLFormControlElement.cpp: Ditto.
1402         * html/HTMLFormElement.cpp: Ditto.
1403         * html/HTMLFrameElementBase.cpp:
1404         (WebCore::HTMLFrameElementBase::parseAttribute): Ditto.
1405         * html/HTMLFrameSetElement.cpp:
1406         (WebCore::HTMLFrameSetElement::parseAttribute): Ditto.
1407         * html/HTMLImageElement.cpp:
1408         (WebCore::HTMLImageElement::parseAttribute): Ditto.
1409         * html/HTMLInputElement.cpp:
1410         (WebCore::HTMLInputElement::parseAttribute): Ditto.
1411         * html/HTMLLinkElement.cpp:
1412         (WebCore::HTMLLinkElement::parseAttribute): Ditto.
1413         * html/HTMLMediaElement.cpp:
1414         (WebCore::HTMLMediaElement::parseAttribute): Ditto.
1415         * html/HTMLObjectElement.cpp:
1416         (WebCore::HTMLObjectElement::parseAttribute): Ditto.
1417         * html/HTMLScriptElement.cpp:
1418         (WebCore::HTMLScriptElement::parseAttribute): Ditto.
1419         * html/HTMLSelectElement.cpp: Ditto.
1420         * html/HTMLStyleElement.cpp: Ditto.
1421         * html/HTMLTextFormControlElement.cpp: Ditto.
1422         * html/HTMLTrackElement.cpp: Ditto.
1423         * html/track/LoadableTextTrack.cpp: Ditto.
1424         * svg/SVGElement.cpp:
1425         (WebCore::SVGElement::parseAttribute): Ditto.
1426         * svg/SVGSVGElement.cpp:
1427         (WebCore::SVGSVGElement::parseAttribute): Ditto.
1428         * svg/SVGScriptElement.cpp:
1429         (WebCore::SVGScriptElement::parseAttribute): Ditto.
1430
1431         * inspector/InspectorDOMAgent.cpp:
1432         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
1433         Moved the code here to dig inside a JSEventListener for things like
1434         the source location. This used to be spread across multiple function
1435         calls in ScriptEventListener.h, which were doing and redoing the same
1436         things, so better to just get it all at once.
1437
1438         * html/parser/XSSAuditor.cpp:
1439         (WebCore::XSSAuditor::init): Fixed "minium" typo.
1440
1441 2013-09-21  Anders Carlsson  <andersca@apple.com>
1442
1443         Don't store the "processing-instruction" string for PI tokens in the XPath parser
1444         https://bugs.webkit.org/show_bug.cgi?id=121746
1445
1446         Reviewed by Antti Koivisto.
1447
1448         For PI tokens, the string is always going to be "processing-instruction", and it's never used so we don't need to save it.
1449
1450         * xml/XPathGrammar.y:
1451         * xml/XPathParser.cpp:
1452         (Parser::nextTokenInternal):
1453         (Parser::lex):
1454
1455 2013-09-21  Patrick Gansterer  <paroga@webkit.org>
1456
1457         Handle windows lineendings in makeprop.pl after r155511
1458         https://bugs.webkit.org/show_bug.cgi?id=121740
1459
1460         Reviewed by Ryosuke Niwa.
1461
1462         Check for an optinal \r at the end of a line in regular expressions
1463         to make it work again on native windows machines which use CRLF.
1464
1465         * css/makeprop.pl:
1466
1467 2013-09-21  Andreas Kling  <akling@apple.com>
1468
1469         Re-inline some hot ElementData functions.
1470         <https://webkit.org/b/121743>
1471
1472         Reviewed by Antti Koivisto.
1473
1474         Make the following functions inline again:
1475
1476             - deref()
1477             - addAttribute()
1478             - removeAttribute()
1479             - attributeAt()
1480
1481         They were out-of-lined in r154249 and perf.webkit.org reports a 1.4%
1482         regression on the html5 spec for that revision. This'll hopefully steer
1483         the graph back in the right direction.
1484
1485 2013-09-21  Tim Horton  <timothy_horton@apple.com>
1486
1487         GeneratorGeneratedImage should be called GradientImage
1488         https://bugs.webkit.org/show_bug.cgi?id=121085
1489
1490         Reviewed by Simon Fraser.
1491
1492         No new tests, just a refactor.
1493
1494         r150053 removed the concept of a Generator, making GeneratorGeneratedImage
1495         take a Gradient. This leaves GeneratorGeneratedImage's name not making a
1496         whole lot of sense, so let's rename it to GradientImage.
1497
1498         * CMakeLists.txt:
1499         * GNUmakefile.list.am:
1500         * Target.pri:
1501         * WebCore.vcxproj/WebCore.vcxproj:
1502         * WebCore.vcxproj/WebCore.vcxproj.filters:
1503         * WebCore.xcodeproj/project.pbxproj:
1504         * css/CSSGradientValue.cpp:
1505         (WebCore::CSSGradientValue::image):
1506         * platform/graphics/BitmapImage.h:
1507         * platform/graphics/GradientImage.cpp: Renamed from Source/WebCore/platform/graphics/GeneratorGeneratedImage.cpp.
1508         (WebCore::GradientImage::draw):
1509         (WebCore::GradientImage::drawPattern):
1510         * platform/graphics/GradientImage.h: Renamed from Source/WebCore/platform/graphics/GeneratorGeneratedImage.h.
1511         * platform/graphics/Image.h:
1512         * platform/graphics/ImageBuffer.h:
1513         Rename.
1514
1515         * css/CSSImageGeneratorValue.cpp:
1516         (WebCore::CSSImageGeneratorValue::cachedImageForSize):
1517         (WebCore::CSSImageGeneratorValue::saveCachedImageForSize):
1518         (WebCore::CSSImageGeneratorValue::CachedGeneratedImage::CachedGeneratedImage):
1519         * css/CSSImageGeneratorValue.h:
1520         (WebCore::CSSImageGeneratorValue::CachedGeneratedImage::image):
1521         Drive-by, the CSSImageGeneratorValue generated image cache should be
1522         in terms of GeneratedImage, not a random subclass, regardless
1523         of the fact that it's only used for GradientImage as of yet.
1524
1525 2013-09-21  Darin Adler  <darin@apple.com>
1526
1527         Shrink valueForBasicShape by removing repeated calls to cssValuePool()
1528         https://bugs.webkit.org/show_bug.cgi?id=121736
1529
1530         Reviewed by Sam Weinig.
1531
1532         * css/BasicShapeFunctions.cpp:
1533         (WebCore::valueForBasicShape): Put the pool into a local variable and use that.
1534
1535 2013-09-20  Darin Adler  <darin@apple.com>
1536
1537         Another CSS parser leak fix
1538         https://bugs.webkit.org/show_bug.cgi?id=121730
1539
1540         Reviewed by Alexey Proskuryakov.
1541
1542         * css/CSSGrammar.y.in: Added a missing adoptPtr.
1543
1544 2013-09-20  Alexey Proskuryakov  <ap@apple.com>
1545
1546         Handle panning gestures messages properly on Windows
1547         https://bugs.webkit.org/show_bug.cgi?id=121711
1548
1549         Follow-up fix: five regression tests started to crash on Mac.
1550
1551         Reviewed by Anders Carlsson.
1552
1553         * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollByRecursively):
1554         Added null checks, not all callers are interested in scrolled view pointer.
1555
1556 2013-09-20  Ryosuke Niwa  <rniwa@webkit.org>
1557
1558         Bad cast from CSSInitialValue to CSSValueList
1559         https://bugs.webkit.org/show_bug.cgi?id=121729
1560
1561         Reviewed by Beth Dakin.
1562
1563         Merge https://chromium.googlesource.com/chromium/blink/+/fcfaa51f9207b32cffe751c1a1380a921e464cbb
1564
1565         The issue was that we would cast to CSSValueList without checking
1566         the type of the CSSValue. After this change, we use the ASSERT'ing
1567         cast and explicitly check the type of the CSSValue before the cast.
1568
1569         Test: fast/css/crash-inherit-value-font-family.html
1570
1571         * css/CSSParser.cpp:
1572         (WebCore::CSSParser::parseFontFaceValue):
1573
1574 2013-09-20  Zoltan Horvath  <zoltan@webkit.org>
1575
1576         Remove includes from LineWidth.h
1577         https://bugs.webkit.org/show_bug.cgi?id=121716
1578
1579         Reviewed by Darin Adler.
1580
1581         In r156197 I removed logicalLineHeight from LineWidth.h, so we don't need to include RenderBlock.h
1582         and RenderRubyRun.h anymore in LineWidth.h.
1583
1584         No new tests, no behavior change.
1585
1586         * rendering/LineWidth.cpp:
1587         * rendering/LineWidth.h:
1588
1589 2013-09-20  Roger Fong  <roger_fong@apple.com>
1590
1591         Handle panning gestures messages properly on Windows.
1592         https://bugs.webkit.org/show_bug.cgi?id=121711.
1593
1594         Reviewed by Brent Fulgham.
1595
1596         This is needed by the Windows port to keep track to determine whether or not
1597         we need to overpan.
1598
1599         No new functionality added.
1600
1601         * rendering/RenderLayer.cpp:
1602         (WebCore::RenderLayer::scrollByRecursively):
1603         * rendering/RenderLayer.h: 
1604         Added an argument to keep track of which scrollview was actually scrolled
1605
1606 2013-09-20  Alexandru Chiculita  <achicu@adobe.com>
1607
1608         Web Inspector: [CSS Regions] Display CSS Regions chain when highlighting a CSS Region node
1609         https://bugs.webkit.org/show_bug.cgi?id=121719
1610
1611         Reviewed by Joseph Pecoraro.
1612
1613         Test: inspector/elements/highlight-node-regions.html
1614
1615         When a CSS Region node is highlighted through the WebInspector, it will also lookup all the regions
1616         that are part of the same flow and inject enough information into InspectorOverlayPage.js to get the other
1617         CSS Regions highlighted as well. A chain will also link the regions and a number will display the ordering
1618         of the content.
1619
1620         * WebCore.exp.in:
1621         * inspector/InspectorController.cpp:
1622         (WebCore::InspectorController::buildObjectForHighlightedNode):
1623         * inspector/InspectorController.h:
1624         * inspector/InspectorOverlay.cpp:
1625         (WebCore::buildObjectForRegionHighlight):
1626         (WebCore::buildObjectForCSSRegionsHighlight):
1627         (WebCore::InspectorOverlay::buildObjectForHighlightedNode):
1628         (WebCore::InspectorOverlay::drawNodeHighlight): Separated the InspectorObject building part out of this function,
1629         so that we can call buildObjectForHighlightedNode from the Internals APIs for testing.
1630         * inspector/InspectorOverlay.h:
1631         * inspector/InspectorOverlayPage.js:
1632         (_drawRegionNumber):
1633         (_quadMidPoint):
1634         (_drawRegionLink):
1635         (_fixQuadScrollPosition):
1636         (_drawRegionsHighlight):
1637         (drawNodeHighlight):
1638         * testing/Internals.cpp: Exposed the generated InspectorObject to the layout test.
1639         (WebCore::Internals::inspectorHighlightObject):
1640         * testing/Internals.h:
1641         * testing/Internals.idl:
1642
1643 2013-09-20  Commit Queue  <commit-queue@webkit.org>
1644
1645         Unreviewed, rolling out r156185.
1646         http://trac.webkit.org/changeset/156185
1647         https://bugs.webkit.org/show_bug.cgi?id=121727
1648
1649         Caused a lot of crashes in tests (Requested by ap on #webkit).
1650
1651         * dom/Document.cpp:
1652         (WebCore::Document::Document):
1653         (WebCore::Document::recalcStyle):
1654         (WebCore::Document::updateLayout):
1655         * dom/Document.h:
1656
1657 2013-09-20  Dean Jackson  <dino@apple.com>
1658
1659         Shaders that fail to compile should be marked as such
1660         https://bugs.webkit.org/show_bug.cgi?id=121721
1661
1662         Reviewed by Simon Fraser.
1663
1664         1. Add a new logging channel for WebGL.
1665
1666         2. If a translated shader fails to compile (technically
1667         this should never happen), mark it as invalid.
1668
1669         Test: https://www.khronos.org/registry/webgl/sdk/tests/conformance/glsl/misc/shader-with-non-reserved-words.html
1670
1671         * platform/Logging.h: New WebGL channel.
1672         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1673         (WebCore::GraphicsContext3D::compileShader): Log the raw and translated
1674         input to glCompileShader, but mark the entry as invalid.
1675
1676 2013-09-20  Mario Sanchez Prada  <mario.prada@samsung.com>
1677
1678         [ATK] Do not expose aria-help in ATK based platforms
1679         https://bugs.webkit.org/show_bug.cgi?id=121675
1680
1681         Reviewed by Chris Fleizach.
1682
1683         Stop exposing the value for the 'aria-help' attribute as an
1684         AtkObject attribute, based in AccessibilityObject::helpText().
1685
1686         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1687         (webkitAccessibleGetAttributes): Remove the mapping.
1688
1689 2013-09-20  Simon Fraser  <simon.fraser@apple.com>
1690
1691         Scrollbars don't appear on long pages after r155660
1692         https://bugs.webkit.org/show_bug.cgi?id=121714
1693         <rdar://problem/15042478>
1694
1695         Reviewed by Beth Dakin.
1696         
1697         After r155660, we don't do any additional layouts when scrollbars are 
1698         added or removed. That caused us to not enter the code that creates or
1699         destroys composting layers for scrollbars in RenderLayerCompositor, resulting
1700         in missing scrollbars.
1701         
1702         Fix by having ScrollView::updateScrollbars() call addedOrRemovedScrollbar()
1703         when a scrollbar was added or removed, which is overridden in FrameView
1704         to call through to RenderLayerCompositor::frameViewDidAddOrRemoveScrollbars().
1705
1706         Not testable since scrollbar layers aren't contained in layer tree dumps
1707         (to reduce diffs between platforms).
1708
1709         * page/FrameView.cpp:
1710         (WebCore::FrameView::addedOrRemovedScrollbar): New function to tell the compositor
1711         that scrollbars changed.
1712         * page/FrameView.h:
1713         * platform/ScrollView.cpp:
1714         (WebCore::ScrollView::setHasHorizontalScrollbar): Change the meaning of the return
1715         value to say if the scrollbar was added or removed. Add an out param that indicates
1716         whether the scrollbar change affects content size (not true for overlay scrollbars).
1717         (WebCore::ScrollView::setHasVerticalScrollbar): Ditto.
1718         (WebCore::ScrollView::updateScrollbars): Keep track of whether scrollbars were
1719         added or removed, and call addedOrRemovedScrollbar() if true.
1720         * platform/ScrollView.h:
1721         * rendering/RenderLayerCompositor.cpp:
1722         (WebCore::RenderLayerCompositor::frameViewDidAddOrRemoveScrollbars): Call updateOverflowControlsLayers().
1723         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
1724         * rendering/RenderLayerCompositor.h:
1725
1726 2013-09-20  Simon Fraser  <simon.fraser@apple.com>
1727
1728         Ensure that TileController tile coverage is updated on scrolling even when we don't have scrollbars
1729         https://bugs.webkit.org/show_bug.cgi?id=121700
1730         <rdar://problem/15030589>
1731
1732         Reviewed by Dean Jackson.
1733
1734         r155660 introduced a bug where we wouldn't make scrollbars on long pages. However,
1735         that revealed a fundamental flaw in the TiledBacking update logic; it relied on the
1736         GraphicsLayer flushes triggered by scrollbars updates in order to update the main
1737         TileController's tile coverage. No scrollbars meant no tile coverage updates.
1738         
1739         Fix by explicitly triggering a flush when the FrameView is scrolled (we get
1740         notified about this on the main thread after the scrolling thread has moved
1741         layers around).
1742         
1743         No test since this will only be exposed for a short time while scrollbars are
1744         broken.
1745
1746         * rendering/RenderLayerCompositor.cpp:
1747         (WebCore::RenderLayerCompositor::frameViewDidScroll):
1748
1749 2013-09-20  Zoltan Horvath  <zoltan@webkit.org>
1750
1751         Refactoring LineBreaker and RenderTextInfo out of RenderBlock.h
1752         https://bugs.webkit.org/show_bug.cgi?id=121707
1753
1754         Reviewed by David Hyatt.
1755
1756         LineBreaker and RenderTextInfo are defined in RenderBlock.h, but only used in RenderBlockLineLayout.cpp.
1757         Moving them there (LineBreaker needs to be a friend class of RenderBlock) in the first step in the process
1758         of refactoring LineBreaker::NextSegmentBreak into more manageable chunks.
1759
1760         This change was reviewed and landed in Blink:
1761         https://src.chromium.org/viewvc/blink?revision=157402&view=revision
1762
1763         No new tests.
1764
1765         * rendering/RenderBlock.h:
1766         * rendering/RenderBlockLineLayout.cpp:
1767         (WebCore::LineBreaker::LineBreaker):
1768         (WebCore::LineBreaker::lineWasHyphenated):
1769         (WebCore::LineBreaker::positionedObjects):
1770         (WebCore::LineBreaker::clear):
1771         (WebCore::RenderTextInfo::RenderTextInfo):
1772         (WebCore::RenderTextInfo::~RenderTextInfo):
1773         (WebCore::LineBreaker::skipTrailingWhitespace):
1774         (WebCore::LineBreaker::skipLeadingWhitespace):
1775         (WebCore::LineBreaker::reset):
1776         (WebCore::LineBreaker::nextLineBreak):
1777         (WebCore::LineBreaker::nextSegmentBreak):
1778
1779 2013-09-20  Zoltan Horvath  <zoltan@webkit.org>
1780
1781         Move logicalHeightForLine out of LineWidth.h
1782         https://bugs.webkit.org/show_bug.cgi?id=121575
1783
1784         Reviewed by David Hyatt.
1785
1786         In bug #121107 (r155565), I moved logicalHeightForLine into LineWidth.h as part of LineWidth
1787         refactoring. LogicalHeightForLine without passing the second parameter uses RenderBlock::lineHeight
1788         anyway, except it doesn't take -line-box-contain CSS property into account. For Shapes we don't
1789         have implementation for variable-height lines (https://bugs.webkit.org/show_bug.cgi?id=95361) yet, so
1790         so I modified the affected functions to call lineHeight directly. I renamed logicalHeightForLine
1791         to minLineHeightForReplacedRenderer, and I made the second parameter a mandatory for that function.
1792
1793         No new tests, no behavior change.
1794
1795         * rendering/LineWidth.cpp:
1796         (WebCore::LineWidth::updateAvailableWidth):
1797         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
1798         * rendering/LineWidth.h:
1799         * rendering/RenderBlock.cpp: Move the definition here.
1800         (WebCore::RenderBlock::minLineHeightForReplacedRenderer):
1801         * rendering/RenderBlock.h: Move the function here and rename it.
1802         * rendering/RenderBlockLineLayout.cpp:
1803         (WebCore::RenderBlock::layoutShapeInsideInfo):
1804         (WebCore::updateLogicalInlinePositions):
1805         (WebCore::updateSegmentsForShapes):
1806
1807 2013-09-20  Alexey Proskuryakov  <ap@apple.com>
1808
1809         -[WebHTMLConveter _getFloat:forNode:property:] leaks
1810         https://bugs.webkit.org/show_bug.cgi?id=121709
1811
1812         Reviewed by Enrica Casucci.
1813
1814         * platform/mac/HTMLConverter.mm:
1815         (-[WebHTMLConverter _getFloat:forNode:property:]): Don't leak.
1816
1817 2013-09-20  Yongjun Zhang  <yongjun_zhang@apple.com>
1818
1819         Add an argument to ImageSource::createFrameAtIndex to hint a decoder that we expect a scaled image.
1820         https://bugs.webkit.org/show_bug.cgi?id=121696
1821
1822         Reviewed by Antti Koivisto.
1823
1824         Add an argument to ImageSource::createFrameAtIndex.  A platform image decoder can decide the optimal
1825         scale based on the hint and pass the real scale it used for decoding.
1826
1827         No new tests, no behavior change.
1828
1829         * platform/graphics/ImageSource.cpp:
1830         (WebCore::ImageSource::createFrameAtIndex):
1831         * platform/graphics/ImageSource.h:
1832         * platform/graphics/cg/ImageSourceCG.cpp:
1833         (WebCore::ImageSource::createFrameAtIndex):
1834
1835 2013-09-20  Andreas Kling  <akling@apple.com>
1836
1837         Make JSMainThreadNullState noncopyable.
1838
1839         Blindly rubber-stamped by Antti Koivisto.
1840
1841         * bindings/js/JSMainThreadExecState.h:
1842
1843 2013-09-20  Dan Bernstein  <mitz@apple.com>
1844
1845         Make extract-localizable-strings available to WebCore clients
1846         https://bugs.webkit.org/show_bug.cgi?id=121699
1847
1848         Reviewed by Darin Adler.
1849
1850         * WebCore.xcodeproj/project.pbxproj: Added a Scripts group with a reference to
1851         extract-localizable-strings.pl. Added a Copy Scripts build phase to the WebCore target that
1852         copies the script into PrivateHeaders/Scripts in the framework.
1853         * extract-localizable-strings.pl: Copied from Tools/Scripts/extract-localizable-strings.
1854
1855 2013-09-20  Antti Koivisto  <antti@apple.com>
1856
1857         Move layer hierarchy functions from RenderObject to RenderElement
1858         https://bugs.webkit.org/show_bug.cgi?id=121692
1859
1860         Reviewed by Andreas Kling.
1861
1862         * rendering/RenderElement.cpp:
1863         (WebCore::RenderElement::addLayers):
1864         (WebCore::RenderElement::removeLayers):
1865         (WebCore::RenderElement::moveLayers):
1866         (WebCore::RenderElement::findNextLayer):
1867         (WebCore::RenderElement::layerCreationAllowedForSubtree):
1868         
1869             Move these from RenderObject.
1870
1871         (WebCore::RenderElement::insertedIntoTree):
1872         (WebCore::RenderElement::willBeRemovedFromTree):
1873         
1874             Factor the layer related portion of these virtuals here.
1875
1876 2013-09-20  Benjamin Poulain  <benjamin@webkit.org>
1877
1878         Start cleaning the API of SelectorChecker
1879         https://bugs.webkit.org/show_bug.cgi?id=121654
1880
1881         Reviewed by Antti Koivisto.
1882
1883         Make the matching mode internal.
1884         Remove unused accessors.
1885         Make isFrameFocused() internal.
1886
1887         * css/ElementRuleCollector.cpp:
1888         (WebCore::ElementRuleCollector::ruleMatches):
1889         * css/SelectorChecker.cpp:
1890         (WebCore::SelectorChecker::matchRecursively):
1891         (WebCore::SelectorChecker::checkOne):
1892         (WebCore::isFrameFocused):
1893         * css/SelectorChecker.h:
1894         (WebCore::SelectorChecker::match):
1895         * css/StyleResolver.h:
1896         (WebCore::checkRegionSelector):
1897         * dom/SelectorQuery.cpp:
1898         (WebCore::SelectorDataList::selectorMatches):
1899
1900 2013-09-20  Benjamin Poulain  <benjamin@webkit.org>
1901
1902         Remove SelectorChecker's CrossesBoundary boundary mode
1903         https://bugs.webkit.org/show_bug.cgi?id=121653
1904
1905         Reviewed by Antti Koivisto.
1906
1907         This mode is an ancient vestige of shadow dom.
1908
1909         * css/SelectorChecker.cpp:
1910         (WebCore::SelectorChecker::match):
1911         (WebCore::SelectorChecker::checkOne):
1912         * css/SelectorChecker.h:
1913
1914 2013-09-20  Benjamin Poulain  <benjamin@webkit.org>
1915
1916         Move the SharingRules mode outside of SelectorChecker
1917         https://bugs.webkit.org/show_bug.cgi?id=121652
1918
1919         Reviewed by Antti Koivisto.
1920
1921         The SharingRules handling inside SelectorChecker is a weird hack
1922         to hit a specific branch of ElementRuleCollector.
1923
1924         This patch moves the exception to ElementRuleCollector, where it is easier
1925         to understand what it is for.
1926
1927         * css/ElementRuleCollector.cpp:
1928         (WebCore::ElementRuleCollector::doCollectMatchingRulesForList):
1929         * css/SelectorChecker.cpp:
1930         (WebCore::SelectorChecker::match):
1931
1932 2013-09-20  Yoav Weiss  <yoav@yoav.ws>
1933
1934         Fixed img src URLS with multiple spaces
1935         https://bugs.webkit.org/show_bug.cgi?id=121592
1936
1937         Reviewed by Darin Adler.
1938
1939         Test: fast/loader/image-src-multiple-space.html
1940
1941         I've removed the simplifyWhiteSpace step from HTMLImageElement's src attribute during the srcset selection algorithm.
1942         That step prevented URLs with multiple spaces from being loaded as images, minimizing the multiple spaces into a single one.
1943
1944         * html/parser/HTMLParserIdioms.cpp:
1945         (WebCore::bestFitSourceForImageAttributes):
1946
1947 2013-09-20  Arunprasad Rajkumar  <ararunprasad@gmail.com>
1948
1949         Hiding a focused element should unfocus it and fire a blur event
1950         https://bugs.webkit.org/show_bug.cgi?id=29241
1951
1952         Reviewed by Darin Adler.
1953
1954         Test: fast/dom/HTMLDocument/active-element-gets-unfocusable.html
1955
1956         We check whether the current focus element is really focusable after
1957         the style recalculation and layout change. If it is not focusable then schedule a
1958         timer to reset it asynchronously.
1959
1960         * dom/Document.cpp:
1961         (WebCore::Document::Document):
1962         (WebCore::Document::recalcStyle): Check isFocusable() on the focus element after
1963         style recalculation.
1964         (WebCore::Document::updateLayout): Check isFocusable() on the focus element after
1965         layout.
1966         (WebCore::Document::resetHiddenFocusElementSoon):
1967         (WebCore::Document::resetHiddenFocusElementTimer):
1968         * dom/Document.h:
1969
1970 2013-09-20  Alexey Proskuryakov  <ap@apple.com>
1971
1972         REGRESSION (r156140): Srcset tests are frequently crashing
1973         https://bugs.webkit.org/show_bug.cgi?id=121695
1974
1975         Reviewed by Dean Jackson.
1976
1977         Returning a string created without copying bytes is not safe. It used to be OK
1978         because a new string was immediately created by decodeURLEscapeSequences().
1979         But even that was not great, because decodeURLEscapeSequences() could potentially
1980         return the same string, not a deep copy, if we decided to optimize it like that.
1981
1982         Also made a number of drive-by style fixes.
1983         - It's URL, not Url.
1984         - It's srcset, not srcSet.
1985         -  We don't add ".0" in floating point value initializers. It's particularly misleading
1986         to initialize a float with 1.0, which is a double value.
1987         - Renamed srcSetLength to srcsetAttributeLength to match srcsetAttribute variable
1988         whose length it caches.
1989
1990         * html/parser/HTMLParserIdioms.cpp:
1991         (WebCore::parseImagesWithScaleFromSrcsetAttribute):
1992         (WebCore::bestFitSourceForImageAttributes):
1993
1994 2013-09-19  Martin Robinson  <mrobinson@igalia.com>
1995
1996         [GTK] Clean up the Skip* functions in the GObject DOM bindings code generator
1997         https://bugs.webkit.org/show_bug.cgi?id=121633
1998
1999         Reviewed by Gustavo Noronha Silva.
2000
2001         * bindings/scripts/CodeGeneratorGObject.pm:
2002         (SkipAttribute): Fold in some skipping checks that are used by all callers.
2003         (SkipFunction): Ditto.
2004         (GenerateProperties): Rely on SkipAttribute more thoroughly.
2005         (GenerateFunction): Rely on SkipFunction more thoroughly.
2006         (GenerateFunctions): Rely on SkipAttribute more thoroughly.
2007
2008 2013-09-20  Patrick Gansterer  <paroga@webkit.org>
2009
2010         Fix the build after r156144
2011
2012         * html/canvas/CanvasRenderingContext2D.cpp: Added missing include.
2013
2014 2013-09-20  Ryosuke Niwa  <rniwa@webkit.org>
2015
2016         renderStyleOfEnclosingTextNode should update style before using a renderer
2017         https://bugs.webkit.org/show_bug.cgi?id=121690
2018
2019         Reviewed by Enrica Casucci.
2020
2021         Merge https://chromium.googlesource.com/chromium/blink/+/65f089545e8c18cb268dfcbe56cba1cd8045527a
2022
2023         When accessing a renderer editing should always make sure that the style has been updated for the node.
2024         Editing calls splitTextNode in a number of places and then accesses the renderer later. This patch is
2025         the first of many to make sure editing always updates the style before attempting to access the renderer
2026         (or style) of a node after calling a mutation method.
2027
2028         * editing/ApplyBlockElementCommand.cpp:
2029         (WebCore::ApplyBlockElementCommand::renderStyleOfEnclosingTextNode):
2030         * editing/ApplyBlockElementCommand.h:
2031
2032 2013-09-20  Darin Adler  <darin@apple.com>
2033
2034         Fix a couple more CSS leaks
2035         https://bugs.webkit.org/show_bug.cgi?id=121683
2036
2037         Reviewed by Alexey Proskuryakov.
2038
2039         * css/CSSDefaultStyleSheets.cpp:
2040         (WebCore::CSSDefaultStyleSheets::viewSourceStyle): Put the result of the
2041         parseUASheet into a global variable so it doesn't show up as a storage leak.
2042
2043         * css/CSSGrammar.y.in: Added a missing adoptRef. This was leaking any rule
2044         we parsed individually.
2045
2046 2013-09-20  Bem Jones-Bey  <bjonesbe@adobe.com>
2047
2048         Simplify the ShapeOutsideInfo and ShapeInfo interfaces
2049         https://bugs.webkit.org/show_bug.cgi?id=121685
2050
2051         Reviewed by Darin Adler.
2052
2053         With the creation ShapeInfo::computeSegmentsForLine, it became possible to
2054         simplify the ShapeInfo classes. ShapeOutsideInfo has no need to save the
2055         segments, and now that segment creation is in its own method, it doesn't have
2056         to save the segments anymore. This also simplifies the public interface of
2057         ShapeOutsideInfo, as it only has one method to do the computation.
2058
2059         Also, the methods in ShapeOutsideInfo have been renamed to reflect the fact
2060         that ShapeOutsideInfo isn't really interested in segments.
2061
2062         No new tests, no new behavior.
2063
2064         * rendering/FloatingObjects.cpp:
2065         (WebCore::FloatingObjects::logicalLeftOffset):
2066         (WebCore::FloatingObjects::logicalRightOffset):
2067         * rendering/LineWidth.cpp:
2068         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
2069         * rendering/shapes/ShapeInfo.cpp:
2070         * rendering/shapes/ShapeInfo.h:
2071         * rendering/shapes/ShapeInsideInfo.h:
2072         * rendering/shapes/ShapeOutsideInfo.cpp:
2073         (WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
2074         * rendering/shapes/ShapeOutsideInfo.h:
2075
2076 2013-09-20  Antonio Gomes  <a1.gomes@sisa.samsung.com>
2077
2078         Making tests added in r156157 JS-only, given that other
2079         code generators are still broken.
2080
2081         Original bug 121305 (StrictTypeChecking extended attribute fails for methods with sequence<T>).
2082         https://bugs.webkit.org/show_bug.cgi?id=121305
2083
2084         Rubber stamped by Alexey Proskuryakov.
2085
2086         * bindings/scripts/test/TestObj.idl:
2087
2088 2013-09-20  Jacky Jiang  <zhajiang@blackberry.com>
2089
2090         [BlackBerry] Poor rendering opening a Google map short link
2091         https://bugs.webkit.org/show_bug.cgi?id=121687
2092
2093         Reviewed by Yong Li.
2094         Internally reviewed by Arvid Nilsson.
2095
2096         JIRA 495023
2097         Route lines on google map were shown even they were on a hidden canvas.
2098         Include visibility on LayerWebKitThread if it's a canvas layer and respect
2099         the visibility when compositing layers in LayerRenderer.
2100
2101         * platform/graphics/blackberry/LayerData.h:
2102         (WebCore::LayerData::isCanvasLayer):
2103         (WebCore::LayerData::isVisible):
2104         (WebCore::LayerData::includeVisibility):
2105         * platform/graphics/blackberry/LayerRenderer.cpp:
2106         (WebCore::LayerRenderer::compositeLayersRecursive):
2107
2108 2013-09-20  Sam White  <samuel_white@apple.com>
2109
2110         AX: WebArea claims to have a subrole, but always returns nil.
2111         https://bugs.webkit.org/show_bug.cgi?id=121658
2112
2113         Reviewed by Chris Fleizach.
2114
2115         No new tests, updated existing AXWebArea related test to reflect unused attribute removal.
2116
2117         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2118         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2119
2120 2013-09-20  Andreas Kling  <akling@apple.com>
2121
2122         Add valueForLength/minimumValueForLength wrappers to RenderElement.
2123         <https://webkit.org/b/121676>
2124
2125         Reviewed by Antti Koivisto.
2126
2127         Add two inline wrappers for these functions so we don't have to pass
2128         the RenderView everywhere.
2129
2130 2013-09-20  Martin Robinson  <mrobinson@igalia.com>
2131
2132         [GTK] Fix some small style issues in the bindings
2133         https://bugs.webkit.org/show_bug.cgi?id=121613
2134
2135         Reviewed by Carlos Garcia Campos.
2136
2137         * bindings/scripts/CodeGeneratorGObject.pm: When printing the license
2138         header use the more common comment style within the WebKit project.
2139         (GenerateProperty): Indent property definitions according to WebKit style, improve
2140         the nick and blurb properties, and improve the various parameter spec argument layout.
2141         (GenerateFunction): Remove the newline from function signatures to match WebKit style.
2142         * bindings/scripts/test/GObject: Update bindings test results.
2143
2144 2013-09-20  Patrick Gansterer  <paroga@webkit.org>
2145
2146         [CMake] Use COMPILE_DEFINITIONS target property for setting BUILDING_* defines
2147         https://bugs.webkit.org/show_bug.cgi?id=121672
2148
2149         Reviewed by Gyuyoung Kim.
2150
2151         Since the scope of add_definitions() is always a whole file, we need to use
2152         target properties instead to set definitions only for specific targets.
2153
2154         * CMakeLists.txt:
2155
2156 2013-09-18  Antonio Gomes  <a1.gomes@sisa.samsung.com>
2157
2158         Make "autoscroll for drag'n drop" a setting
2159         https://bugs.webkit.org/show_bug.cgi?id=121559
2160
2161         Reviewed by Ryosuke Niwa.
2162
2163         Currently, there is a ChromeClient hook to make the
2164         feature opt'ed-in or out. That makes it harder to test the
2165         feature on ports that do not enable it, e.g. Mac/WebKit2 port.
2166         However, Mac/WebKit2 is the port that has the best drag'n drop
2167         WTR implementation.
2168
2169         Patch changes the toggle on/off mechanism to be a setting,
2170         and exposes it through InternalSetting interface for testing.
2171
2172         * page/AutoscrollController.cpp:
2173         (WebCore::AutoscrollController::updateDragAndDrop):
2174         * page/ChromeClient.h:
2175         * page/Settings.in:
2176         * testing/InternalSettings.cpp:
2177         (WebCore::InternalSettings::Backup::Backup):
2178         (WebCore::InternalSettings::Backup::restoreTo):
2179         (WebCore::InternalSettings::setAutoscrollForDragAndDropEnabled):
2180         * testing/InternalSettings.h:
2181         * testing/InternalSettings.idl:
2182
2183 2013-09-16  Antonio Gomes  <a1.gomes@sisa.samsung.com>
2184
2185         StrictTypeChecking extended attribute fails for methods with sequence<T>
2186         https://bugs.webkit.org/show_bug.cgi?id=121305
2187
2188         Reviewed by Darin Adler.
2189
2190         The extended attribute StrictTypeChecking can not be set to methods if
2191         one of the parameters is a "sequence".
2192         Basically, since "sequence" is not considered a native type
2193         (see function IsNativeType) the Perl code generator tries to
2194         include its supposedly associated header, in this case "JSsequence.h"
2195         Compilation then fails.
2196
2197         It is a problem for bindings including WebGL, where all methods
2198         are supposed to be set as StrictTypeChecking (see bug 44202 [1]). Due to this restriction,
2199         it relaxed, but I would like to bring it back.
2200
2201         Patch fixes the issue by hardening the way includes are auto-added
2202         for methods where StrictTypeChecking extended attribute is present.
2203         Now, only wrapper types (see IsWrapperType) trigger header inclusion,
2204         excluding arrays, sequences, basic types, etc.
2205
2206         [1] https://bugs.webkit.org/show_bug.cgi?id=44202
2207
2208         * bindings/scripts/CodeGeneratorJS.pm:
2209         (GenerateParametersCheck):
2210         * bindings/scripts/test/JS/JSTestObj.cpp:
2211         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
2212         * bindings/scripts/test/JS/JSTestObj.h:
2213         * bindings/scripts/test/TestObj.idl:
2214
2215 2013-09-20  Andreas Kling  <akling@apple.com>
2216
2217         Optimize fetching the Node for never-anonymous renderers.
2218         <https://webkit.org/b/121627>
2219
2220         Reviewed by Antti Koivisto.
2221
2222         Add a RenderObject::nodeForNonAnonymous() that can be used instead
2223         of node() when a renderer is guaranteed non-anonymous.
2224
2225         Use this to implement reference element getters for the various
2226         renderers that are known at compile-time to correspond to a DOM node.
2227
2228         Also renamed existingElement() => element() since using an alternate
2229         name for a reference overload isn't actually necessary.
2230
2231 2013-09-20  Patrick Gansterer  <paroga@webkit.org>
2232
2233         Remove duplicated secondsPerDay variables
2234         https://bugs.webkit.org/show_bug.cgi?id=121601
2235
2236         Reviewed by Andreas Kling.
2237
2238         Use secondsPerDay from DateMath.h instead of defining it again.
2239
2240         * history/HistoryItem.cpp:
2241         (WebCore::timeToDay):
2242
2243 2013-09-20  Patrick Gansterer  <paroga@webkit.org>
2244
2245         Fix duplicated loop variable names after r155743
2246         https://bugs.webkit.org/show_bug.cgi?id=121667
2247
2248         Reviewed by Andreas Kling.
2249
2250         Do not use the same name for variables in nested loops to fix a compiler warning.
2251
2252         * page/animation/CSSPropertyAnimation.cpp:
2253         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
2254
2255 2013-09-20  Antti Koivisto  <antti@apple.com>
2256
2257         Make RenderObject::parent() return RenderElement
2258         https://bugs.webkit.org/show_bug.cgi?id=121671
2259
2260         Reviewed by Andreas Kling.
2261
2262         Make RenderObject::parent() return RenderElement and adopt everywhere.
2263         Moved addChild/removeChild from RenderObject to RenderElement.
2264         Uninlined a few big RenderObject functions.
2265         Renamed RenderObject::remove() -> RenderObject::removeFromParent()
2266
2267 2013-09-20  Csaba Osztrogon√°c  <ossy@webkit.org>
2268
2269         Buildfix after r156133 for !ENABLE(WORKERS) platforms
2270         https://bugs.webkit.org/show_bug.cgi?id=121669
2271
2272         Reviewed by Antti Koivisto.
2273
2274         * platform/ThreadGlobalData.cpp:
2275         * platform/ThreadGlobalData.h:
2276
2277 2013-09-20  Antti Koivisto  <antti@apple.com>
2278
2279         Make createRenderer() return RenderElement
2280         https://bugs.webkit.org/show_bug.cgi?id=121666
2281
2282         Rubber-stamped by Andreas Kling.
2283         
2284         Tighter typing.
2285
2286 2013-09-20  Patrick Gansterer  <paroga@webkit.org>
2287
2288         Buildfix for ENABLE(CSS_FILTERS) && !ENABLE(ACCELERATED_COMPOSITING) after r155131.
2289
2290         * rendering/RenderLayer.cpp:
2291         (WebCore::RenderLayer::enclosingFilterRepaintLayer):
2292
2293 2013-09-20  Patrick Gansterer  <paroga@webkit.org>
2294
2295         [WIN] Fix build without precompiled header after r154146.
2296
2297         * platform/win/WebCoreBundleWin.cpp:
2298
2299 2013-09-20  Antti Koivisto  <antti@apple.com>
2300
2301         Add covariant RenderElement* Element::renderer()
2302         https://bugs.webkit.org/show_bug.cgi?id=121638
2303
2304         Reviewed by Andreas Kling.
2305
2306         Also add isRenderElement() test and casting functions.
2307
2308 2013-09-19  Anders Carlsson  <andersca@apple.com>
2309
2310         Handle null font families.
2311
2312         Reviewed by Darin Adler.
2313
2314         * platform/graphics/Font.cpp:
2315         (WebCore::computeFontGlyphsCacheHash):
2316         Don't crash when trying to hash null strings.
2317
2318 2013-09-19  Darin Adler  <darin@apple.com>
2319
2320         Fix a couple mistakes in my recent CSS grammar leak patch
2321         https://bugs.webkit.org/show_bug.cgi?id=121659
2322
2323         Reviewed by Alexey Proskuryakov.
2324
2325         * css/CSSGrammar.y.in: Added initialization to nullptr for some error cases
2326         that were otherwise leaving a bad value for the result of the production.
2327         Also fixed a reversed logical expression.
2328
2329 2013-09-19  Yoav Weiss  <yoav@yoav.ws>
2330
2331         Remove URL decoding in srcset handling
2332         https://bugs.webkit.org/show_bug.cgi?id=121609
2333
2334         Reviewed by Benjamin Poulain.
2335
2336         Tests: fast/hidpi/image-srcset-question-mark.html
2337                fast/loader/image-src-question-mark.html
2338
2339         Removed URL decoding from src and srcset's handling algorithm, since they break encoded URLS.
2340
2341         * html/parser/HTMLParserIdioms.cpp:
2342         (WebCore::parseImagesWithScaleFromSrcSetAttribute):
2343         (WebCore::bestFitSourceForImageAttributes):
2344
2345 2013-09-19  Anders Carlsson  <andersca@apple.com>
2346
2347         Avoid calling AtomicString::lower() in makeFontGlyphsCacheKey
2348         https://bugs.webkit.org/show_bug.cgi?id=121656
2349
2350         Reviewed by Darin Adler.
2351
2352         Instead of lower casing AtomicStrings, store the strings as is and use the case folding
2353         hash and case insensitive compare to determine equality.
2354
2355         * platform/graphics/Font.cpp:
2356         (WebCore::operator==):
2357         (WebCore::makeFontGlyphsCacheKey):
2358         (WebCore::computeFontGlyphsCacheHash):
2359
2360 2013-09-19  Darin Adler  <darin@apple.com>
2361
2362         Fix leaks in CSS parser caused by overwriting owned raw pointers with 0
2363         https://bugs.webkit.org/show_bug.cgi?id=121655
2364
2365         Reviewed by Anders Carlsson.
2366
2367         * css/CSSGrammar.y.in: Use nullptr instead of 0. Use unique_ptr instead
2368         of a raw pointer in cases where we might or might not actually keep
2369         the allocated memory. This can still be cleaned up further, but this
2370         should fix the memory leaks we have been seeing.
2371
2372 2013-09-19  Eric Carlson  <eric.carlson@apple.com>
2373
2374         MediaStream API: update MediaStreamTrackEvent object to match spec
2375         https://bugs.webkit.org/show_bug.cgi?id=121624
2376
2377         Reviewed by Dean Jackson.
2378
2379         Test: fast/mediastream/MediaStreamTrackEvent-constructor.html
2380
2381         * Modules/mediastream/MediaStreamTrack.idl: Remove NoInterfaceObject.
2382
2383         * Modules/mediastream/MediaStreamTrackEvent.cpp: 
2384         (WebCore::MediaStreamTrackEventInit::MediaStreamTrackEventInit): New.
2385         (WebCore::MediaStreamTrackEvent::create): New form that takes an initialize.
2386         (WebCore::MediaStreamTrackEvent::MediaStreamTrackEvent): Ditto.
2387         * Modules/mediastream/MediaStreamTrackEvent.h:
2388         * Modules/mediastream/MediaStreamTrackEvent.idl:
2389
2390         * bindings/js/JSDictionary.cpp:
2391         (WebCore::JSDictionary::convertValue): New.
2392         * bindings/js/JSDictionary.h:
2393
2394 2013-09-19  Anders Carlsson  <andersca@apple.com>
2395
2396         Remove #if !ENABLE(WORKERS) code in ThreadGlobalData
2397         https://bugs.webkit.org/show_bug.cgi?id=121649
2398
2399         Reviewed by Sam Weinig.
2400
2401         This lets us remove a FIXME. Also, move threadGlobalData out of line; there's no need for it to be inline.
2402
2403         * WebCore.exp.in:
2404         * platform/ThreadGlobalData.cpp:
2405         (WebCore::threadGlobalData):
2406         * platform/ThreadGlobalData.h:
2407
2408 2013-09-19  Anders Carlsson  <andersca@apple.com>
2409
2410         Modernize Length setters/getters
2411         https://bugs.webkit.org/show_bug.cgi?id=121647
2412
2413         Reviewed by Andreas Kling.
2414
2415         Add a move constructor and move assignment operator to Length and fixup some of the getters and setters.
2416
2417         * css/CSSComputedStyleDeclaration.cpp:
2418         (WebCore::getBorderRadiusCornerValues):
2419         (WebCore::getBorderRadiusCornerValue):
2420         * css/DeprecatedStyleBuilder.cpp:
2421         (WebCore::ApplyPropertyLength::setValue):
2422         (WebCore::ApplyPropertyLength::createHandler):
2423         (WebCore::ApplyPropertyBorderRadius::setValue):
2424         (WebCore::ApplyPropertyBorderRadius::createHandler):
2425         (WebCore::ApplyPropertyLineHeight::createHandler):
2426         * page/animation/CSSPropertyAnimation.cpp:
2427         (WebCore::LengthPropertyWrapper::LengthPropertyWrapper):
2428         (WebCore::LengthPropertyWrapper::blend):
2429         (WebCore::FillLayerPropertyWrapper::FillLayerPropertyWrapper):
2430         (WebCore::FillLayerPropertyWrapper::blend):
2431         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
2432         * platform/CalculationValue.h:
2433         (WebCore::CalcExpressionLength::CalcExpressionLength):
2434         (WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength):
2435         * platform/Length.cpp:
2436         (WebCore::CalculationValueHandleMap::remove):
2437         (WebCore::CalculationValueHandleMap::find):
2438         (WebCore::Length::decrementCalculatedRef):
2439         * platform/Length.h:
2440         (WebCore::Length::Length):
2441         (WebCore::Length::operator=):
2442         (WebCore::Length::moveFromLength):
2443         * platform/LengthBox.cpp:
2444         (WebCore::LengthBox::logicalLeft):
2445         (WebCore::LengthBox::logicalRight):
2446         (WebCore::LengthBox::before):
2447         (WebCore::LengthBox::after):
2448         (WebCore::LengthBox::start):
2449         (WebCore::LengthBox::end):
2450         * platform/LengthBox.h:
2451         (WebCore::LengthBox::LengthBox):
2452         (WebCore::LengthBox::left):
2453         (WebCore::LengthBox::right):
2454         (WebCore::LengthBox::top):
2455         (WebCore::LengthBox::bottom):
2456         * platform/LengthSize.h:
2457         (WebCore::LengthSize::LengthSize):
2458         (WebCore::LengthSize::setWidth):
2459         (WebCore::LengthSize::width):
2460         (WebCore::LengthSize::setHeight):
2461         (WebCore::LengthSize::height):
2462         * platform/graphics/filters/FilterOperation.h:
2463         (WebCore::FilterOperation::BlurFilterOperation::create):
2464         (WebCore::FilterOperation::BlurFilterOperation::stdDeviation):
2465         (WebCore::FilterOperation::BlurFilterOperation::BlurFilterOperation):
2466         * rendering/style/BasicShapes.h:
2467         (WebCore::BasicShapeRectangle::x):
2468         (WebCore::BasicShapeRectangle::y):
2469         (WebCore::BasicShapeRectangle::width):
2470         (WebCore::BasicShapeRectangle::height):
2471         (WebCore::BasicShapeRectangle::cornerRadiusX):
2472         (WebCore::BasicShapeRectangle::cornerRadiusY):
2473         (WebCore::BasicShapeRectangle::setX):
2474         (WebCore::BasicShapeRectangle::setY):
2475         (WebCore::BasicShapeRectangle::setWidth):
2476         (WebCore::BasicShapeRectangle::setHeight):
2477         (WebCore::BasicShapeRectangle::setCornerRadiusX):
2478         (WebCore::BasicShapeRectangle::setCornerRadiusY):
2479         (WebCore::BasicShapeCircle::centerX):
2480         (WebCore::BasicShapeCircle::centerY):
2481         (WebCore::BasicShapeCircle::radius):
2482         (WebCore::BasicShapeCircle::setCenterX):
2483         (WebCore::BasicShapeCircle::setCenterY):
2484         (WebCore::BasicShapeCircle::setRadius):
2485         (WebCore::BasicShapeEllipse::centerX):
2486         (WebCore::BasicShapeEllipse::centerY):
2487         (WebCore::BasicShapeEllipse::radiusX):
2488         (WebCore::BasicShapeEllipse::radiusY):
2489         (WebCore::BasicShapeEllipse::setCenterX):
2490         (WebCore::BasicShapeEllipse::setCenterY):
2491         (WebCore::BasicShapeEllipse::setRadiusX):
2492         (WebCore::BasicShapeEllipse::setRadiusY):
2493         (WebCore::BasicShapePolygon::getXAt):
2494         (WebCore::BasicShapePolygon::getYAt):
2495         (WebCore::BasicShapePolygon::appendPoint):
2496         (WebCore::BasicShapeInsetRectangle::top):
2497         (WebCore::BasicShapeInsetRectangle::right):
2498         (WebCore::BasicShapeInsetRectangle::bottom):
2499         (WebCore::BasicShapeInsetRectangle::left):
2500         (WebCore::BasicShapeInsetRectangle::cornerRadiusX):
2501         (WebCore::BasicShapeInsetRectangle::cornerRadiusY):
2502         (WebCore::BasicShapeInsetRectangle::setTop):
2503         (WebCore::BasicShapeInsetRectangle::setRight):
2504         (WebCore::BasicShapeInsetRectangle::setBottom):
2505         (WebCore::BasicShapeInsetRectangle::setLeft):
2506         (WebCore::BasicShapeInsetRectangle::setCornerRadiusX):
2507         (WebCore::BasicShapeInsetRectangle::setCornerRadiusY):
2508         * rendering/style/FillLayer.h:
2509         (WebCore::FillSize::FillSize):
2510         (WebCore::FillLayer::xPosition):
2511         (WebCore::FillLayer::yPosition):
2512         (WebCore::FillLayer::sizeLength):
2513         (WebCore::FillLayer::setXPosition):
2514         (WebCore::FillLayer::setYPosition):
2515         * rendering/style/NinePieceImage.cpp:
2516         (WebCore::NinePieceImage::NinePieceImage):
2517         * rendering/style/NinePieceImage.h:
2518         (WebCore::NinePieceImage::setImageSlices):
2519         (WebCore::NinePieceImage::setBorderSlices):
2520         (WebCore::NinePieceImage::setOutset):
2521         (WebCore::NinePieceImage::computeOutset):
2522         * rendering/style/RenderStyle.cpp:
2523         (WebCore::RenderStyle::specifiedLineHeight):
2524         * rendering/style/RenderStyle.h:
2525         * rendering/style/StyleBoxData.h:
2526         (WebCore::StyleBoxData::width):
2527         (WebCore::StyleBoxData::height):
2528         (WebCore::StyleBoxData::minWidth):
2529         (WebCore::StyleBoxData::minHeight):
2530         (WebCore::StyleBoxData::maxWidth):
2531         (WebCore::StyleBoxData::maxHeight):
2532         (WebCore::StyleBoxData::verticalAlign):
2533         * rendering/style/StyleReflection.h:
2534         (WebCore::StyleReflection::offset):
2535         (WebCore::StyleReflection::setOffset):
2536
2537 2013-09-19  Andreas Kling  <akling@apple.com>
2538
2539         Out-of-line InspectorValues create() methods.
2540         <https://webkit.org/b/121639>
2541
2542         Reviewed by Joseph Pecoraro.
2543
2544         These functions are hardly performance-critical and are taking up
2545         quite a lot of space.
2546
2547         Shrinks the WebCore binary by 70500 bytes.
2548
2549 2013-09-19  Alexey Proskuryakov  <ap@apple.com>
2550
2551         Layout Test http/tests/security/canvas-remote-read-remote-image-redirect.html is flaky
2552         https://bugs.webkit.org/show_bug.cgi?id=121458
2553
2554         Reviewed by Sam Weinig.
2555
2556         The code to automagically produce line numbers is quite fragile. Added some FIXMEs,
2557         and added an issue that was making reporting flaky for code is JS event handlers
2558         executed while parsing was paused.
2559
2560         * page/PageConsole.cpp: (WebCore::PageConsole::addMessage): Use actual "script is
2561         running" check instead of "parsing a script element" one.
2562
2563 2013-09-18  Ryosuke Niwa  <rniwa@webkit.org>
2564
2565         Remove superfluous CSSLinearTimingFunctionValue and use switch on TimingFunction::type() in more places
2566         https://bugs.webkit.org/show_bug.cgi?id=121589
2567
2568         Reviewed by Dean Jackson.
2569  
2570         Replaced CSSLinearTimingFunctionValue by the identifier "linear" and used switch statements on
2571         TimingFunction::type() in more places where we were branching on every type.
2572
2573         Merge https://chromium.googlesource.com/chromium/blink/+/5454f20c71090c35bdd1053e5cc572d5c0bdede7
2574         Merge https://chromium.googlesource.com/chromium/blink/+/104ad42c523d32b67d108c6e59f4f27488fe38a5
2575
2576         * css/CSSComputedStyleDeclaration.cpp:
2577         (WebCore::createTimingFunctionValue):
2578         * css/CSSTimingFunctionValue.cpp:
2579         * css/CSSTimingFunctionValue.h:
2580         * css/CSSToStyleMap.cpp:
2581         (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
2582         * css/CSSValue.cpp:
2583         (WebCore::CSSValue::equals):
2584         (WebCore::CSSValue::cssText):
2585         (WebCore::CSSValue::destroy):
2586         * css/CSSValue.h:
2587         (WebCore::CSSValue::isCubicBezierTimingFunctionValue):
2588         * page/animation/AnimationBase.cpp:
2589         (WebCore::AnimationBase::progress):
2590
2591 2013-09-19  Commit Queue  <commit-queue@webkit.org>
2592
2593         Unreviewed, rolling out r156119.
2594         http://trac.webkit.org/changeset/156119
2595         https://bugs.webkit.org/show_bug.cgi?id=121640
2596
2597         broke builds in various ways (Requested by anttik on #webkit).
2598
2599         * accessibility/AccessibilitySpinButton.cpp:
2600         * bindings/scripts/CodeGeneratorObjC.pm:
2601         (GenerateImplementation):
2602         * css/SelectorChecker.cpp:
2603         * dom/ContainerNode.h:
2604         * dom/Element.h:
2605         * dom/PseudoElement.cpp:
2606         (WebCore::PseudoElement::didAttachRenderers):
2607         * editing/SplitTextNodeContainingElementCommand.cpp:
2608         (WebCore::SplitTextNodeContainingElementCommand::doApply):
2609         * editing/TypingCommand.cpp:
2610         * html/ImageDocument.cpp:
2611         * page/PageSerializer.cpp:
2612         * rendering/RenderElement.h:
2613         * rendering/RenderObject.h:
2614         * svg/SVGAnimatedColor.cpp:
2615         (WebCore::adjustForCurrentColor):
2616         * svg/SVGLocatable.cpp:
2617         * svg/graphics/filters/SVGFEImage.cpp:
2618         (WebCore::FEImage::determineAbsolutePaintRect):
2619         (WebCore::FEImage::referencedRenderer):
2620         * svg/graphics/filters/SVGFEImage.h:
2621
2622 2013-09-19  Antti Koivisto  <antti@apple.com>
2623
2624         Add covariant RenderElement* Element::renderer()
2625         https://bugs.webkit.org/show_bug.cgi?id=121638
2626
2627         Reviewed by Andreas Kling.
2628
2629         Also add isRenderElement() test and casting functions.
2630
2631 2013-09-19  Andreas Kling  <akling@apple.com>
2632
2633         Streamline JSMainThreadNullState.
2634         <https://webkit.org/b/121636>
2635
2636         Reviewed by Anders Carlsson.
2637
2638         JSMainThreadNullState is only used by non-JavaScript bindings and
2639         thus won't ever call didLeaveScriptContext() on destruction.
2640         Specialize the class for its use-case instead of sharing code
2641         with JSMainThreadExecState.
2642
2643         Shrinks the WebCore binary by 82848 bytes.
2644
2645 2013-09-19  Bear Travis  <betravis@adobe.com>
2646
2647         CSS_SHAPES not supported on AppleWin port
2648         https://bugs.webkit.org/show_bug.cgi?id=118810
2649
2650         Reviewed by Brent Fulgham.
2651
2652         Enabling fast/shapes on windows.
2653
2654         * WebCore.vcxproj/WebCore.vcxproj: Add missing shape includes.
2655         * WebCore.vcxproj/WebCoreCommon.props: Include shapes source folder.
2656         * WebCore.vcxproj/copyForwardingHeaders.cmd: Copy shapes headers.
2657         * css/CSSPropertyNames.in: Tweak to ensure shapes properties are regenerated.
2658
2659 2013-09-19  Andreas Kling  <akling@apple.com>
2660
2661         Add SVGPropertyInfo.cpp
2662         <https://webkit.org/b/121622>
2663
2664         Reviewed by Anders Carlsson.
2665
2666         Add a cpp file for this class to make it more hackable.
2667
2668         * CMakeLists.txt:
2669         * GNUmakefile.list.am:
2670         * Target.pri:
2671         * WebCore.vcxproj/WebCore.vcxproj:
2672         * WebCore.vcxproj/WebCore.vcxproj.filters:
2673         * WebCore.xcodeproj/project.pbxproj:
2674         * svg/properties/SVGPropertyInfo.cpp: Added.
2675         (WebCore::SVGPropertyInfo::SVGPropertyInfo):
2676         * svg/properties/SVGPropertyInfo.h:
2677
2678 2013-09-19  Eric Carlson  <eric.carlson@apple.com>
2679
2680         MediaStream API: update NavigatorUserMediaError object to match spec
2681         https://bugs.webkit.org/show_bug.cgi?id=121584
2682
2683         Reviewed by Dean Jackson.
2684
2685         No new tests, updated getusermedia.html.
2686
2687         * CMakeLists.txt: Add NavigatorUserMediaError.cpp.
2688         * GNUmakefile.list.am: Ditto.
2689
2690         * Modules/mediastream/NavigatorUserMediaError.cpp: Added.
2691         * Modules/mediastream/NavigatorUserMediaError.h: Derive from DOMError, get rid of "message" attribute.
2692         * Modules/mediastream/NavigatorUserMediaError.idl: Ditto.
2693
2694         * Modules/mediastream/UserMediaRequest.cpp:
2695         (WebCore::UserMediaRequest::create): ASCIILiteral -> AtomicString. Rename constraint parameters.
2696         (WebCore::UserMediaRequest::UserMediaRequest): Rename constraint parameters.
2697         (WebCore::UserMediaRequest::audioConstraints): Return PassRefPtr<> instead of raw ptr.
2698         (WebCore::UserMediaRequest::videoConstraints): Ditto.
2699         (WebCore::UserMediaRequest::ownerDocument): Clean up style.
2700         (WebCore::UserMediaRequest::succeed): 
2701         (WebCore::UserMediaRequest::permissionFailure): Renamed from fail.
2702         (WebCore::UserMediaRequest::constraintFailure):  Renamed from failConstraint.
2703         (WebCore::UserMediaRequest::callSuccessHandler): New.
2704         (WebCore::UserMediaRequest::callErrorHandler): New.
2705         * Modules/mediastream/UserMediaRequest.h:
2706
2707         * WebCore.xcodeproj/project.pbxproj: Add NavigatorUserMediaError.cpp
2708
2709         * dom/DOMError.h: Make constructor protected.
2710
2711         * platform/mediastream/MediaStreamSourcesQueryClient.h: Make constraints available.
2712
2713 2013-09-19  Bem Jones-Bey  <bjonesbe@adobe.com>
2714
2715         Fix handling of top margin on float with shape-outside
2716         https://bugs.webkit.org/show_bug.cgi?id=121614
2717
2718         Reviewed by Alexandru Chiculita.
2719
2720         When a float has shape outside, the top margin should be treated as if
2721         there is no shape there, so inline content should be allowed to flow
2722         into that space. This patch fixes two issues:
2723         
2724         1) If the top margin is the same as the line height, a line should be
2725         able to fit into the margin. Before this patch, that line was being
2726         treated as if it intersected with the shape.
2727         
2728         2) The shape should be positioned (x, y) relative to the box sizing
2729         box of the float. While the x coordinate was being treated properly,
2730         the y coordinate was relative to the top of the margin box. This patch
2731         fixes this behavior.
2732         
2733         This patch also includes a simple test for right and left margins, as
2734         I wrote that test and then discovered the problems listed above.
2735         
2736         This patch also removes an unused override of the
2737         lineOverlapsShapeBounds method.
2738
2739         Tests: csswg/submitted/shapes/shape-outside/shape-outside-floats-margin-000.html
2740                csswg/submitted/shapes/shape-outside/shape-outside-floats-margin-001.html
2741
2742         * rendering/FloatingObjects.cpp:
2743         (WebCore::FloatingObjects::logicalLeftOffset): 
2744         (WebCore::FloatingObjects::logicalRightOffset):
2745         * rendering/LineWidth.cpp:
2746         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
2747         * rendering/shapes/ShapeInfo.h:
2748         * rendering/shapes/ShapeInsideInfo.h:
2749         * rendering/shapes/ShapeOutsideInfo.cpp:
2750         (WebCore::ShapeOutsideInfo::computeSegmentsForContainingBlockLine):
2751         * rendering/shapes/ShapeOutsideInfo.h:
2752
2753 2013-09-19  Antti Koivisto  <antti@apple.com>
2754
2755         Add RenderElement
2756         https://bugs.webkit.org/show_bug.cgi?id=121608
2757
2758         Reviewed by Dave Hyatt.
2759
2760         Add a common base class for all Element renderers. The class hierarchy will now look like this
2761         
2762         RenderObject
2763             RenderText
2764             RenderElement
2765                 RenderLayerModelObject
2766                     ...
2767                 RenderSVGModelObject
2768                     ...
2769                 RenderSVGGradientStop
2770                 
2771         This will allow tighter typing in both render and DOM trees.
2772         
2773         The patch also moves renderer factory function to RenderElement::createFor().
2774
2775 2013-09-19  Alexey Proskuryakov  <ap@apple.com>
2776
2777         REGRESSION (r149928): CanvasStyle::operator= leaks everything
2778         https://bugs.webkit.org/show_bug.cgi?id=121591
2779
2780         Reviewed by Andreas Kling.
2781
2782         * html/canvas/CanvasStyle.cpp: (WebCore::CanvasStyle::operator=): Don't leak.
2783
2784 2013-09-19  Andrei Parvu  <parvu@adobe.com>
2785
2786         [CSS Masking/Background] Position property should be ignored when using repeat: space
2787         https://bugs.webkit.org/show_bug.cgi?id=120623
2788
2789         The background/mask-position should be ignored when using repeat: space,
2790         unless there is not enough space for two copies of the image. In that case,
2791         only one image is placed and background/mask-position determines its position.
2792
2793         Reviewed by Dirk Schulze.
2794
2795         Test: css3/masking/mask-repeat-one-copy.html
2796
2797         * rendering/RenderBoxModelObject.cpp: Ignored position property if space value is positive, set no-repeat otherwise.
2798         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2799
2800 2013-09-19  Andreas Kling  <akling@apple.com>
2801
2802         CTTE: EllipsisBox::renderer() should return RenderBlock&.
2803         <https://webkit.org/b/121604>
2804
2805         Reviewed by Antti Koivisto.
2806
2807         I missed adding a renderer() overload when fixing up EllipsisBox.
2808         Flushed out one unnecessary type check.
2809
2810 2013-09-19  Andreas Kling  <akling@apple.com>
2811
2812         CTTE: Tighten renderer types for InlineTextBox and SVGInlineTextBox.
2813         <https://webkit.org/b/121605>
2814
2815         Reviewed by Antti Koivisto.
2816
2817         Codify the following:
2818
2819         - InlineTextBox always has a RenderText.
2820         - SVGInlineTextBox always has a RenderSVGInlineText.
2821
2822         Removed InlineTextBox::textRenderer() and make renderer() simply
2823         return a RenderText&/RenderSVGInlineText& instead.
2824
2825         This turns some node() accessors into textNode() and removes a host
2826         of casts and assertions.
2827
2828 2013-09-19  Antti Koivisto  <antti@apple.com>
2829
2830         [CTTE] Hide nonPseudoNode and generatingNode, replace with Element versions
2831         https://bugs.webkit.org/show_bug.cgi?id=121606
2832
2833         Reviewed by Andreas Kling.
2834
2835 2013-09-19  Andreas Kling  <akling@apple.com>
2836
2837         CTTE: Tighten renderer types for InlineFlowBox and SVGInlineFlowBox.
2838         <https://webkit.org/b/121603>
2839
2840         Reviewed by Antti Koivisto.
2841
2842         Codify the following:
2843
2844         - InlineFlowBox always has a RenderBoxModelObject.
2845         - SVGInlineFlowBox always has a RenderSVGInline.
2846
2847         This turns some node() accessors into element(). Neato!
2848
2849 2013-09-19  Gurpreet Kaur  <k.gurpreet@samsung.com>
2850
2851         CSS Unit vmax and vmin in border-width not handled.
2852         https://bugs.webkit.org/show_bug.cgi?id=121421
2853
2854         Reviewed by Darin Adler.
2855
2856         Border properties were not applied incase its values 
2857         were given in vmax/vmin units.
2858
2859         Tests: fast/css/viewport-vmax-border.html
2860                fast/css/viewport-vmin-border.html
2861
2862         * css/CSSPrimitiveValue.cpp:
2863         (WebCore::CSSPrimitiveValue::computeLengthDouble):
2864         * css/CSSPrimitiveValue.h:
2865         (WebCore::CSSPrimitiveValue::isViewportPercentageMax):
2866         (WebCore::CSSPrimitiveValue::isViewportPercentageMin):
2867         * css/DeprecatedStyleBuilder.cpp:
2868         (WebCore::ApplyPropertyComputeLength::applyValue):
2869         Calculating the border values which has been specified in
2870         vmax/vmin units. 1vmax: 1vw or 1vh, whatever is largest.
2871         1vmin: 1vw or 1vh, whatever is smallest. The vh/vw units are 
2872         calcultated as percent of viewport height and viewport width respectively.
2873
2874 2013-09-19  Antti Koivisto  <antti@apple.com>
2875
2876         [CTTE] RenderText is always anonymous or associated with Text node
2877         https://bugs.webkit.org/show_bug.cgi?id=121596
2878
2879         Reviewed by Andreas Kling.
2880
2881         Tighten the node type of RenderText and its subclasses to Text.
2882         Switch to createAnonymous pattern.
2883         Switch a bunch of unnecessary StringImpl* use to Strings.
2884
2885 2013-09-18  Mihnea Ovidenie  <mihnea@adobe.com>
2886
2887         Unreviewed build fix after 156082. Guard SVG code with defines.
2888
2889         * rendering/RenderNamedFlowThread.cpp:
2890         (WebCore::nextNodeInsideContentNode):
2891
2892 2013-09-18  Mihnea Ovidenie  <mihnea@adobe.com>
2893
2894         [CSSRegions] Failed to retrieve named flow ranges for content with inline svg
2895         https://bugs.webkit.org/show_bug.cgi?id=121489
2896
2897         Reviewed by David Hyatt.
2898
2899         The inline SVG element behaves like a replaced element in HTML context. When computing the ranges
2900         that are displayed inside a region for a named flow that contains an inline SVG element, we have
2901         to treat the SVG as a replaced and run the checks only for the SVG root element, skipping the
2902         other SVG elements inside.
2903
2904         Test: fast/regions/get-region-flow-ranges-inline-svg.html
2905
2906         * rendering/RenderNamedFlowThread.cpp:
2907         (WebCore::nextNodeInsideContentNode): Add function to retrieve the next node in traversal
2908         under the contentNode subtree that should be used for getRanges inspection.
2909         (WebCore::RenderNamedFlowThread::getRanges): Replace NodeTravesal::next with nextNodeInsideContentNode.
2910
2911 2013-09-18  Bem Jones-Bey  <bjonesbe@adobe.com>
2912
2913         REGRESSION (r155854 - r155967) block with margin-left adjacent to floated block causes text of subsequent blocks to overlap the floated block.
2914         https://bugs.webkit.org/show_bug.cgi?id=121532
2915
2916         Reviewed by Andreas Kling.
2917
2918         When refactoring the code, I ended up adding the margin in instead of
2919         subtracting it in the case of an intruding float. This patch fixes
2920         that so that the margin is properly handled.
2921
2922         Test: fast/block/float/intruding-float-sibling-with-margin.html
2923
2924         * rendering/RenderBlock.cpp:
2925         (WebCore::RenderBlock::addIntrudingFloats):
2926
2927 2013-09-18  Ryosuke Niwa  <rniwa@webkit.org>
2928
2929         Merge HTMLBodyElement::didNotifySubtreeInsertions into HTMLBodyElement::insertedInto
2930         https://bugs.webkit.org/show_bug.cgi?id=121576
2931
2932         Reviewed by Andreas Kling.
2933
2934         Merge https://chromium.googlesource.com/chromium/blink/+/2a9cac908f4eceadfcf9d21bdf5b3e598075aa1f
2935
2936         The logic in didNotifySubtreeInsertions to set the marginwidth and marginheight attributes
2937         on the <body> of elements inside <iframe> and <frame> doesn't need to run after inserting
2938         all the children of the frame. In fact this means that when you have those attributes
2939         and then the script in the iframe touches offsetLeft or any layout dependent property
2940         we'll layout with the wrong values and then have to do another layout after these margin
2941         attributes are set.
2942
2943         I also remove the scheduleRelayout() call that was inside didNotifySubtreeInsertions. This
2944         call doesn't make any sense, inserting a <body> will always trigger a style recalc and
2945         a subsequent layout. The code is 9 years old: https://trac.webkit.org/changeset/8122
2946         and all tests run fine without it.
2947
2948         * html/HTMLBodyElement.cpp:
2949         (WebCore::HTMLBodyElement::insertedInto):
2950         * html/HTMLBodyElement.h:
2951         * html/HTMLFrameElementBase.h:
2952         (WebCore::isHTMLFrameElementBase):
2953         (WebCore::toHTMLFrameElementBase):
2954
2955 2013-09-18  Jer Noble  <jer.noble@apple.com>
2956
2957         [MSE] Throw exception when setting timestampOffset while 'updating' state is set.
2958         https://bugs.webkit.org/show_bug.cgi?id=121561
2959
2960         Reviewed by Eric Carlson.
2961
2962         Tests: Updated http/tests/media/media-source/mediasource-append-buffer.html.
2963
2964         Merge https://chromium.googlesource.com/chromium/blink/+/25285998be3d0edcd951d12d445a7375e50e512c
2965         by Changbin Shao.
2966
2967         The Media Source Extensions spec requires that an exception be thrown if the 'updating' attribute
2968         equals true while setting the timestampOffset of a SourceBuffer. 
2969
2970         * Modules/mediasource/SourceBuffer.cpp:
2971         (WebCore::SourceBuffer::setTimestampOffset):
2972
2973 2013-09-18  Anders Carlsson  <andersca@apple.com>
2974
2975         RefPtrHashMap should work with move only types
2976         https://bugs.webkit.org/show_bug.cgi?id=121564
2977
2978         Reviewed by Andreas Kling.
2979
2980         * bridge/IdentifierRep.cpp:
2981         (WebCore::IdentifierRep::get):
2982         * page/PageGroup.cpp:
2983         (WebCore::PageGroup::transientLocalStorage):
2984
2985 2013-09-18  Enrica Casucci  <enrica@apple.com>
2986
2987         Upstream changes to WebHTMLConverter to support HTML
2988         to NSAttributedString conversion on both iOS and OS X.
2989
2990         Reviewed by Benjamin Poulain.
2991
2992         This is a new submission of r156001 with the fix for the
2993         failing TestWebKitAPI test. The additional change has been
2994         reviewed by Tim Horton.
2995         
2996         * platform/mac/HTMLConverter.h:
2997         * platform/mac/HTMLConverter.mm:
2998         (WebDefaultFont):
2999         (_fontForNameAndSize):
3000         (+[WebHTMLConverter defaultParagraphStyle]):
3001         (-[WebHTMLConverter _computedStyleForElement:]):
3002         (-[WebHTMLConverter _specifiedStyleForElement:]):
3003         (-[WebHTMLConverter _computedStringForNode:property:]):
3004         (-[WebHTMLConverter _stringForNode:property:]):
3005         (-[WebHTMLConverter _getComputedFloat:forNode:property:]):
3006         (-[WebHTMLConverter _getFloat:forNode:property:]):
3007         (_NSFirstPathForDirectoriesInDomains):
3008         (_NSSystemLibraryPath):
3009         (-[WebHTMLConverter _webKitBundle]):
3010         (_colorForRGBColor):
3011         (_shadowForShadowStyle):
3012         (-[WebHTMLConverter _elementIsBlockLevel:]):
3013         (-[WebHTMLConverter _elementHasOwnBackgroundColor:]):
3014         (-[WebHTMLConverter _computedColorForNode:property:]):
3015         (-[WebHTMLConverter _colorForNode:property:]):
3016         (-[WebHTMLConverter _computedAttributesForElement:]):
3017         (-[WebHTMLConverter _attributesForElement:]):
3018         (-[WebHTMLConverter _newParagraphForElement:tag:allowEmpty:suppressTrailingSpace:]):
3019         (-[WebHTMLConverter _newLineForElement:]):
3020         (-[WebHTMLConverter _newTabForElement:]):
3021         (-[WebHTMLConverter _WebMessageDocumentClass]):
3022         (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
3023         (-[WebHTMLConverter _addQuoteForElement:opening:level:]):
3024         (-[WebHTMLConverter _addValue:forElement:]):
3025         (-[WebHTMLConverter _fillInBlock:forElement:backgroundColor:extraMargin:extraPadding:isTable:]):
3026         (_dateForString):
3027         (_colCompare):
3028         (-[WebHTMLConverter _processMetaElementWithName:content:]):
3029         (-[WebHTMLConverter _processHeadElement:]):
3030         (-[WebHTMLConverter _enterElement:tag:display:embedded:]):
3031         (-[WebHTMLConverter _addTableForElement:]):
3032         (-[WebHTMLConverter _addTableCellForElement:]):
3033         (-[WebHTMLConverter _processElement:tag:display:depth:]):
3034         (-[WebHTMLConverter _addMarkersToList:range:]):
3035         (-[WebHTMLConverter _exitElement:tag:display:depth:startIndex:]):
3036         (-[WebHTMLConverter _processText:]):
3037         (-[WebHTMLConverter _traverseNode:depth:embedded:]):
3038         (-[WebHTMLConverter _traverseFooterNode:depth:]):
3039         (-[WebHTMLConverter _loadFromDOMRange]):
3040         (-[WebHTMLConverter dealloc]):
3041         (-[WebHTMLConverter init]):
3042         (-[WebHTMLConverter initWithDOMRange:]):
3043         (-[WebHTMLConverter attributedString]):
3044         (+[WebHTMLConverter editingAttributedStringFromRange:]):
3045
3046 2013-09-18  Antti Koivisto  <antti@apple.com>
3047
3048         Rename RenderBR to RenderLineBreak
3049         https://bugs.webkit.org/show_bug.cgi?id=121560
3050
3051         Reviewed by Sam Weinig.
3052
3053         It now represents both hard (br) and soft (wbr) line breaks.
3054
3055 2013-09-18  Robert Hogan  <robert@webkit.org>
3056
3057         Quirksmode: Break Tag Extra Space Bug
3058         https://bugs.webkit.org/show_bug.cgi?id=11943
3059
3060         Reviewed by David Hyatt.
3061
3062         Collapse away all space between text and a hard line-break when in a right-aligned
3063         container so that the trailing space doesn't push the text away from the container edge.
3064
3065         Test: fast/text/whitespace/trailing-space-before-br-in-right-aligned-text.html
3066
3067         * rendering/RenderBlockLineLayout.cpp:
3068         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
3069
3070 2013-09-18  Jer Noble  <jer.noble@apple.com>
3071
3072         Unreviewed build fix for Qt (and other) ports after 156049.
3073
3074         Wrap implementation of PublicURLManager in ENABLE(BLOB) check.
3075
3076         * html/PublicURLManager.cpp:
3077
3078 2013-09-18  Jer Noble  <jer.noble@apple.com>
3079
3080         Merge blink MediaSource changes since fork.
3081         https://bugs.webkit.org/show_bug.cgi?id=118752
3082
3083         Rubber-stamped by Eric Carlson.
3084
3085         Tests: http/tests/media/media-source/mediasource-addsourcebuffer.html
3086                http/tests/media/media-source/mediasource-append-buffer.html
3087                http/tests/media/media-source/mediasource-buffered.html
3088                http/tests/media/media-source/mediasource-closed.html
3089                http/tests/media/media-source/mediasource-config-change-mp4-a-bitrate.html
3090                http/tests/media/media-source/mediasource-config-change-mp4-av-audio-bitrate.html
3091                http/tests/media/media-source/mediasource-config-change-mp4-av-framesize.html
3092                http/tests/media/media-source/mediasource-config-change-mp4-av-video-bitrate.html
3093                http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate.html
3094                http/tests/media/media-source/mediasource-config-change-mp4-v-framerate.html
3095                http/tests/media/media-source/mediasource-config-change-mp4-v-framesize.html
3096                http/tests/media/media-source/mediasource-config-change-webm-a-bitrate.html
3097                http/tests/media/media-source/mediasource-config-change-webm-av-audio-bitrate.html
3098                http/tests/media/media-source/mediasource-config-change-webm-av-framesize.html
3099                http/tests/media/media-source/mediasource-config-change-webm-av-video-bitrate.html
3100                http/tests/media/media-source/mediasource-config-change-webm-v-bitrate.html
3101                http/tests/media/media-source/mediasource-config-change-webm-v-framerate.html
3102                http/tests/media/media-source/mediasource-config-change-webm-v-framesize.html
3103                http/tests/media/media-source/mediasource-is-type-supported.html
3104                http/tests/media/media-source/mediasource-multiple-attach.html
3105                http/tests/media/media-source/mediasource-play.html
3106                http/tests/media/media-source/mediasource-sourcebufferlist.html
3107
3108         Add files to project. Fix compile errors exposed by enabling.
3109
3110         * WebCore.xcodeproj/project.pbxproj:
3111         * Modules/mediasource/MediaSourceRegistry.cpp:
3112         (WebCore::MediaSourceRegistry::lookupMediaSource):
3113         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3114         (WebCore::MediaPlayerPrivateAVFoundation::load):
3115         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3116         (WebCore::MediaPlayerPrivateQTKit::load):
3117         * platform/mac/MIMETypeRegistryMac.mm:
3118         (WebCore::MIMETypeRegistry::isSupportedMediaSourceMIMEType):
3119         * CMakeLists.txt:
3120         * DerivedSources.make:
3121         * DerivedSources.pri:
3122         * GNUmakefile.list.am:
3123
3124         Merge
3125         https://chromium.googlesource.com/chromium/blink/+/c38e2955db98a300a535b692869fea0e41501497
3126         https://chromium.googlesource.com/chromium/blink/+/8568015e9bee1de7fccee28163f9e4a4b51f9baf
3127         https://chromium.googlesource.com/chromium/blink/+/14417e8fa6294f4e7dbc1e0fac549398522b2f97
3128         https://chromium.googlesource.com/chromium/blink/+/f43a5496f233102f8861a067a9cf8053c010d401
3129         https://chromium.googlesource.com/chromium/blink/+/57771439806f7c6e6a272efb1ea72900f5f6a015
3130         https://chromium.googlesource.com/chromium/blink/+/8c77a790a9d225194db0a8832399d0f9e1fa54ec
3131         https://chromium.googlesource.com/chromium/blink/+/d33ae3fa7a8592e946503ed17f862a27c6d9dde1
3132         https://chromium.googlesource.com/chromium/blink/+/1caaa9c51f06e1b9341d58c994f77fd59fcd236d
3133         https://chromium.googlesource.com/chromium/blink/+/e95720393b0ebe67f19de39bb77cdf2926165512
3134         https://chromium.googlesource.com/chromium/blink/+/bad2c1b4b70faec731b2ad3cc8a4ccf28de6cc38
3135         https://chromium.googlesource.com/chromium/blink/+/a7873430c3d5c9373336c6f3993db3cb4228e9cd
3136         https://chromium.googlesource.com/chromium/blink/+/508966d5e32360b3cec058f9fbae0014542fbc52
3137         https://chromium.googlesource.com/chromium/blink/+/371dfe72f61ce6f73e6c242324da73c415d38be3
3138
3139 2013-09-18  Andreas Kling  <akling@apple.com>
3140
3141         CTTE: RenderBR always has an HTMLElement.
3142         <https://webkit.org/b/121557>
3143
3144         Reviewed by Antti Koivisto.
3145
3146         This renderer is never anonymous and always has a corresponding HTMLElement.
3147         Tighten this up by making the constructor take a HTMLElement& and remove
3148         RenderBR::createAnonymous().
3149
3150 2013-09-18  Andreas Kling  <akling@apple.com>
3151
3152         Avoid using RenderBR internally in RenderMenuList.
3153         <https://webkit.org/b/121550>
3154
3155         Reviewed by Antti Koivisto.
3156
3157         RenderMenuLists with an empty caption text were previously using a
3158         RenderBR as placeholder.
3159
3160         Switch to using a \n RenderText instead so we can tighten RenderBR.
3161
3162         This will change DRT dumps but actual metrics should not change.
3163
3164 2013-09-18  Antti Koivisto  <antti@apple.com>
3165
3166         Change one accidental "object->isText() || object->isLineBreak()" from previous patch back to "object->isTextOrLineBreak()"
3167         
3168         Not reviewed.
3169
3170         * rendering/InlineIterator.h:
3171         (WebCore::isIteratorTarget):
3172
3173 2013-09-18  Antti Koivisto  <antti@apple.com>
3174
3175         Remove RenderWordBreak
3176         https://bugs.webkit.org/show_bug.cgi?id=121549
3177
3178         Reviewed by Andreas Kling.
3179
3180         Remove RenderWordBreak and make it a bit in RenderBR instead.
3181         
3182         * CMakeLists.txt:
3183         * GNUmakefile.list.am:
3184         * Target.pri:
3185         * WebCore.vcxproj/WebCore.vcxproj:
3186         * WebCore.xcodeproj/project.pbxproj:
3187         * dom/Document.cpp:
3188         (WebCore::Document::updateHoverActiveState):
3189         * dom/Position.cpp:
3190         (WebCore::hasInlineBoxWrapper):
3191         (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
3192         * editing/Editor.cpp:
3193         (WebCore::findFirstMarkable):
3194         * editing/TextIterator.cpp:
3195         (WebCore::ignoresContainerClip):
3196         * html/HTMLElement.cpp:
3197         (WebCore::HTMLElement::createRenderer):
3198         * rendering/InlineBox.cpp:
3199         (WebCore::InlineBox::logicalHeight):
3200         (WebCore::InlineBox::baselinePosition):
3201         (WebCore::InlineBox::lineHeight):
3202         (WebCore::InlineBox::deleteLine):
3203         (WebCore::InlineBox::extractLine):
3204         (WebCore::InlineBox::attachLine):
3205         (WebCore::InlineBox::nodeAtPoint):
3206         * rendering/InlineBox.h:
3207         (WebCore::InlineBox::isLineBreak):
3208         * rendering/InlineFlowBox.cpp:
3209         (WebCore::InlineFlowBox::addToLine):
3210         (WebCore::InlineFlowBox::computeOverflow):
3211         * rendering/InlineIterator.h:
3212         (WebCore::InlineIterator::atTextParagraphSeparator):
3213         (WebCore::isIteratorTarget):
3214         * rendering/RenderBR.cpp:
3215         (WebCore::RenderBR::RenderBR):
3216         * rendering/RenderBR.h:
3217         (WebCore::toRenderBR):
3218     
3219             RenderBR now represents both hard and soft line breaks. It will be renamed to RenderLineBreak later.
3220
3221         * rendering/RenderBlock.cpp:
3222         (WebCore::InlineMinMaxIterator::next):
3223         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
3224         * rendering/RenderBlockLineLayout.cpp:
3225         (WebCore::createInlineBoxForRenderer):
3226         (WebCore::dirtyLineBoxesForRenderer):
3227         (WebCore::RenderBlock::computeBlockDirectionPositionsForLine):
3228         (WebCore::RenderBlockFlow::layoutInlineChildren):
3229         (WebCore::textBeginsWithBreakablePosition):
3230         (WebCore::canBreakAtThisPosition):
3231         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
3232         * rendering/RenderInline.cpp:
3233         (WebCore::RenderInline::generateCulledLineBoxRects):
3234         (WebCore::RenderInline::culledInlineFirstLineBox):
3235         (WebCore::RenderInline::culledInlineLastLineBox):
3236         (WebCore::RenderInline::dirtyLineBoxes):
3237         * rendering/RenderLineBoxList.cpp:
3238         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
3239         * rendering/RenderObject.h:
3240         (WebCore::RenderObject::isLineBreak):
3241         
3242             This bit covers both BR and WBR.
3243
3244         (WebCore::RenderObject::isBR):
3245         (WebCore::RenderObject::isLineBreakOpportunity):
3246         
3247             Rename isWordBreak to isLineBreakOpportunity. This matches HTML5 spec terminology.
3248
3249         (WebCore::RenderObject::isTextOrLineBreak):
3250         
3251             Since WBR used to be Text we want this check to still cover it too. Renamed from isTextOrBR.
3252
3253         (WebCore::RenderObject::setIsLineBreak):
3254         (WebCore::RenderObject::isWBR):
3255         (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
3256         * rendering/RenderObjectChildList.cpp:
3257         (WebCore::RenderObjectChildList::removeChildNode):
3258         * rendering/RenderText.cpp:
3259         * rendering/RenderText.h:
3260         * rendering/RenderTreeAsText.cpp:
3261         (WebCore::RenderTreeAsText::writeRenderObject):
3262         * rendering/RenderWordBreak.cpp: Removed.
3263         * rendering/RenderWordBreak.h: Removed.
3264         * rendering/RenderingAllInOne.cpp:
3265         * rendering/RootInlineBox.cpp:
3266         (WebCore::RootInlineBox::ascentAndDescentForBox):
3267         (WebCore::RootInlineBox::verticalPositionForBox):
3268         (WebCore::RootInlineBox::includeLeadingForBox):
3269         (WebCore::RootInlineBox::includeFontForBox):
3270         (WebCore::RootInlineBox::includeGlyphsForBox):
3271         (WebCore::RootInlineBox::includeMarginForBox):
3272
3273 2013-09-18  Csaba Osztrogon√°c  <ossy@webkit.org>
3274
3275         ASSERT_NOT_REACHED is touched in WebCore::CSSPrimitiveValue::computeLengthDouble
3276         https://bugs.webkit.org/show_bug.cgi?id=120469
3277
3278         Tests: fast/css/outline-offset-parsing-assert.html
3279                fast/css/outline-offset-parsing.html
3280
3281         Reviewed by Dirk Schulze.
3282
3283         * css/CSSParser.cpp:
3284         (WebCore::CSSParser::parseValue): Fixed a typo after r66615, outline-offset can't be percentage.
3285
3286 2013-09-18  Gurpreet Kaur  <k.gurpreet@samsung.com>
3287
3288         [MathML] Implement the subscriptshift and superscriptshift attributes
3289         https://bugs.webkit.org/show_bug.cgi?id=120069
3290
3291         Reviewed by Darin Adler.
3292
3293         Added support for subscriptshift and superscriptshift attributes. The
3294         subscriptshift attribute is for msup element and superscriptshift for
3295         msup. msubsup can have both subscriptshift and superscriptshift. The
3296         subscriptshift attribute specifies the minimum amount to shift the
3297         baseline of subscript down. The superscriptshift attribute specifies
3298         the minimum amount to shift the baseline of superscript up.
3299
3300         Tests: mathml/presentation/msub-subscriptshift.html
3301                mathml/presentation/msubsup-subscriptshift.html
3302                mathml/presentation/msubsup-superscriptshift.html
3303                mathml/presentation/msup-superscriptshift.html
3304                mathml/presentation/multiscript-subscriptshift.html
3305                mathml/presentation/multiscript-superscriptshift.html
3306
3307         * mathml/mathattrs.in:
3308         * rendering/mathml/RenderMathMLScripts.cpp:
3309         (WebCore::RenderMathMLScripts::layout):
3310         For aligning the subscript and superscript padding is added to the base.
3311         So subscriptshift and superscriptshift attributes is set as padding bottom
3312         and padding top of base respectively.
3313
3314 2013-09-18  Mario Sanchez Prada  <mario.prada@samsung.com>
3315
3316         [ATK] Expose aria-haspopup and aria-sort without the 'aria-' prefix
3317         https://bugs.webkit.org/show_bug.cgi?id=121495
3318
3319         Reviewed by Chris Fleizach.
3320
3321         Removed the 'aria-' prefix from the exposed ATK object attributes
3322         for WAI-ARIA attributes 'aria-haspopup' and 'aria-sort'.
3323
3324         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3325         (webkitAccessibleGetAttributes): Removed the prefix.
3326
3327 2013-09-17  Antti Koivisto  <antti@apple.com>
3328
3329         Rename InlineBox::isText()
3330         <https://webkit.org/b/121525>
3331
3332         Reviewed by Andreas Kling.
3333
3334         The flag sounds like RenderObject::isText() yet it can be set for some inline boxes generated
3335         for non-text renderers too (br, list markers). This is pretty confusing.
3336         
3337         Rename to InlineBox::behavesLikeText().
3338
3339         * rendering/InlineBox.cpp:
3340         (WebCore::InlineBox::logicalHeight):
3341         (WebCore::InlineBox::baselinePosition):
3342         (WebCore::InlineBox::lineHeight):
3343         * rendering/InlineBox.h:
3344         (WebCore::InlineBox::behavesLikeText):
3345         (WebCore::InlineBox::setBehavesLikeText):
3346         (WebCore::InlineBox::InlineBoxBitfields::InlineBoxBitfields):
3347         * rendering/InlineFlowBox.cpp:
3348         (WebCore::InlineFlowBox::addToLine):
3349         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
3350         * rendering/InlineTextBox.cpp:
3351         (WebCore::InlineTextBox::baselinePosition):
3352         (WebCore::InlineTextBox::lineHeight):
3353         * rendering/RenderBlockLineLayout.cpp:
3354         (WebCore::createInlineBoxForRenderer):
3355         (WebCore::setLogicalWidthForTextRun):
3356         * rendering/RenderListMarker.cpp:
3357         (WebCore::RenderListMarker::createInlineBox):
3358         * rendering/RenderText.cpp:
3359         (WebCore::RenderText::createInlineTextBox):
3360         * rendering/RootInlineBox.cpp:
3361         (WebCore::RootInlineBox::includeLeadingForBox):
3362         (WebCore::RootInlineBox::includeFontForBox):
3363         (WebCore::RootInlineBox::includeGlyphsForBox):
3364         (WebCore::RootInlineBox::includeMarginForBox):
3365         
3366             Switch tests from isText() to isTextOrBR(). This matches the behavior before r155957.
3367             I don't know if there is a case where this actually makes any difference in behavior.
3368
3369 2013-09-17  Sam Weinig  <sam@webkit.org>
3370
3371         Shrink SVGPathStringBuilder
3372         https://bugs.webkit.org/show_bug.cgi?id=121536
3373
3374         Reviewed by Anders Carlsson.
3375
3376         - Use StringBuilder everywhere to avoid unnecessary temporary
3377           String objects and code size bloat.
3378         - Also did a drive by FINAL / OVERRIDE pass.
3379
3380         As an example of the win, the function SVGPathStringBuilder::arcTo
3381         went from being 6120 bytes down to just 378 bytes.
3382
3383         * svg/SVGPathStringBuilder.cpp:
3384         (WebCore::SVGPathStringBuilder::SVGPathStringBuilder):
3385         (WebCore::SVGPathStringBuilder::~SVGPathStringBuilder):
3386         (WebCore::SVGPathStringBuilder::cleanup):
3387         (WebCore::SVGPathStringBuilder::incrementPathSegmentCount):
3388         (WebCore::SVGPathStringBuilder::continueConsuming):
3389         It wasn't helpful for these to be inlined, so move them to
3390         the implementation file.
3391
3392         (WebCore::appendFlag):
3393         (WebCore::appendNumber):
3394         (WebCore::appendPoint):
3395         Added helpers.
3396
3397         (WebCore::SVGPathStringBuilder::moveTo):
3398         (WebCore::SVGPathStringBuilder::lineTo):
3399         (WebCore::SVGPathStringBuilder::lineToHorizontal):
3400         (WebCore::SVGPathStringBuilder::lineToVertical):
3401         (WebCore::SVGPathStringBuilder::curveToCubic):
3402         (WebCore::SVGPathStringBuilder::curveToCubicSmooth):
3403         (WebCore::SVGPathStringBuilder::curveToQuadratic):
3404         (WebCore::SVGPathStringBuilder::curveToQuadraticSmooth):
3405         (WebCore::SVGPathStringBuilder::arcTo):
3406         (WebCore::SVGPathStringBuilder::closePath):
3407         * svg/SVGPathStringBuilder.h:
3408         Stopped using operator+ and removed duplicate string building logic in each build
3409         type (e.g. both sides of the PathCoordinateMode condition were doing almost identical
3410         work).
3411
3412 2013-09-17  Sam Weinig  <sam@webkit.org>
3413
3414         CTTE: Convert some straggling Element subclasses constructors to take a Document&
3415         https://bugs.webkit.org/show_bug.cgi?id=121533
3416
3417         Reviewed by Anders Carlsson.
3418
3419         * html/HTMLMeterElement.cpp:
3420         (WebCore::HTMLMeterElement::didAddUserAgentShadowRoot):
3421         * html/HTMLProgressElement.cpp:
3422         (WebCore::HTMLProgressElement::didAddUserAgentShadowRoot):
3423         * html/HTMLTextAreaElement.cpp:
3424         (WebCore::HTMLTextAreaElement::didAddUserAgentShadowRoot):
3425         * html/SearchInputType.cpp:
3426         (WebCore::SearchInputType::createShadowSubtree):
3427         * html/TextFieldInputType.cpp:
3428         (WebCore::TextFieldInputType::createShadowSubtree):
3429         * html/shadow/MeterShadowElement.cpp:
3430         (WebCore::MeterShadowElement::MeterShadowElement):
3431         (WebCore::MeterInnerElement::MeterInnerElement):
3432         * html/shadow/MeterShadowElement.h:
3433         (WebCore::MeterInnerElement::create):
3434         (WebCore::MeterBarElement::create):
3435         (WebCore::MeterValueElement::create):
3436         * html/shadow/ProgressShadowElement.cpp:
3437         (WebCore::ProgressShadowElement::ProgressShadowElement):
3438         (WebCore::ProgressInnerElement::ProgressInnerElement):
3439         (WebCore::ProgressBarElement::ProgressBarElement):
3440         (WebCore::ProgressValueElement::ProgressValueElement):
3441         * html/shadow/ProgressShadowElement.h:
3442         (WebCore::ProgressInnerElement::create):
3443         (WebCore::ProgressBarElement::create):
3444         (WebCore::ProgressValueElement::create):
3445         * html/shadow/SpinButtonElement.cpp:
3446         (WebCore::SpinButtonElement::SpinButtonElement):
3447         (WebCore::SpinButtonElement::create):
3448         * html/shadow/SpinButtonElement.h:
3449         * html/shadow/TextControlInnerElements.cpp:
3450         (WebCore::TextControlInnerContainer::TextControlInnerContainer):
3451         (WebCore::TextControlInnerContainer::create):
3452         (WebCore::TextControlInnerElement::TextControlInnerElement):
3453         (WebCore::TextControlInnerElement::create):
3454         (WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
3455         (WebCore::TextControlInnerTextElement::create):
3456         (WebCore::SearchFieldResultsButtonElement::SearchFieldResultsButtonElement):
3457         (WebCore::SearchFieldResultsButtonElement::create):
3458         (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
3459         (WebCore::SearchFieldCancelButtonElement::create):
3460         (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
3461         (WebCore::InputFieldSpeechButtonElement::create):
3462         * html/shadow/TextControlInnerElements.h:
3463
3464 2013-09-17  Zoltan Horvath  <zoltan@webkit.org>
3465
3466         [CSS Shapes] Use the float height to determine position in shape-inside
3467         https://bugs.webkit.org/show_bug.cgi?id=102846
3468
3469         Reviewed by Darin Adler.
3470
3471         Float positioning inside shape-inside has been working only for simple cases when the float boundaries didn't overlap with the shape.
3472         This patch fixes the behavior for left floats and shapes with inline content. I want to add this work step by step, therefore the next
3473         step would be to add support for block content with inline content (e.g. paragraphs) then cover cases with right floats.
3474
3475         Tests: fast/shapes/shape-inside/shape-inside-left-float-in-lower-left-triangle-inline-content.html
3476                fast/shapes/shape-inside/shape-inside-left-float-in-lower-right-triangle-inline-content.html
3477                fast/shapes/shape-inside/shape-inside-left-float-in-upper-left-triangle-inline-content.html
3478                fast/shapes/shape-inside/shape-inside-left-float-in-upper-right-triangle-inline-content.html
3479
3480         * rendering/LineWidth.cpp:
3481         (WebCore::LineWidth::LineWidth): Use the new updateCurrentShapeSegment member function.
3482         (WebCore::LineWidth::updateCurrentShapeSegment): We need a function to update the current line segment's reference, since we use it multiple places.
3483         * rendering/LineWidth.h: Add new member function.
3484         * rendering/RenderBlock.cpp:
3485         (WebCore::RenderBlock::computeLogicalLocationForFloat): Fix positioning of a floating element.
3486         * rendering/RenderBlockLineLayout.cpp:
3487         (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine): Use updateSegmentsForLine instead of computeSegmentsForLine.
3488         (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread): Use updateSegmentsForLine instead of computeSegmentsForLine.
3489         (WebCore::RenderBlock::adjustLogicalLineTopAndLogicalHeightIfNeeded):
3490         (WebCore::updateSegmentsForShapes): After our float is positioned, we need to adjust the current lineTop and update the logical height to be able to wrap around the float.
3491         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak): If we have a float in our line we might need to adjust our lineTop and logicalHeight.
3492         * rendering/shapes/ShapeInfo.cpp:
3493         (WebCore::::computeSegmentsForLine): Add new const function to compute the segments. I'd like make this function static later if possible.
3494         (WebCore::::updateSegmentsForLine): Old computeSegmentsForLine, change name to indicate that it is actually changing things.
3495         * rendering/shapes/ShapeInfo.h: Update function names, add declaration.
3496         (WebCore::ShapeInfo::clearSegments):
3497         (WebCore::ShapeInfo::logicalLineBottom):
3498         (WebCore::ShapeInfo::lineOverlapsShapeBounds):
3499         * rendering/shapes/ShapeInsideInfo.cpp:
3500         (WebCore::ShapeInsideInfo::computeFirstFitPositionForFloat): Compute the first fit position below the current line position inside shapes. I called this function
3501         this way, because currently we use it only for shapes.
3502         * rendering/shapes/ShapeInsideInfo.h: Update function names.
3503         * rendering/shapes/ShapeOutsideInfo.cpp: Update function names.
3504         (WebCore::ShapeOutsideInfo::computeSegmentsForContainingBlockLine):
3505         (WebCore::ShapeOutsideInfo::updateSegmentsForLine):
3506         * rendering/shapes/ShapeOutsideInfo.h: Update function names.
3507
3508 2013-09-17  Sam Weinig  <sam@webkit.org>
3509
3510         Replace use of OwnArrayPtr<Foo> with std::unique_ptr<Foo[]> in WebCore
3511         https://bugs.webkit.org/show_bug.cgi?id=121527
3512
3513         Reviewed by Anders Carlsson.
3514
3515         * Modules/webaudio/AudioBufferSourceNode.cpp:
3516         (WebCore::AudioBufferSourceNode::setBuffer):
3517         * Modules/webaudio/AudioBufferSourceNode.h:
3518         * Modules/webaudio/OscillatorNode.h:
3519         * css/CSSParser.cpp:
3520         (WebCore::CSSParser::setupParser):
3521         (WebCore::CSSParser::currentCharacter16):
3522         * css/CSSParser.h:
3523         * html/HTMLAreaElement.h:
3524         * html/HTMLFrameSetElement.h:
3525         * html/canvas/WebGLRenderingContext.cpp:
3526         (WebCore::WebGLRenderingContext::copyTexSubImage2D):
3527         (WebCore::WebGLRenderingContext::simulateVertexAttrib0):
3528         (WebCore::WebGLRenderingContext::LRUImageBufferCache::LRUImageBufferCache):
3529         * html/canvas/WebGLRenderingContext.h:
3530         * platform/ScrollAnimatorNone.cpp:
3531         * platform/audio/DynamicsCompressor.cpp:
3532         (WebCore::DynamicsCompressor::setNumberOfChannels):
3533         * platform/audio/DynamicsCompressor.h:
3534         * platform/audio/FFTFrame.h:
3535         * platform/audio/gstreamer/FFTFrameGStreamer.cpp:
3536         (WebCore::FFTFrame::FFTFrame):
3537         * platform/efl/ScrollbarEfl.cpp:
3538         (ScrollbarEfl::updateThumbPositionAndProportion):
3539         * platform/graphics/ANGLEWebKitBridge.cpp:
3540         (WebCore::ANGLEWebKitBridge::compileShaderSource):
3541         * platform/graphics/GraphicsContext3D.cpp:
3542         (WebCore::GraphicsContext3D::texImage2DResourceSafe):
3543         * platform/graphics/GraphicsContext3D.h:
3544         * platform/graphics/GraphicsContext3DPrivate.cpp:
3545         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
3546         * platform/graphics/blackberry/LayerTexture.cpp:
3547         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
3548         (WebCore::getDirtyRects):
3549         * platform/graphics/cg/GraphicsContext3DCG.cpp:
3550         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
3551         * platform/graphics/cg/GraphicsContextCG.cpp:
3552         * platform/graphics/cg/ImageBufferCG.cpp:
3553         * platform/graphics/gpu/Texture.cpp:
3554         (WebCore::Texture::updateSubRect):
3555         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
3556         (WebCore::HarfBuzzShaper::HarfBuzzShaper):
3557         (WebCore::HarfBuzzShaper::setNormalizedBuffer):
3558         * platform/graphics/harfbuzz/HarfBuzzShaper.h:
3559         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
3560         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
3561         (WebCore::GraphicsContext3D::compileShader):
3562         (WebCore::GraphicsContext3D::getActiveAttrib):
3563         (WebCore::GraphicsContext3D::getActiveUniform):
3564         (WebCore::GraphicsContext3D::getProgramInfoLog):
3565         (WebCore::GraphicsContext3D::getShaderInfoLog):
3566         * platform/graphics/opentype/OpenTypeSanitizer.cpp:
3567         * platform/graphics/texmap/TextureMapperGL.cpp:
3568         * platform/graphics/wince/SharedBitmap.cpp:
3569         (WebCore::SharedBitmap::SharedBitmap):
3570         (WebCore::SharedBitmap::to16bit):
3571         * platform/graphics/wince/SharedBitmap.h:
3572         * platform/image-decoders/blackberry/JPEGImageDecoder.cpp:
3573         (WebCore::ImageReader::decode):
3574         * platform/image-decoders/png/PNGImageDecoder.cpp:
3575         (WebCore::PNGImageReader::createRowBuffer):
3576         * platform/win/ContextMenuWin.cpp:
3577         (WebCore::ContextMenu::getContextMenuItems):
3578         * platform/win/LoggingWin.cpp:
3579         (WebCore::logLevelString):
3580         * plugins/PluginPackage.cpp:
3581         * plugins/blackberry/PluginViewBlackBerry.cpp:
3582         (WebCore::PluginView::handleTouchEvent):
3583         * plugins/win/PluginPackageWin.cpp:
3584         (WebCore::PluginPackage::fetchInfo):
3585
3586 2013-09-17  Commit Queue  <commit-queue@webkit.org>
3587
3588         Unreviewed, rolling out r156001.
3589         http://trac.webkit.org/changeset/156001
3590         https://bugs.webkit.org/show_bug.cgi?id=121529
3591
3592         Broke API tests (Requested by ap on #webkit).
3593
3594         * platform/mac/HTMLConverter.h:
3595         * platform/mac/HTMLConverter.mm:
3596         (WebDefaultFont):
3597         (_fontForNameAndSize):
3598         (+[WebHTMLConverter defaultParagraphStyle]):
3599         (-[WebHTMLConverter _computedStyleForElement:]):
3600         (-[WebHTMLConverter _specifiedStyleForElement:]):
3601         (-[WebHTMLConverter _computedStringForNode:property:]):
3602         (-[WebHTMLConverter _stringForNode:property:]):
3603         (-[WebHTMLConverter _getComputedFloat:forNode:property:]):
3604         (-[WebHTMLConverter _getFloat:forNode:property:]):
3605         (_colorForRGBColor):
3606         (_shadowForShadowStyle):
3607         (-[WebHTMLConverter _elementIsBlockLevel:]):
3608         (-[WebHTMLConverter _elementHasOwnBackgroundColor:]):
3609         (-[WebHTMLConverter _computedColorForNode:property:]):
3610         (-[WebHTMLConverter _colorForNode:property:]):
3611         (-[WebHTMLConverter _computedAttributesForElement:]):
3612         (-[WebHTMLConverter _attributesForElement:]):
3613         (-[WebHTMLConverter _newParagraphForElement:tag:allowEmpty:suppressTrailingSpace:]):
3614         (-[WebHTMLConverter _newLineForElement:]):
3615         (-[WebHTMLConverter _newTabForElement:]):
3616         (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
3617         (-[WebHTMLConverter _addQuoteForElement:opening:level:]):
3618         (-[WebHTMLConverter _addValue:forElement:]):
3619         (-[WebHTMLConverter _fillInBlock:forElement:backgroundColor:extraMargin:extraPadding:isTable:]):
3620         (_dateForString):
3621         (_colCompare):
3622         (-[WebHTMLConverter _enterElement:tag:display:]):
3623         (-[WebHTMLConverter _addTableForElement:]):
3624         (-[WebHTMLConverter _addTableCellForElement:]):
3625         (-[WebHTMLConverter _processElement:tag:display:depth:]):
3626         (-[WebHTMLConverter _addMarkersToList:range:]):
3627         (-[WebHTMLConverter _exitElement:tag:display:depth:startIndex:]):
3628         (-[WebHTMLConverter _processText:]):
3629         (-[WebHTMLConverter _traverseNode:depth:embedded:]):
3630         (-[WebHTMLConverter _traverseFooterNode:depth:]):
3631         (-[WebHTMLConverter _loadFromDOMRange]):
3632         (-[WebHTMLConverter dealloc]):
3633         (-[WebHTMLConverter init]):
3634         (-[WebHTMLConverter initWithDOMRange:]):
3635         (-[WebHTMLConverter attributedString]):
3636         (+[WebHTMLConverter editingAttributedStringFromRange:]):
3637         (fileWrapperForElement):
3638
3639 2013-09-17  Samuel White  <samuel_white@apple.com>
3640
3641         AX: Mac AXARIABusy should be AXElementBusy (not ARIA specific)
3642         https://bugs.webkit.org/show_bug.cgi?id=121442
3643
3644         Reviewed by Chris Fleizach.
3645
3646         No new tests, changed AXARIABusy attribute to AXElementBusy to uncouple the concept of busy with
3647         the aria-busy attribute. This will allow us to expand on the definition of busy moving forward.
3648
3649         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3650         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
3651         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
3652
3653 2013-09-17  Andreas Kling  <akling@apple.com>
3654
3655         Pack create_hash_table tables better.
3656         <https://webkit.org/b/121517>
3657
3658         Reviewed by Sam Weinig.
3659
3660         Reduces WebCore binary size by 72744 bytes.
3661
3662         * bindings/scripts/CodeGeneratorJS.pm:
3663         (GenerateHashTable):
3664
3665             Updated for new HashTableValue member order.
3666
3667         * bindings/scripts/test/JS/*:
3668
3669             Rebaselined bindings tests.
3670
3671 2013-09-17  Zoltan Horvath  <zoltan@webkit.org>
3672
3673         [Qt] Add FlowThreadController.h to Target.pri
3674         https://bugs.webkit.org/show_bug.cgi?id=121516
3675
3676         Reviewed by Dirk Schulze.
3677
3678         No new tests, no behavior change.
3679
3680         * Target.pri:
3681
3682 2013-09-17  Anders Carlsson  <andersca@apple.com>
3683
3684         Stop explicitly using PassOwnPtr in WebCore/html
3685         https://bugs.webkit.org/show_bug.cgi?id=121511
3686
3687         Reviewed by Andreas Kling.
3688
3689         * dom/ElementRareData.h:
3690         (WebCore::ElementRareData::setClassList):
3691         * html/ButtonInputType.cpp:
3692         (WebCore::ButtonInputType::create):
3693         * html/ButtonInputType.h:
3694         * html/CheckboxInputType.cpp:
3695         (WebCore::CheckboxInputType::create):
3696         (WebCore::CheckboxInputType::willDispatchClick):
3697         * html/CheckboxInputType.h:
3698         * html/ClassList.cpp:
3699         (WebCore::ClassList::create):
3700         * html/ClassList.h:
3701         * html/ColorInputType.cpp:
3702         (WebCore::ColorInputType::create):
3703         * html/ColorInputType.h:
3704         * html/DateInputType.cpp:
3705         (WebCore::DateInputType::create):
3706         * html/DateInputType.h:
3707         * html/DateTimeInputType.cpp:
3708         (WebCore::DateTimeInputType::create):
3709         * html/DateTimeInputType.h:
3710         * html/DateTimeLocalInputType.cpp:
3711         (WebCore::DateTimeLocalInputType::create):
3712         * html/DateTimeLocalInputType.h:
3713         * html/EmailInputType.cpp:
3714         (WebCore::EmailInputType::create):
3715         * html/EmailInputType.h:
3716         * html/FileInputType.cpp:
3717         (WebCore::FileInputType::create):
3718         * html/FileInputType.h:
3719         * html/FormAssociatedElement.cpp:
3720         (WebCore::FormAttributeTargetObserver::create):
3721         * html/FormController.cpp:
3722         (WebCore::SavedFormState::create):
3723         (WebCore::SavedFormState::deserialize):
3724         (WebCore::FormKeyGenerator::create):
3725         (WebCore::FormController::createSavedFormStateMap):
3726         * html/FormController.h:
3727         (WebCore::FormController::create):
3728         * html/HTMLInputElement.cpp:
3729         (WebCore::ListAttributeTargetObserver::create):
3730         * html/HiddenInputType.cpp:
3731         (WebCore::HiddenInputType::create):
3732         * html/HiddenInputType.h:
3733         * html/ImageInputType.cpp:
3734         (WebCore::ImageInputType::create):
3735         * html/ImageInputType.h:
3736         * html/InputType.cpp:
3737         (WebCore::InputType::create):
3738         (WebCore::InputType::createText):
3739         (WebCore::InputType::willDispatchClick):
3740         * html/InputType.h:
3741         * html/MonthInputType.cpp:
3742         (WebCore::MonthInputType::create):
3743         * html/MonthInputType.h:
3744         * html/NumberInputType.cpp:
3745         (WebCore::NumberInputType::create):
3746         * html/NumberInputType.h:
3747         * html/PasswordInputType.cpp:
3748         (WebCore::PasswordInputType::create):
3749         * html/PasswordInputType.h:
3750         * html/PublicURLManager.h:
3751         (WebCore::PublicURLManager::create):
3752         * html/RadioInputType.cpp:
3753         (WebCore::RadioInputType::create):
3754         (WebCore::RadioInputType::willDispatchClick):
3755         * html/RadioInputType.h:
3756         * html/RangeInputType.cpp:
3757         (WebCore::RangeInputType::create):
3758         * html/RangeInputType.h:
3759         * html/ResetInputType.cpp:
3760         (WebCore::ResetInputType::create):
3761         * html/ResetInputType.h:
3762         * html/SearchInputType.cpp:
3763         (WebCore::SearchInputType::create):
3764         * html/SearchInputType.h:
3765         * html/SubmitInputType.cpp:
3766         (WebCore::SubmitInputType::create):
3767         * html/SubmitInputType.h:
3768         * html/TelephoneInputType.cpp:
3769         (WebCore::TelephoneInputType::create):
3770         * html/TelephoneInputType.h:
3771         * html/TextInputType.cpp:
3772         (WebCore::TextInputType::create):
3773         * html/TextInputType.h:
3774         * html/TimeInputType.cpp:
3775         (WebCore::TimeInputType::create):
3776         * html/TimeInputType.h:
3777         * html/URLInputType.cpp:
3778         (WebCore::URLInputType::create):
3779         * html/URLInputType.h:
3780         * html/ValidationMessage.cpp:
3781         (WebCore::ValidationMessage::create):
3782         * html/ValidationMessage.h:
3783         * html/ValidityState.h:
3784         (WebCore::ValidityState::create):
3785         * html/WeekInputType.cpp:
3786         (WebCore::WeekInputType::create):
3787         * html/WeekInputType.h:
3788         * html/canvas/CanvasRenderingContext2D.cpp:
3789         (WebCore::CanvasRenderingContext2D::createCompositingBuffer):
3790         * html/canvas/CanvasRenderingContext2D.h:
3791         (WebCore::CanvasRenderingContext2D::create):
3792         * html/canvas/EXTDrawBuffers.cpp:
3793         (WebCore::EXTDrawBuffers::create):
3794         * html/canvas/EXTDrawBuffers.h:
3795         * html/canvas/EXTTextureFilterAnisotropic.cpp:
3796         (WebCore::EXTTextureFilterAnisotropic::create):
3797         * html/canvas/EXTTextureFilterAnisotropic.h:
3798         * html/canvas/OESElementIndexUint.cpp:
3799         (WebCore::OESElementIndexUint::create):
3800         * html/canvas/OESElementIndexUint.h:
3801         * html/canvas/OESStandardDerivatives.cpp:
3802         (WebCore::OESStandardDerivatives::create):
3803         * html/canvas/OESStandardDerivatives.h:
3804         * html/canvas/OESTextureFloat.cpp:
3805         (WebCore::OESTextureFloat::create):
3806         * html/canvas/OESTextureFloat.h:
3807         * html/canvas/OESTextureHalfFloat.cpp:
3808         (WebCore::OESTextureHalfFloat::create):
3809         * html/canvas/OESTextureHalfFloat.h:
3810         * html/canvas/OESVertexArrayObject.cpp:
3811         (WebCore::OESVertexArrayObject::create):
3812         * html/canvas/OESVertexArrayObject.h:
3813         * html/canvas/WebGLCompressedTextureATC.cpp:
3814         (WebCore::WebGLCompressedTextureATC::create):
3815         * html/canvas/WebGLCompressedTextureATC.h:
3816         * html/canvas/WebGLCompressedTexturePVRTC.cpp:
3817         (WebCore::WebGLCompressedTexturePVRTC::create):
3818         * html/canvas/WebGLCompressedTexturePVRTC.h:
3819         * html/canvas/WebGLCompressedTextureS3TC.cpp:
3820         (WebCore::WebGLCompressedTextureS3TC::create):
3821         * html/canvas/WebGLCompressedTextureS3TC.h:
3822         * html/canvas/WebGLDebugRendererInfo.cpp:
3823         (WebCore::WebGLDebugRendererInfo::create):
3824         * html/canvas/WebGLDebugRendererInfo.h:
3825         * html/canvas/WebGLDebugShaders.cpp:
3826         (WebCore::WebGLDebugShaders::create):
3827         * html/canvas/WebGLDebugShaders.h:
3828         * html/canvas/WebGLDepthTexture.cpp:
3829         (WebCore::WebGLDepthTexture::create):
3830         * html/canvas/WebGLDepthTexture.h:
3831         * html/canvas/WebGLLoseContext.cpp:
3832         (WebCore::WebGLLoseContext::create):
3833         * html/canvas/WebGLLoseContext.h:
3834         * html/canvas/WebGLRenderingContext.cpp:
3835         (WebCore::WebGLRenderingContext::create):
3836         * html/canvas/WebGLRenderingContext.h:
3837         * html/parser/BackgroundHTMLParser.cpp:
3838         (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
3839         (WebCore::BackgroundHTMLParser::resumeFrom):
3840         * html/parser/BackgroundHTMLParser.h:
3841         (WebCore::BackgroundHTMLParser::create):
3842         * html/parser/HTMLDocumentParser.cpp:
3843         (WebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser):
3844         (WebCore::HTMLDocumentParser::validateSpeculations):
3845         (WebCore::HTMLDocumentParser::discardSpeculationsAndResumeFrom):
3846         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
3847         * html/parser/HTMLDocumentParser.h:
3848         * html/parser/HTMLElementStack.cpp:
3849         (WebCore::HTMLElementStack::ElementRecord::ElementRecord):
3850         * html/parser/HTMLElementStack.h:
3851         (WebCore::HTMLElementStack::ElementRecord::releaseNext):
3852         (WebCore::HTMLElementStack::ElementRecord::setNext):
3853         * html/parser/HTMLMetaCharsetParser.h:
3854         (WebCore::HTMLMetaCharsetParser::create):
3855         * html/parser/HTMLParserScheduler.h:
3856         (WebCore::HTMLParserScheduler::create):
3857         * html/parser/HTMLParserThread.h:
3858         (WebCore::HTMLParserThread::create):
3859         * html/parser/HTMLPreloadScanner.cpp:
3860         (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
3861         * html/parser/HTMLResourcePreloader.cpp:
3862         (WebCore::HTMLResourcePreloader::preload):
3863         * html/parser/HTMLResourcePreloader.h:
3864         (WebCore::PreloadRequest::create):
3865         * html/parser/HTMLScriptRunner.h:
3866         (WebCore::HTMLScriptRunner::create):
3867         * html/parser/HTMLToken.h:
3868         (WebCore::HTMLToken::releaseDoctypeData):
3869         * html/parser/HTMLTokenizer.h:
3870         (WebCore::HTMLTokenizer::create):
3871         * html/parser/HTMLTreeBuilder.h:
3872         (WebCore::HTMLTreeBuilder::create):
3873         * html/parser/XSSAuditor.cpp:
3874         (WebCore::XSSAuditor::filterToken):
3875         * html/parser/XSSAuditor.h:
3876         * html/parser/XSSAuditorDelegate.h:
3877         (WebCore::XSSInfo::create):
3878         * html/track/WebVTTParser.h:
3879         (WebCore::WebVTTParser::create):
3880         * html/track/WebVTTTokenizer.h:
3881         (WebCore::WebVTTTokenizer::create):
3882
3883 2013-09-17  Enrica Casucci  <enrica@apple.com>
3884
3885         Upstream changes to WebHTMLConverter to support HTML
3886         to NSAttributedString conversion on both iOS and OS X.
3887
3888         Reviewed by Benjamin Poulain.
3889
3890         * platform/mac/HTMLConverter.h:
3891         * platform/mac/HTMLConverter.mm:
3892         (WebDefaultFont):
3893         (_fontForNameAndSize):
3894         (+[WebHTMLConverter defaultParagraphStyle]):
3895         (-[WebHTMLConverter _computedStyleForElement:]):
3896         (-[WebHTMLConverter _specifiedStyleForElement:]):
3897         (-[WebHTMLConverter _computedStringForNode:property:]):
3898         (-[WebHTMLConverter _stringForNode:property:]):
3899         (-[WebHTMLConverter _getComputedFloat:forNode:property:]):
3900         (-[WebHTMLConverter _getFloat:forNode:property:]):
3901         (_NSFirstPathForDirectoriesInDomains):
3902         (_NSSystemLibraryPath):
3903         (-[WebHTMLConverter _webKitBundle]):
3904         (_colorForRGBColor):
3905         (_shadowForShadowStyle):
3906         (-[WebHTMLConverter _elementIsBlockLevel:]):
3907         (-[WebHTMLConverter _elementHasOwnBackgroundColor:]):
3908         (-[WebHTMLConverter _computedColorForNode:property:]):
3909         (-[WebHTMLConverter _colorForNode:property:]):
3910         (-[WebHTMLConverter _computedAttributesForElement:]):
3911         (-[WebHTMLConverter _attributesForElement:]):
3912         (-[WebHTMLConverter _newParagraphForElement:tag:allowEmpty:suppressTrailingSpace:]):
3913         (-[WebHTMLConverter _newLineForElement:]):
3914         (-[WebHTMLConverter _newTabForElement:]):
3915         (-[WebHTMLConverter _WebMessageDocumentClass]):
3916         (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
3917         (-[WebHTMLConverter _addQuoteForElement:opening:level:]):
3918         (-[WebHTMLConverter _addValue:forElement:]):
3919         (-[WebHTMLConverter _fillInBlock:forElement:backgroundColor:extraMargin:extraPadding:isTable:]):
3920         (_dateForString):
3921         (_colCompare):
3922         (-[WebHTMLConverter _processMetaElementWithName:content:]):
3923         (-[WebHTMLConverter _processHeadElement:]):
3924         (-[WebHTMLConverter _enterElement:tag:display:embedded:]):
3925         (-[WebHTMLConverter _addTableForElement:]):
3926         (-[WebHTMLConverter _addTableCellForElement:]):
3927         (-[WebHTMLConverter _processElement:tag:display:depth:]):
3928         (-[WebHTMLConverter _addMarkersToList:range:]):
3929         (-[WebHTMLConverter _exitElement:tag:display:depth:startIndex:]):
3930         (-[WebHTMLConverter _processText:]):
3931         (-[WebHTMLConverter _traverseNode:depth:embedded:]):
3932         (-[WebHTMLConverter _traverseFooterNode:depth:]):
3933         (-[WebHTMLConverter _loadFromDOMRange]):
3934         (-[WebHTMLConverter dealloc]):
3935         (-[WebHTMLConverter init]):
3936         (-[WebHTMLConverter initWithDOMRange:]):
3937         (-[WebHTMLConverter attributedString]):
3938         (+[WebHTMLConverter editingAttributedStringFromRange:]):
3939
3940 2013-09-17  Sam Weinig  <sam@webkit.org>
3941
3942         Add make_unique and start using it
3943         https://bugs.webkit.org/show_bug.cgi?id=121523
3944
3945         Reviewed by Anders Carlsson.
3946
3947         * html/HTMLAreaElement.h:
3948         * html/HTMLFrameSetElement.h:
3949         * platform/Length.cpp:
3950         (WebCore::newCoordsArray):
3951         (WebCore::newLengthArray):
3952         * platform/Length.h:
3953         Switch off OwnArrayPtr to std::unique_ptr<T[]> and make use of make_unique.
3954
3955 2013-09-17  Simon Fraser  <simon.fraser@apple.com>
3956
3957         Hardware accelerated CSS transitions appear pixelated when scaled up using transform
3958         https://bugs.webkit.org/show_bug.cgi?id=27684
3959         <rdar://problem/6134606>
3960
3961         Reviewed by Dean Jackson.
3962         
3963         Take transforms and animations into account when computing the contentsScale
3964         for a layer, so that scaled-up layers remain sharp most of the time.
3965         
3966         In its recursiveCommitChanges() tree walk, GraphicsLayerCA now tracks
3967         a root-relative transform, and extracts from that transform the X and Y
3968         scales which it uses to scale the backing store.
3969         
3970         If the layer has transform animations on it, we keep around
3971         a transformation matrix for the animation endpoints (or keyframes),
3972         pick up the state that has the larger impact on the root-relative scale,
3973         and use that as the layer's transform, and the transform when recursing
3974         over descendants.
3975
3976         Tests: compositing/contents-scale/animating.html
3977                compositing/contents-scale/scaled-ancestor.html
3978                compositing/contents-scale/simple-scale.html
3979                compositing/contents-scale/z-translate.html
3980
3981         * platform/graphics/ca/GraphicsLayerCA.cpp:
3982         (WebCore::maxScaleFromTransform): Decompose the transform if necesssary
3983         to extract the X and Y scale components.
3984         (WebCore::GraphicsLayerCA::GraphicsLayerCA): Initialize m_rootRelativeScaleFactor.
3985         (WebCore::GraphicsLayerCA::flushCompositingState): Supply a TransformationMatrix
3986         for the root of the recursion.
3987         (WebCore::GraphicsLayerCA::layerTransform): This code was factored out of
3988         computeVisibleRect(), and optionally takes a custom transform.
3989         (WebCore::GraphicsLayerCA::computeVisibleRect): Use the layerTransform() function.
3990         (WebCore::GraphicsLayerCA::updateRootRelativeScale): Given a transform from the root,
3991         find the max scale factor by multiplying the various animation endpoint matrices and picking
3992         the one with the biggest impact on scale. Use this to set m_rootRelativeScaleFactor, and
3993         set the flag to say that we need to update contentsScale.
3994         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
3995         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): After updating
3996         animations, call updateRootRelativeScale() to update m_rootRelativeScaleFactor.
3997         (WebCore::GraphicsLayerCA::updateAnimations): We have a side table of animation name to
3998         TransformationMatrix, so figure out which entries can be removed from that side table,
3999         and remove them.
4000         (WebCore::GraphicsLayerCA::setAnimationOnLayer):
4001         (WebCore::GraphicsLayerCA::appendToUncommittedAnimations): Store the matrices for
4002         animation endpoints/keyframes in the m_animationTransforms side table. We don't store
4003         them directly in LayerPropertyAnimation because we just want the final matrix for
4004         a transform list, and using a side table makes ownership easier to manage.
4005         (WebCore::GraphicsLayerCA::getTransformFromAnimationsWithMaxScaleImpact):
4006         goes through the matrices for the running animation endpoints/keyframes, and
4007         multiplies each with the transform up to this layer to find the matrix with the
4008         larger impact on scale.
4009         (WebCore::GraphicsLayerCA::setTransformAnimationEndpoints): Returns a vector
4010         of TransformationMatrix for the from and to states.
4011         (WebCore::GraphicsLayerCA::setTransformAnimationKeyframes): Returns a vector
4012         of TransformationMatrix for the keyframes.
4013         (WebCore::GraphicsLayerCA::updateContentsScale): Include m_rootRelativeScaleFactor in the
4014         scale factor computation.
4015         (WebCore::GraphicsLayerCA::dumpAdditionalProperties): If we're dumping visible rects,
4016         also dump the contentsScale. Convenient at these are useful to look at together, and I didn't
4017         want to pollute Internals with yet more flags.
4018         * platform/graphics/ca/GraphicsLayerCA.h:
4019         (WebCore::GraphicsLayerCA::LayerPropertyAnimation::LayerPropertyAnimation): Formatting.
4020
4021 2013-09-17  Commit Queue  <commit-queue@webkit.org>
4022
4023         Unreviewed, rolling out r155977.
4024         http://trac.webkit.org/changeset/155977
4025         https://bugs.webkit.org/show_bug.cgi?id=121515
4026
4027         Broke over a dozen tests on Mac WK2 (Requested by ap on
4028         #webkit).
4029
4030         * platform/graphics/ca/GraphicsLayerCA.cpp:
4031         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
4032         (WebCore::GraphicsLayerCA::flushCompositingState):
4033         (WebCore::GraphicsLayerCA::computeVisibleRect):
4034         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
4035         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
4036         (WebCore::GraphicsLayerCA::updateAnimations):
4037         (WebCore::GraphicsLayerCA::setAnimationOnLayer):
4038         (WebCore::GraphicsLayerCA::appendToUncommittedAnimations):
4039         (WebCore::GraphicsLayerCA::setTransformAnimationEndpoints):
4040         (WebCore::GraphicsLayerCA::setTransformAnimationKeyframes):
4041         (WebCore::GraphicsLayerCA::updateContentsScale):
4042         (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
4043         * platform/graphics/ca/GraphicsLayerCA.h:
4044         (WebCore::GraphicsLayerCA::LayerPropertyAnimation::LayerPr