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