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