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