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