0f12609ff31508a712de0821cbc6ac7c28aa8a07
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-08-25  Zalan Bujtas  <zalan@apple.com>
2
3         Rename RenderObject::showTree() and showTreeForThis() to showNodeTree*().
4         https://bugs.webkit.org/show_bug.cgi?id=136238
5
6         Reviewed by Simon Fraser.
7
8         showNodeTree()/showNodeTreeForThis() reflects the functionality better.
9
10         No change in functionality.
11
12         * rendering/InlineBox.cpp:
13         (WebCore::InlineBox::showNodeTreeForThis):
14         (showNodeTree):
15         (WebCore::InlineBox::showTreeForThis): Deleted.
16         (showTree): Deleted.
17         * rendering/InlineBox.h:
18         * rendering/RenderObject.cpp:
19         (WebCore::RenderObject::showNodeTreeForThis):
20         (showNodeTree):
21         (WebCore::RenderObject::showTreeForThis): Deleted.
22         (showTree): Deleted.
23         * rendering/RenderObject.h:
24
25 2014-08-25  Antti Koivisto  <antti@apple.com>
26
27         Don't pass priority as parameter to ResourceLoadScheduler
28         https://bugs.webkit.org/show_bug.cgi?id=136232
29
30         Reviewed by Sam Weinig.
31
32         It is part of the ResourceRequest which is also passed in.
33
34         * WebCore.exp.in:
35         * loader/ResourceLoadScheduler.cpp:
36         (WebCore::ResourceLoadScheduler::scheduleSubresourceLoad):
37         (WebCore::ResourceLoadScheduler::schedulePluginStreamLoad):
38         (WebCore::ResourceLoadScheduler::scheduleLoad):
39         * loader/ResourceLoadScheduler.h:
40         * loader/cache/CachedResource.cpp:
41         (WebCore::CachedResource::load):
42         * platform/network/cf/ResourceRequestCFNet.cpp:
43         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
44         * platform/network/cocoa/ResourceRequestCocoa.mm:
45         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
46
47             Restore the original request priority when a delegate modifies the request.
48
49 2014-08-25  Beth Dakin  <bdakin@apple.com>
50
51         Rubber-banding in overflow:scroll regions does not work correctly with direction:rtl
52         https://bugs.webkit.org/show_bug.cgi?id=136176
53
54         Reviewed by Sam Weinig.
55
56         Use scrollPosition() instead of scrollXOffset() and scrollYOffset() which both add 
57         in the scrollOrigin(). Other implementations of visibleContentRectInternal() do 
58         not add in the scrollOrigin(), so RenderLayer's shouldn't either in order to be
59         consistent. This makes rubber-banding work for RTL because 
60         ScrollAnimatorMac::pinnedInDirection() and 
61         ScrollAnimatorMac::absoluteScrollPosition() both return the expect values now.
62
63         * rendering/RenderLayer.cpp:
64         (WebCore::RenderLayer::visibleContentRectInternal):
65
66 2014-08-25  Benjamin Poulain  <benjamin@webkit.org>
67
68         Reduce style marking when using the pseudo class :placeholder-shown
69         https://bugs.webkit.org/show_bug.cgi?id=136203
70
71         Reviewed by Darin Adler.
72
73         When the :placeholder-shown filter is hit, we were always marking the RenderStyle as unique.
74         As a result, if :placeholder-shown was used without a more restrictive filter (e.g. "*:placeholder-shown"
75         or simply ":placeholder-shown"), style sharing was disabled for the whole tree.
76
77         This patch rescope the tree marking to any element that can be affected by a placeholder:
78         any the subclass of HTMLTextFormControlElement. For other elements, any change in internal state
79         would be irrelevant for "isPlaceholderVisible".
80
81         Styling of :placeholder-shown is covered by the existing tests. Style sharing of :placeholder-shown
82         is covered by LayoutTests/fast/css/placeholder-shown-basics.html.
83
84         * css/SelectorChecker.cpp:
85         (WebCore::SelectorChecker::checkOne):
86         * css/SelectorCheckerTestFunctions.h:
87         (WebCore::isPlaceholderShown): Deleted.
88         * cssjit/SelectorCompiler.cpp:
89         (WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
90         (WebCore::SelectorCompiler::makeElementStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
91         (WebCore::SelectorCompiler::isPlaceholderShown):
92         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPlaceholderShown):
93         (WebCore::SelectorCompiler::makeUniqueIfNecessaryAndTestIsPlaceholderShown): Deleted.
94
95 2014-08-25  Antti Koivisto  <antti@apple.com>
96
97         Remove ResourceLoader::didChangePriority
98         https://bugs.webkit.org/show_bug.cgi?id=136230
99
100         Reviewed by Andreas Kling.
101
102         It doesn't do anything on any platform.
103
104         * loader/ResourceLoader.cpp:
105         (WebCore::ResourceLoader::didChangePriority): Deleted.
106         * loader/ResourceLoader.h:
107         * loader/cache/CachedResource.cpp:
108         (WebCore::CachedResource::setLoadPriority):
109         * platform/network/ResourceHandle.cpp:
110         (WebCore::ResourceHandle::didChangePriority): Deleted.
111         * platform/network/ResourceHandle.h:
112
113 2014-08-24  Brian J. Burg  <burg@cs.washington.edu>
114
115         Web Inspector: rename Inspector::TypeBuilder to Inspector::Protocol
116         https://bugs.webkit.org/show_bug.cgi?id=136031
117
118         Reviewed by Timothy Hatcher.
119
120         Rename TypeBuilder namespace to Protocol. Disambiguate where
121         necessary. Also rename InspectorTypeBuilder to ProtocolTypes.
122
123         * CMakeLists.txt:
124         * DerivedSources.make:
125         * ForwardingHeaders/inspector/InspectorJSTypeBuilders.h: Removed.
126         * ForwardingHeaders/inspector/InspectorTypeBuilder.h: Removed.
127         * WebCore.order:
128         * WebCore.vcxproj/WebCore.vcxproj:
129         * WebCore.vcxproj/WebCore.vcxproj.filters:
130         * WebCore.xcodeproj/project.pbxproj:
131         * inspector/CommandLineAPIHost.cpp:
132         (WebCore::CommandLineAPIHost::inspectImpl):
133         * inspector/InspectorApplicationCacheAgent.cpp:
134         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
135         (WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame):
136         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCache):
137         (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
138         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource):
139         * inspector/InspectorApplicationCacheAgent.h:
140         * inspector/InspectorCSSAgent.cpp:
141         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
142         (WebCore::InspectorCSSAgent::getInlineStylesForNode):
143         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
144         (WebCore::InspectorCSSAgent::getAllStyleSheets):
145         (WebCore::InspectorCSSAgent::getStyleSheet):
146         (WebCore::InspectorCSSAgent::setStyleText):
147         (WebCore::InspectorCSSAgent::setPropertyText):
148         (WebCore::InspectorCSSAgent::toggleProperty):
149         (WebCore::InspectorCSSAgent::setRuleSelector):
150         (WebCore::InspectorCSSAgent::addRule):
151         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
152         (WebCore::InspectorCSSAgent::getNamedFlowCollection):
153         (WebCore::InspectorCSSAgent::asInspectorStyleSheet):
154         (WebCore::InspectorCSSAgent::collectStyleSheets):
155         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
156         (WebCore::InspectorCSSAgent::detectOrigin):
157         (WebCore::InspectorCSSAgent::buildObjectForRule):
158         (WebCore::InspectorCSSAgent::buildArrayForRuleList):
159         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
160         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
161         (WebCore::InspectorCSSAgent::buildArrayForRegions):
162         (WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
163         * inspector/InspectorCSSAgent.h:
164         * inspector/InspectorDOMAgent.cpp:
165         (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
166         (WebCore::InspectorDOMAgent::getDocument):
167         (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
168         (WebCore::InspectorDOMAgent::querySelectorAll):
169         (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
170         (WebCore::InspectorDOMAgent::getEventListenersForNode):
171         (WebCore::InspectorDOMAgent::getAccessibilityPropertiesForNode):
172         (WebCore::InspectorDOMAgent::getSearchResults):
173         (WebCore::InspectorDOMAgent::resolveNode):
174         (WebCore::InspectorDOMAgent::getAttributes):
175         (WebCore::InspectorDOMAgent::buildObjectForNode):
176         (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
177         (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
178         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
179         (WebCore::InspectorDOMAgent::processAccessibilityChildren):
180         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
181         (WebCore::InspectorDOMAgent::didCommitLoad):
182         (WebCore::InspectorDOMAgent::didInsertDOMNode):
183         (WebCore::InspectorDOMAgent::styleAttributeInvalidated):
184         * inspector/InspectorDOMAgent.h:
185         * inspector/InspectorDOMDebuggerAgent.cpp:
186         (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent):
187         * inspector/InspectorDOMStorageAgent.cpp:
188         (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
189         (WebCore::InspectorDOMStorageAgent::storageId):
190         (WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent):
191         * inspector/InspectorDOMStorageAgent.h:
192         * inspector/InspectorDatabaseAgent.cpp:
193         (WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
194         * inspector/InspectorDatabaseAgent.h:
195         * inspector/InspectorDatabaseResource.cpp:
196         (WebCore::InspectorDatabaseResource::bind):
197         * inspector/InspectorIndexedDBAgent.cpp:
198         * inspector/InspectorLayerTreeAgent.cpp:
199         (WebCore::InspectorLayerTreeAgent::layersForNode):
200         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
201         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderLayerHierarchy):
202         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
203         (WebCore::InspectorLayerTreeAgent::buildObjectForIntRect):
204         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
205         * inspector/InspectorLayerTreeAgent.h:
206         * inspector/InspectorPageAgent.cpp:
207         (WebCore::InspectorPageAgent::resourceTypeJson):
208         (WebCore::InspectorPageAgent::cachedResourceTypeJson):
209         (WebCore::buildObjectForCookie):
210         (WebCore::buildArrayForCookies):
211         (WebCore::InspectorPageAgent::getCookies):
212         (WebCore::InspectorPageAgent::getResourceTree):
213         (WebCore::InspectorPageAgent::searchInResource):
214         (WebCore::buildObjectForSearchResult):
215         (WebCore::InspectorPageAgent::searchInResources):
216         (WebCore::InspectorPageAgent::buildObjectForFrame):
217         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
218         * inspector/InspectorPageAgent.h:
219         * inspector/InspectorReplayAgent.cpp:
220         (WebCore::buildInspectorObjectForPosition):
221         (WebCore::buildInspectorObjectForInput):
222         (WebCore::buildInspectorObjectForSession):
223         (WebCore::buildInspectorObjectForSessionState):
224         (WebCore::buildInspectorObjectForSegmentState):
225         (WebCore::SerializeInputToJSONFunctor::SerializeInputToJSONFunctor):
226         (WebCore::SerializeInputToJSONFunctor::operator()):
227         (WebCore::buildInspectorObjectForSegment):
228         (WebCore::InspectorReplayAgent::switchSession):
229         (WebCore::InspectorReplayAgent::insertSessionSegment):
230         (WebCore::InspectorReplayAgent::removeSessionSegment):
231         (WebCore::InspectorReplayAgent::currentReplayState):
232         (WebCore::InspectorReplayAgent::getAvailableSessions):
233         (WebCore::InspectorReplayAgent::getSessionData):
234         (WebCore::InspectorReplayAgent::getSegmentData):
235         * inspector/InspectorReplayAgent.h:
236         * inspector/InspectorResourceAgent.cpp:
237         (WebCore::buildObjectForTiming):
238         (WebCore::buildObjectForResourceRequest):
239         (WebCore::buildObjectForResourceResponse):
240         (WebCore::buildObjectForCachedResource):
241         (WebCore::InspectorResourceAgent::willSendRequest):
242         (WebCore::InspectorResourceAgent::didReceiveResponse):
243         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
244         (WebCore::InspectorResourceAgent::buildInitiatorObject):
245         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
246         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
247         (WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
248         (WebCore::InspectorResourceAgent::didSendWebSocketFrame):
249         * inspector/InspectorResourceAgent.h:
250         * inspector/InspectorStyleSheet.cpp:
251         (WebCore::buildSourceRangeObject):
252         (WebCore::buildMediaObject):
253         (WebCore::fillMediaListChain):
254         (WebCore::InspectorStyle::buildObjectForStyle):
255         (WebCore::InspectorStyle::buildArrayForComputedStyle):
256         (WebCore::InspectorStyle::styleWithProperties):
257         (WebCore::InspectorStyleSheet::create):
258         (WebCore::InspectorStyleSheet::InspectorStyleSheet):
259         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
260         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
261         (WebCore::selectorsFromSource):
262         (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
263         (WebCore::InspectorStyleSheet::buildObjectForRule):
264         (WebCore::InspectorStyleSheet::buildObjectForStyle):
265         (WebCore::InspectorStyleSheet::resourceStyleSheetText):
266         (WebCore::InspectorStyleSheet::buildArrayForRuleList):
267         (WebCore::InspectorStyleSheetForInlineStyle::create):
268         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
269         * inspector/InspectorStyleSheet.h:
270         (WebCore::InspectorStyleSheet::canBind):
271         * inspector/InspectorTimelineAgent.cpp:
272         (WebCore::toProtocol):
273         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
274         (WebCore::InspectorTimelineAgent::sendEvent):
275         * inspector/PageRuntimeAgent.cpp:
276
277 2014-08-25  Brendan Long  <b.long@cablelabs.com>
278
279         [GStreamer] ASSERT failure in WebKitWebSource in StreamingClient
280         https://bugs.webkit.org/show_bug.cgi?id=136132
281
282         adoptGRef() has an ASSERT failure if it's used on a floating pointer. For some reason,
283         WebKitWebSrc* src in StreamingClient's constructor is floating. Since we
284         don't construct this ourselves, I assume this is happening in Playbin.
285
286         If we remove the ref and adopt, GRefPtr's constructor calls gst_object_ref_sink,
287         which removes the floating reference and doesn't increment the reference count.
288         This should work, but actually causes the page to either lock up or crash (different
289         results for different testers).
290
291         In this case, it seems like the adoptGRef / gst_object_ref was the correct thing to do,
292         but adoptGRef won't actually let us do. Removing the ASSERT is a bad idea, because
293         usually we don't want to adopt floating pointers.
294
295         This is all a long way of saying that making m_src a raw pointer and manually
296         calling gst_object_ref(), and calling gst_object_unref in the destructor is the
297         best solution in this case, since it fixes the problem while leaving the ASSERT
298         to protect us in the much more common case where adopting a floating reference is bad.
299
300         Reviewed by Philippe Normand.
301
302         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
303         (StreamingClient::StreamingClient): Make m_src a raw pointer instead of a GRefPtr.
304         (StreamingClient::~StreamingClient): Unref m_src.
305         (StreamingClient::createReadBuffer): Replace m_src.get() with m_src, since it's a raw pointer now.
306         (StreamingClient::handleResponseReceived): Same.
307         (StreamingClient::handleDataReceived): Same.
308         (StreamingClient::handleNotifyFinished): Same.
309         (CachedResourceStreamingClient::notifyFinished): Same.
310         (ResourceHandleStreamingClient::didFail): Same.
311         (ResourceHandleStreamingClient::wasBlocked): Same.
312         (ResourceHandleStreamingClient::cannotShowURL): Same.
313
314 2014-08-25  Zan Dobersek  <zdobersek@igalia.com>
315
316         [GTK] Remove PopupMenuGtk, SearchPopupMenuGtk
317         https://bugs.webkit.org/show_bug.cgi?id=136211
318
319         Reviewed by Carlos Garcia Campos.
320
321         Remove the two classes from the codebase. They're not used anymore
322         after the WebKit1 layer of the GTK port was removed some time ago.
323
324         * PlatformGTK.cmake:
325         * platform/gtk/PopupMenuGtk.cpp: Removed.
326         * platform/gtk/PopupMenuGtk.h: Removed.
327         * platform/gtk/SearchPopupMenuGtk.cpp: Removed.
328         * platform/gtk/SearchPopupMenuGtk.h: Removed.
329
330 2014-08-25  Shivakumar JM  <shiva.jm@samsung.com>
331
332         Web Core: Fix unused parameter build warning.
333         https://bugs.webkit.org/show_bug.cgi?id=136208
334
335         Reviewed by Darin Adler.
336
337         Fix unused build warning by removing parameter, which is not used.
338
339         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
340         (WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
341
342 2014-08-22  Sergio Villar Senin  <svillar@igalia.com>
343
344         ASSERTION FAILED: !trackSizes.isEmpty() in WebCore::createGridTrackList
345         https://bugs.webkit.org/show_bug.cgi?id=136149
346
347         Reviewed by Darin Adler.
348
349         The second argument of the repeat() function is a <track-list>
350         that must have at least one <track-size>. Should it not be found,
351         the declaration must be invalidated.
352
353         * css/CSSParser.cpp:
354         (WebCore::CSSParser::parseGridTrackRepeatFunction):
355
356 2014-08-24  Zan Dobersek  <zdobersek@igalia.com>
357
358         Move WebCore storage code to C++11 lambdas, std::function
359         https://bugs.webkit.org/show_bug.cgi?id=126435
360
361         Reviewed by Darin Adler.
362
363         Use C++11 lambdas instead of WTF::bind and std::function<void ()>
364         instead of WTF::Function<void ()> in StorageAreaSync, StorageSyncManager,
365         StorageThread and StorageTracker classes.
366
367         * storage/StorageAreaSync.cpp:
368         (WebCore::StorageAreaSync::StorageAreaSync):
369         (WebCore::StorageAreaSync::scheduleFinalSync):
370         (WebCore::StorageAreaSync::syncTimerFired):
371         * storage/StorageSyncManager.cpp:
372         (WebCore::StorageSyncManager::dispatch):
373         * storage/StorageSyncManager.h:
374         * storage/StorageThread.cpp:
375         (WebCore::StorageThread::dispatch):
376         (WebCore::StorageThread::terminate):
377         (WebCore::StorageThread::releaseFastMallocFreeMemoryInAllThreads):
378         * storage/StorageThread.h:
379         * storage/StorageTracker.cpp:
380         (WebCore::StorageTracker::importOriginIdentifiers):
381         (WebCore::StorageTracker::syncImportOriginIdentifiers):
382         (WebCore::StorageTracker::syncFileSystemAndTrackerDatabase):
383         (WebCore::StorageTracker::setOriginDetails):
384         (WebCore::StorageTracker::deleteAllOrigins):
385         (WebCore::StorageTracker::deleteOrigin):
386
387 2014-08-24  Alexey Proskuryakov  <ap@apple.com>
388
389         ASSERT(extractable()) when storing a non-extractable key in IndexedDB
390         https://bugs.webkit.org/show_bug.cgi?id=136202
391         rdar://problem/17993967
392
393         Reviewed by Darin Adler.
394
395         Test: crypto/subtle/rsa-indexeddb-non-exportable.html
396
397         Removed the obsolete assertion.
398
399         * crypto/keys/CryptoKeyAES.cpp: (WebCore::CryptoKeyAES::exportData):
400         * crypto/keys/CryptoKeyHMAC.cpp: (WebCore::CryptoKeyHMAC::exportData):
401         * crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::exportData):
402
403 2014-08-24  Brian J. Burg  <burg@cs.washington.edu>
404
405         Web Inspector: Rename DOM.RGBA and remove workarounds in the bindings generator
406         https://bugs.webkit.org/show_bug.cgi?id=136025
407
408         Reviewed by Joseph Pecoraro.
409
410         Rename DOM.RGBA to DOM.RGBAColor to avoid name clashes with headers on Windows CE.
411         This workaround used to be special-cased in the bindings generator.
412
413         Type names are not used in protocol messages, so this does not introduce legacy issues.
414
415         * inspector/protocol/DOM.json:
416
417 2014-08-24  Michael Catanzaro  <mcatanzaro@igalia.com>
418
419         [GTK] Toggle buttons visually broken with GTK+ 3.13.7
420         https://bugs.webkit.org/show_bug.cgi?id=136130
421
422         Reviewed by Martin Robinson.
423
424         No new tests. Hopefully covered by existing tests, and our tests only
425         run with GTK+ 3.6 anyway.
426
427         * platform/gtk/RenderThemeGtk3.cpp:
428         (WebCore::paintToggle): use GTK_STATE_FLAG_CHECKED when compiling for
429         GTK+ 3.13.7 and above to ensure toggle buttons display as toggled.
430
431 2014-08-23  Brady Eidson  <beidson@apple.com>
432
433         Random Gamepad cleanup
434         https://bugs.webkit.org/show_bug.cgi?id=136193
435
436         Reviewed by Sam Weinig.
437
438         No new tests (Not tested yet, and no change in behavior anyways)
439
440         - Use DOMWindow WeakPtrs when iterating
441         - More references instead of pointers
442
443         * Modules/gamepad/GamepadEvent.cpp:
444         (WebCore::GamepadEvent::GamepadEvent):
445         * Modules/gamepad/GamepadEvent.h:
446         (WebCore::GamepadEvent::create):
447
448         * Modules/gamepad/GamepadManager.cpp:
449         (WebCore::GamepadManager::platformGamepadDisconnected):
450         (WebCore::GamepadManager::makeGamepadVisible):
451         * Modules/gamepad/NavigatorGamepad.cpp:
452         (WebCore::NavigatorGamepad::gamepadFromPlatformGamepad):
453         (WebCore::NavigatorGamepad::gamepadAtIndex): Deleted.
454         * Modules/gamepad/NavigatorGamepad.h:
455
456         * page/DOMWindow.cpp:
457         (WebCore::DOMWindow::DOMWindow):
458         * page/DOMWindow.h:
459
460 2014-08-23  Byungseon Shin  <sun.shin@lge.com>
461
462         Unify GraphicsLayer::setContentsToMedia and setContentsToCanvas
463         https://bugs.webkit.org/show_bug.cgi?id=109658
464
465         Reviewed by Martin Robinson.
466  
467         Based on patch originally written by Tim Horton.
468         Merge setContentsToMedia and setContentsToCanvas into setContentsToPlatformLayer.
469  
470         * WebCore.exp.in:
471         Adjust exports.
472  
473         * platform/graphics/GraphicsLayer.h:
474         Move ContentsLayerPurpose enum up out of GraphicsLayer platform implmentations
475         and into GraphicsLayer, so we can use it as a parameter.
476         Add ContentsLayerForPlugin.
477  
478         (WebCore::GraphicsLayer::setContentsToPlatformLayer):
479         Remove setContentsToMedia and setContentsToCanvas, and replace them
480         with setContentsToPlatformLayer, which previously existed but was unused
481         and simply called setContentsToMedia.
482         setContentsToPlatformLayer takes a ContentsLayerPurpose, primarily
483         so that GraphicsLayerCA can know whether it needs to setNeedsDisplay
484         the layer when parenting it (canvas) or not (everything else).
485  
486         * platform/graphics/ca/GraphicsLayerCA.cpp:
487         (WebCore::GraphicsLayerCA::setContentsToPlatformLayer):
488         Rename function setContentsToMedia -> setContentsToPlatformLayer.
489         Rename argument mediaLayer -> platformLayer.
490         Store the passed-in ContentsLayerPurpose.
491         Remove setContentsToCanvas.
492  
493         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
494         (WebCore::GraphicsLayerCA::updateContentsPlatformLayer):
495         Remove updateContentsMediaLayer and updateContentsCanvas layer,
496         add updateContentsPlatformLayer.
497  
498         * platform/graphics/ca/GraphicsLayerCA.h:
499         Do the same to the LayerChange enum.
500  
501         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
502         (WebCore::GraphicsLayerTextureMapper::setContentsToImage):
503         (WebCore::GraphicsLayerTextureMapper::setContentsToPlatformLayer):
504         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
505         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
506         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
507         (WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay):
508         (WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
509         (WebCore::CoordinatedGraphicsLayer::syncPlatformLayer):
510         (WebCore::CoordinatedGraphicsLayer::destroyPlatformLayerIfNeeded):
511         (WebCore::CoordinatedGraphicsLayer::createPlatformLayerIfNeeded):
512         (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
513         Fold these together in the same way as elsewhere.
514  
515         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
516         Do the same to the LayerChange enum.
517  
518         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
519         (WebCore::CoordinatedGraphicsScene::createPlatformLayerIfNeeded):
520         (WebCore::CoordinatedGraphicsScene::syncPlatformLayerIfNeeded):
521         (WebCore::CoordinatedGraphicsScene::destroyPlatformLayerIfNeeded):
522         (WebCore::CoordinatedGraphicsScene::setLayerState):
523         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
524         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
525         (WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
526         Rename canvasLayer -> platformLayer.
527  
528         * rendering/RenderLayerBacking.cpp:
529         (WebCore::RenderLayerBacking::updateConfiguration):
530         Use the new setContentsToPlatformLayer, passing in the relevant ContentsLayerPurpose.
531
532 2014-08-23  Joseph Pecoraro  <pecoraro@apple.com>
533
534         Web Inspector: Do not copy large module source strings
535         https://bugs.webkit.org/show_bug.cgi?id=136191
536
537         Reviewed by Benjamin Poulain.
538
539         * inspector/CommandLineAPIModule.cpp:
540         (WebCore::CommandLineAPIModule::source):
541
542 2014-08-23  Zan Dobersek  <zdobersek@igalia.com>
543
544         Remove uses of CrossThreadTask in ThreadableWebSocketChannelClientWrapper, WorkerThreadableWebSocketChannel
545         https://bugs.webkit.org/show_bug.cgi?id=133954
546
547         Reviewed by Darin Adler.
548
549         Replace uses of CrossThreadTask with C++11 lambdas in the ThreadableWebSocketChannelClientWrapper
550         and WorkerThreadableWebSocketChannel classes.
551
552         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
553         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
554         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
555         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
556         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
557         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
558         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
559         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
560         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
561         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasksCallback): Deleted.
562         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnectCallback): Deleted.
563         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback): Deleted.
564         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryDataCallback): Deleted.
565         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmountCallback): Deleted.
566         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback): Deleted.
567         (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback): Deleted.
568         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageErrorCallback): Deleted.
569         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
570         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
571         (WebCore::WorkerThreadableWebSocketChannel::Peer::send):
572         (WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount):
573         (WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect):
574         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage):
575         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
576         (WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
577         (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
578         (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
579         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
580         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
581         (WebCore::WorkerThreadableWebSocketChannel::Bridge::connect):
582         (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
583         (WebCore::WorkerThreadableWebSocketChannel::Bridge::bufferedAmount):
584         (WebCore::WorkerThreadableWebSocketChannel::Bridge::close):
585         (WebCore::WorkerThreadableWebSocketChannel::Bridge::fail):
586         (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
587         (WebCore::WorkerThreadableWebSocketChannel::Bridge::suspend):
588         (WebCore::WorkerThreadableWebSocketChannel::Bridge::resume):
589         (WebCore::workerGlobalScopeDidSend): Deleted.
590         (WebCore::workerGlobalScopeDidGetBufferedAmount): Deleted.
591         (WebCore::workerGlobalScopeDidConnect): Deleted.
592         (WebCore::workerGlobalScopeDidReceiveMessage): Deleted.
593         (WebCore::workerGlobalScopeDidReceiveBinaryData): Deleted.
594         (WebCore::workerGlobalScopeDidUpdateBufferedAmount): Deleted.
595         (WebCore::workerGlobalScopeDidStartClosingHandshake): Deleted.
596         (WebCore::workerGlobalScopeDidClose): Deleted.
597         (WebCore::workerGlobalScopeDidReceiveMessageError): Deleted.
598         (WebCore::WorkerThreadableWebSocketChannel::mainThreadConnect): Deleted.
599         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSend): Deleted.
600         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendArrayBuffer): Deleted.
601         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendBlob): Deleted.
602         (WebCore::WorkerThreadableWebSocketChannel::mainThreadBufferedAmount): Deleted.
603         (WebCore::WorkerThreadableWebSocketChannel::mainThreadClose): Deleted.
604         (WebCore::WorkerThreadableWebSocketChannel::mainThreadFail): Deleted.
605         (WebCore::WorkerThreadableWebSocketChannel::mainThreadDestroy): Deleted.
606         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSuspend): Deleted.
607         (WebCore::WorkerThreadableWebSocketChannel::mainThreadResume): Deleted.
608         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
609
610 2014-08-23  Yusuke Suzuki  <utatane.tea@gmail.com>
611
612         Clean up build warnings: control reaches end of non-void function
613         https://bugs.webkit.org/show_bug.cgi?id=135889
614
615         Reviewed by Alexey Proskuryakov.
616
617         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
618         (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
619         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
620         (WebCore::JSCryptoAlgorithmDictionary::createParametersForSign):
621         (WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
622         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest):
623         (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey):
624         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey):
625         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits):
626         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
627         (WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey):
628         * crypto/CryptoKey.cpp:
629         (WebCore::CryptoKey::type):
630
631 2014-08-23  Zan Dobersek  <zdobersek@igalia.com>
632
633         [TexMap] Only notify of a required flush on the first layer property change
634         https://bugs.webkit.org/show_bug.cgi?id=136104
635
636         Reviewed by Martin Robinson.
637
638         The GraphicsLayer's client should only be notified that a flush is required
639         when the first change of one of the layer's properties is initiated, instead
640         of requesting the flush on every such change.
641
642         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
643         (WebCore::GraphicsLayerTextureMapper::notifyChange):
644
645 2014-08-22  Dan Bernstein  <mitz@apple.com>
646
647         Try to fix the Mac build using the internal SDK.
648
649         * bindings/objc/PublicDOMInterfaces.h:
650
651 2014-08-22  Renato Nagy  <nagy.renato@stud.u-szeged.hu>
652
653         Remove LevelDB.
654         https://bugs.webkit.org/show_bug.cgi?id=136170
655
656         Reviewed by Gyuyoung Kim.
657
658         * CMakeLists.txt:
659         * Modules/indexeddb/IDBObjectStore.cpp:
660         (WebCore::IDBObjectStore::createIndex):
661         * Modules/indexeddb/IDBTransactionCoordinator.cpp:
662         (WebCore::IDBTransactionCoordinator::canRunTransaction):
663         (WebCore::doScopesOverlap): Deleted.
664         * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.cpp: Removed.
665         * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.h: Removed.
666         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp: Removed.
667         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h: Removed.
668         * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.cpp: Removed.
669         * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h: Removed.
670         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp: Removed.
671         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h: Removed.
672         * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.cpp: Removed.
673         * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.h: Removed.
674         * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp: Removed.
675         * Modules/indexeddb/leveldb/IDBLevelDBCoding.h: Removed.
676         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp: Removed.
677         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h: Removed.
678         * WebCore.vcxproj/WebCore.vcxproj:
679         * WebCore.vcxproj/WebCore.vcxproj.filters:
680         * WebCore.xcodeproj/project.pbxproj:
681         * platform/DatabaseStrategy.cpp:
682         (WebCore::DatabaseStrategy::createIDBFactoryBackend):
683         * platform/leveldb/LevelDBComparator.h: Removed.
684         * platform/leveldb/LevelDBDatabase.cpp: Removed.
685         * platform/leveldb/LevelDBDatabase.h: Removed.
686         * platform/leveldb/LevelDBIterator.h: Removed.
687         * platform/leveldb/LevelDBSlice.h: Removed.
688         * platform/leveldb/LevelDBTransaction.cpp: Removed.
689         * platform/leveldb/LevelDBTransaction.h: Removed.
690         * platform/leveldb/LevelDBWriteBatch.cpp: Removed.
691         * platform/leveldb/LevelDBWriteBatch.h: Removed.
692
693 2014-08-22  KwangHyuk Kim  <hyuki.kim@samsung.com>
694
695         [EFL] Fix build break caused by ENABLE_GAMEPAD_DEPRECATED.
696         https://bugs.webkit.org/show_bug.cgi?id=136110
697
698         Reviewed by Gyuyoung Kim.
699
700         WebCore_INCLUDE_DIRECTORY for gamepad was removed from WK2 Efl in order to fix build break when ENABLE_GAMEPAD_DEPRECATED is on.
701
702         No new tests because no functional changes.
703
704         * PlatformEfl.cmake:
705
706 2014-08-22  Benjamin Poulain  <benjamin@webkit.org>
707
708         Style invalidation does not work for adjacent node updates
709         https://bugs.webkit.org/show_bug.cgi?id=136145
710
711         Reviewed by Antti Koivisto.
712
713         There were a bunch of cases in which the style would be in an inconsistent
714         state until the style resolver kicks in for the entire document.
715
716         For example, let's take the selector "foo.bar + target". When the class "bar"
717         changes, the element foo is invalidated. The element target is untouched.
718
719         Now, if the style of "target" is accessed, nodeOrItsAncestorNeedsStyleRecalc()
720         returns false and the old style is accessed.
721
722         At some point, when the style of the entire document is resolved, the node
723         "foo" is styled, and "target" is invalidated.
724
725
726         To fix the issue, this patch adds an extra flag keeping track of subtrees that
727         have any node needing style recalc: DirectChildNeedsStyleRecalcFlag.
728
729         When invalidating the node "foo", its parent is marked with
730         DirectChildNeedsStyleRecalcFlag to note that one of the child nodes has an invalid style.
731
732         When verifying the style state in nodeOrItsAncestorNeedsStyleRecalc(), we check that flag
733         in addition to the siblings dependencies to find if the node is part of a subtree that may
734         be invalid due to sibling selectors.
735
736         Similarly, in the style resolver, we use the flag to clear the style on all elements
737         that could potentially be invalid.
738
739
740         This patch removes the changes introduced by r172721
741         (The style is not updated correctly when the pseudo class :empty is applied on anything but the rightmost element).
742         That bug was just a special case of what is solved here.
743
744
745         Tests: fast/selectors/attribute-direct-adjacent-style-update.html
746                fast/selectors/attribute-sibling-style-update.html
747                fast/selectors/class-direct-adjacent-style-update.html
748                fast/selectors/class-sibling-style-update.html
749                fast/selectors/first-child-direct-adjacent-style-update.html
750                fast/selectors/first-child-sibling-style-update.html
751
752         * css/SelectorChecker.cpp:
753         (WebCore::SelectorChecker::checkOne):
754         * cssjit/SelectorCompiler.cpp:
755         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsEmpty):
756         (WebCore::SelectorCompiler::setStyleOfSiblingsAffectedByEmpty): Deleted.
757         * dom/ContainerNode.h:
758         (WebCore::ContainerNode::directChildNeedsStyleRecalc):
759         (WebCore::ContainerNode::setDirectChildNeedsStyleRecalc):
760         Remove the special case for :empty.
761
762         * dom/Document.cpp:
763         (WebCore::nodeOrItsAncestorNeedsStyleRecalc):
764         * dom/Element.cpp:
765         (WebCore::checkForEmptyStyleChange):
766         (WebCore::checkForSiblingStyleChanges):
767         (WebCore::Element::setStyleOfSiblingsAffectedByEmpty): Deleted.
768         (WebCore::Element::rareDataStyleOfSiblingsAffectedByEmpty): Deleted.
769         * dom/Element.h:
770         (WebCore::Element::styleOfSiblingsAffectedByEmpty): Deleted.
771         * dom/ElementRareData.h:
772         (WebCore::ElementRareData::ElementRareData):
773         (WebCore::ElementRareData::styleOfSiblingsAffectedByEmpty): Deleted.
774         (WebCore::ElementRareData::setStyleOfSiblingsAffectedByEmpty): Deleted.
775         * dom/Node.cpp:
776         (WebCore::markAncestorsWithChildNeedsStyleRecalc):
777         (WebCore::Node::setNeedsStyleRecalc):
778         (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc): Deleted.
779         * dom/Node.h:
780         (WebCore::Node::clearChildNeedsStyleRecalc):
781         * style/StyleResolveTree.cpp:
782         (WebCore::Style::resetStyleForNonRenderedDescendants):
783
784 2014-08-22  Joseph Pecoraro  <pecoraro@apple.com>
785
786         Remove unused legacy InspectorFrontendHost methods
787         https://bugs.webkit.org/show_bug.cgi?id=136186
788
789         Reviewed by Andreas Kling.
790
791         * bindings/js/JSInspectorFrontendHostCustom.cpp:
792         (WebCore::JSInspectorFrontendHost::recordActionTaken): Deleted.
793         (WebCore::JSInspectorFrontendHost::recordPanelShown): Deleted.
794         (WebCore::JSInspectorFrontendHost::recordSettingChanged): Deleted.
795         * inspector/InspectorFrontendHost.idl:
796
797 2014-08-22  Joseph Pecoraro  <pecoraro@apple.com>
798
799         Remove unnecessary WTFString creation in Dictionary getter
800         https://bugs.webkit.org/show_bug.cgi?id=136184
801
802         Reviewed by Benjamin Poulain.
803
804         * bindings/js/Dictionary.cpp:
805         (WebCore::Dictionary::getWithUndefinedOrNullCheck):
806         * bindings/js/Dictionary.h:
807         * bindings/js/JSDictionary.cpp:
808         (WebCore::JSDictionary::getWithUndefinedOrNullCheck):
809         * bindings/js/JSDictionary.h:
810
811 2014-08-22  Commit Queue  <commit-queue@webkit.org>
812
813         Unreviewed, rolling out r172866.
814         https://bugs.webkit.org/show_bug.cgi?id=136177
815
816         Broke iOS build (Requested by othermaciej on #webkit).
817
818         Reverted changeset:
819
820         "Replace use of WKCopyCFLocalizationPreferredName with
821         NSLocale public API"
822         https://bugs.webkit.org/show_bug.cgi?id=136082
823         http://trac.webkit.org/changeset/172866
824
825 2014-08-22  David Hyatt  <hyatt@apple.com>
826
827         Add proper support for letter-spacing to bopomofo Ruby
828         https://bugs.webkit.org/show_bug.cgi?id=136171
829
830         Reviewed by Sam Weinig.
831
832         Added fast/ruby/bopomofo-letter-spacing.html
833
834         * rendering/RenderRubyRun.cpp:
835         (WebCore::RenderRubyRun::layout):
836         Alter the layout of bopomofo ruby so that the distance between the base characters is the max of
837         the letter-spacing between the characters and the minimum required width to hold two rows of
838         Ruby.
839
840         Push the bopomofo ruby into the letter-spacing to ensure that it comes right after the base character
841         and not after all the letter-spacing.
842
843 2014-08-22  Simon Fraser  <simon.fraser@apple.com>
844
845         Fix showing paint rects when selecting lines in the timeline
846         https://bugs.webkit.org/show_bug.cgi?id=136173
847
848         Reviewed by Joseph Pecoraro.
849
850         Fix the condition used to decide when to show the overlay.
851
852         * inspector/InspectorOverlay.cpp:
853         (WebCore::InspectorOverlay::shouldShowOverlay):
854
855 2014-08-22  Simon Fraser  <simon.fraser@apple.com>
856
857         Use the correct rect for paint flashing
858         https://bugs.webkit.org/show_bug.cgi?id=136169
859
860         Reviewed by Sam Weinig.
861
862         Use the rect we've converted to root document coordinates for paint flashing.
863
864         * inspector/InspectorPageAgent.cpp:
865         (WebCore::InspectorPageAgent::didPaint):
866
867 2014-08-22  Dean Jackson  <dino@apple.com>
868
869         Google Canvas2D maps are too slow and uncontrollable with Safari with full screen mode
870         https://bugs.webkit.org/show_bug.cgi?id=136168
871
872         Reviewed by Tim Horton.
873
874         When Google maps are using their 2D "lite" fallback and you're drawing in a huge
875         window such as fullscreen 4K, we would drop back to unaccelerated mode, thinking
876         that we'd exceeded the maximum IOSurface size.
877
878         Remove the hardcoded limit on IOSurface sizes, and instead ask the system
879         what it believe the maximum to be. This was significantly higher than our
880         limit on the systems I tested.
881
882         * platform/graphics/cg/ImageBufferCG.cpp:
883         (WebCore::ImageBuffer::ImageBuffer): Include our IOSurface wrapper, which
884         has a query for maximum size, and use that instead.
885
886 2014-08-22  Simon Fraser  <simon.fraser@apple.com>
887
888         Maybe fix Windows.
889
890         * inspector/InspectorOverlay.cpp:
891         (WebCore::InspectorOverlay::showPaintRect):
892
893 2014-08-22  Simon Fraser  <simon.fraser@apple.com>
894
895         Implement paint flashing in the WK1 InspectorOverlay page
896         https://bugs.webkit.org/show_bug.cgi?id=136138
897
898         Reviewed by Sam Weinig, Joseph Pecoraro.
899
900         Implement paint flashing for the WebKit1 InspectorOverlay via a second canvas in the overlay page.
901         We avoid allocating backing store for this canvas until we have paint rects.
902         
903         Because this overlay page is weird and doesn't know how to paint itself, InspectorOverlay manages
904         an array of rects, and pushes them to the page when they change, before forcing a paint.
905         
906         Because iOS doesn't use the InspectorOverlay page, stub out setShowPaintRects on its
907         WebKit WebInspectorClient, but don't yet implement paint flashing there.
908
909         * inspector/InspectorOverlay.cpp:
910         (WebCore::InspectorOverlay::InspectorOverlay):
911         (WebCore::InspectorOverlay::shouldShowOverlay):
912         (WebCore::InspectorOverlay::update):
913         (WebCore::buildObjectForRect):
914         (WebCore::InspectorOverlay::setShowingPaintRects):
915         (WebCore::InspectorOverlay::showPaintRect):
916         (WebCore::InspectorOverlay::updatePaintRectsTimerFired):
917         (WebCore::InspectorOverlay::drawPaintRects):
918         (WebCore::InspectorOverlay::forcePaint):
919         (WebCore::quadToPath): Deleted.
920         (WebCore::drawOutlinedQuad): Deleted.
921         (WebCore::InspectorOverlay::drawOutline): Deleted.
922         * inspector/InspectorOverlay.h:
923         * inspector/InspectorOverlayPage.html:
924         * inspector/InspectorOverlayPage.js:
925         (updatePaintRects):
926         (reset):
927         (_drawShapeHighlight):
928         * inspector/InspectorPageAgent.cpp:
929         (WebCore::InspectorPageAgent::setShowPaintRects):
930         (WebCore::InspectorPageAgent::didPaint):
931
932 2014-08-22  Eric Carlson  <eric.carlson@apple.com>
933
934         [iOS] Cleanup media code
935         https://bugs.webkit.org/show_bug.cgi?id=136163
936
937         Reviewed by Jer Noble.
938
939         No new tests, no functionality was changed.
940
941         * html/HTMLMediaElement.cpp:
942         (WebCore::HTMLMediaElement::HTMLMediaElement): Don't initialize m_requestingPlay.
943         (WebCore::HTMLMediaElement::parseMediaPlayerAttribute): Deleted.
944         (WebCore::HTMLMediaElement::parseAttribute): Don't call parseMediaPlayerAttribute.
945         (WebCore::HTMLMediaElement::playInternal): m_requestingPlay is dead, Jim.
946         (WebCore::HTMLMediaElement::updatePlayState): Ditto.
947         (WebCore::HTMLMediaElement::updatePlayState): Remove obsolete FIXME.
948         * html/HTMLMediaElement.h:
949         * platform/graphics/MediaPlayer.cpp:
950         (WebCore::MediaPlayer::attributeChanged): Deleted.
951         (WebCore::MediaPlayer::readyForPlayback): Deleted.
952         * platform/graphics/MediaPlayer.h:
953         * platform/graphics/MediaPlayerPrivate.h:
954         (WebCore::MediaPlayerPrivateInterface::attributeChanged): Deleted.
955         (WebCore::MediaPlayerPrivateInterface::readyForPlayback): Deleted.
956
957 2014-08-20  Maciej Stachowiak  <mjs@apple.com>
958
959         Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API
960         https://bugs.webkit.org/show_bug.cgi?id=136082
961
962         Reviewed by Alexey Proskuryakov.
963
964         * platform/mac/Language.mm:
965         (WebCore::httpStyleLanguageCode): Replace use of WKCopyCFLocalizationPreferredName
966         with new WebCoreNSStringExtras helper.
967         * platform/mac/WebCoreNSStringExtras.mm: Replacements for the aspects of
968         WKCopyCFLocalizationPreferredName.
969         (preferredBundleLocalizationName): New helper - most preferred localization available
970         in the main bundle, canonicalized the way we like it.
971         (canonicalLocalizationName): Convert a lcalization name to a string with language and
972         country code, using default if necessary (e.g. "en" maps to "en_US").
973         * WebCore.order: Remove mention of WKCopyCFLocalizationPreferredName.
974         * WebCore.exp.in: ditto; also export preferredBundleLocalizationName for WebKit(2).
975         * platform/ios/WebCoreSystemInterfaceIOS.mm: ditto
976         * platform/mac/WebCoreSystemInterface.h: ditto
977         * platform/mac/WebCoreSystemInterface.mm: ditto
978
979 2014-08-22  Daniel Bates  <dabates@apple.com>
980
981         [iOS] Disable ENABLE_IOS_{GESTURE, TOUCH}_EVENTS, and temporarily disable ENABLE_TOUCH_EVENTS
982         and ENABLE_XSLT when building with the iOS public SDK
983         https://bugs.webkit.org/show_bug.cgi?id=135945
984
985         Reviewed by Andy Estes.
986
987         Towards bringing up the iOS WebKit port using the iOS public SDK, disable the proprietary
988         iOS gesture and touch event code. For now we also temporarily disable ENABLE_TOUCH_EVENTS
989         and ENABLE_XSLT while we focus to get the rest of the port built using the public SDK. We'll
990         look to enable these features once we stabilize the build.
991
992         * Configurations/FeatureDefines.xcconfig: Disable ENABLE_IOS_{GESTURE, TOUCH}_EVENTS, ENABLE_TOUCH_EVENTS
993         and ENABLE_XSLT when building with the public SDK.
994         * Configurations/WebCore.xcconfig:
995         * DerivedSources.make: Conditionally generate derived sources for touch and gesture events as applicable and pass
996         define WTF_USE_APPLE_INTERNAL_SDK when generating bindings (if applicable). Make the logic for determining
997         whether WTF_PLATFORM_IOS is defined consistent with logic for determining whether WTF_USE_APPLE_INTERNAL_SDK and
998         ENABLE_ORIENTATION_EVENTS are defined. We should look to further cleanup this code.
999         * bindings/js/ios/TouchConstructors.cpp: Substitute ENABLE(IOS_TOUCH_EVENTS) for macro expression "PLATFORM(IOS) && ENABLE(TOUCH_EVENTS)".
1000         * bindings/objc/DOMEvents.h: Write preprocessor logic in terms of ENABLE_TOUCH_EVENTS and ENABLE_IOS_GESTURE_EVENTS.
1001         * bindings/objc/PublicDOMInterfaces.h: Include private header <WebKitAdditions/PublicDOMInterfacesIOS.h> when
1002         it exists as opposed to assuming it exists when building for iOS.
1003         * dom/Document.cpp:
1004         (WebCore::Document::Document): Substitute ENABLE(IOS_TOUCH_EVENTS) for macro expression "ENABLE(TOUCH_EVENTS) && PLATFORM(IOS)".
1005         (WebCore::Document::prepareForDestruction): Ditto.
1006         (WebCore::Document::removeAllEventListeners): Ditto.
1007         * dom/Document.h: Write preprocessor logic in terms of ENABLE_IOS_TOUCH_EVENTS and ENABLE_TOUCH_EVENTS.
1008         * dom/Document.idl: Ditto.
1009         * dom/Touch.h: Substitute ENABLE(IOS_TOUCH_EVENTS) for PLATFORM(IOS)..
1010         * dom/TouchEvent.h: Ditto.
1011         * dom/TouchList.h: Ditto.
1012         * dom/ios/TouchEvents.cpp: Substitute ENABLE(IOS_TOUCH_EVENTS) for macro expression "PLATFORM(IOS) && ENABLE(TOUCH_EVENTS)".
1013         * history/CachedFrame.cpp: Add PLATFORM(IOS) guard.
1014         * html/shadow/SliderThumbElement.cpp:
1015         (WebCore::SliderThumbElement::SliderThumbElement): Substitute ENABLE(IOS_TOUCH_EVENTS) for ENABLE(TOUCH_EVENTS).
1016         (WebCore::SliderThumbElement::willDetachRenderers): Ditto.
1017         * html/shadow/SliderThumbElement.h: Ditto.
1018         * loader/EmptyClients.h: Ditto.
1019         * platform/ios/PlatformEventFactoryIOS.h: Write preprocessor logic in terms of ENABLE_IOS_TOUCH_EVENTS and ENABLE_TOUCH_EVENTS.
1020         Only include header <WebKitAdditions/PlatformTouchEventIOS.h> when building with ENABLE_TOUCH_EVENTS enabled.
1021
1022 2014-08-22  Simon Fraser  <simon.fraser@apple.com>
1023
1024         Implement paint flashing via GraphicsLayers in the WK2 inspector overlay
1025         https://bugs.webkit.org/show_bug.cgi?id=136136
1026
1027         Reviewed by Sam Weinig, Joseph Pecoraro.
1028
1029         Allow InspectorClient to have a custom implementation of showPaintRect(). For
1030         WebKit2's WebInspectorClient, implement this by creating a set of GraphicsLayers
1031         which are parented in a document overlay, with 0.25s fade-out animations.
1032         
1033         Also change InspectorInstrumentation::didPaintImpl() to no longer take a GraphicsContext;
1034         it makes no sense to paint the paint rects directly into the context of the web page.
1035         Now that the paint rects are painted into an overlay, the rectangles need to be converted
1036         to root document coordinates, which is done in InspectorInstrumentation::didPaintImpl().
1037         
1038         Remove the generic InspectorOverlay::drawOutline()-based indicators; they will
1039         be reimplemented in a later patch.
1040
1041         * WebCore.exp.in:
1042         * inspector/InspectorClient.h:
1043         (WebCore::InspectorClient::showPaintRect):
1044         * inspector/InspectorInstrumentation.cpp:
1045         (WebCore::InspectorInstrumentation::didPaintImpl):
1046         * inspector/InspectorInstrumentation.h:
1047         (WebCore::InspectorInstrumentation::didPaint):
1048         * inspector/InspectorPageAgent.cpp:
1049         (WebCore::InspectorPageAgent::didPaint):
1050         * inspector/InspectorPageAgent.h:
1051         * page/FrameView.cpp:
1052         (WebCore::FrameView::didPaintContents):
1053         * rendering/RenderLayerBacking.cpp:
1054         (WebCore::RenderLayerBacking::paintContents):
1055
1056 2014-08-22  Commit Queue  <commit-queue@webkit.org>
1057
1058         Unreviewed, rolling out r172844.
1059         https://bugs.webkit.org/show_bug.cgi?id=136164
1060
1061         re-applying WEBCORE_EXPORTS patch (Requested by
1062         alexchristensen on #webkit).
1063
1064         Reverted changeset:
1065
1066         "Revert r172831, it broke the Windows build."
1067         http://trac.webkit.org/changeset/172844
1068
1069 2014-08-21  David Hyatt  <hyatt@apple.com>
1070
1071         Implement rudimentary Bopomofo Ruby support (ruby-position:inter-character)
1072         https://bugs.webkit.org/show_bug.cgi?id=136137
1073         <rdar://problem/12567545>
1074
1075         Reviewed by Sam Weinig.
1076
1077         Added fast/ruby/bopomofo.html and fast/ruby/bopomofo-rl.html.
1078
1079         * css/CSSParser.cpp:
1080         (WebCore::isValidKeywordPropertyAndValue):
1081         * css/CSSPrimitiveValueMappings.h:
1082         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1083         (WebCore::CSSPrimitiveValue::operator RubyPosition):
1084         * css/CSSPropertyNames.in:
1085         * css/CSSValueKeywords.in:
1086         Add support for the new inter-character value for ruby-position and also
1087         add support for a new font-size keyword, -webkit-ruby-text, that is used
1088         to set a smart initial font size based off the type of ruby being presented.
1089
1090         * css/DeprecatedStyleBuilder.cpp:
1091         (WebCore::ApplyPropertyFontSize::determineRubyTextSizeMultiplier):
1092         (WebCore::ApplyPropertyFontSize::applyValue):
1093         Determine the Ruby text size multiplier when -webkit-ruby-text is specified
1094         as the font size. For ruby-position of before/after, we use 50% of the parent
1095         font size. For inter-character ruby, we default to 25% instead. If inter-character
1096         Ruby is nested, we assume it's to display tone marks, and we use 100% to ensure
1097         the tone mark is the same size and does not get smaller.
1098
1099         * css/StyleResolver.cpp:
1100         (WebCore::StyleResolver::adjustStyleForInterCharacterRuby):
1101         (WebCore::StyleResolver::applyMatchedProperties):
1102         * css/StyleResolver.h:
1103         ruby-position is now the highest priority CSS property, and it is resolved
1104         before all other properties to ensure that its value can be checked when
1105         determining a smart default font size. adjustStyleForInterCharacterRuby is a new
1106         function called to auto-adjust inter-character ruby text to be vertical writing mode when
1107         encountered inside horizontal documents.
1108
1109         * css/html.css:
1110         (ruby > rt):
1111         Change the font-size from 50% to -webkit-ruby-text to allow us to customize it as
1112         needed depending on what kind of Ruby we want to show.
1113
1114         * rendering/RenderRubyRun.cpp:
1115         (WebCore::RenderRubyRun::layout):
1116         * rendering/RenderRubyRun.h:
1117         Add layout code to properly position vertical ruby text relative to a horizontal base.
1118
1119         * rendering/style/RenderStyleConstants.h:
1120         Add the new inter-character constant for ruby-position.
1121
1122         * rendering/style/StyleRareInheritedData.h:
1123         Increase the number of storage bits for RubyPosition from 1 to 2 now that we support 3 values.
1124
1125 2014-08-22  Jon Lee  <jonlee@apple.com>
1126
1127         Fix iOS build due to r172832 and move RUBBER_BANDING out of FeatureDefines.h
1128         https://bugs.webkit.org/show_bug.cgi?id=136157
1129
1130         Reviewed by Simon Fraser.
1131
1132         * Configurations/FeatureDefines.xcconfig: Add ENABLE(RUBBER_BANDING).
1133
1134 2014-08-22  Zan Dobersek  <zdobersek@igalia.com>
1135
1136         [GTK] Add the Wayland protocol extension
1137         https://bugs.webkit.org/show_bug.cgi?id=136102
1138
1139         Reviewed by Martin Robinson.
1140
1141         Add the Wayland protocol extension that allows mapping GtkWidget
1142         objects (via an ID that's unique to that GtkWidget) to the
1143         corresponding Wayland surface objects. This way the nested
1144         compositor has the proper information about what GtkWidget has
1145         to be updated when surfaces are committed by the LayerTreeHost.
1146
1147         * PlatformGTK.cmake:
1148         * platform/graphics/wayland: Added.
1149         * platform/graphics/wayland/WebKitGtkWaylandClientProtocol.xml: Added.
1150
1151 2014-08-21  Antti Koivisto  <antti@apple.com>
1152
1153         Animated GIFs scrolled out of view still cause titlebar blur to update, on tumblr.com page
1154         https://bugs.webkit.org/show_bug.cgi?id=136139
1155
1156         Reviewed by Simon Fraser.
1157
1158         The mechanism for pausing GIF images outside the viewport did not work for subframes.
1159
1160         Test: fast/repaint/no-animation-outside-viewport-subframe.html
1161
1162         * WebCore.exp.in:
1163         * page/FrameView.cpp:
1164         (WebCore::FrameView::scrollPositionChanged):
1165         (WebCore::FrameView::resumeVisibleImageAnimationsIncludingSubframes):
1166
1167             Add a function for resuming animations as needed in all subframes.
1168             This is used after scrolling instead of calling the RenderView function directly.
1169
1170         * page/FrameView.h:
1171         * page/Page.cpp:
1172         (WebCore::Page::resumeAnimatingImages):
1173         * rendering/RenderElement.cpp:
1174         (WebCore::RenderElement::newImageAnimationFrameAvailable):
1175
1176             Determine the overall visible rect so that it is correct in subframes too.
1177
1178         * rendering/RenderLayer.cpp:
1179         (WebCore::RenderLayer::scrollTo):
1180         * rendering/RenderView.cpp:
1181         (WebCore::RenderView::resumePausedImageAnimationsIfNeeded):
1182
1183 2014-08-21  Alex Christensen  <achristensen@webkit.org>
1184
1185         More WEBCORE_EXPORT macros!
1186         https://bugs.webkit.org/show_bug.cgi?id=136146
1187
1188         Reviewed by Benjamin Poulain.
1189
1190         * Modules/geolocation/GeolocationClient.h:
1191         * Modules/mediastream/UserMediaClient.h:
1192         * Modules/mediastream/UserMediaRequest.h:
1193         * Modules/notifications/NotificationClient.h:
1194         * Modules/speech/SpeechSynthesis.h:
1195         * bindings/generic/RuntimeEnabledFeatures.h:
1196         * bindings/js/DOMWrapperWorld.h:
1197         * bindings/js/GCController.h:
1198         * bindings/js/IDBBindingUtilities.h:
1199         * bindings/js/JSDOMBinding.h:
1200         * bindings/js/JSNodeCustom.h:
1201         * bindings/js/JSNodeListCustom.h:
1202         * bindings/js/JSPluginElementFunctions.h:
1203         * bindings/js/ScriptController.h:
1204         * bindings/js/SerializedScriptValue.h:
1205         * crypto/SerializedCryptoKeyWrap.h:
1206         * css/LengthFunctions.h:
1207         * css/StyleProperties.h:
1208         * css/StyleSheetContents.h:
1209         * dom/DeviceOrientationClient.h:
1210         * dom/Range.h:
1211         * dom/ScriptExecutionContext.h:
1212         * dom/StyledElement.h:
1213         * dom/TreeScope.h:
1214         * dom/UIEventWithKeyState.h:
1215         * dom/UserGestureIndicator.h:
1216         * dom/UserTypingGestureIndicator.h:
1217         * dom/ViewportArguments.h:
1218         * editing/SmartReplace.h:
1219         * editing/TextIterator.h:
1220         * editing/VisiblePosition.h:
1221         * editing/VisibleSelection.h:
1222         * editing/VisibleUnits.h:
1223         * editing/cocoa/HTMLConverter.h:
1224         * editing/htmlediting.h:
1225         * editing/mac/TextAlternativeWithRange.h:
1226         * editing/mac/TextUndoInsertionMarkupMac.h:
1227         * editing/markup.h:
1228         * history/HistoryItem.cpp:
1229         * history/PageCache.h:
1230         * html/TimeRanges.h:
1231         * html/parser/HTMLParserIdioms.h:
1232         * inspector/InstrumentingAgents.h:
1233         * loader/FrameLoader.h:
1234         * loader/ResourceBuffer.h:
1235         * loader/ResourceLoadScheduler.h:
1236         * loader/ResourceLoader.h:
1237         (WebCore::ResourceLoader::originalRequest):
1238         * loader/SubframeLoader.h:
1239         * loader/SubresourceLoader.h:
1240         * loader/TextResourceDecoder.h:
1241         * loader/appcache/ApplicationCacheStorage.h:
1242         * loader/cache/MemoryCache.h:
1243         * loader/icon/IconDatabaseBase.h:
1244         * loader/ios/DiskImageCacheIOS.h:
1245         * page/Chrome.h:
1246         * page/SecurityOrigin.h:
1247         * page/SecurityPolicy.h:
1248         * page/Settings.h:
1249         * page/UserContentController.h:
1250         * page/UserContentURLPattern.h:
1251         * page/UserMessageHandlerDescriptor.h:
1252         * page/ViewportConfiguration.h:
1253         * page/VisitedLinkStore.h:
1254         * page/WheelEventDeltaTracker.h:
1255         * page/cocoa/UserAgent.h:
1256         * page/scrolling/ScrollingConstraints.h:
1257         * page/scrolling/ScrollingCoordinator.h:
1258         * page/scrolling/ScrollingStateFixedNode.h:
1259         * page/scrolling/ScrollingStateFrameScrollingNode.h:
1260         * page/scrolling/ScrollingStateNode.h:
1261         * page/scrolling/ScrollingStateOverflowScrollingNode.h:
1262         * page/scrolling/ScrollingStateScrollingNode.h:
1263         * page/scrolling/ScrollingStateStickyNode.h:
1264         * page/scrolling/ScrollingStateTree.h:
1265         * page/scrolling/ScrollingThread.h:
1266         * page/scrolling/ScrollingTree.h:
1267         * page/scrolling/ScrollingTreeOverflowScrollingNode.h:
1268         * page/scrolling/ScrollingTreeScrollingNode.h:
1269         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
1270         * page/scrolling/mac/ScrollingTreeFixedNode.h:
1271         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
1272         * page/scrolling/mac/ScrollingTreeStickyNode.h:
1273         * platform/Cursor.h:
1274         * platform/DragImage.h:
1275         * platform/FileSystem.h:
1276         * platform/Language.h:
1277         * platform/LinkHash.h:
1278         * platform/LocalizedStrings.h:
1279         * platform/Logging.h:
1280         * platform/MemoryPressureHandler.h:
1281         * platform/NotImplemented.h:
1282         * platform/PlatformStrategies.h:
1283         * platform/PublicSuffix.h:
1284         * platform/RuntimeApplicationChecks.h:
1285         * platform/RuntimeApplicationChecksIOS.h:
1286         * platform/SchemeRegistry.h:
1287         * platform/ScrollView.h:
1288         * platform/ScrollableArea.h:
1289         * platform/Scrollbar.h:
1290         * platform/ScrollbarTheme.h:
1291         * platform/SharedBuffer.h:
1292         * platform/ThreadCheck.h:
1293         * platform/ThreadGlobalData.h:
1294         * platform/Timer.h:
1295         * platform/URL.h:
1296         * platform/UUID.h:
1297         * platform/UserActivity.h:
1298         * platform/Widget.h:
1299         * platform/cf/CFURLExtras.h:
1300         * platform/cf/RunLoopObserver.h:
1301         * platform/cocoa/SystemVersion.h:
1302         * platform/graphics/Color.h:
1303         * platform/graphics/FloatRect.h:
1304         * platform/graphics/FontCache.h:
1305         * platform/graphics/GeometryUtilities.h:
1306         * platform/graphics/GraphicsContext.h:
1307         * platform/graphics/IntRect.h:
1308         * platform/graphics/LayoutRect.h:
1309         * platform/graphics/StringTruncator.h:
1310         * platform/graphics/TextRun.h:
1311         * platform/graphics/ca/TileController.h:
1312         * platform/graphics/ca/mac/PlatformCAAnimationMac.h:
1313         * platform/graphics/cg/GraphicsContextCG.h:
1314         * platform/graphics/mac/ColorMac.h:
1315         * platform/graphics/transforms/TransformationMatrix.h:
1316         * platform/ios/FileSystemIOS.h:
1317         * platform/ios/PlatformEventFactoryIOS.h:
1318         * platform/ios/SelectionRect.h:
1319         * platform/ios/SystemMemory.h:
1320         * platform/ios/TileControllerMemoryHandlerIOS.h:
1321         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
1322         * platform/mac/PlatformEventFactoryMac.h:
1323         * platform/mac/ScrollbarThemeMac.h:
1324         * platform/mac/WebCoreNSURLExtras.h:
1325         * platform/mac/WebNSAttributedStringExtras.h:
1326         * platform/network/BlobRegistry.h:
1327         * platform/network/CookieStorage.h:
1328         * platform/network/DNS.h:
1329         * platform/network/NetworkStateNotifier.h:
1330         * platform/network/PlatformCookieJar.h:
1331         * platform/network/ProxyServer.h:
1332         * platform/network/ResourceErrorBase.h:
1333         * platform/network/ResourceHandle.h:
1334         * platform/network/ResourceHandleClient.h:
1335         * platform/network/ResourceRequestBase.h:
1336         * platform/network/ResourceResponseBase.h:
1337         * platform/network/SynchronousLoaderClient.h:
1338         * platform/network/cf/ResourceError.h:
1339         * platform/network/cf/ResourceRequest.h:
1340         * platform/network/cf/ResourceResponse.h:
1341         * platform/network/ios/QuickLook.h:
1342         * platform/network/mac/AuthenticationMac.h:
1343         * platform/sql/SQLiteDatabase.cpp:
1344         * platform/text/LocaleToScriptMapping.h:
1345         * platform/text/TextBreakIterator.h:
1346         * platform/text/TextEncoding.h:
1347         (WebCore::TextEncoding::decode):
1348         * platform/text/TextEncodingRegistry.h:
1349         * platform/text/TextStream.h:
1350         * rendering/RenderBlock.h:
1351         * rendering/RenderBox.h:
1352         * rendering/RenderEmbeddedObject.h:
1353         * rendering/RenderLayer.h:
1354         * rendering/RenderLayerBacking.h:
1355         * rendering/RenderLayerCompositor.h:
1356         * rendering/RenderListItem.h:
1357         * rendering/RenderObject.h:
1358         * rendering/RenderText.h:
1359         * rendering/RenderTextControl.h:
1360         * rendering/RenderThemeIOS.h:
1361         * rendering/RenderTreeAsText.h:
1362         * rendering/RenderView.h:
1363         * rendering/RenderWidget.h:
1364         * rendering/ScrollBehavior.cpp:
1365         * rendering/break_lines.cpp:
1366         * rendering/style/RenderStyle.h:
1367         * replay/UserInputBridge.h:
1368         * storage/StorageEventDispatcher.h:
1369         * storage/StorageMap.h:
1370         * storage/StorageStrategy.h:
1371         * storage/StorageTracker.h:
1372         * testing/Internals.h:
1373         * workers/WorkerThread.h:
1374         Added more WEBCORE_EXPORT macros where needed.
1375
1376 2014-08-21  Tim Horton  <timothy_horton@apple.com>
1377
1378         Revert r172831, it broke the Windows build.
1379
1380 2014-08-21  Ryuan Choi  <ryuan.choi@samsung.com>
1381
1382         Unreviewed build fix when RUBBER_BANDING is not enabled.
1383
1384         * rendering/RenderLayer.cpp:
1385         (WebCore::RenderLayer::overhangAmount):
1386         (WebCore::RenderLayer::setHasHorizontalScrollbar):
1387         (WebCore::RenderLayer::setHasVerticalScrollbar):
1388
1389 2014-08-21  Brent Fulgham  <bfulgham@apple.com>
1390
1391         [Win] WebCore.proj is not copying WebKit resource files.
1392         https://bugs.webkit.org/show_bug.cgi?id=136142
1393         <rdar://problem/17733682>
1394
1395         Reviewed by Tim Horton.
1396
1397         * WebCore.vcxproj/WebCore.proj: Copy missing resource files during
1398         post-build step.
1399
1400 2014-08-21  Simon Fraser  <simon.fraser@apple.com>
1401
1402         Try to fix the 32-bit build by using wildcards in the exported non-virtual thunks
1403         for GraphicsLayerCA::platformCALayerAnimationStarted and GraphicsLayerCA::platformCALayerAnimationEnded.
1404
1405         * WebCore.exp.in:
1406
1407 2014-08-21  Simon Fraser  <simon.fraser@apple.com>
1408
1409         Add animationDidEnd callbacks on GraphicsLayer
1410         https://bugs.webkit.org/show_bug.cgi?id=136084
1411
1412         Reviewed by Tim Horton.
1413
1414         Hook up GraphicsLayerClient::notifyAnimationEnded() so that code using GraphicsLayers directly
1415         can add animations, and know when they finish.
1416
1417         * WebCore.exp.in:
1418         * platform/graphics/GraphicsLayerClient.h:
1419         (WebCore::GraphicsLayerClient::notifyAnimationStarted):
1420         (WebCore::GraphicsLayerClient::notifyAnimationEnded):
1421         * platform/graphics/ca/GraphicsLayerCA.cpp:
1422         (WebCore::GraphicsLayerCA::platformCALayerAnimationStarted):
1423         (WebCore::GraphicsLayerCA::platformCALayerAnimationEnded):
1424         * platform/graphics/ca/GraphicsLayerCA.h:
1425         * platform/graphics/ca/PlatformCALayer.h:
1426         * platform/graphics/ca/PlatformCALayerClient.h:
1427         (WebCore::PlatformCALayerClient::platformCALayerAnimationStarted):
1428         (WebCore::PlatformCALayerClient::platformCALayerAnimationEnded):
1429         * platform/graphics/ca/mac/PlatformCALayerMac.h:
1430         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1431         (-[WebAnimationDelegate animationDidStart:]):
1432         (-[WebAnimationDelegate animationDidStop:finished:]):
1433         (PlatformCALayerMac::animationStarted):
1434         (PlatformCALayerMac::animationEnded):
1435         * rendering/RenderLayerBacking.cpp:
1436         (WebCore::RenderLayerBacking::notifyAnimationStarted):
1437         * rendering/RenderLayerBacking.h:
1438
1439 2014-08-21  Zalan Bujtas  <zalan@apple.com>
1440
1441         Enable SATURATED_LAYOUT_ARITHMETIC.
1442         https://bugs.webkit.org/show_bug.cgi?id=136106
1443
1444         Reviewed by Simon Fraser.
1445
1446         SATURATED_LAYOUT_ARITHMETIC protects LayoutUnit against arithmetic overflow.
1447         (No measurable performance regression on Mac.)
1448
1449         Test: fast/dynamic/saturated-layout-arithmetic.html
1450
1451         * Configurations/FeatureDefines.xcconfig:
1452
1453 2014-08-21  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
1454
1455         New ruby parsing rule breaks some real web sites.
1456         https://bugs.webkit.org/show_bug.cgi?id=136062
1457
1458         Reviewed by Ryosuke Niwa.
1459
1460         An RP element should not auto close an RTC element.
1461
1462         The HTML5.1 spec was changed:
1463         http://www.w3.org/html/wg/drafts/html/master/syntax.html#parsing-main-inbody
1464         This was done at the following commit:
1465         https://github.com/w3c/html/commit/c61397b989b28235ee2228f280aa8d475f3b9ebf
1466
1467         This patch changed the RP element's behavior to follow the spec change.
1468
1469         Test: fast/ruby/rp-inside-rtc.html
1470
1471         * html/parser/HTMLTreeBuilder.cpp:
1472         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
1473
1474 2014-08-21  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
1475
1476         REGRESSION: CSS not() selector does not work when it appears after or within @supports
1477         https://bugs.webkit.org/show_bug.cgi?id=136063
1478
1479         Reviewed by Darin Adler.
1480
1481         CSSParser changes its m_parsingMode to SupportsMode when it finds
1482         "@supports" token. However, the mode will be never changed to
1483         NormalMode. This changes parsing algorithm for "not" token forever,
1484         and it cannot parse not pseudo class selector.
1485
1486         When we finish parsing @supports rule, we should change to normal
1487         mode.
1488
1489         @media does the same thing. This patch changed CharacterEndMediaQuery
1490         to CharacterEndConditionQuery, and we change parsing mode from
1491         SupportsMode to NormalMode when the parser finished to parse
1492         @supports rule.
1493
1494         Like "@-webkit-mediaquery", we cannot use '{' to
1495         "@-webkit-supports-condition". Changed "@-webkit-supports-condition"
1496         parsing rule and parseSupportsCondition() not to use '{'.
1497
1498         Tests: css3/supports-not-selector-cssom.html
1499                css3/supports-not-selector.html
1500
1501         * css/CSSGrammar.y.in:
1502         * css/CSSParser.cpp:
1503         (WebCore::CSSParser::parseSupportsCondition):
1504         (WebCore::isCSSLetter):
1505         (WebCore::CSSParser::realLex):
1506
1507 2014-08-21  Beth Dakin  <bdakin@apple.com>
1508
1509         overflow:scroll elements should support rubber-banding
1510         https://bugs.webkit.org/show_bug.cgi?id=91655
1511
1512         Reviewed by Sam Weinig and Darin Adler.
1513
1514         This patch enables rubber-banding in overflow regions and it keeps latching 
1515         working as currently implemented.
1516
1517         We cannot return early here if there is no scroll delta. There won't be a scroll
1518         delta in most cases during event.phase() == PlatformWheelEventPhaseEnded, but that 
1519         phase is required to be processed in order for rubber-banding to work properly. 
1520         * dom/Element.cpp:
1521         (WebCore::Element::dispatchWheelEvent):
1522         * page/EventHandler.cpp:
1523         (WebCore::handleWheelEventInAppropriateEnclosingBoxForSingleAxis):
1524
1525         Add a setting for this, which will default to true. This allows us to disable the 
1526         feature in WebKit1 for now. There is a bug about making it work.
1527         * page/Settings.in:
1528
1529         allowsHorizontalStretching() and allowsVerticalStretching() now take the 
1530         PlatformWheelEvent as a parameter, so that ScrollElasticityAutomatic can use the 
1531         event to decide whether or not stretching should be allowed in this case. 
1532         ScrollElasticityAutomatic will not allow stretching if it is a brand new gesture 
1533         that would result in a rubber-band. We don't want to rubber-band in that case
1534         because we want the event to propagate up to a parent view. Also added some helper 
1535         functions just to make that code easier to read.
1536         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
1537         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1538         (WebCore::newGestureIsStarting):
1539         (WebCore::ScrollingTreeFrameScrollingNodeMac::isAlreadyPinnedInDirectionOfGesture):
1540         (WebCore::ScrollingTreeFrameScrollingNodeMac::allowsHorizontalStretching):
1541         (WebCore::ScrollingTreeFrameScrollingNodeMac::allowsVerticalStretching):
1542         * platform/mac/ScrollAnimatorMac.h:
1543         * platform/mac/ScrollAnimatorMac.mm:
1544         (WebCore::ScrollAnimatorMac::handleWheelEvent):
1545         (WebCore::newGestureIsStarting):
1546         (WebCore::ScrollAnimatorMac::isAlreadyPinnedInDirectionOfGesture):
1547         (WebCore::ScrollAnimatorMac::allowsVerticalStretching):
1548         (WebCore::ScrollAnimatorMac::allowsHorizontalStretching):
1549         * platform/mac/ScrollElasticityController.h:
1550         * platform/mac/ScrollElasticityController.mm:
1551         (WebCore::ScrollElasticityController::handleWheelEvent):
1552
1553         To opt into rubber-banding, all we have to do is implement overhangAmount and set 
1554         scroll elasticity. We'll choose ScrollElasticityAutomatic which means that we'll
1555         only rubber-band in directions that can scroll and that we won't rubber-band for
1556         new gestures when we're already pinned to the edge.
1557         * rendering/RenderLayer.cpp:
1558         (WebCore::RenderLayer::overhangAmount):
1559         (WebCore::RenderLayer::setHasHorizontalScrollbar):
1560         (WebCore::RenderLayer::setHasVerticalScrollbar):
1561
1562 2014-08-21  Alex Christensen  <achristensen@webkit.org>
1563
1564         More WEBCORE_EXPORT macros.
1565         https://bugs.webkit.org/show_bug.cgi?id=136129
1566
1567         Reviewed by Tim Horton.
1568
1569         * Modules/geolocation/Geolocation.h:
1570         * Modules/geolocation/GeolocationController.h:
1571         * Modules/indexeddb/IDBDatabaseBackend.h:
1572         * Modules/indexeddb/IDBDatabaseMetadata.h:
1573         * Modules/indexeddb/IDBKey.h:
1574         * Modules/indexeddb/IDBKeyData.h:
1575         * Modules/indexeddb/IDBKeyPath.h:
1576         * Modules/indexeddb/IDBKeyRange.h:
1577         * Modules/indexeddb/IDBKeyRangeData.h:
1578         * Modules/notifications/Notification.h:
1579         * Modules/notifications/NotificationController.h:
1580         * bindings/js/GCController.h:
1581         * bridge/IdentifierRep.h:
1582         * css/StyleProperties.h:
1583         * dom/ExceptionCodePlaceholder.h:
1584         * dom/KeyboardEvent.h:
1585         * dom/MouseEvent.h:
1586         * dom/MouseRelatedEvent.h:
1587         * dom/Node.h:
1588         (WebCore::Node::hasEditableStyle):
1589         * dom/NodeTraversal.h:
1590         * dom/Position.h:
1591         (WebCore::Position::Position):
1592         * dom/Range.h:
1593         (WebCore::Range::startContainer):
1594         (WebCore::Range::startOffset):
1595         (WebCore::Range::endContainer):
1596         (WebCore::Range::endOffset):
1597         * editing/FrameSelection.h:
1598         (WebCore::DragCaretController::clear):
1599         * history/HistoryItem.h:
1600         * history/PageCache.h:
1601         * html/FormController.h:
1602         * html/HTMLElement.h:
1603         * html/HTMLFormElement.h:
1604         * html/HTMLFrameOwnerElement.h:
1605         * html/HTMLInputElement.h:
1606         * html/HTMLMediaElement.h:
1607         * html/HTMLOptGroupElement.h:
1608         * html/HTMLOptionElement.h:
1609         * html/HTMLPlugInElement.h:
1610         * html/HTMLPlugInImageElement.h:
1611         * html/HTMLSelectElement.h:
1612         * html/HTMLTableCellElement.h:
1613         * html/HTMLTextAreaElement.h:
1614         * html/HTMLTextFormControlElement.h:
1615         * html/HTMLVideoElement.h:
1616         * html/ImageDocument.h:
1617         * html/PluginDocument.h:
1618         * html/forms/FileIconLoader.h:
1619         * html/shadow/InsertionPoint.h:
1620         * inspector/InspectorClient.h:
1621         * inspector/InspectorController.h:
1622         * inspector/InspectorFrontendClientLocal.h:
1623         * inspector/InspectorInstrumentation.h:
1624         * loader/FrameLoadRequest.h:
1625         * loader/FrameLoader.h:
1626         * loader/FrameLoaderStateMachine.h:
1627         * loader/HistoryController.h:
1628         * loader/LoaderStrategy.h:
1629         * loader/NavigationAction.h:
1630         * loader/NetscapePlugInStreamLoader.h:
1631         * loader/ProgressTracker.h:
1632         * loader/archive/cf/LegacyWebArchive.h:
1633         * loader/cache/MemoryCache.h:
1634         * loader/icon/IconController.h:
1635         * loader/icon/IconDatabase.h:
1636         * loader/icon/IconDatabaseBase.h:
1637         * page/FocusController.h:
1638         * page/Frame.h:
1639         * page/FrameDestructionObserver.h:
1640         Replaced WEBCORE_TESTING with WEBCORE_EXPORT.
1641         * page/FrameTree.h:
1642         * page/FrameView.h:
1643         * page/Page.h:
1644         * page/PageConsole.h:
1645         * page/PageGroup.h:
1646         * page/PageThrottler.h:
1647         * page/PrintContext.h:
1648         * page/scrolling/ScrollingConstraints.h:
1649         * page/scrolling/ScrollingStateNode.h:
1650         * platform/FileChooser.h:
1651         * platform/GamepadProvider.h:
1652         * platform/Length.h:
1653         * platform/MIMETypeRegistry.h:
1654         * platform/MemoryPressureHandler.h:
1655         * platform/Pasteboard.h:
1656         * platform/PlatformExportMacros.h:
1657         Removed WEBCORE_TESTING, which I'm replacing with WEBCORE_EXPORT.
1658         * platform/PlatformKeyboardEvent.h:
1659         * platform/PlatformPasteboard.h:
1660         * platform/PlatformSpeechSynthesisVoice.h:
1661         * platform/PlatformSpeechSynthesizer.h:
1662         * platform/audio/MediaSessionManager.h:
1663         * platform/graphics/FloatPoint.h:
1664         * platform/graphics/FloatQuad.h:
1665         * platform/graphics/FloatRect.h:
1666         * platform/graphics/FloatSize.h:
1667         * platform/graphics/Font.h:
1668         * platform/graphics/FontCache.h:
1669         * platform/graphics/FontGlyphs.h:
1670         * platform/graphics/FontPlatformData.h:
1671         * platform/graphics/GlyphPageTreeNode.h:
1672         * platform/graphics/Gradient.h:
1673         * platform/graphics/GraphicsContext.h:
1674         * platform/graphics/GraphicsLayer.h:
1675         * platform/graphics/Icon.h:
1676         * platform/graphics/Image.h:
1677         * platform/graphics/ImageBuffer.h:
1678         * platform/graphics/IntPoint.h:
1679         * platform/graphics/IntRect.h:
1680         * platform/graphics/IntSize.h:
1681         * platform/graphics/LayoutRect.h:
1682         * platform/graphics/MediaPlayer.h:
1683         * platform/graphics/Path.h:
1684         * platform/graphics/Region.h:
1685         * platform/graphics/ca/GraphicsLayerCA.h:
1686         * platform/graphics/ca/LayerFlushScheduler.h:
1687         * platform/graphics/ca/LayerPool.h:
1688         * platform/graphics/ca/PlatformCAFilters.h:
1689         * platform/graphics/ca/PlatformCALayer.h:
1690         * platform/graphics/ca/mac/PlatformCAAnimationMac.h:
1691         * platform/graphics/ca/mac/PlatformCALayerMac.h:
1692         * platform/graphics/cg/IOSurfacePool.h:
1693         * platform/graphics/cocoa/IOSurface.h:
1694         * platform/graphics/filters/FilterOperations.h:
1695         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1696         * platform/ios/LegacyTileCache.h:
1697         * platform/ios/PlatformEventFactoryIOS.h:
1698         * platform/ios/wak/FloatingPointEnvironment.h:
1699         * platform/mac/HIDGamepadProvider.h:
1700         * platform/mock/MockMediaStreamCenter.h:
1701         * platform/network/FormData.h:
1702         * platform/network/HTTPHeaderMap.h:
1703         * platform/network/NetworkStorageSession.h:
1704         * platform/network/ProtectionSpaceBase.h:
1705         * platform/network/cocoa/ProtectionSpaceCocoa.h:
1706         (WebCore::ProtectionSpace::encodingRequiresPlatformData):
1707         * platform/network/ios/QuickLook.h:
1708         * platform/text/TextBreakIterator.h:
1709         * plugins/PluginData.h:
1710         * plugins/PluginMainThreadScheduler.h:
1711         * rendering/HitTestLocation.h:
1712         * rendering/HitTestResult.h:
1713         * rendering/InlineBox.h:
1714         Added more WEBCORE_EXPORT macros, which don't do anything yet.
1715
1716 2014-08-21  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
1717
1718         [GTK] WebkitWebProcess crashing navigating away from ogg video element
1719         https://bugs.webkit.org/show_bug.cgi?id=135348
1720
1721         Reviewed by Philippe Normand.
1722
1723         Let GraphicsLayerTextureMapper know it needs to detach the platform
1724         layer when a MediaPlayerPrivateGStreamerBase is destroyed.
1725
1726         No new test since media/restore-from-page-cache.html covers it.
1727
1728         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1729         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
1730
1731 2014-08-20  Benjamin Poulain  <benjamin@webkit.org>
1732
1733         CSS: Implement the :placeholder-shown pseudo-class from Selectors Level 4
1734         https://bugs.webkit.org/show_bug.cgi?id=118162
1735
1736         Reviewed by Antti Koivisto.
1737
1738         Previously, HTMLTextFormControlElement was using some mix of its own state
1739         and style to change the visibility of the placeholder. That approach was a little
1740         bit too fragile, and we do not want the style to depends on the renderer() since
1741         that creates circular dependencies.
1742
1743         The biggest change here is refactoring HTMLTextFormControlElement to have
1744         1) An explicit "visible placeholder" state.
1745         2) Separate the textUpdate() from the visibilityUpdate().
1746         3) Remove the dependencies between the Element's style and the placeholder's style.
1747            This is done by simply using display:none; on the placeholder so that its parent's visibility
1748            is irrelevant.
1749
1750         When matching the selector, the style is set as unique since style sharing does not deal with
1751         the changes of HTMLTextFormControlElement.
1752
1753         Tests: fast/css/placeholder-shown-basics.html
1754                fast/selectors/placeholder-shown-long-adjacent-backtracking.html
1755                fast/selectors/placeholder-shown-sibling-style-update.html
1756                fast/selectors/placeholder-shown-style-update.html
1757                fast/selectors/placeholder-shown-with-input-basics.html
1758                fast/selectors/placeholder-shown-with-textarea-basics.html
1759
1760         * css/CSSSelector.cpp:
1761         (WebCore::CSSSelector::selectorText):
1762         Add the CSS Selector description for CSSOM.
1763
1764         * css/CSSSelector.h:
1765         * css/SelectorChecker.cpp:
1766         (WebCore::SelectorChecker::checkOne):
1767         * css/SelectorCheckerTestFunctions.h:
1768         (WebCore::isPlaceholderShown):
1769         * css/SelectorPseudoClassAndCompatibilityElementMap.in:
1770         * css/html.css:
1771         (::-webkit-input-placeholder):
1772         Previously, the display was forced through the UA stylesheet. Since the display is now part
1773         of the placeholder visibility, it is explicitly handled by HTMLTextFormControlElement and
1774         its subclasses.
1775
1776         * cssjit/SelectorCompiler.cpp:
1777         (WebCore::SelectorCompiler::addPseudoClassType):
1778         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1779         (WebCore::SelectorCompiler::makeUniqueIfNecessaryAndTestIsPlaceholderShown):
1780         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPlaceholderShown):
1781         * html/HTMLInputElement.cpp:
1782         (WebCore::HTMLInputElement::parseAttribute):
1783         * html/HTMLTextAreaElement.cpp:
1784         (WebCore::HTMLTextAreaElement::updateValue):
1785         (WebCore::HTMLTextAreaElement::setValueCommon):
1786         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
1787         * html/HTMLTextFormControlElement.cpp:
1788         (WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement):
1789         (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
1790         (WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
1791         (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
1792         (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
1793         (WebCore::HTMLTextFormControlElement::selectionDirection):
1794         (WebCore::HTMLTextFormControlElement::restoreCachedSelection):
1795         (WebCore::HTMLTextFormControlElement::parseAttribute):
1796         (WebCore::HTMLTextFormControlElement::hidePlaceholder):
1797         (WebCore::HTMLTextFormControlElement::showPlaceholderIfNecessary):
1798         * html/HTMLTextFormControlElement.h:
1799         (WebCore::HTMLTextFormControlElement::isPlaceholderVisible):
1800         (WebCore::HTMLTextFormControlElement::cachedSelectionDirection):
1801         * html/TextFieldInputType.cpp:
1802         (WebCore::TextFieldInputType::updatePlaceholderText):
1803         (WebCore::TextFieldInputType::subtreeHasChanged):
1804         (WebCore::TextFieldInputType::updateInnerTextValue):
1805         * rendering/RenderTextControl.cpp:
1806         (WebCore::RenderTextControl::styleDidChange):
1807         * testing/Internals.cpp:
1808         (WebCore::Internals::visiblePlaceholder):
1809
1810 2014-08-20  Mark Rowe  <mrowe@apple.com>
1811
1812         Fix the release build after r172806.
1813
1814         * Modules/mediasource/SourceBuffer.cpp:
1815         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveRenderingError): Add a missing semicolon.
1816
1817 2014-08-20  Benjamin Poulain  <bpoulain@apple.com>
1818
1819         Remove HTMLInputElement's suggestedValue
1820         https://bugs.webkit.org/show_bug.cgi?id=136094
1821
1822         Reviewed by Darin Adler.
1823
1824         That code is Chrome specific. It is unused now.
1825
1826         * WebCore.exp.in:
1827         * html/HTMLInputElement.cpp:
1828         (WebCore::HTMLInputElement::setValue):
1829         (WebCore::HTMLInputElement::setValueFromRenderer):
1830         (WebCore::HTMLInputElement::suggestedValue): Deleted.
1831         (WebCore::HTMLInputElement::setSuggestedValue): Deleted.
1832         * html/HTMLInputElement.h:
1833         * html/HTMLTextFormControlElement.cpp:
1834         (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
1835         * html/HTMLTextFormControlElement.h:
1836         (WebCore::HTMLTextFormControlElement::isEmptySuggestedValue): Deleted.
1837         * html/InputType.cpp:
1838         (WebCore::InputType::canSetSuggestedValue): Deleted.
1839         * html/InputType.h:
1840         * html/TextFieldInputType.cpp:
1841         (WebCore::TextFieldInputType::updateInnerTextValue):
1842         (WebCore::TextFieldInputType::canSetSuggestedValue): Deleted.
1843         * html/TextFieldInputType.h:
1844         * testing/Internals.cpp:
1845         (WebCore::Internals::suggestedValue): Deleted.
1846         (WebCore::Internals::setSuggestedValue): Deleted.
1847         * testing/Internals.h:
1848         * testing/Internals.idl:
1849
1850 2014-08-20  Dean Jackson  <dino@apple.com>
1851
1852         WebAudio FFT analysis uses incorrect scaling
1853         https://bugs.webkit.org/show_bug.cgi?id=136120
1854
1855         Reviewed by Tim Horton.
1856
1857         This is a port of Blink r166687 (author rtoy)
1858         https://codereview.chromium.org/156993002
1859
1860         Currently, for a fixed sine-wave input, the peak FFT amplitude changes
1861         depending on the selected FFT size. This is incorrect; the FFT amplitude
1862         should not appreciably change when the FFT size changes.
1863
1864         Layout test added to verify the FFT result stays approximately constant,
1865         independent of the FFT size used.
1866
1867         When this test is run using an older version of WebKit, the peak varies
1868         from about -44 dB (FFT size 32) to -7 dB (FFT size 2048).  With this CL,
1869         the peak is about -7 dB.  (It's not 0 dB because of the Blackman window that is applied.)
1870
1871         Note: this change may break existing applications that depended on this strange scaling effect.
1872
1873         Test: webaudio/realtimeanalyser-fft-scaling.html
1874
1875         * Modules/webaudio/RealtimeAnalyser.cpp:
1876         (WebCore::RealtimeAnalyser::doFFTAnalysis):
1877
1878 2014-08-20  Alex Christensen  <achristensen@webkit.org>
1879
1880         Introducing WEBCORE_EXPORT macro.
1881         https://bugs.webkit.org/show_bug.cgi?id=136108
1882
1883         Reviewed by Antti Koivisto.
1884
1885         This should eventually replace WebCore.exp.in.
1886
1887         * platform/PlatformExportMacros.h:
1888         Define WEBCORE_EXPORT to nothing to not cause problems while I'm working on it.
1889         * Modules/encryptedmedia/CDM.h:
1890         * Modules/speech/DOMWindowSpeechSynthesis.h:
1891         * Modules/webdatabase/DatabaseManager.h:
1892         * Modules/webdatabase/DatabaseTracker.h:
1893         * accessibility/AXObjectCache.h:
1894         * bindings/js/DOMWrapperWorld.h:
1895         * bridge/jsc/BridgeJSC.h:
1896         * bridge/runtime_method.h:
1897         * bridge/runtime_object.h:
1898         * bridge/runtime_root.h:
1899         * css/CSSComputedStyleDeclaration.h:
1900         * css/CSSParserMode.h:
1901         * css/CSSValue.h:
1902         * css/DOMWindowCSS.h:
1903         * css/StyleSheetContents.h:
1904         * dom/CharacterData.h:
1905         * dom/ClientRect.h:
1906         * dom/ClientRectList.h:
1907         * dom/ContainerNode.h:
1908         * dom/ContextDestructionObserver.h:
1909         * dom/DOMImplementation.h:
1910         * dom/DataTransfer.h:
1911         * dom/DeviceMotionData.h:
1912         * dom/DeviceOrientationData.h:
1913         * dom/Document.h:
1914         (WebCore::Document::setAnnotatedRegionsDirty):
1915         * dom/DocumentMarker.h:
1916         * dom/DocumentMarkerController.h:
1917         * dom/DocumentStyleSheetCollection.h:
1918         * dom/Element.h:
1919         * dom/Event.h:
1920         (WebCore::Event::create):
1921         * dom/EventListenerMap.h:
1922         * editing/DictationAlternative.h:
1923         * editing/EditCommand.h:
1924         * editing/EditingStyle.h:
1925         * editing/Editor.h:
1926         * editing/mac/AlternativeTextUIController.h:
1927         * history/BackForwardController.h:
1928         * history/BackForwardList.h:
1929         * history/CachedFrame.h:
1930         * loader/CookieJar.h:
1931         * loader/CrossOriginPreflightResultCache.h:
1932         * loader/DocumentLoader.h:
1933         * loader/DocumentWriter.h:
1934         * loader/appcache/ApplicationCache.h:
1935         * loader/appcache/ApplicationCacheHost.h:
1936         * loader/appcache/ApplicationCacheStorage.h:
1937         * loader/archive/ArchiveResource.h:
1938         * loader/cache/CachedImage.h:
1939         * loader/cache/CachedResource.h:
1940         * loader/cache/CachedResourceHandle.h:
1941         * loader/cache/CachedResourceLoader.h:
1942         * page/Chrome.h:
1943         * page/ContextMenuController.h:
1944         * page/DOMWindow.h:
1945         * page/DOMWindowExtension.h:
1946         * page/DragController.h:
1947         * page/EventHandler.h:
1948         * page/animation/AnimationController.h:
1949         * page/scrolling/AsyncScrollingCoordinator.h:
1950         * platform/CalculationValue.h:
1951         * platform/ContentFilter.h:
1952         * platform/ContextMenu.h:
1953         * platform/ContextMenuItem.h:
1954         * platform/CrossThreadCopier.h:
1955         * platform/Cursor.h:
1956         * platform/DatabaseStrategy.h:
1957         * platform/DisplaySleepDisabler.h:
1958         * platform/DragData.h:
1959         * platform/LocalizedStrings.h:
1960         * platform/audio/AudioHardwareListener.h:
1961         * platform/audio/AudioSession.h:
1962         * platform/audio/ios/MediaSessionManagerIOS.mm:
1963         * platform/graphics/BitmapImage.h:
1964         * platform/graphics/Color.h:
1965         * platform/graphics/DisplayRefreshMonitor.h:
1966         * platform/graphics/transforms/AffineTransform.h:
1967         * platform/ios/WebCoreSystemInterfaceIOS.mm:
1968         * platform/ios/WebVideoFullscreenModelMediaElement.h:
1969         * platform/ios/wak/WAKView.mm:
1970         * platform/ios/wak/WKContentObservation.h:
1971         * platform/ios/wak/WKView.h:
1972         * platform/ios/wak/WebCoreThread.h:
1973         * platform/ios/wak/WebCoreThreadMessage.h:
1974         * platform/mac/BlockExceptions.h:
1975         * platform/mock/DeviceOrientationClientMock.h:
1976         * platform/network/AuthenticationChallengeBase.h:
1977         * platform/network/BlobData.h:
1978         * platform/network/BlobDataFileReference.h:
1979         * platform/network/BlobRegistry.h:
1980         * platform/network/BlobRegistryImpl.h:
1981         * platform/network/CredentialBase.h:
1982         * platform/network/CredentialStorage.h:
1983         * platform/network/PlatformCookieJar.h:
1984         * platform/network/cf/AuthenticationChallenge.h:
1985         * platform/network/cocoa/CredentialCocoa.h:
1986         * platform/network/mac/CertificateInfo.h:
1987         * platform/sql/SQLiteDatabase.h:
1988         (WebCore::SQLiteDatabase::disableThreadingChecks):
1989         * platform/sql/SQLiteDatabaseTracker.h:
1990         * platform/sql/SQLiteStatement.h:
1991         * platform/sql/SQLiteTransaction.h:
1992         * platform/text/BidiContext.h:
1993         Added WEBCORE_EXPORT macros.
1994
1995 2014-08-20  Pratik Solanki  <psolanki@apple.com>
1996
1997         Move DiskCacheMonitor to WebCore so that WebKit1 clients can use it as well
1998         https://bugs.webkit.org/show_bug.cgi?id=135896
1999
2000         Reviewed by Andreas Kling.
2001
2002         Refactor code and move it to WebCore.
2003
2004         * WebCore.exp.in:
2005         * WebCore.xcodeproj/project.pbxproj:
2006         * loader/ResourceLoader.h:
2007             Make willCacheResponse protected so that SubresourceLoader can override it.
2008         * loader/SubresourceLoader.h:
2009         * loader/cocoa/DiskCacheMonitorCocoa.h: Added.
2010             Mostly the same as the existing NetworkDiskCacheMonitor class in WebKit2. In the
2011             CFNetwork callback block, it calls a virtual function that is overridden by
2012             NetworkDiskCacheMonitor to send a message to WebContent process.
2013         (WebCore::DiskCacheMonitor::~DiskCacheMonitor):
2014         (WebCore::DiskCacheMonitor::resourceRequest):
2015         (WebCore::DiskCacheMonitor::sessionID):
2016         * loader/cocoa/DiskCacheMonitorCocoa.mm:
2017         (WebCore::DiskCacheMonitor::tryGetFileBackedSharedBufferFromCFURLCachedResponse):
2018             Copied from NetworkResourceLoader::tryGetFileBackedSharedBufferFromCFURLCachedResponse.
2019         (WebCore::DiskCacheMonitor::monitorFileBackingStoreCreation):
2020         (WebCore::DiskCacheMonitor::DiskCacheMonitor):
2021         (WebCore::DiskCacheMonitor::resourceBecameFileBacked):
2022             Replace the cached resource data with the contents of the file backed buffer. This is
2023             used in WebKit1 (and also for any resource loads that happen from the WebContent
2024             process).
2025         * loader/cocoa/SubresourceLoaderCocoa.mm: Added.
2026         (WebCore::SubresourceLoader::willCacheResponse):
2027             Override willCacheresponse from ResourceLoader to listen for disk cache notifications.
2028
2029 2014-08-20  Eric Carlson  <eric.carlson@apple.com>
2030
2031         Cleanup MediaSession
2032         https://bugs.webkit.org/show_bug.cgi?id=136116
2033
2034         Reviewed by Brent Fulgham.
2035
2036         MediaSessionManagerClient interface isn't used, remove it.
2037         No new tests, this doesn't change behavior.
2038
2039         * WebCore.exp.in:
2040         * platform/audio/MediaSessionManager.cpp:
2041         (WebCore::MediaSessionManager::addSession): 
2042         (WebCore::MediaSessionManager::removeSession):
2043         (WebCore::MediaSessionManager::sessionWillBeginPlayback):
2044         (WebCore::MediaSessionManager::addClient): Deleted.
2045         (WebCore::MediaSessionManager::removeClient): Deleted.
2046         * platform/audio/MediaSessionManager.h:
2047         (WebCore::MediaSessionManagerClient::~MediaSessionManagerClient): Deleted.
2048         (WebCore::MediaSessionManagerClient::MediaSessionManagerClient): Deleted.
2049
2050 2014-08-20  Eric Carlson  <eric.carlson@apple.com>
2051
2052         [MSE] add additional SourceBuffer and MediaSource logging
2053         https://bugs.webkit.org/show_bug.cgi?id=136114
2054
2055         Reviewed by Brent Fulgham.
2056
2057         No new tests, this adds debug-only logging.
2058
2059         * Modules/mediasource/MediaSource.cpp:
2060         (WebCore::MediaSource::setReadyState): Fix a typo.
2061         (WebCore::MediaSource::streamEndedWithError): Log the error.
2062
2063         * Modules/mediasource/SourceBuffer.cpp:
2064         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Log when parsing fails.
2065         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveRenderingError): Log error.
2066         (WebCore::SourceBuffer::sourceBufferPrivateDidEndStream): Ditto.
2067         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): Log.
2068         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Log error.
2069
2070 2014-08-20  Commit Queue  <commit-queue@webkit.org>
2071
2072         Unreviewed, rolling out r172798.
2073         https://bugs.webkit.org/show_bug.cgi?id=136113
2074
2075         Broke builds (Requested by msaboff on #webkit).
2076
2077         Reverted changeset:
2078
2079         "Introducing WEBCORE_EXPORT macro."
2080         https://bugs.webkit.org/show_bug.cgi?id=136108
2081         http://trac.webkit.org/changeset/172798
2082
2083 2014-08-20  Alex Christensen  <achristensen@webkit.org>
2084
2085         Introducing WEBCORE_EXPORT macro.
2086         https://bugs.webkit.org/show_bug.cgi?id=136108
2087
2088         Reviewed by Antti Koivisto.
2089
2090         This should eventually replace WebCore.exp.in.
2091
2092         * platform/PlatformExportMacros.h:
2093         Define WEBCORE_EXPORT to nothing to not cause problems while I'm working on it.
2094         * Modules/encryptedmedia/CDM.h:
2095         * Modules/speech/DOMWindowSpeechSynthesis.h:
2096         * Modules/webdatabase/DatabaseManager.h:
2097         * Modules/webdatabase/DatabaseTracker.h:
2098         * accessibility/AXObjectCache.h:
2099         * bindings/js/DOMWrapperWorld.h:
2100         * bridge/jsc/BridgeJSC.h:
2101         * bridge/runtime_method.cpp:
2102         * bridge/runtime_method.h:
2103         * bridge/runtime_object.cpp:
2104         * bridge/runtime_object.h:
2105         * bridge/runtime_root.h:
2106         * css/CSSComputedStyleDeclaration.h:
2107         * css/CSSParserMode.h:
2108         * css/CSSValue.h:
2109         * css/DOMWindowCSS.h:
2110         * css/StyleSheetContents.h:
2111         * dom/CharacterData.h:
2112         * dom/ClientRect.h:
2113         * dom/ClientRectList.h:
2114         * dom/ContainerNode.h:
2115         * dom/ContextDestructionObserver.h:
2116         * dom/DOMImplementation.h:
2117         * dom/DataTransfer.h:
2118         * dom/DeviceMotionData.h:
2119         * dom/DeviceOrientationData.h:
2120         * dom/Document.h:
2121         (WebCore::Document::setAnnotatedRegionsDirty):
2122         * dom/DocumentMarker.h:
2123         * dom/DocumentMarkerController.h:
2124         * dom/DocumentStyleSheetCollection.h:
2125         * dom/Element.h:
2126         * dom/Event.h:
2127         (WebCore::Event::create):
2128         * dom/EventListenerMap.h:
2129         * editing/DictationAlternative.h:
2130         * editing/EditCommand.h:
2131         * editing/EditingStyle.h:
2132         * editing/Editor.h:
2133         * editing/mac/AlternativeTextUIController.h:
2134         * history/BackForwardController.h:
2135         * history/BackForwardList.h:
2136         * history/CachedFrame.h:
2137         * loader/CookieJar.h:
2138         * loader/CrossOriginPreflightResultCache.h:
2139         * loader/DocumentLoader.h:
2140         * loader/DocumentWriter.h:
2141         * loader/appcache/ApplicationCache.h:
2142         * loader/appcache/ApplicationCacheHost.h:
2143         * loader/appcache/ApplicationCacheStorage.h:
2144         * loader/archive/ArchiveResource.h:
2145         * loader/cache/CachedImage.h:
2146         * loader/cache/CachedResource.h:
2147         * loader/cache/CachedResourceHandle.h:
2148         * loader/cache/CachedResourceLoader.h:
2149         * page/Chrome.h:
2150         * page/ContextMenuController.h:
2151         * page/DOMWindow.h:
2152         * page/DOMWindowExtension.h:
2153         * page/DragController.h:
2154         * page/EventHandler.h:
2155         * page/animation/AnimationController.h:
2156         * page/scrolling/AsyncScrollingCoordinator.h:
2157         * platform/CalculationValue.h:
2158         * platform/ContentFilter.h:
2159         * platform/ContextMenu.h:
2160         * platform/ContextMenuItem.h:
2161         * platform/CrossThreadCopier.h:
2162         * platform/Cursor.h:
2163         * platform/DatabaseStrategy.h:
2164         * platform/DisplaySleepDisabler.h:
2165         * platform/DragData.h:
2166         * platform/LocalizedStrings.h:
2167         * platform/audio/AudioHardwareListener.h:
2168         * platform/audio/AudioSession.h:
2169         * platform/audio/ios/MediaSessionManagerIOS.mm:
2170         * platform/graphics/BitmapImage.h:
2171         * platform/graphics/Color.h:
2172         * platform/graphics/DisplayRefreshMonitor.h:
2173         * platform/graphics/transforms/AffineTransform.h:
2174         * platform/ios/WebCoreSystemInterfaceIOS.mm:
2175         * platform/ios/WebVideoFullscreenModelMediaElement.h:
2176         * platform/ios/wak/WAKView.mm:
2177         * platform/ios/wak/WKContentObservation.h:
2178         * platform/ios/wak/WKView.h:
2179         * platform/ios/wak/WebCoreThread.h:
2180         * platform/ios/wak/WebCoreThreadMessage.h:
2181         * platform/mac/BlockExceptions.h:
2182         * platform/mock/DeviceOrientationClientMock.h:
2183         * platform/network/AuthenticationChallengeBase.h:
2184         * platform/network/BlobData.h:
2185         * platform/network/BlobDataFileReference.h:
2186         * platform/network/BlobRegistry.h:
2187         * platform/network/BlobRegistryImpl.h:
2188         * platform/network/CredentialBase.h:
2189         * platform/network/CredentialStorage.h:
2190         * platform/network/PlatformCookieJar.h:
2191         * platform/network/cf/AuthenticationChallenge.h:
2192         * platform/network/cocoa/CredentialCocoa.h:
2193         * platform/network/mac/CertificateInfo.h:
2194         * platform/sql/SQLiteDatabase.h:
2195         (WebCore::SQLiteDatabase::disableThreadingChecks):
2196         * platform/sql/SQLiteDatabaseTracker.h:
2197         * platform/sql/SQLiteStatement.h:
2198         * platform/sql/SQLiteTransaction.h:
2199         * platform/text/BidiContext.h:
2200         Added WEBCORE_EXPORT macros.
2201
2202 2014-08-20  Zalan Bujtas  <zalan@apple.com>
2203
2204         Dashed/dotted borders do not paint.
2205         https://bugs.webkit.org/show_bug.cgi?id=135898
2206
2207         Reviewed by Simon Fraser.
2208
2209         Remove the empty line checks for drawLines. There's no need to protect the graphics
2210         context from empty lines.
2211
2212         Tests: fast/borders/border-painting-dashed-at-all.html
2213                fast/borders/border-painting-dashed.html
2214                fast/borders/border-painting-dotted-at-all.html
2215                fast/borders/border-painting-dotted.html
2216                fast/borders/border-painting-double-at-all.html
2217                fast/borders/border-painting-double.html
2218                fast/borders/border-painting-groove-at-all.html
2219                fast/borders/border-painting-inset-at-all.html
2220                fast/borders/border-painting-inset.html
2221                fast/borders/border-painting-outset-at-all.html
2222                fast/borders/border-painting-outset.html
2223                fast/borders/border-painting-ridge-at-all.html
2224                fast/borders/border-painting-solid-at-all.html
2225                fast/borders/border-painting-solid.html
2226                fast/borders/hidpi-border-painting-groove.html
2227                fast/borders/hidpi-border-painting-ridge.html
2228
2229         * rendering/RenderObject.cpp:
2230         (WebCore::RenderObject::drawLineForBoxSide):
2231         (WebCore::drawBorderLineRect): Deleted.
2232         (WebCore::drawBorderLine): Deleted.
2233
2234 2014-08-19  Jinwoo Song  <jinwoo7.song@samsung.com>
2235
2236         Ignore usemap attributes without '#' in img element
2237         https://bugs.webkit.org/show_bug.cgi?id=133336
2238
2239         Reviewed by Ryosuke Niwa.
2240
2241         HTML5 specification says we should ignore usemap attributes without #.
2242         http://www.w3.org/TR/html5/infrastructure.html#valid-hash-name-reference
2243
2244         Test: fast/dom/replaced-image-map-valid-hash-name.html
2245
2246         * dom/TreeScope.cpp:
2247         (WebCore::TreeScope::getImageMap):
2248
2249 2014-08-19  Pratik Solanki  <psolanki@apple.com>
2250
2251         Remove PurgeableBuffer since it is not very useful any more
2252         https://bugs.webkit.org/show_bug.cgi?id=135939
2253
2254         Reviewed by Andreas Kling.
2255
2256         The usefulness of having purgeable memory for cached resources has diminished now that
2257         WebKit uses file backed resources when possible. Since this is read only memory, it is in
2258         essence "purgeable". Having the PurgeableBuffer code adds additional complexity that we
2259         don't need. e.g. on my Mac, I am not seeing any entry for "WebCore purgeable data" when I
2260         run vmmap against the web processes that I have running. It is used on iOS, however even
2261         there much of the purgeable memory we create gets replaced by file backed memory once we get
2262         the notification from CFNetwork.
2263
2264         No new tests because no functional changes.
2265
2266         * WebCore.xcodeproj/project.pbxproj:
2267         * inspector/InspectorPageAgent.cpp:
2268         (WebCore::prepareCachedResourceBuffer):
2269         * loader/DocumentLoader.cpp:
2270         (WebCore::DocumentLoader::subresource):
2271         * loader/ResourceBuffer.cpp:
2272         (WebCore::ResourceBuffer::hasPurgeableBuffer): Deleted.
2273         (WebCore::ResourceBuffer::setShouldUsePurgeableMemory): Deleted.
2274         (WebCore::ResourceBuffer::createPurgeableBuffer): Deleted.
2275         (WebCore::ResourceBuffer::releasePurgeableBuffer): Deleted.
2276         * loader/ResourceBuffer.h:
2277         * loader/SubresourceLoader.cpp:
2278         (WebCore::SubresourceLoader::didFinishLoading):
2279         * loader/cache/CachedCSSStyleSheet.cpp:
2280         (WebCore::CachedCSSStyleSheet::sheetText):
2281         (WebCore::CachedCSSStyleSheet::destroyDecodedData):
2282         * loader/cache/CachedCSSStyleSheet.h:
2283         * loader/cache/CachedImage.cpp:
2284         (WebCore::CachedImage::image):
2285         (WebCore::CachedImage::imageForRenderer):
2286         (WebCore::CachedImage::imageSizeForRenderer):
2287         (WebCore::CachedImage::destroyDecodedData):
2288         (WebCore::CachedImage::canUseDiskImageCache):
2289         * loader/cache/CachedImage.h:
2290         * loader/cache/CachedResource.cpp:
2291         (WebCore::CachedResource::addClientToSet):
2292         (WebCore::CachedResource::isSafeToMakePurgeable): Deleted.
2293         (WebCore::CachedResource::makePurgeable): Deleted.
2294         (WebCore::CachedResource::isPurgeable): Deleted.
2295         (WebCore::CachedResource::wasPurged): Deleted.
2296         * loader/cache/CachedResource.h:
2297         (WebCore::CachedResource::resourceBuffer):
2298         (WebCore::CachedResource::purgePriority): Deleted.
2299         * loader/cache/CachedScript.cpp:
2300         (WebCore::CachedScript::script):
2301         (WebCore::CachedScript::destroyDecodedData):
2302         * loader/cache/CachedScript.h:
2303         * loader/cache/MemoryCache.cpp:
2304         (WebCore::MemoryCache::resourceForRequestImpl):
2305         (WebCore::MemoryCache::pruneDeadResourcesToSize):
2306         (WebCore::MemoryCache::evict):
2307         (WebCore::MemoryCache::TypeStatistic::addResource):
2308         (WebCore::MemoryCache::dumpStats):
2309         (WebCore::MemoryCache::dumpLRULists):
2310         (WebCore::MemoryCache::makeResourcePurgeable): Deleted.
2311         * loader/cache/MemoryCache.h:
2312         (WebCore::MemoryCache::TypeStatistic::TypeStatistic):
2313         (WebCore::MemoryCache::shouldMakeResourcePurgeableOnEviction): Deleted.
2314         * platform/PurgePriority.h: Removed.
2315         * platform/PurgeableBuffer.h: Removed.
2316         * platform/SharedBuffer.cpp:
2317         (WebCore::SharedBuffer::SharedBuffer):
2318         (WebCore::SharedBuffer::size):
2319         (WebCore::SharedBuffer::data):
2320         (WebCore::SharedBuffer::append):
2321         (WebCore::SharedBuffer::clear):
2322         (WebCore::SharedBuffer::copy):
2323         (WebCore::SharedBuffer::getSomeData):
2324         (WebCore::SharedBuffer::adoptPurgeableBuffer): Deleted.
2325         (WebCore::SharedBuffer::createPurgeableBuffer): Deleted.
2326         (WebCore::SharedBuffer::releasePurgeableBuffer): Deleted.
2327         * platform/SharedBuffer.h:
2328         (WebCore::SharedBuffer::hasPurgeableBuffer): Deleted.
2329         (WebCore::SharedBuffer::shouldUsePurgeableMemory): Deleted.
2330         * platform/cf/SharedBufferCF.cpp:
2331         (WebCore::SharedBuffer::SharedBuffer):
2332         * platform/mac/PurgeableBufferMac.cpp: Removed.
2333         * platform/mac/SharedBufferMac.mm:
2334         (WebCore::SharedBuffer::createCFData):
2335         * platform/soup/SharedBufferSoup.cpp:
2336
2337 2014-08-19  Zalan Bujtas  <zalan@apple.com>
2338
2339         Remove ENABLE(SUBPIXEL_LAYOUT).
2340         https://bugs.webkit.org/show_bug.cgi?id=136077
2341
2342         Reviewed by Simon Fraser.
2343
2344         Remove compile time flag SUBPIXEL_LAYOUT. All ports have it enabled for a while now.
2345
2346         * Configurations/FeatureDefines.xcconfig:
2347         * css/CSSPrimitiveValue.cpp:
2348         (WebCore::CSSPrimitiveValue::computeLength):
2349         * dom/Element.cpp:
2350         (WebCore::adjustForLocalZoom):
2351         (WebCore::Element::offsetWidth):
2352         (WebCore::Element::offsetHeight):
2353         (WebCore::Element::clientLeft):
2354         (WebCore::Element::clientTop):
2355         (WebCore::Element::clientWidth):
2356         (WebCore::Element::clientHeight):
2357         * platform/LayoutUnit.h:
2358         (WebCore::LayoutUnit::LayoutUnit):
2359         (WebCore::LayoutUnit::ceilToFloat):
2360         (WebCore::LayoutUnit::ceil):
2361         (WebCore::LayoutUnit::round):
2362         (WebCore::LayoutUnit::floor):
2363         (WebCore::boundedMultiply):
2364         (WebCore::operator*):
2365         (WebCore::operator/):
2366         (WebCore::intMod):
2367         (WebCore::operator%):
2368         (WebCore::roundedLayoutUnit):
2369         (WebCore::ceiledLayoutUnit):
2370         (WebCore::LayoutUnit::toInt): Deleted.
2371         (WebCore::LayoutUnit::toFloat): Deleted.
2372         (WebCore::LayoutUnit::toDouble): Deleted.
2373         (WebCore::LayoutUnit::epsilon): Deleted.
2374         * platform/graphics/LayoutPoint.h:
2375         (WebCore::roundedForPainting):
2376         (WebCore::flooredForPainting):
2377         (WebCore::ceiledForPainting):
2378         (WebCore::roundedLayoutPoint):
2379         * platform/graphics/LayoutRect.cpp:
2380         (WebCore::enclosingLayoutRect):
2381         * platform/graphics/LayoutRect.h:
2382         (WebCore::pixelSnappedIntRect):
2383         (WebCore::pixelSnappedForPainting):
2384         * platform/graphics/LayoutSize.h:
2385         (WebCore::roundedLayoutSize):
2386         (WebCore::flooredForPainting):
2387         * rendering/RenderBlock.cpp:
2388         (WebCore::adjustFloatForSubPixelLayout):
2389         * rendering/RenderBlockFlow.cpp:
2390         (WebCore::RenderBlockFlow::layoutBlockChild):
2391         * rendering/RenderElement.h:
2392         (WebCore::adjustLayoutUnitForAbsoluteZoom):
2393         * rendering/style/RenderStyle.h:
2394         (WebCore::adjustLayoutUnitForAbsoluteZoom):
2395
2396 2014-08-19  Bem Jones-Bey  <bjonesbe@adobe.com>
2397
2398         [CSS Shapes] A few calc() test failures in the shape-image-threshold parsing tests
2399         https://bugs.webkit.org/show_bug.cgi?id=135926
2400
2401         Reviewed by Dirk Schulze.
2402
2403         shape-image-threshold is a Number, so it should be parsed as one. The
2404         default parsing doesn't support calcs, but numbers do.
2405
2406         No new tests, fixes exitsing test to pass.
2407
2408         * css/DeprecatedStyleBuilder.cpp:
2409         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Use
2410             ApplyPropertyNumber instead of ApplyPropertyDefault for
2411             shape-image-threshold.
2412
2413 2014-08-18  Maciej Stachowiak  <mjs@apple.com>
2414
2415         Use NSURLFileTypeMappings directly instead of depending on WebKitSystemInterface wrappers for it
2416         https://bugs.webkit.org/show_bug.cgi?id=136035
2417
2418         Reviewed by Dan Bernstein.
2419
2420         * WebCore.exp.in: Remove reference to no longer existent sumbols.
2421         * WebCore.order: ditto
2422         * WebCore.xcodeproj/project.pbxproj: Install new NSURLFileTyeMappings.h header.
2423         * platform/ios/MIMETypeRegistryIOS.mm:
2424         (WebCore::MIMETypeRegistry::getMIMETypeForExtension): Use NSURLFileTypeMappings
2425         directly instead of via WKSI wrapper.
2426         * platform/mac/MIMETypeRegistryMac.mm:
2427         (WebCore::MIMETypeRegistry::getMIMETypeForExtension): ditto
2428         (WebCore::MIMETypeRegistry::getExtensionsForMIMEType): ditto
2429         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType): ditto
2430         * platform/mac/WebCoreSystemInterface.h: Remove references to the no-longer-used
2431         WKGetExtensionsForMIMEType, WKGetPreferredExtensionForMIMEType, or WKGetMIMETypeForExtension
2432         * platform/mac/WebCoreSystemInterface.mm: ditto
2433         * platform/spi: Added. This is where headers to declare SPI go.
2434         * platform/spi/cocoa: Added. See above.
2435         * platform/spi/cocoa/NSURLFileTypeMappingsSPI.h: Added. Header to declare
2436         the internal class NSURLFileTypeMappings and some of its methods.
2437
2438 2014-08-18  Commit Queue  <commit-queue@webkit.org>
2439
2440         Unreviewed, rolling out r172736.
2441         https://bugs.webkit.org/show_bug.cgi?id=136060
2442
2443         Caused 14% PLT regressions (Requested by rniwa on #webkit).
2444
2445         Reverted changeset:
2446
2447         "Remove PurgeableBuffer since it is not very useful any more"
2448         https://bugs.webkit.org/show_bug.cgi?id=135939
2449         http://trac.webkit.org/changeset/172736
2450
2451 2014-08-18  Simon Fraser  <simon.fraser@apple.com>
2452
2453         Provide default implementations of all GraphicsLayerClient methods
2454         https://bugs.webkit.org/show_bug.cgi?id=136054
2455
2456         Reviewed by Tim Horton.
2457
2458         Make none of the functions in GraphicsLayerClient pure virtual, since in many cases
2459         subclasses don't need to provide their own implementations.
2460
2461         * platform/graphics/GraphicsLayerClient.h:
2462         (WebCore::GraphicsLayerClient::notifyAnimationStarted):
2463         (WebCore::GraphicsLayerClient::notifyFlushRequired):
2464         (WebCore::GraphicsLayerClient::paintContents):
2465         * rendering/RenderLayerCompositor.h:
2466
2467 2014-08-18  Pratik Solanki  <psolanki@apple.com>
2468
2469         Remove PurgeableBuffer since it is not very useful any more
2470         https://bugs.webkit.org/show_bug.cgi?id=135939
2471
2472         Reviewed by Geoffrey Garen.
2473
2474         The usefulness of having purgeable memory for cached resources has diminished now that
2475         WebKit uses file backed resources when possible. Since this is read only memory, it is in
2476         essence "purgeable". Having the PurgeableBuffer code adds additional complexity that we
2477         don't need. e.g. on my Mac, I am not seeing any entry for "WebCore purgeable data" when I
2478         run vmmap against the web processes that I have running. It is used on iOS, however even
2479         there much of the purgeable memory we create gets replaced by file backed memory once we get
2480         the notification from CFNetwork.
2481
2482         No new tests because no functional changes.
2483
2484         * WebCore.xcodeproj/project.pbxproj:
2485         * inspector/InspectorPageAgent.cpp:
2486         (WebCore::prepareCachedResourceBuffer):
2487         * loader/DocumentLoader.cpp:
2488         (WebCore::DocumentLoader::subresource):
2489         * loader/ResourceBuffer.cpp:
2490         (WebCore::ResourceBuffer::hasPurgeableBuffer): Deleted.
2491         (WebCore::ResourceBuffer::setShouldUsePurgeableMemory): Deleted.
2492         (WebCore::ResourceBuffer::createPurgeableBuffer): Deleted.
2493         (WebCore::ResourceBuffer::releasePurgeableBuffer): Deleted.
2494         * loader/ResourceBuffer.h:
2495         * loader/SubresourceLoader.cpp:
2496         (WebCore::SubresourceLoader::didFinishLoading):
2497         * loader/cache/CachedCSSStyleSheet.cpp:
2498         (WebCore::CachedCSSStyleSheet::sheetText):
2499         (WebCore::CachedCSSStyleSheet::destroyDecodedData):
2500         * loader/cache/CachedCSSStyleSheet.h:
2501         * loader/cache/CachedImage.cpp:
2502         (WebCore::CachedImage::image):
2503         (WebCore::CachedImage::imageForRenderer):
2504         (WebCore::CachedImage::imageSizeForRenderer):
2505         (WebCore::CachedImage::destroyDecodedData):
2506         (WebCore::CachedImage::canUseDiskImageCache):
2507         * loader/cache/CachedImage.h:
2508         * loader/cache/CachedResource.cpp:
2509         (WebCore::CachedResource::addClientToSet):
2510         (WebCore::CachedResource::isSafeToMakePurgeable): Deleted.
2511         (WebCore::CachedResource::makePurgeable): Deleted.
2512         (WebCore::CachedResource::isPurgeable): Deleted.
2513         (WebCore::CachedResource::wasPurged): Deleted.
2514         * loader/cache/CachedResource.h:
2515         (WebCore::CachedResource::resourceBuffer):
2516         (WebCore::CachedResource::purgePriority): Deleted.
2517         * loader/cache/CachedScript.cpp:
2518         (WebCore::CachedScript::script):
2519         (WebCore::CachedScript::destroyDecodedData):
2520         * loader/cache/CachedScript.h:
2521         * loader/cache/MemoryCache.cpp:
2522         (WebCore::MemoryCache::resourceForRequestImpl):
2523         (WebCore::MemoryCache::pruneDeadResourcesToSize):
2524         (WebCore::MemoryCache::evict):
2525         (WebCore::MemoryCache::TypeStatistic::addResource):
2526         (WebCore::MemoryCache::dumpStats):
2527         (WebCore::MemoryCache::dumpLRULists):
2528         (WebCore::MemoryCache::makeResourcePurgeable): Deleted.
2529         * loader/cache/MemoryCache.h:
2530         (WebCore::MemoryCache::TypeStatistic::TypeStatistic):
2531         (WebCore::MemoryCache::shouldMakeResourcePurgeableOnEviction): Deleted.
2532         * platform/PurgePriority.h: Removed.
2533         * platform/PurgeableBuffer.h: Removed.
2534         * platform/SharedBuffer.cpp:
2535         (WebCore::SharedBuffer::SharedBuffer):
2536         (WebCore::SharedBuffer::size):
2537         (WebCore::SharedBuffer::data):
2538         (WebCore::SharedBuffer::append):
2539         (WebCore::SharedBuffer::clear):
2540         (WebCore::SharedBuffer::copy):
2541         (WebCore::SharedBuffer::getSomeData):
2542         (WebCore::SharedBuffer::adoptPurgeableBuffer): Deleted.
2543         (WebCore::SharedBuffer::createPurgeableBuffer): Deleted.
2544         (WebCore::SharedBuffer::releasePurgeableBuffer): Deleted.
2545         * platform/SharedBuffer.h:
2546         (WebCore::SharedBuffer::hasPurgeableBuffer): Deleted.
2547         (WebCore::SharedBuffer::shouldUsePurgeableMemory): Deleted.
2548         * platform/cf/SharedBufferCF.cpp:
2549         (WebCore::SharedBuffer::SharedBuffer):
2550         * platform/mac/PurgeableBufferMac.cpp: Removed.
2551         * platform/mac/SharedBufferMac.mm:
2552         (WebCore::SharedBuffer::createCFData):
2553         * platform/soup/SharedBufferSoup.cpp:
2554
2555 2014-08-18  Pratik Solanki  <psolanki@apple.com>
2556
2557         Use modern for loop instead of iterators in SharedBufferCF.cpp
2558         https://bugs.webkit.org/show_bug.cgi?id=136000
2559
2560         Reviewed by Andreas Kling.
2561
2562         * platform/cf/SharedBufferCF.cpp:
2563         (WebCore::SharedBuffer::copyBufferAndClear):
2564         (WebCore::SharedBuffer::copySomeDataFromDataArray):
2565         (WebCore::SharedBuffer::maybeAppendDataArray): Use auto& instead of auto for less RetainPtr/refcount churn.
2566
2567 2014-08-18  Antti Koivisto  <antti@apple.com>
2568
2569         Tighten RenderCounter typing
2570         https://bugs.webkit.org/show_bug.cgi?id=136049
2571
2572         Reviewed by Andreas Kling.
2573
2574         RenderObject* -> RenderElement&
2575
2576         * rendering/CounterNode.cpp:
2577         (WebCore::CounterNode::CounterNode):
2578         (WebCore::CounterNode::create):
2579         (WebCore::showTreeAndMark):
2580         * rendering/CounterNode.h:
2581         (WebCore::CounterNode::owner):
2582         * rendering/RenderCounter.cpp:
2583         (WebCore::previousInPreOrder):
2584         (WebCore::parentOrPseudoHostElement):
2585         (WebCore::previousSiblingOrParent):
2586         (WebCore::areRenderersElementsSiblings):
2587         (WebCore::nextInPreOrder):
2588         (WebCore::planCounter):
2589         (WebCore::findPlaceForCounter):
2590         (WebCore::makeCounterNode):
2591         (WebCore::RenderCounter::originalText):
2592         (WebCore::destroyCounterNodeWithoutMapRemoval):
2593         (WebCore::RenderCounter::destroyCounterNodes):
2594         (WebCore::RenderCounter::destroyCounterNode):
2595         (WebCore::RenderCounter::rendererRemovedFromTree):
2596         (WebCore::updateCounters):
2597         (WebCore::RenderCounter::rendererSubtreeAttached):
2598         (WebCore::RenderCounter::rendererStyleChanged):
2599         (showCounterRendererTree):
2600         * rendering/RenderCounter.h:
2601         * rendering/RenderElement.cpp:
2602         (WebCore::RenderElement::RenderElement):
2603         (WebCore::RenderElement::insertChildInternal):
2604         (WebCore::RenderElement::removeChildInternal):
2605         (WebCore::RenderElement::styleDidChange):
2606         (WebCore::RenderElement::willBeDestroyed):
2607         * rendering/RenderElement.h:
2608         (WebCore::RenderElement::hasCounterNodeMap):
2609         (WebCore::RenderElement::setHasCounterNodeMap):
2610         
2611             Move CounterNodeMap to RenderElement from RenderObject.
2612
2613         * rendering/RenderObject.cpp:
2614         (WebCore::RenderObject::willBeDestroyed):
2615         * rendering/RenderObject.h:
2616         (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
2617         (WebCore::RenderObject::hasCounterNodeMap): Deleted.
2618         (WebCore::RenderObject::setHasCounterNodeMap): Deleted.
2619
2620 2014-08-18  Peyton Randolph  <prandolph@apple.com>
2621
2622         Expose long mouse press WebKit API. Part of 135257 - Add long mouse press gesture
2623         https://bugs.webkit.org/show_bug.cgi?id=136048
2624
2625         Reviewed by Dan Bernstein.
2626
2627         This patch exposes long mouse press API callbacks in both the injected bundle and on the UI process
2628         through their respective page UI clients. The callbacks are modeled off of the mouseDidMoveOverElement
2629         callback. Like the mouseDidMoveOverElement callback, these callbacks allow the bundle to pass 
2630         information to the UI process via a userData out parameter.
2631
2632         * page/Chrome.cpp:
2633         (WebCore::Chrome::didBeginTrackingPotentialLongMousePress): Added.
2634         (WebCore::Chrome::didRecognizeLongMousePress): Added.
2635         (WebCore::Chrome::didCancelTrackingPotentialLongMousePress): Added.
2636         * page/Chrome.h:
2637         * page/ChromeClient.h:
2638         (WebCore::ChromeClient::didBeginTrackingPotentialLongMousePress): Added.
2639         (WebCore::ChromeClient::didRecognizeLongMousePress): Added.
2640         (WebCore::ChromeClient::didCancelTrackingPotentialLongMousePress): Added.
2641         * page/EventHandler.cpp:
2642         (WebCore::EventHandler::handleMousePressEvent): 
2643         Pass the press hit test result to kick off the long mouse press.
2644         (WebCore::EventHandler::beginTrackingPotentialLongMousePress): Notify the chrome.
2645         (WebCore::EventHandler::recognizeLongMousePress): Ditto.
2646         (WebCore::EventHandler::cancelTrackingPotentialLongMousePress): 
2647         Ditto. Also opportunistically remove a runtime switch check to see if long pressing is enabled. The
2648         runtime switch check was only triggered when long pressing was disabled in the middle of a long press.
2649         * page/EventHandler.h:
2650
2651 2014-08-18  Przemyslaw Kuczynski  <p.kuczynski@samsung.com>
2652
2653         Fix unintentional integer overflow before widen
2654         https://bugs.webkit.org/show_bug.cgi?id=135463
2655
2656         Reviewed by Oliver Hunt.
2657
2658         Overflowing expression is evaluated using operands arithmetic but then is used in
2659         context which expects an wider integer type. To avoid overflow at least one operand
2660         has to be representative of the wider type.
2661
2662         * loader/FTPDirectoryParser.cpp:
2663         (WebCore::parseOneFTPLine): Changed strtoul to strtoull.
2664         * loader/ProgressTracker.cpp:
2665         (WebCore::ProgressTracker::incrementProgress): Added static_cast to long long.
2666         * platform/efl/FileSystemEfl.cpp:
2667         (WebCore::getVolumeFreeSizeForPath): Added static_cast to uint64_t.
2668
2669 2014-08-18  Vivek Galatage  <vivek.vg@samsung.com>
2670
2671         Implement CanvasRenderingContext2D direction attribute
2672         https://bugs.webkit.org/show_bug.cgi?id=135878
2673
2674         Reviewed by Darin Adler.
2675
2676         The attribute, 'direction', represents the text directionality.
2677         This is an important attribute for the bi-directional text within the CanvasRenderingContext2D.
2678         The allowed set of values are 'rtl', 'ltr' and 'inherit'.
2679
2680         Specification URL: http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting.html#dom-context-2d-direction
2681
2682         Test: fast/canvas/canvas-direction.html
2683
2684         * html/canvas/CanvasRenderingContext2D.cpp:
2685         (WebCore::inheritedDirection):
2686         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
2687         (WebCore::CanvasRenderingContext2D::reset):
2688         (WebCore::CanvasRenderingContext2D::State::State):
2689         (WebCore::CanvasRenderingContext2D::State::operator=):
2690         (WebCore::CanvasRenderingContext2D::direction):
2691         (WebCore::CanvasRenderingContext2D::setDirection):
2692         (WebCore::CanvasRenderingContext2D::drawTextInternal):
2693         * html/canvas/CanvasRenderingContext2D.h:
2694         * html/canvas/CanvasRenderingContext2D.idl:
2695
2696 2014-08-18  Benjamin Poulain  <benjamin@webkit.org>
2697
2698         The style is not updated correctly when the pseudo class :empty is applied on anything but the rightmost element
2699         https://bugs.webkit.org/show_bug.cgi?id=135999
2700
2701         Reviewed by Antti Koivisto.
2702
2703         In Element's checkForEmptyStyleChange(), the style invalidation was only considering the invalidation of the element
2704         for which the subtree has changed. When the pseudo class :empty is used with a sibling combinator (e.g. foo:empty+bar),
2705         we were never invalidating the style of the element on which the selector applies.
2706
2707         This patch fixes the issue by invalidating the whole subtree rooted at the parent if the :empty rules applies
2708         to siblings. A new flag "styleOfSiblingsAffectedByEmpty" is introduced to cover this case.
2709
2710         SelectorChecker just sets the flag all the time if any sibling rule exists.
2711         This is overkill but that code is just there for non-jit cases.
2712
2713         SelectorCompiler does a better job and only sets the flag if matching anything else than the rightmost element.
2714         There is a case not optimized, :empty with descendant (e.g. foo:empty>bar). Those cases are useless in practice,
2715         it is not worth optimizing them.
2716
2717         Tests: fast/css/pseudo-element-updates-on-empty.html
2718                fast/selectors/not-empty-adjacent-style-update.html
2719                fast/selectors/not-empty-style-update.html
2720
2721         * css/SelectorChecker.cpp:
2722         (WebCore::SelectorChecker::checkOne):
2723         * cssjit/SelectorCompiler.cpp:
2724         (WebCore::SelectorCompiler::fragmentMatchesTheRightmostElement):
2725         shouldUseRenderStyleFromCheckingContext() is renamed fragmentMatchesTheRightmostElement() because
2726         it is now also used by generateElementIsEmpty() in a context where the Context's style is irrelevant.
2727
2728         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2729         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
2730         (WebCore::SelectorCompiler::setStyleOfSiblingsAffectedByEmpty):
2731         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsEmpty):
2732         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
2733         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
2734         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
2735         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
2736         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
2737         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPseudoElement):
2738         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement):
2739         (WebCore::SelectorCompiler::shouldUseRenderStyleFromCheckingContext): Deleted.
2740         (WebCore::SelectorCompiler::setElementStyleIsAffectedByEmptyAndUpdateRenderStyleIfNecessary): Deleted.
2741         * dom/Element.cpp:
2742         (WebCore::checkForEmptyStyleChange):
2743         (WebCore::Element::setStyleOfSiblingsAffectedByEmpty):
2744         (WebCore::Element::rareDataStyleOfSiblingsAffectedByEmpty):
2745         * dom/Element.h:
2746         (WebCore::Element::styleOfSiblingsAffectedByEmpty):
2747         * dom/ElementRareData.h:
2748         (WebCore::ElementRareData::styleOfSiblingsAffectedByEmpty):
2749         (WebCore::ElementRareData::setStyleOfSiblingsAffectedByEmpty):
2750         (WebCore::ElementRareData::ElementRareData):
2751
2752 2014-08-18  Brent Fulgham  <bfulgham@apple.com>
2753
2754         [Mac] Unreviewed merge correction.
2755
2756         * page/mac/EventHandlerMac.mm:
2757         (WebCore::EventHandler::platformCompleteWheelEvent): Revert an
2758         unintended change from r172705.
2759
2760 2014-08-18  Bem Jones-Bey  <bjonesbe@adobe.com>
2761
2762         Small cleanup for ShapeOutsideDeltas
2763         https://bugs.webkit.org/show_bug.cgi?id=136043
2764
2765         Reviewed by Zoltan Horvath.
2766
2767         Remove explicit initializtion of LayoutUnit members and explicitly
2768         size the boolean flags so they pack properly.
2769
2770         No new tests, no behavior change.
2771
2772         * rendering/shapes/ShapeOutsideInfo.h:
2773
2774 2014-08-18  Dirk Schulze  <krit@webkit.org>
2775
2776         calc() doesn't work for SVG CSS properties
2777         https://bugs.webkit.org/show_bug.cgi?id=136026
2778
2779         Reviewed by Andreas Kling.
2780
2781         Make calc() work on SVG CSS properties as well. stroke-width and
2782         stroke-dashoffset used SVGLength. SVGLength doesn't work together with
2783         cross units length arguments like % and px (just returns 0 in these
2784         cases). I moved these properties over to Length. All modified files
2785         beside to SVGCSSParser are related to this switch.
2786
2787         Test: svg/css/parse-calc-length.html
2788
2789         * css/CSSComputedStyleDeclaration.cpp:
2790         (WebCore::ComputedStyleExtractor::propertyValue):
2791         * css/DeprecatedStyleBuilder.cpp:
2792         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2793         * css/SVGCSSComputedStyleDeclaration.cpp:
2794         (WebCore::ComputedStyleExtractor::svgPropertyValue):
2795         * css/SVGCSSParser.cpp:
2796         (WebCore::CSSParser::parseSVGValue):
2797         * css/SVGCSSStyleSelector.cpp:
2798         (WebCore::StyleResolver::applySVGProperty):
2799         * page/animation/CSSPropertyAnimation.cpp:
2800         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
2801         * rendering/style/RenderStyle.h:
2802         * rendering/style/SVGRenderStyle.h:
2803         (WebCore::SVGRenderStyle::setStrokeWidth):
2804         (WebCore::SVGRenderStyle::setStrokeDashOffset):
2805         (WebCore::SVGRenderStyle::strokeWidth):
2806         (WebCore::SVGRenderStyle::strokeDashOffset):
2807         (WebCore::SVGRenderStyle::initialStrokeDashOffset): Deleted.
2808         (WebCore::SVGRenderStyle::initialStrokeWidth): Deleted.
2809         * rendering/style/SVGRenderStyleDefs.cpp:
2810         (WebCore::StyleStrokeData::StyleStrokeData):
2811         * rendering/style/SVGRenderStyleDefs.h:
2812         * rendering/svg/RenderSVGShape.cpp:
2813         (WebCore::RenderSVGShape::strokeWidth):
2814         * rendering/svg/RenderSVGText.cpp:
2815         (WebCore::RenderSVGText::strokeBoundingBox):
2816         * rendering/svg/SVGRenderSupport.cpp:
2817         (WebCore::SVGRenderSupport::applyStrokeStyleToContext):
2818         * rendering/svg/SVGRenderTreeAsText.cpp:
2819         (WebCore::writeStyle):
2820         * svg/SVGLengthContext.cpp:
2821         (WebCore::SVGLengthContext::valueForLength):
2822
2823 2014-08-18  Andy Estes  <aestes@apple.com>
2824
2825         REGRESSION (r167856): adobe.com no longer able to launch Create Cloud app using a URL with a custom scheme
2826         https://bugs.webkit.org/show_bug.cgi?id=136010
2827
2828         Reviewed by Darin Adler.
2829
2830         r167856 caused WebKit to stop scheduling certain kinds of navigations (window.location changes, meta-refresh,
2831         and some calls to window.open) when the request URL is invalid. Adobe.com performs one of these navigations to
2832         an invalid URL with an external scheme (aam:), relying on Safari's navigation policy delegate to ignore the
2833         navigation and launch the external app registered to handle aam: URLs. Since the navigation is no longer
2834         scheduled, the policy delegate is never executed and the external app never launches.
2835
2836         Instead of not scheduling the navigation, allow it to proceed until the client's policy delegate has executed
2837         and made a decision. Only disallow the navigation if the policy delegate told WebKit to proceed with the load.
2838         This exposes these navigations to clients via the policy delegate and via willPerformClientRedirectToURL and
2839         didCancelClientRedirectForFrame on the frame load delegate.
2840         
2841         To constrain this check only to the navigation types covered by r167856, only two NavigationSchedulers
2842         (ScheduledRedirect and ScheduledLocationChange) enable the invalid URL check.
2843
2844         Note that r167856 also caused an iOS regression, and this was resolved in r170120 by adding a linked-on-or-after
2845         check and a WebCore setting. Since the iOS regression is also resolved by the approach described above, this
2846         patch reverts r170120 (but keeps some of its tests).
2847
2848         Tests: fast/loader/redirect-to-invalid-url-using-javascript-calls-policy-delegate.html
2849                fast/loader/redirect-to-invalid-url-using-javascript-disallowed.html
2850                fast/loader/redirect-to-invalid-url-using-meta-refresh-calls-policy-delegate.html
2851                fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed.html
2852                fast/loader/window-open-to-invalid-url-calls-policy-delegate.html
2853                fast/loader/window-open-to-invalid-url-disallowed.html
2854
2855         * WebCore.exp.in: Updated the symbol FrameLoader::loadFrameRequest.
2856         * loader/FrameLoader.cpp:
2857         (WebCore::FrameLoader::changeLocation): Added an AllowNavigationToInvalidURL argument; passed down to urlSelected.
2858         (WebCore::FrameLoader::urlSelected): Added an AllowNavigationToInvalidURL argument; passed down to loadFrameRequest.
2859         (WebCore::FrameLoader::loadURLIntoChildFrame): Passed AllowNavigationToInvalidURL::Yes to loadURL.
2860         (WebCore::FrameLoader::loadFrameRequest): Added an AllowNavigationToInvalidURL argument; passed down to loadURL and loadPostRequest.
2861         (WebCore::FrameLoader::loadURL): Added an AllowNavigationToInvalidURL argument; passed down to continueLoadAfterNewWindowPolicy and loadWithNavigationAction.
2862         (WebCore::FrameLoader::loadPostRequest): Ditto.
2863         (WebCore::FrameLoader::load): Passed AllowNavigationToInvalidURL::Yes to continueLoadAfterNewWindowPolicy.
2864         (WebCore::FrameLoader::loadWithNavigationAction): Added an AllowNavigationToInvalidURL argument; passed down to loadWithDocumentLoader.
2865         (WebCore::FrameLoader::loadWithDocumentLoader): Added an AllowNavigationToInvalidURL argument; passed down to continueLoadAfterNavigationPolicy.
2866         (WebCore::FrameLoader::reloadWithOverrideEncoding): Passed AllowNavigationToInvalidURL::Yes to loadWithDocumentLoader.
2867         (WebCore::FrameLoader::reload): Ditto.
2868         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
2869             Added an AllowNavigationToInvalidURL argument; if its value is No and the request's URL is invalid, do not continue.
2870             Added a FIXME about calling clientRedirectCancelledOrFinished on non-quick redirect cancellations.
2871         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): Added an AllowNavigationToInvalidURL argument; passed down to loadWithNavigationAction.
2872         (WebCore::FrameLoader::loadDifferentDocumentItem): Passed AllowNavigationToInvalidURL::Yes to either loadWithDocumentLoader or loadWithNavigationAction.
2873         * loader/FrameLoader.h:
2874         * loader/FrameLoaderTypes.h: Defined AllowNavigationToInvalidURL to have values of Yes and No.
2875         * loader/NavigationScheduler.cpp:
2876         (WebCore::ScheduledRedirect::fire): Passed AllowNavigationToInvalidURL::No to FrameLoader::changeLocation.
2877         (WebCore::ScheduledLocationChange::fire): Ditto.
2878         (WebCore::NavigationScheduler::shouldScheduleNavigation): Removed the URL::isValid check.
2879         (WebCore::NavigationScheduler::scheduleLocationChange): Passed AllowNavigationToInvalidURL::No to FrameLoder::changeLocation during fragment navigations.
2880         * page/ContextMenuController.cpp:
2881         (WebCore::openNewWindow): Passed AllowNavigationToInvalidURL::Yes to FrameLoader::loadFrameRequest.
2882         (WebCore::ContextMenuController::contextMenuItemSelected): Ditto.
2883         * page/Settings.in: Removed allowNavigationToInvalidURL.
2884
2885 2014-08-18  Renata Hodovan  <rhodovan.u-szeged@partner.samsung.com>
2886
2887         Fix keyTimes list length of from/to/by animations.
2888         https://bugs.webkit.org/show_bug.cgi?id=136037
2889
2890         Reviewed by Darin Adler.
2891
2892         For from/to/by animations, the length of keyTimes and keyPoints
2893         attribute if are specified must be equal and must have at least
2894         2 values.
2895
2896         This is backport of my fix in Blink: https://codereview.chromium.org/453243003/
2897
2898         Test: svg/animations/invalid-keytime-number-crash.html
2899
2900         * svg/SVGAnimationElement.cpp:
2901         (WebCore::SVGAnimationElement::startedActiveInterval):
2902
2903 2014-08-18  Brent Fulgham  <bfulgham@apple.com>
2904
2905         [Mac] Follow-up to r136040 based on Darin Adler's comments.
2906
2907         Pass Widget* as a Widget&, since it can never be null.
2908
2909         * page/EventHandler.cpp:
2910         (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent):
2911         (WebCore::EventHandler::handleWheelEvent):
2912         * page/EventHandler.h:
2913         * page/mac/EventHandlerMac.mm:
2914         (WebCore::EventHandler::platformCompleteWheelEvent):
2915         (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent):
2916
2917 2014-08-17  Brent Fulgham  <bfulgham@apple.com>
2918
2919         [Mac] Gesture scrolls don't work in the WebKit1 clients after scrolling a non-scrollable iFrame
2920         https://bugs.webkit.org/show_bug.cgi?id=136029
2921         <rdar://problem/17767169>
2922
2923         Reviewed by Maciej Stachowiak.
2924
2925         This is difficult to test in our layout tests, since it relies on specific host application
2926         behavior.
2927
2928         If the platform widget is a frame view (IFrame), and we are in WebKit1, 'passWheelEventToWidget'
2929         has already called 'scrollWheel' on the underlying platform widget. We need to return true in
2930         this case to avoid getting multiple copies of the scrollWheel event sent to the platform widget.
2931
2932         * page/EventHandler.cpp:
2933         (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Revise default stub to
2934         accept a Widget* argument.
2935         (WebCore::EventHandler::handleWheelEvent):
2936         * page/EventHandler.h:
2937         * page/mac/EventHandlerMac.mm:
2938         (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Check for WK1 case and
2939         return 'true' when the underlying NSScrollView has been issues a scrollWheel event.
2940         
2941
2942 2014-08-18  Andy Estes  <aestes@apple.com>
2943
2944         Revert r172697.
2945
2946         It made several webarchive layout tests flaky and didn't have the correct behavior for non-quick redirects.
2947
2948         * loader/FrameLoader.cpp:
2949         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
2950         * loader/NavigationScheduler.cpp:
2951         (WebCore::NavigationScheduler::shouldScheduleNavigation):
2952         * page/Settings.in:
2953
2954 2014-08-15  Andy Estes  <aestes@apple.com>
2955
2956         REGRESSION (r167856): adobe.com no longer able to launch Create Cloud app using a URL with a custom scheme
2957         https://bugs.webkit.org/show_bug.cgi?id=136010
2958
2959         Reviewed by Darin Adler.
2960
2961         r167856 caused WebKit to stop scheduling certain kinds of navigations (window.location changes, meta-refresh,
2962         and some calls to window.open) when the request URL is invalid. Adobe.com performs one of these navigations to
2963         an invalid URL with an external scheme (aam:), relying on Safari's navigation policy delegate to ignore the
2964         navigation and launch the external app registered to handle aam: URLs. Since the navigation is no longer
2965         scheduled, the policy delegate is never executed and the external app never launches.
2966
2967         Instead of not scheduling the navigation, allow it to proceed until the client's policy delegate has executed
2968         and made a decision. Only disallow the navigation if the policy delegate told WebKit to proceed with the load.
2969         This exposes these navigations to clients via the policy delegate and via willPerformClientRedirectToURL and
2970         didCancelClientRedirectForFrame on the frame load delegate.
2971
2972         Note that r167856 also caused an iOS regression, and this was resolved in r170120 by adding a linked-on-or-after
2973         check and a WebCore setting. Since the iOS regression is also resolved by the approach described above, this
2974         patch reverts r170120 (but keeps some of its tests).
2975
2976         Tests: fast/loader/redirect-to-invalid-url-using-javascript-calls-policy-delegate.html
2977                fast/loader/redirect-to-invalid-url-using-javascript-disallowed.html
2978                fast/loader/redirect-to-invalid-url-using-meta-refresh-calls-policy-delegate.html
2979                fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed.html
2980                fast/loader/window-open-to-invalid-url-calls-policy-delegate.html
2981                fast/loader/window-open-to-invalid-url-disallowed.html
2982
2983         * loader/FrameLoader.cpp:
2984         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Do not continue if the navigation will be a redirect
2985         to an invalid URL.
2986         * loader/NavigationScheduler.cpp:
2987         (WebCore::NavigationScheduler::shouldScheduleNavigation): Resumed scheduling navigations to invalid URLs.
2988         * page/Settings.in: Removed the allowNavigationToInvalidURL setting.
2989
2990 2014-08-15  Dean Jackson  <dino@apple.com>
2991
2992         REGRESSION (r164173): Safari AutoFill button in popover, default buttons on iCloud control panel and Safari Safe Browsing pages don't have default appearance
2993         https://bugs.webkit.org/show_bug.cgi?id=136011
2994
2995         Reviewed by Sam Weinig.
2996
2997         When we render some controls, we need to make sure the NSWindow subclass we
2998         use as the host of the AppKit views identifies itself as the key window (if
2999         the control state is correct). We already have a flag tracking this for
3000         key appearance - just make sure we do the same for isKeyWindow.
3001
3002         * platform/mac/ThemeMac.mm:
3003         (-[WebCoreThemeWindow isKeyWindow]): New override to mirror the static
3004         variable for key appearance.
3005
3006 2014-08-15  Zalan Bujtas  <zalan@apple.com>
3007
3008         Do not use FloatRect::infiniteRect() to flag full repaints.
3009         https://bugs.webkit.org/show_bug.cgi?id=135900
3010
3011         Reviewed by Simon Fraser.
3012
3013         Converting FloatRect::infiniteRect() to IntRect leads to value overflow
3014         and we end up with invalid repaint rectangle. Use a boolean flag to indicate
3015         full repaint request.
3016
3017         Covered by existing tests.
3018
3019         * platform/graphics/ca/GraphicsLayerCA.cpp:
3020         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
3021         (WebCore::GraphicsLayerCA::setNeedsDisplay):
3022         (WebCore::GraphicsLayerCA::setNeedsDisplayInRect):
3023         (WebCore::GraphicsLayerCA::repaintLayerDirtyRects):
3024         * platform/graphics/ca/GraphicsLayerCA.h:
3025         * platform/graphics/ca/PlatformCALayer.h:
3026         * platform/graphics/ca/TileGrid.cpp:
3027         (WebCore::TileGrid::setTileNeedsDisplayInRect):
3028         * platform/graphics/ca/mac/PlatformCALayerMac.h:
3029         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3030         (PlatformCALayerMac::setNeedsDisplay):
3031         (PlatformCALayerMac::setNeedsDisplayInRect):
3032
3033 2014-08-15  Benjamin Poulain  <benjamin@webkit.org>
3034
3035         Unify the modes style resolution modes SharingRules and StyleInvalidation
3036         https://bugs.webkit.org/show_bug.cgi?id=135969
3037
3038         Reviewed by Andreas Kling.
3039
3040         Unifying the Collector and SelectorCheckers was done in previous patches,
3041         this is just removing the enums.
3042
3043         * css/ElementRuleCollector.cpp:
3044         (WebCore::ElementRuleCollector::collectMatchingRules):
3045         (WebCore::ElementRuleCollector::hasAnyMatchingRules):
3046         * css/SelectorChecker.cpp:
3047         (WebCore::SelectorChecker::match):
3048         * css/SelectorChecker.h:
3049         * css/StyleInvalidationAnalysis.cpp:
3050         (WebCore::invalidateStyleRecursively):
3051         * cssjit/SelectorCompiler.cpp:
3052         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateMarkPseudoStyleForPseudoElement):
3053
3054 2014-08-15  Benjamin Poulain  <benjamin@webkit.org>
3055
3056         CSS JIT: compile :-webkit-full-page-media
3057         https://bugs.webkit.org/show_bug.cgi?id=135968
3058
3059         Reviewed by Alexey Proskuryakov.
3060
3061         Add the pseudo class :-webkit-full-page-media with an unoptimized function call.
3062
3063         It would be possible to inline it, but this selector is so uncommon I don't think
3064         it is worth having any additional complexity for it.
3065
3066         * css/SelectorChecker.cpp:
3067         (WebCore::SelectorChecker::checkOne):
3068         * css/SelectorCheckerTestFunctions.h:
3069         (WebCore::isMediaDocument):
3070         * cssjit/SelectorCompiler.cpp:
3071         (WebCore::SelectorCompiler::addPseudoClassType):
3072
3073 2014-08-15  Wenson Hsieh  <wenson_hsieh@apple.com>
3074
3075         Fix gliding in AxisScrollSnapAnimator for Mac
3076         https://bugs.webkit.org/show_bug.cgi?id=135971
3077
3078         Reviewed by Dean Jackson.
3079
3080         Previously, momentum events that are handled immediately after finishing a glide animation cause a second, extremely
3081         slow glide animation to trigger. To fix this, I added a new state DestinationReached. During this state, additional
3082         momentum events that are handled after the glide animation completes will not fill up the momentum window and trigger
3083         a second glide event.
3084
3085         * platform/mac/AxisScrollSnapAnimator.h:
3086         * platform/mac/AxisScrollSnapAnimator.mm:
3087         (WebCore::AxisScrollSnapAnimator::AxisScrollSnapAnimator):
3088         (WebCore::AxisScrollSnapAnimator::handleWheelEvent):
3089         (WebCore::AxisScrollSnapAnimator::scrollSnapAnimationUpdate):
3090         (WebCore::AxisScrollSnapAnimator::endScrollSnapAnimation):
3091         (WebCore::AxisScrollSnapAnimator::computeGlideDelta):
3092
3093 2014-08-15  Eric Carlson  <eric.carlson@apple.com>
3094
3095         [MSE] Implement a maximum buffer size for SourceBuffer
3096         https://bugs.webkit.org/show_bug.cgi?id=135614
3097
3098         Reviewed by Jer Noble.
3099
3100         Implement the MSE coded frame eviction algorithm: when new buffers are appended attempt
3101         to keep the amount of data buffered below a maximum size (which is determined by the media
3102         session manager) by freeing coded frames as follows:
3103             1 - Free frames in 30 second chunks from 0 to 30 seconds before the current time.
3104             2 - If there are time ranges after the range with the current time, free frames in
3105                 30 second chunks from duration back to the beginning of the time range after
3106                 current time.
3107
3108         For now we DO NOT throw a QUOTA_EXCEEDED_ERR when we are not able to free up enough
3109         space to remain below the prescribed quota, because some big name, widely deployed, 
3110         code bases ignore the error and continue appending data as though the failed append
3111         succeeded, leading to a corrupted bitstream and failure to play.
3112
3113         * Modules/mediasource/SampleMap.cpp:
3114         (WebCore::SampleMap::addSample): Drive-by performance optimization: sample->presentationTime()
3115             is used more than once, stash it in a local variable.
3116         (WebCore::SampleMap::removeSample): Ditto.
3117
3118         * Modules/mediasource/SourceBuffer.cpp:
3119         (WebCore::logRanges): Debug-only function to log TimeRanges.
3120         (WebCore::SourceBuffer::SourceBuffer):
3121         (WebCore::SourceBuffer::remove): Optimize logging. Buffer full and coded frame eviction logic
3122             is in SourceBuffer instead of SourceBufferPrivate.
3123         (WebCore::SourceBuffer::appendBufferInternal): Ditto.
3124         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Set m_bufferFull when more data
3125             has been buffered than allowed.
3126         (WebCore::removeSamplesFromTrackBuffer): Add logging.
3127         (WebCore::SourceBuffer::removeCodedFrames): Improve logging. Avoid debug build assert when
3128             current time is after last enqueued presentation time.
3129         (WebCore::SourceBuffer::evictCodedFrames): The coded frame eviction algorithm.
3130         (WebCore::SourceBuffer::maximumBufferSize): Return the maximum amount of data that can 
3131             be buffered.
3132         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Improve logging. Don't attempt
3133             to create a PlatformTimeRanges with inverted start and end to avoid an assert in debug.
3134         (WebCore::SourceBuffer::hasAudio): New, return true if there are any audio tracks.
3135         (WebCore::SourceBuffer::hasVideo): New, return true if there are any video tracks.
3136         (WebCore::SourceBuffer::sourceBufferPrivateHasAudio): Call hasAudio.
3137         (WebCore::SourceBuffer::sourceBufferPrivateHasVideo): Call hasVideo.
3138         (WebCore::SourceBuffer::hasCurrentTime): Return true if currentTime is greater than duration.
3139         (WebCore::SourceBuffer::hasFutureTime): Ditto.
3140         (WebCore::SourceBuffer::extraMemoryCost): Return the amount of data buffered: the size of
3141             the input buffer plus the size of all track samples.
3142         (WebCore::SourceBuffer::reportExtraMemoryCost): Move buffered size calculation to extraMemoryCost.
3143         (WebCore::SourceBuffer::document): Document accessor.
3144         * Modules/mediasource/SourceBuffer.h: Drive-by size optimization by moving all bool member
3145             variables to the end of class.
3146
3147         * html/HTMLMediaElement.cpp:
3148         (WebCore::HTMLMediaElement::refreshCachedTime): Drive-by removal of overly chatty logging.
3149         (WebCore::HTMLMediaElement::maximumSourceBufferSize): New, maximum source buffer size.
3150         * html/HTMLMediaElement.h:
3151
3152         * html/HTMLMediaSession.cpp:
3153         (WebCore::HTMLMediaSession::maximumMediaSourceBufferSize): New, get maximum source buffer 
3154             size from settings, return full amount for an SourceBuffer with video and audio, return 5%
3155             of the maximum for an audio-only SourceBuffer.
3156         * html/HTMLMediaSession.h:
3157
3158         * page/Settings.in: Add maximumSourceBufferSize. Default value is enough for approximately
3159             five minutes of 1080p video and stereo audio.
3160
3161         * platform/graphics/PlatformTimeRanges.cpp:
3162         (WebCore::PlatformTimeRanges::totalDuration): Drive-by optimization.
3163         (WebCore::PlatformTimeRanges::dump): New, allow a PlatformTimeRanges to be printed.
3164         * platform/graphics/PlatformTimeRanges.h:
3165
3166         * platform/graphics/SourceBufferPrivate.h: Delete evictCodedFrames and isFull, that logic
3167             is not in SourceBuffer.
3168         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
3169         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3170         (WebCore::SourceBufferPrivateAVFObjC::processCodedFrame): Drive-by logging fix.
3171         (WebCore::SourceBufferPrivateAVFObjC::evictCodedFrames): Deleted.
3172         (WebCore::SourceBufferPrivateAVFObjC::isFull): Deleted.
3173
3174         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
3175         (WebCore::MockSourceBufferPrivate::evictCodedFrames): Deleted.
3176         (WebCore::MockSourceBufferPrivate::isFull): Deleted.
3177         * platform/mock/mediasource/MockSourceBufferPrivate.h:
3178
3179 2014-08-15  Zalan Bujtas  <zalan@apple.com>
3180
3181         REGRESSION: Parts of the route/route options windows are invisible at maps.google.com
3182         https://bugs.webkit.org/show_bug.cgi?id=135977
3183         <rdar://problem/17961698>
3184
3185         Reviewed by Andreas Kling.
3186
3187         When the style change requires both layout and repaint, the style diff is set to
3188         'layout is needed' (and masks the repaint change) as normally layout is followed by a repaint.
3189         However, in compositing context, layout may not be followed by repaint, so when the style diff
3190         indicates layout, we need to figure out whether it implies repaint too.
3191         This logic should eventually be moved from RenderElement to RenderLayerModelObject/RenderLayer.
3192         -tracked here: webkit.org/b/135990
3193
3194         Test: compositing/cliprect-and-position-change-on-compositing-layer.html
3195
3196         * rendering/RenderElement.cpp:
3197         (WebCore::RenderElement::setNeedsPositionedMovementLayout):
3198         * rendering/style/RenderStyle.cpp:
3199         (WebCore::RenderStyle::changeRequiresLayerRepaint):
3200         (WebCore::RenderStyle::diffRequiresLayerRepaint):
3201         (WebCore::RenderStyle::diffRequiresRepaint): Deleted.
3202         * rendering/style/RenderStyle.h:
3203         * rendering/style/RenderStyleConstants.h:
3204
3205 2014-08-15  Brian J. Burg  <burg@cs.washington.edu>
3206
3207         Web Inspector: rewrite CodeGeneratorInspector to be modular and testable
3208         https://bugs.webkit.org/show_bug.cgi?id=131596
3209
3210         Reviewed by Joseph Pecoraro.
3211
3212         Aside from hooking up the new inspector bindings generator to the build system,
3213         there are a few comingled changes that would be painful to split from the main
3214         patch. Together, these changes make it possible to forward-declare all protocol
3215         enumerations as scoped enums, reducing weird ordering dependencies between domains.
3216
3217         All runtimeCast() methods are now static methods of BindingTraits specializations,
3218         rather than as static methods of the type builder classes.
3219
3220         All protocol enumeration types are scoped enums rather than struct-namespaced enums.
3221
3222         Remove some implicit protocol type and enumeration definitions because they trigger
3223         compiler bugs or introduce unnecessary complexity in the bindings generator.
3224
3225         No new tests, no behavior changed.
3226
3227         * CMakeLists.txt:
3228         * DerivedSources.make: Update script dependencies and the bindings generator script name.
3229
3230         * inspector/CommandLineAPIHost.cpp:
3231         (WebCore::CommandLineAPIHost::inspectImpl): Convert to BindingTraits.
3232
3233         * inspector/InspectorCSSAgent.cpp:
3234         (WebCore::InspectorCSSAgent::detectOrigin):
3235         (WebCore::InspectorCSSAgent::buildArrayForRegions):
3236         * inspector/InspectorCSSAgent.h:
3237         * inspector/InspectorDOMAgent.cpp:
3238         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
3239         * inspector/InspectorPageAgent.cpp:
3240         (WebCore::InspectorPageAgent::resourceTypeJson):
3241         (WebCore::InspectorPageAgent::cachedResourceTypeJson):
3242         (WebCore::InspectorPageAgent::getScriptExecutionStatus): Convert to scoped enums.
3243
3244         (WebCore::InspectorPageAgent::buildObjectForFrameTree): Extract FrameResourceTree::Resources
3245         into its own explicitly-defined object type. The new generator does not support implicitly
3246         defining object types as elements of arrays.
3247         * inspector/InspectorPageAgent.h:
3248         * inspector/InspectorReplayAgent.cpp: Disambiguate between internal and protocol types.
3249         (WebCore::buildInspectorObjectForSessionState):
3250         (WebCore::buildInspectorObjectForSegmentState):
3251         (WebCore::InspectorReplayAgent::sessionState):
3252         (WebCore::InspectorReplayAgent::didCreateFrontendAndBackend):
3253         (WebCore::InspectorReplayAgent::frameNavigated):
3254         (WebCore::InspectorReplayAgent::frameDetached):
3255         (WebCore::InspectorReplayAgent::willDispatchEvent):
3256         (WebCore::InspectorReplayAgent::startCapturing):
3257         (WebCore::InspectorReplayAgent::stopCapturing):
3258         (WebCore::InspectorReplayAgent::replayToPosition):
3259         (WebCore::InspectorReplayAgent::replayToCompletion):
3260         (WebCore::InspectorReplayAgent::pausePlayback):
3261         (WebCore::InspectorReplayAgent::cancelPlayback):
3262         (WebCore::InspectorReplayAgent::switchSession):
3263         (WebCore::InspectorReplayAgent::insertSessionSegment):
3264         (WebCore::InspectorReplayAgent::removeSessionSegment):
3265         (WebCore::InspectorReplayAgent::currentReplayState):
3266         (WebCore::InspectorReplayAgent::getAvailableSessions):
3267         (WebCore::InspectorReplayAgent::getSessionData):
3268         (WebCore::InspectorReplayAgent::getSegmentData):
3269         * inspector/InspectorReplayAgent.h:
3270         * inspector/InspectorResourceAgent.cpp:
3271         (WebCore::InspectorResourceAgent::willSendRequest):
3272         * inspector/InspectorStyleSheet.cpp: Convert to scoped enums. Extract CSSProperty::Status
3273         because scoped enums defined in a class scope trigger compiler bugs in GCC 4.8.
3274         (WebCore::buildMediaObject):
3275         (WebCore::InspectorStyle::styleWithProperties): Work around compiler disagreements.
3276         (WebCore::InspectorStyleSheet::create):
3277         (WebCore::InspectorStyleSheet::InspectorStyleSheet):
3278         (WebCore::InspectorStyleSheetForInlineStyle::create):
3279         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
3280         * inspector/InspectorStyleSheet.h:
3281
3282         * inspector/InspectorTimelineAgent.cpp: Convert to scoped enums and BindingTraits.
3283         (WebCore::toProtocol):
3284         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
3285         (WebCore::InspectorTimelineAgent::sendEvent):
3286
3287         * inspector/protocol/CSS.json: Extract CSSProperty::Status.
3288         * inspector/protocol/Page.json: Extract FrameResourceTree::Resources.
3289
3290 2014-08-15  Jer Noble  <jer.noble@apple.com>
3291
3292         [EME][Mac] Adopt AVStreamSession.
3293         https://bugs.webkit.org/show_bug.cgi?id=135983
3294
3295         Reviewed by Eric Carlson.
3296
3297         Add AVStreamDataParsers to a new AVStreamSession instance, and expire that session when asked to release
3298         the session's keys.
3299
3300         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
3301         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
3302         (WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC):
3303         (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys):
3304         (WebCore::CDMSessionMediaSourceAVFObjC::update):
3305
3306 2014-08-15  Wenson Hsieh  <wenson_hsieh@apple.com>
3307
3308         Implement snapping behavior for iOS
3309         https://bugs.webkit.org/show_bug.cgi?id=135769
3310
3311         Reviewed by Brent Fulgham.
3312
3313         Added support for snap points on iOS. This entails sending snap points from the web process to the UI process
3314         by encoding and decoding snap points and updating ScrollingTreeOverflowScrollingNodeIOS and WKWebView to support
3315         animation to snap points in the cases of mainframe and overflow scrolling, respectively.
3316
3317         There are no new tests yet -- we'll need to find a way to test this!
3318
3319         * WebCore.exp.in:
3320         * page/scrolling/AsyncScrollingCoordinator.cpp:
3321         (WebCore::setStateScrollingNodeSnapOffsetsAsFloat): Helper functions used to convert LayoutUnits to floats for snap offsets.
3322         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated): Update snap offsets for mainframe scrolling, as well as the state node.
3323         (WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode): Added snap offsets.
3324         * page/scrolling/AxisScrollSnapOffsets.h:
3325         (WebCore::closestSnapOffset): Computes the closest snap offset given a sorted vector of comparable types (e.g. float, LayoutUnit).
3326         * page/scrolling/ScrollingCoordinator.h:
3327         * page/scrolling/ScrollingStateScrollingNode.cpp:
3328         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
3329         (WebCore::ScrollingStateScrollingNode::setHorizontalSnapOffsets):
3330         (WebCore::ScrollingStateScrollingNode::setVerticalSnapOffsets):
3331         * page/scrolling/ScrollingStateScrollingNode.h:
3332         (WebCore::ScrollingStateScrollingNode::horizontalSnapOffsets):
3333         (WebCore::ScrollingStateScrollingNode::verticalSnapOffsets):
3334         * page/scrolling/ScrollingTreeScrollingNode.cpp:
3335         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
3336         * page/scrolling/ScrollingTreeScrollingNode.h:
3337         (WebCore::ScrollingTreeScrollingNode::horizontalSnapOffsets):
3338         (WebCore::ScrollingTreeScrollingNode::verticalSnapOffsets):
3339         * rendering/RenderLayer.cpp:
3340         (WebCore::RenderLayer::updateScrollInfoAfterLayout): Update snap offsets for overflow scrolling.
3341         * rendering/RenderLayerCompositor.cpp:
3342         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): Updates the state node's snap offsets for overflow scrolling.
3343
3344 2014-08-15  Dirk Schulze  <krit@webkit.org>
3345
3346         Turn r/rx/ry to presentation attributes
3347         https://bugs.webkit.org/show_bug.cgi?id=135978
3348
3349         Unreviewed typo.
3350
3351         * rendering/svg/RenderSVGEllipse.cpp:
3352         (WebCore::RenderSVGEllipse::calculateRadiiAndCenter):
3353
3354 2014-08-15  Dirk Schulze  <krit@webkit.org>
3355
3356         Turn r/rx/ry to presentation attributes
3357         https://bugs.webkit.org/show_bug.cgi?id=135978
3358
3359         Reviewed by Dean Jackson.
3360
3361         This follows the patch for width and height presentation attributes and
3362         turns rx, ry and r to presentation attributes as well:
3363
3364         ​http://trac.webkit.org/changeset/171341
3365
3366         Extended existing tests.
3367
3368         * css/CSSComputedStyleDeclaration.cpp:
3369         (WebCore::ComputedStyleExtractor::propertyValue):
3370         * css/CSSParser.cpp:
3371         (WebCore::isSimpleLengthPropertyID):
3372         * css/DeprecatedStyleBuilder.cpp:
3373         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
3374         * css/SVGCSSParser.cpp:
3375         (WebCore::CSSParser::parseSVGValue):
3376         * css/SVGCSSPropertyNames.in:
3377         * page/animation/CSSPropertyAnimation.cpp:
3378         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
3379         * rendering/style/RenderStyle.h:
3380         * rendering/style/SVGRenderStyle.h:
3381         (WebCore::SVGRenderStyle::setR):
3382         (WebCore::SVGRenderStyle::setRx):
3383         (WebCore::SVGRenderStyle::setRy):
3384         (WebCore::SVGRenderStyle::r):
3385         (WebCore::SVGRenderStyle::rx):
3386         (WebCore::SVGRenderStyle::ry):
3387         * rendering/style/SVGRenderStyleDefs.cpp:
3388         (WebCore::StyleLayoutData::StyleLayoutData):
3389         (WebCore::StyleLayoutData::operator==):
3390         * rendering/style/SVGRenderStyleDefs.h:
3391         * rendering/svg/RenderSVGEllipse.cpp:
3392         (WebCore::RenderSVGEllipse::calculateRadiiAndCenter):
3393         * rendering/svg/SVGPathData.cpp:
3394         (WebCore::updatePathFromCircleElement):
3395         (WebCore::updatePathFromEllipseElement):
3396         (WebCore::updatePathFromRectElement):
3397         (WebCore::updatePathFromLineElement): Deleted.
3398         * svg/SVGCircleElement.cpp:
3399         (WebCore::SVGCircleElement::svgAttributeChanged):
3400         * svg/SVGElement.cpp:
3401         (WebCore::populateAttributeNameToCSSPropertyIDMap):
3402         (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap):
3403         * svg/SVGEllipseElement.cpp:
3404         (WebCore::SVGEllipseElement::svgAttributeChanged):
3405         * svg/SVGRectElement.cpp:
3406         (WebCore::SVGRectElement::svgAttributeChanged):
3407
3408 2014-08-15  Dirk Schulze  <krit@webkit.org>
3409
3410         Turn cx/cy to presentation attributes
3411         https://bugs.webkit.org/show_bug.cgi?id=135975
3412
3413         Reviewed by Dean Jackson.
3414
3415         This follows the patch for width and height presentation attributes and
3416         turns x and y to presentation attributes as well:
3417
3418         ​http://trac.webkit.org/changeset/171341
3419
3420         Extended existing tests.
3421
3422         * css/CSSComputedStyleDeclaration.cpp:
3423         (WebCore::ComputedStyleExtractor::propertyValue):
3424         * css/CSSParser.cpp:
3425         (WebCore::isSimpleLengthPropertyID):
3426         * css/DeprecatedStyleBuilder.cpp:
3427         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
3428         * css/SVGCSSParser.cpp:
3429         (WebCore::CSSParser::parseSVGValue):
3430         * css/SVGCSSPropertyNames.in:
3431         * page/animation/CSSPropertyAnimation.cpp:
3432         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
3433         * rendering/style/RenderStyle.h:
3434         * rendering/style/SVGRenderStyle.h:
3435         (WebCore::SVGRenderStyle::setCx):
3436         (WebCore::SVGRenderStyle::setCy):
3437         (WebCore::SVGRenderStyle::cx):
3438         (WebCore::SVGRenderStyle::cy):
3439         * rendering/style/SVGRenderStyleDefs.cpp:
3440         (WebCore::StyleLayoutData::StyleLayoutData):
3441         (WebCore::StyleLayoutData::operator==):
3442         * rendering/style/SVGRenderStyleDefs.h:
3443         * rendering/svg/RenderSVGEllipse.cpp:
3444         (WebCore::RenderSVGEllipse::calculateRadiiAndCenter):
3445         * rendering/svg/SVGPathData.cpp:
3446         (WebCore::updatePathFromCircleElement):
3447         (WebCore::updatePathFromEllipseElement):
3448         * svg/SVGCircleElement.cpp:
3449         (WebCore::SVGCircleElement::svgAttributeChanged):
3450         (WebCore::SVGCircleElement::selfHasRelativeLengths): Deleted.
3451         * svg/SVGCircleElement.h:
3452         * svg/SVGElement.cpp:
3453         (WebCore::populateAttributeNameToCSSPropertyIDMap):
3454         (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap):
3455         * svg/SVGEllipseElement.cpp:
3456         (WebCore::SVGEllipseElement::svgAttributeChanged):
3457         (WebCore::SVGEllipseElement::selfHasRelativeLengths): Deleted.
3458         * svg/SVGEllipseElement.h:
3459
3460 2014-08-15  Adenilson Cavalcanti  <cavalcantii@gmail.com>
3461
3462         Fix typo in Path comment
3463         https://bugs.webkit.org/show_bug.cgi?id=135960
3464
3465         Reviewed by Alexey Proskuryakov.
3466
3467         No new tests, no change on behavior.
3468
3469         * platform/graphics/Path.h:
3470
3471 2014-08-14  Andreas Kling  <akling@apple.com>
3472
3473         Remove two unused Range functions.
3474         <https://webkit.org/b/135944>
3475
3476         Reviewed by Geoffrey Garen.
3477
3478         * dom/Range.cpp:
3479         (WebCore::Range::maxStartOffset): Deleted.
3480         (WebCore::Range::maxEndOffset): Deleted.
3481         * dom/Range.h:
3482
3483 2014-08-14  Daniel Bates  <dabates@apple.com>
3484
3485         Preserve editing style for -webkit-tap-highlight-color on all ports that enable ENABLE_TOUCH_EVENTS
3486         https://bugs.webkit.org/show_bug.cgi?id=135963
3487
3488         Reviewed by Andy Estes.
3489
3490         Currently we only preserve the CSS property -webkit-tap-highlight-color during editing operations
3491         for iOS. Instead we should preserve it for all ports that enable ENABLE_TOUCH_EVENTS as this CSS
3492         property isn't specific to iOS.
3493
3494         Also added FIXME comment with regards to the CSS property -webkit-composition-fill-color.
3495
3496         * editing/EditingStyle.cpp:
3497
3498 2014-08-14  Benjamin Poulain  <benjamin@webkit.org>
3499
3500         CSS JIT: compile the :empty pseudo class
3501         https://bugs.webkit.org/show_bug.cgi?id=135958
3502
3503         Reviewed by Andreas Kling.
3504
3505         Compile :empty, nothing fancy.
3506
3507         Tests: fast/selectors/empty-basics.html
3508                fast/selectors/empty-long-adjacent-backtracking.html
3509                fast/selectors/empty-adjacent-style-update.html
3510                fast/selectors/empty-style-update.html
3511
3512         * cssjit/SelectorCompiler.cpp:
3513         (WebCore::SelectorCompiler::addPseudoClassType):
3514         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
3515         (WebCore::SelectorCompiler::jumpIfElementIsNotEmpty):
3516         (WebCore::SelectorCompiler::setElementStyleIsAffectedByEmpty):
3517         (WebCore::SelectorCompiler::setElementStyleFromContextIsAffectedByEmptyAndUpdateRenderStyleIfNecessary):
3518         (WebCore::SelectorCompiler::setElementStyleIsAffectedByEmptyAndUpdateRenderStyleIfNecessary):
3519         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsEmpty):
3520         * dom/CharacterData.h:
3521         (WebCore::CharacterData::dataMemoryOffset):
3522         * dom/ContainerNode.h:
3523         (WebCore::ContainerNode::firstChildMemoryOffset):
3524         * dom/Node.h:
3525         (WebCore::Node::flagIsText):
3526
3527 2014-08-14  Wenson Hsieh  <wenson_hsieh@apple.com>
3528
3529         Implement scroll snapping animations on Mac
3530         https://bugs.webkit.org/show_bug.cgi?id=135768
3531
3532         Reviewed by Beth Dakin.
3533
3534         Implementing the scroll snap animations required for snapping in both overflow and mainframe areas on Mac.
3535         Since we receive a series of discrete wheel events, we need to predict the distance we need to traverse,
3536         compute the appropriate snap point, and then compute an animation curve to that location. The snap animations
3537         are split into two types: snapping, which handles letting go of the trackpad with zero velocity, and gliding,
3538         which handles flick gestures. In both cases, sinusoidal curves are used to ease animation to the target
3539         location. In the former case, the initial velocity is low, and increases to a maximum value during the middle
3540         of the animation before decreasing to 0. In the latter case, the curve is computed such that the initial
3541         velocity matches the user's scroll velocity, and the final velocity matches a lower final velocity that is
3542         somewhat arbitrarily computed. (See the FIXME in AxisScrollSnapOffsets::initializeGlideParameters). How the
3543         equations and constants were chosen is described in greater detail in the comments above
3544         AxisScrollSnapOffsets::computeGlideDelta and AxisScrollSnapOffsets::computeSnapDelta. Note that the final
3545         velocity should ideally be equal to 0. However, with this particular curve, this caused the animation to feel
3546         too slow near the snap point.
3547
3548         No tests, since there is no observable change in behavior. Tests will be included when iOS and Mac scrolling
3549         areas hook into this code.
3550
3551         * PlatformMac.cmake:
3552         * WebCore.xcodeproj/project.pbxproj: 
3553         * page/scrolling/AxisScrollSnapOffsets.cpp: 
3554         (WebCore::closestSnapOffset): Computes the closest snap offset given velocity and prdicted destination.
3555         * page/scrolling/AxisScrollSnapOffsets.h:
3556         * platform/mac/AxisScrollSnapAnimator.h: Added.
3557         (WebCore::AxisScrollSnapAnimatorClient::~AxisScrollSnapAnimatorClient):
3558         * platform/mac/AxisScrollSnapAnimator.mm: Added.
3559         (WebCore::toWheelEventStatus): Converts a pair of PlatformWheelEventPhases to a WheelEventStatus.
3560         (WebCore::projectedInertialScrollDistance): Attempts to predict the distance covered by the inertial scrolling phase.
3561         (WebCore::AxisScrollSnapAnimator::AxisScrollSnapAnimator):
3562         (WebCore::AxisScrollSnapAnimator::handleWheelEvent): Updates the internal state of the AxisScrollSnapAnimator, given a PlatformWheelEvent
3563         (WebCore::AxisScrollSnapAnimator::shouldOverrideWheelEvent): Determines whether or not we should override a wheel event given the animator's internal state.
3564         (WebCore::AxisScrollSnapAnimator::scrollSnapAnimationUpdate): Updates a single loop of the scroll snapping animation.
3565         (WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation):
3566         (WebCore::AxisScrollSnapAnimator::endScrollSnapAnimation):
3567         (WebCore::AxisScrollSnapAnimator::computeSnapDelta): See comments for more information.
3568         (WebCore::AxisScrollSnapAnimator::computeGlideDelta): See comments for more information.
3569         (WebCore::AxisScrollSnapAnimator::initializeGlideParameters):
3570         (WebCore::AxisScrollSnapAnimator::pushInitialWheelDelta):
3571         (WebCore::AxisScrollSnapAnimator::averageInitialWheelDelta):
3572         (WebCore::AxisScrollSnapAnimator::clearInitialWheelDeltaWindow):
3573
3574 2014-08-14  Saam Barati  <sbarati@apple.com>
3575
3576         Allow high fidelity type profiling to be enabled and disabled.
3577         https://bugs.webkit.org/show_bug.cgi?id=135423
3578
3579         Reviewed by Geoffrey Garen.
3580
3581         PageRuntimeAgent and WorkerRuntimeAgent now call their super 
3582         class's (InspectorRuntimeAgent) implementation of willDestroyFrontendAndBackend
3583         to give InspectorRuntimeAgent a chance to recompile all JavaScript
3584         functions, if necessary, for type profiling.
3585
3586         * inspector/PageRuntimeAgent.cpp:
3587         (WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend):
3588         * inspector/WorkerRuntimeAgent.cpp:
3589         (WebCore::WorkerRuntimeAgent::willDestroyFrontendAndBackend):
3590
3591 2014-08-14  Brent Fulgham  <bfulgham@apple.com>
3592
3593         [Win] Correct build when DerivedSources location not supplied by build environment
3594         https://bugs.webkit.org/show_bug.cgi?id=135954
3595         <rdar://problem/18023620>
3596
3597         Reviewed by Joseph Pecoraro.
3598
3599         The DerivedSourcesDirectory is not always defined, depending on what
3600         solution is being used to build this project. Instead, just define
3601         it directly, since we already know where it needs to go.
3602
3603         Also:
3604         1. Stop redirecting the copy output to NUL so I can see if this fails in the future.
3605         2. Make sure the target directory exists before copying to it.
3606
3607         * WebCore.vcxproj/copyForwardingHeaders.cmd: Properly specify
3608         the directories for copying the JS file.
3609
3610 2014-08-14  Zoltan Horvath  <zoltan@webkit.org>
3611
3612         [CSS3-Text] Cosmetics on RenderBlockFlow::textAlignmentForLine
3613         https://bugs.webkit.org/show_bug.cgi?id=135940
3614
3615         Reviewed by Darin Adler.
3616
3617         Processing the not CSS3_TEXT case first, and removing an extra whitespace after r172524.
3618
3619         * rendering/RenderBlockLineLayout.cpp:
3620         (WebCore::RenderBlockFlow::textAlignmentForLine):
3621
3622 2014-08-14  Martin Hock  <mhock@apple.com>
3623
3624         IndexedDB should respect SchemeRegistry's database access setting.
3625         https://bugs.webkit.org/show_bug.cgi?id=135890
3626         <rdar://problem/17989469>
3627
3628         Reviewed by Alexey Proskuryakov.
3629
3630         Test: storage/indexeddb/open-db-private-browsing.html
3631
3632         * Modules/indexeddb/IDBFactory.cpp:
3633
3634 2014-08-14  Yoav Weiss  <yoav@yoav.ws>
3635
3636         srcset with w descriptor doesn't behave as expected when sizes is not supported.
3637         https://bugs.webkit.org/show_bug.cgi?id=135935
3638
3639         Reviewed by Dean Jackson.
3640
3641         In current implementation, if sizes is not supported, when authors would write
3642         markup such as `<img src=fallback.jpg srcset="100px.jpg 100w, 400px.jpg 400w">`
3643         the first candidate in srcset would be picked, regardless of its dimensions 
3644         That is likely to be confusing for authors.
3645         Dropping these "not yet supported" candidates is likely to be less confusing,
3646         and will result in the "fallback.jpg" candidate being picked.
3647
3648         No new tests since this change only concerns builds that are built
3649         with the PICTURE_SIZES compile flag turned off.
3650
3651         * html/parser/HTMLSrcsetParser.cpp:
3652         (WebCore::parseDescriptors):
3653         Drop candidates that include either 'w' or 'h' descriptors when the
3654         sizes feature is not supported.
3655
3656 2014-08-14  Antti Koivisto  <antti@apple.com>
3657
3658         Make inherited style and parent renderer references
3659         https://bugs.webkit.org/show_bug.cgi?id=135857
3660
3661         Reviewed by Andreas Kling.
3662
3663         We don't recurse into non-rendered subtrees anymore so they can't be null.
3664         Also stop using Element::renderStyle() as it differs from e->renderer().style() in
3665         some rare cases (that should be fixed).
3666
3667         * style/StyleResolveTree.cpp:
3668         (WebCore::Style::RenderTreePosition::parent):
3669         (WebCore::Style::RenderTreePosition::RenderTreePosition):
3670         (WebCore::Style::RenderTreePosition::canInsert):
3671         (WebCore::Style::RenderTreePosition::insert):
3672         (WebCore::Style::RenderTreePosition::computeNextSibling):
3673         (WebCore::Style::shouldCreateRenderer):
3674         (WebCore::Style::styleForElement):
3675         (WebCore::Style::createRendererIfNeeded):
3676         (WebCore::Style::textRendererIsNeeded):
3677         (WebCore::Style::createTextRendererIfNeeded):
3678         (WebCore::Style::updateTextRendererAfterContentChange):
3679         (WebCore::Style::attachChildren):
3680         (WebCore::Style::attachDistributedChildren):
3681         (WebCore::Style::attachShadowRoot):
3682         (WebCore::Style::resetStyleForNonRenderedDescendants):
3683         (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded):
3684         (WebCore::Style::attachRenderTree):
3685         (WebCore::Style::resolveLocal):
3686         (WebCore::Style::resolveShadowTree):
3687         (WebCore::Style::updateBeforeOrAfterPseudoElement):
3688         (WebCore::Style::resolveTree):
3689
3690 2014-08-14  Antti Koivisto  <antti@apple.com>
3691
3692         [Forms] We should share RenderStyle object for optgroup and option element
3693         https://bugs.webkit.org/show_bug.cgi?id=88405
3694
3695         Reviewed by Andreas Kling.
3696
3697         We can remove this special case now.
3698
3699         * css/StyleResolver.cpp:
3700         (WebCore::StyleResolver::canShareStyleWithElement):
3701
3702 2014-08-14  Antti Koivisto  <antti@apple.com>
3703
3704         Remove nonRendererStyle
3705         https://bugs.webkit.org/show_bug.cgi?id=135938
3706
3707         Reviewed by Andreas Kling.
3708
3709         It is used to support styling of non-renderer option elements. We have a better
3710         mechanism for this, Element::computedStyle().
3711
3712         * dom/Element.cpp:
3713         (WebCore::Element::resetComputedStyle):
3714         (WebCore::Element::willResetComputedStyle):
3715         
3716             Add a virtual callback for computed style reset.
3717
3718         * dom/Element.h:
3719         * dom/Node.h:
3720         (WebCore::Node::nonRendererStyle): Deleted.
3721         * dom/NodeRenderStyle.h:
3722         (WebCore::Node::renderStyle):
3723         
3724             renderStyle() now always matches renderer()->style()
3725
3726         * html/HTMLOptGroupElement.cpp:
3727         (WebCore::HTMLOptGroupElement::HTMLOptGroupElement):
3728         (WebCore::HTMLOptGroupElement::isFocusable):
3729         (WebCore::HTMLOptGroupElement::didAttachRenderers): Deleted.
3730         (WebCore::HTMLOptGroupElement::willDetachRenderers): Deleted.
3731         (WebCore::HTMLOptGroupElement::updateNonRenderStyle): Deleted.
3732         (WebCore::HTMLOptGroupElement::nonRendererStyle): Deleted.
3733         (WebCore::HTMLOptGroupElement::customStyleForRenderer): Deleted.
3734         * html/HTMLOptGroupElement.h:
3735         * html/HTMLOptionElement.cpp:
3736         (WebCore::HTMLOptionElement::isFocusable):
3737         
3738             Use computedStyle.
3739
3740         (WebCore::HTMLOptionElement::willResetComputedStyle):
3741         (WebCore::HTMLOptionElement::didAttachRenderers): Deleted.
3742         (WebCore::HTMLOptionElement::willDetachRenderers): Deleted.
3743         (WebCore::HTMLOptionElement::updateNonRenderStyle): Deleted.
3744         (WebCore::HTMLOptionElement::nonRendererStyle): Deleted.
3745         (WebCore::HTMLOptionElement::customStyleForRenderer): Deleted.
3746         (WebCore::HTMLOptionElement::didRecalcStyle): Deleted.
3747         * html/HTMLOptionElement.h:
3748         * rendering/RenderMenuList.cpp:
3749         (RenderMenuList::updateOptionsWidth):
3750         (RenderMenuList::setTextFromOption):
3751         
3752             Use computedStyle.
3753
3754 2014-08-14  Jer Noble  <jer.noble@apple.com>
3755
3756         [MSE] Altering the quality of a YouTube video will cause the video to distort and display an error message
3757         https://bugs.webkit.org/show_bug.cgi?id=135931
3758
3759         Reviewed by Eric Carlson.
3760
3761         When removing samples from the TrackBuffer's sample map, also remove those samples from the
3762         TrackBuffer's decode queue. Otherwise, removed samples may persist in the decode queue and
3763         either break sync-sample dependencies or cause decoding artifacts.
3764
3765         Pull the code which removes samples from a track buffer into its own utility function, and
3766         use this function both from removeCodedFrames(), and also when samples are removed due to
3767         overlapping appends in sourceBufferPrivateDidReceiveSample(). In order to reference
3768         TrackBuffers outside of SourceBuffer (and in the static removeSamplesFromTrackBuffer()
3769         function), make TrackBuffer a public forward declaration.
3770
3771         * Modules/mediasource/SourceBuffer.cpp:
3772         (WebCore::removeSamplesFromTrackBuffer):
3773         (WebCore::SourceBuffer::removeCodedFrames):
3774         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
3775         * Modules/mediasource/SourceBuffer.h:
3776
3777 2014-08-14  Zan Dobersek  <zdobersek@igalia.com>
3778
3779         ImageBufferDataCairo.h is missing header guards
3780         https://bugs.webkit.org/show_bug.cgi?id=135933
3781
3782         Reviewed by Philippe Normand.
3783
3784         * platform/graphics/cairo/ImageBufferDataCairo.h:
3785         Add the missing head guards to avoid problems when re-inclusion occurs.
3786
3787 2014-08-13  Wenson Hsieh  <wenson_hsieh@apple.com>
3788
3789         Enable CSS_SCROLL_SNAP for iOS
3790         https://bugs.webkit.org/show_bug.cgi?id=135915
3791
3792         Turn on CSS_SCROLL_SNAP for iOS and the iOS simulator.
3793
3794         Reviewed by Tim Horton.
3795
3796         * Configurations/FeatureDefines.xcconfig:
3797
3798 2014-08-13  Wenson Hsieh  <wenson_hsieh@apple.com>
3799
3800         Compute and store snap point positions
3801         https://bugs.webkit.org/show_bug.cgi?id=135268
3802
3803         Reviewed by Simon Fraser.
3804
3805         Working towards implementing a way to extract snap positions (i.e. LayoutUnits) from the parsed snap point properties from CSS,
3806         as well as a way of storing the information. Supports both mainframe and overflow scrolling.
3807
3808         No changes in behavior. I will write tests when I implement snapping for iOS and Mac.
3809         
3810         * WebCore.xcodeproj/project.pbxproj:
3811         * page/FrameView.cpp:
3812         (WebCore::FrameView::updateSnapOffsets): Invokes the static routine in AxisScrollSnapOffsets to update snap offsets for mainframe.
3813         * page/FrameView.h:
3814         * page/scrolling/AxisScrollSnapOffsets.cpp: Added.
3815         (WebCore::appendAndSortChildSnapOffsets):
3816         (WebCore::updateFromStyle):
3817         (WebCore::updateSnapOffsetsForScrollableArea): Update the ScrollableArea's snap axes.
3818         * page/scrolling/AxisScrollSnapOffsets.h: Added.
3819         * platform/ScrollableArea.cpp:
3820         (WebCore::ScrollableArea::setHorizontalSnapOffsets):
3821         (WebCore::ScrollableArea::setVerticalSnapOffsets):
3822         (WebCore::ScrollableArea::clearHorizontalSnapOffsets): Resets the unique_ptr for horizontal snap points.
3823         (WebCore::ScrollableArea::clearVerticalSnapOffsets): Resets the unique_ptr for vertical snap points.
3824         * platform/ScrollableArea.h:
3825         (WebCore::ScrollableArea::horizontalSnapOffsets): Returns a pointer to the ScrollableArea's horizontal snap points.
3826         (WebCore::ScrollableArea::verticalSnapOffsets): Returns a pointer to the ScrollableArea's vertical snap points.
3827         (WebCore::ScrollableArea::updateSnapOffsets):
3828         * rendering/RenderLayer.cpp:
3829         (WebCore::RenderLayer::updateSnapOffsets): Invokes the static routine in AxisScrollSnapOffsets to update snap offsets for an overflow area.
3830         * rendering/RenderLayer.h:
3831
3832 2014-08-13  Mark Rowe  <mrowe@apple.com>
3833
3834         <https://webkit.org/b/135911> WebKit should build on Yosemite with the public SDK.
3835
3836         Reviewed by Darin Adler.
3837
3838         * rendering/RenderThemeMac.mm: Fix the forward-declaration of NSServicesRolloverButtonCell.
3839
3840 2014-08-13  Alex Christensen  <achristensen@webkit.org>
3841
3842         Progress towards CMake on Mac.
3843         https://bugs.webkit.org/show_bug.cgi?id=135819
3844
3845         Reviewed by Laszlo Gombos.
3846
3847         * CMakeLists.txt:
3848         Include derived sources directory, which is needed by Apple ports.
3849         Separated svg and non-svg idls for ObjC bindings.
3850         Don't build the new gamepad API right now.  It's causing naming conflicts and it's not done.
3851         Process CSSUnknownRule.idl.
3852         * PlatformGTK.cmake:
3853         Added cpp as the extension of the generated bindings.
3854         * PlatformMac.cmake:
3855         Include more directories and sources.
3856         Add forwarding headers.
3857         Generate ObjC bindings.
3858         * bindings/objc/DOMUIKitExtensions.mm:
3859         Moved config.h to recognize the PLATFORM macro.
3860         * bindings/scripts/CodeGeneratorObjC.pm:
3861         (ReadPublicInterfaces):
3862         (GenerateInterface):
3863         Added some workarounds for CMake.
3864         * bindings/scripts/IDLAttributes.txt:
3865         Added missing attribute names.
3866         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3867         Added PLATFORM(IOS) to protect IOS_AIRPLAY code.
3868         * platform/mac/PasteboardMac.mm:
3869         Added necessary DRAG_SUPPORT protection.
3870         * platform/text/mac/TextCodecMac.cpp:
3871         Moved config.h to recognize the PLATFORM macro.        
3872
3873 2014-08-13  Jer Noble  <jer.noble@apple.com>
3874
3875         [MSE] Replacing existing samples with overlapping new samples will cause playback to stutter.
3876         https://bugs.webkit.org/show_bug.cgi?id=135902
3877
3878         Reviewed by Eric Carlson.
3879
3880         Only mark the TrackBuffer as needing re-enqueueing if the samples removed by overlapping samples
3881         themselves overlap with potentially enqueued but not yet displayed frames.
3882
3883         * Modules/mediasource/SourceBuffer.cpp:
3884         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
3885
3886 2014-08-13  Andreas Kling  <akling@apple.com>
3887
3888         CSSValueList should never contain null values.
3889         <https://webkit.org/b/135887>
3890
3891         It's not legal for a CSSValueList to contain null CSSValues, so make
3892         it store a Vector of Ref<CSSValue> internally instead.
3893
3894         This allows the compiler to avoid emitting a number of null checks.
3895         It will also allow a future patch to make CSSValueList vend CSSValue&
3896         instead of CSSValue*.
3897
3898         Most of the patch is fixing up things on their way into a CSSValueList
3899         to not be null at the call site, now that append() and prepend() are
3900         taking PassRef instead of PassRefPtr.
3901
3902         Reviewed by Sam Weinig.
3903
3904         * css/BasicShapeFunctions.cpp:
3905         (WebCore::valueForBasicShape):
3906         * css/BasicShapeFunctions.h:
3907         * css/CSSBorderImage.cpp:
3908         (WebCore::createBorderImageValue):
3909         * css/CSSBorderImage.h:
3910         * css/CSSComputedStyleDeclaration.cpp:
3911         (WebCore::valueForImageSliceSide):
3912         (WebCore::valueForNinePieceImageSlice):
3913         (WebCore::valueForNinePieceImageQuad):
3914         (WebCore::valueForNinePieceImage):
3915         (WebCore::getBorderRadiusShorthandValue):
3916         (WebCore::ComputedStyleExtractor::valueForShadow):
3917         (WebCore::ComputedStyleExtractor::valueForFilter):
3918         (WebCore::specifiedValueForGridTrackSize):
3919         (WebCore::addValuesForNamedGridLinesAtIndex):
3920         (WebCore::scrollSnapCoordinates):
3921         (WebCore::createTimingFunctionValue):
3922         (WebCore::fillSourceTypeToCSSValue):
3923         (WebCore::contentToCSSValue):
3924         (WebCore::shapePropertyValue):
3925         (WebCore::ComputedStyleExtractor::propertyValue):
3926         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties):
3927         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForSidesShorthand):
3928         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand):
3929         (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
3930         * css/CSSComputedStyleDeclaration.h:
3931         * css/CSSFontSelector.cpp:
3932         (WebCore::CSSFontSelector::addFontFaceRule):
3933         * css/CSSParser.cpp:
3934         (WebCore::createPrimitiveValuePair):
3935         (WebCore::parseTranslateTransformValue):
3936         (WebCore::CSSParser::createPrimitiveNumericValue):
3937         (WebCore::CSSParser::createPrimitiveStringValue):
3938         (WebCore::CSSParser::addFillValue):
3939         (WebCore::CSSParser::parseNonElementSnapPoints):
3940         (WebCore::CSSParser::parseScrollSnapDestination):
3941         (WebCore::CSSParser::parseFillShorthand):
3942         (WebCore::CSSParser::addAnimationValue):
3943         (WebCore::CSSParser::parseAnimationShorthand):
3944         (WebCore::CSSParser::parseTransitionShorthand):
3945         (WebCore::CSSParser::parseQuotes):
3946         (WebCore::CSSParser::parseContent):
3947         (WebCore::CSSParser::parseFillProperty):
3948         (WebCore::CSSParser::parseAnimationProperty):
3949         (WebCore::CSSParser::parseGridPosition):
3950         (WebCore::CSSParser::parseGridTemplateRowsAndAreas):
3951         (WebCore::CSSParser::parseGridLineNames):
3952         (WebCore::CSSParser::parseGridTrackList):
3953         (WebCore::CSSParser::parseGridTrackRepeatFunction):
3954         (WebCore::CSSParser::parseGridTrackSize):
3955         (WebCore::CSSParser::parseBasicShapeAndOrBox):
3956         (WebCore::CSSParser::parseFontVariant):
3957         (WebCore::CSSParser::parseTransform):
3958         (WebCore::CSSParser::parseBuiltinFilterArguments):
3959         (WebCore::CSSParser::parseFilter):
3960         (WebCore::CSSParser::parseTextEmphasisStyle):
3961         * css/CSSParser.h:
3962         * css/CSSProperty.cpp:
3963         (WebCore::CSSProperty::wrapValueInCommaSeparatedList):
3964         * css/CSSValueList.cpp:
3965         (WebCore::CSSValueList::CSSValueList):
3966         (WebCore::CSSValueList::removeAll):
3967         (WebCore::CSSValueList::hasValue):
3968         (WebCore::CSSValueList::copy):
3969         (WebCore::CSSValueList::customCSSText):
3970         (WebCore::CSSValueList::equals):
3971         (WebCore::CSSValueList::addSubresourceStyleURLs):
3972         (WebCore::CSSValueList::hasFailedOrCanceledSubresources):
3973         * css/CSSValueList.h:
3974         (WebCore::CSSValueList::item):
3975         (WebCore::CSSValueList::itemWithoutBoundsCheck):
3976         (WebCore::CSSValueList::append):
3977         (WebCore::CSSValueList::prepend):
3978         * css/SVGCSSComputedStyleDeclaration.cpp:
3979         (WebCore::paintOrder):
3980         * css/SVGCSSParser.cpp:
3981         (WebCore::CSSParser::parsePaintOrder):
3982         * edit