DOM::renderedImageForcingBlackText returns an image with the wrong logical size on...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-07-31  Tim Horton  <timothy_horton@apple.com>
2
3         DOM::renderedImageForcingBlackText returns an image with the wrong logical size on 2x displays
4         https://bugs.webkit.org/show_bug.cgi?id=135442
5         <rdar://problem/17614632>
6
7         Reviewed by Simon Fraser.
8
9         * bindings/objc/DOM.mm:
10         (-[DOMRange renderedImageForcingBlackText:renderedImageForcingBlackText:]):
11         Scale the NSImage size by the device scale factor,
12         similar to what we did for drag images in r167403.
13         Ideally this scaling would happen in the code that
14         generates the images, but this is a much larger change
15         with much more regression potential.
16
17 2014-07-31  Bear Travis  <betravis@adobe.com>
18
19         [CSS Font Loading] Rename document.fontloader to document.fonts
20         https://bugs.webkit.org/show_bug.cgi?id=135393
21
22         Reviewed by Bem Jones-Bey.
23
24         The most recent version of the specification has renamed
25         document.fontloader to document.fonts. This change updates the
26         names in WebCore and LayoutTests.
27
28         Fixed up existing tests under LayoutTests/fast/css/fontloader-*
29         and LayoutTests/http/webfont/fontloader-*
30
31         * css/CSSFontFace.cpp:
32         (WebCore::CSSFontFace::notifyFontLoader):
33         (WebCore::CSSFontFace::notifyLoadingDone):
34         * dom/Document.cpp:
35         (WebCore::Document::fonts):
36         (WebCore::Document::fontloader): Deleted.
37         * dom/Document.h:
38         * dom/Document.idl:
39         * page/FrameView.cpp:
40         (WebCore::FrameView::performPostLayoutTasks):
41
42 2014-07-31  Andrei Bucur  <abucur@adobe.com>
43
44         REGRESSION: Search highlight is broken in RTL multicolumn content
45         https://bugs.webkit.org/show_bug.cgi?id=135452
46
47         Reviewed by Simon Fraser.
48
49         The offsets for elements inside RTL multi-column elements are incorrectly computed because
50         the columns don't calculate their left position according to the writing direction.
51
52         The patch extracts the column position computation in two helper functions (for top and left)
53         so they can be used when needed in different parts of the code. In our case, the |columnLogicalLeft|
54         function should be used inside |columnTranslationForOffset|.
55
56         Test: fast/multicol/content-bounding-box-rtl.html
57
58         * rendering/RenderMultiColumnSet.cpp:
59         (WebCore::RenderMultiColumnSet::columnLogicalLeft): Return the logical left of a column relative to the set.
60         (WebCore::RenderMultiColumnSet::columnLogicalTop): Return the logical top of a column relative to the set.
61         (WebCore::RenderMultiColumnSet::columnRectAt): Split the code between columnLogicalLeft and columnLogicalTop.
62         (WebCore::RenderMultiColumnSet::collectLayerFragments): Make code clearer by adding a new line.
63         (WebCore::RenderMultiColumnSet::columnTranslationForOffset): Use columnLogicalLeft instead of duplicating logic.
64         * rendering/RenderMultiColumnSet.h:
65
66 2014-07-31  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
67
68         Eliminate "FractionConversion" from CSSPrimitiveValue::convertToLength
69         https://bugs.webkit.org/show_bug.cgi?id=135377
70
71         Reviewed by Darin Adler.
72
73         The FractionConversion argument in CSSPrimitiveValue::convertToLength
74         doesn't seem to actually have a purpose. It is for converting numbers
75         into Length(x * 100, Percent), but this case shouldn't be reachable.
76         The original patch introducing it doesn't shed any light either:
77         [https://bugs.webkit.org/show_bug.cgi?id=74913
78
79         This patch removes the now unused FractionConversion argument. Note
80         that we can probably also merge the two Fixed conversions, as the
81         two only differ in clamping large numbers (probably unintended).
82
83         Patch by Timothy Loh, backported from Blink: https://codereview.chromium.org/71253002
84
85         No new tests.
86
87         * css/CSSCalculationValue.cpp:
88         (WebCore::determineCategory):
89         * css/CSSParser.cpp:
90         (WebCore::parseTransformTranslateArguments):
91         (WebCore::parseTranslateTransformValue):
92         (WebCore::parseTransformArguments): Deleted.
93         * css/CSSPrimitiveValueMappings.h:
94         (WebCore::CSSPrimitiveValue::convertToLength):
95         * css/DeprecatedStyleBuilder.cpp:
96         (WebCore::ApplyPropertyClip::convertToLength):
97         * css/StyleResolver.cpp:
98         (WebCore::StyleResolver::convertToIntLength):
99         (WebCore::StyleResolver::convertToFloatLength):
100         * css/TransformFunctions.cpp:
101         (WebCore::convertToFloatLength):
102
103 2014-07-31  Joseph Pecoraro  <pecoraro@apple.com>
104
105         Web Inspector: console.profile missing profile information
106         https://bugs.webkit.org/show_bug.cgi?id=135432
107
108         Reviewed by Timothy Hatcher.
109
110         By switching console.profile to start/stop the timeline we would
111         not have a chance to recompile JS functions with profiling information.
112         This used to work because whenever the inspector was open we would
113         have profiling information enabled. Go back to that behavior.
114
115         * inspector/InspectorController.cpp:
116         (WebCore::InspectorController::profilerEnabled):
117         Instead of checking if the timeline agent has started, check if the
118         timeline agent has been created. Going back to the normal behavior
119         of always having profiling information when the inspector is open.
120
121         * inspector/InspectorTimelineAgent.h:
122         * inspector/InspectorTimelineAgent.cpp:
123         (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
124         Recompile initializing the timeline agent to include profiling information.
125
126         (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
127         Recompile destrying the timeline agent, only if needed.
128
129         (WebCore::InspectorTimelineAgent::willCallFunction):
130         (WebCore::InspectorTimelineAgent::didCallFunction):
131         (WebCore::InspectorTimelineAgent::willEvaluateScript):
132         (WebCore::InspectorTimelineAgent::didEvaluateScript):
133         Using a boolean to track nested calls would not give expected
134         behavior when un-nesting. Switch to a counter to ensure that
135         as we start profiling in the outermost level we then stop
136         profiling at that same level and not inside an inner nesting.
137
138 2014-07-31  Wenson Hsieh  <wenson_hsieh@apple.com>
139
140         Refactor EventHandler to call ScrollAnimator::handleWheelEvent for overflow scrolling
141         https://bugs.webkit.org/show_bug.cgi?id=135195
142
143         Reviewed by Beth Dakin.
144
145         ScrollableArea::handleWheelEvent is not currently being used to handle wheel events for overflow scrolling; it instead directly invokes ScrollableArea::scroll.
146         In order to expose wheel phases on Mac, the PlatformWheelEvent itself should propagate down to ScrollableArea, not just the scroll granularity, direction and
147         multiplier required by ScrollableArea::scroll. With this patch, PlatformWheelEvent will be "shipped" along with the WheelEvent.
148
149         No new tests, since behavior should not have changed.
150
151         * page/EventHandler.cpp:
152         (WebCore::didScrollInScrollableAreaForSingleAxis): Calls ScrollableArea::scroll directly using WheelEvent's data. Used to handle programmatic WheelEvents, e.g. from JavaScript.
153         (WebCore::handleWheelEventInAppropriateEnclosingBoxForSingleAxis): Finds the correct ScrollableArea and attempts to scroll it using the information contained in the WheelEvent via ScrollableArea::handleWheelEvent
154         (WebCore::EventHandler::defaultWheelEventHandler): Updated to use handleWheelEventInAppropriateEnclosingBoxForSingleAxis instead of scrollNode.
155         (WebCore::scrollNode): Deleted.
156         * rendering/RenderListBox.h: Made RenderListBox::scroll public so it can be invoked from EventHandler::handleWheelEventInAppropriateEnclosingBoxForSingleAxis.
157         * rendering/RenderNamedFlowThread.cpp: Refactored to let EventHandler update nextScrollBlock in the case of isRenderNamedFlowThread().
158         (WebCore::RenderNamedFlowThread::fragmentFromRenderBoxAsRenderBlock): 
159         * rendering/RenderNamedFlowThread.h:
160
161 2014-07-31  Dan Bernstein  <mitz@apple.com>
162
163         WebCore part of: Server trust authentication challenges aren’t sent to the navigation delegate
164         https://bugs.webkit.org/show_bug.cgi?id=135327
165
166         Reviewed by Alexey Proskuryakov.
167
168         * platform/network/cf/ResourceHandleCFNet.cpp:
169         (WebCore::ResourceHandle::receivedCredential): Don’t try to change the persistence of
170         credentials used for server trust, because the platform doesn’t support persistence values
171         other than Session for server trust.
172         * platform/network/mac/ResourceHandleMac.mm:
173         (WebCore::ResourceHandle::receivedCredential): Ditto.
174
175 2014-07-31  Dan Bernstein  <mitz@apple.com>
176
177         Tried to fix building with the OS X 10.9 SDK while targeting OS X 10.8.
178
179         * platform/network/cocoa/CredentialCocoa.mm:
180         (WebCore::toCredentialPersistence):
181
182 2014-07-31  Dan Bernstein  <mitz@apple.com>
183
184         Reverted r171854, because it broke building with the OS X 10.8 SDK.
185
186         * platform/network/cocoa/CredentialCocoa.mm:
187         (WebCore::toCredentialPersistence):
188
189 2014-07-31  Dan Bernstein  <mitz@apple.com>
190
191         Tried to fix building with the OS X 10.9 SDK while targeting OS X 10.8.
192
193         * platform/network/cocoa/CredentialCocoa.mm:
194         (WebCore::toCredentialPersistence):
195
196 2014-07-31  Jer Noble  <jer.noble@apple.com>
197
198         REGRESSION(??): [iOS] Disabling MediaPlaybackRequiresUserGesture does not remove user gesture requirement for entering full screen.
199         https://bugs.webkit.org/show_bug.cgi?id=135443
200
201         Reviewed by Dean Jackson.
202
203         Allow full screen mode to be entered without a user gesture if the gesture requirement for media playback
204         has been unset.
205
206         * html/HTMLMediaElement.cpp:
207         (WebCore::HTMLMediaElement::HTMLMediaElement):
208
209 2014-07-31  Andrei Bucur  <abucur@adobe.com>
210
211         [CSS Multicolumn] Clear the lines when switching to multi-column layout
212         https://bugs.webkit.org/show_bug.cgi?id=135127
213
214         Reviewed by Alexandru Chiculita.
215
216         When switching an element to multi-column layout it becomes a container of block
217         children. When this happens the existing line boxes must be deleted in addition
218         to clearing the hasInlineChildren flag.
219
220         Tests: fast/multicol/inline-container-to-multicol.html
221                fast/multicol/inline-container-to-multicol-float.html
222                fast/multicol/inline-container-to-multicol-positioned.html
223
224         * rendering/RenderBlockFlow.cpp:
225         (WebCore::RenderBlockFlow::createMultiColumnFlowThread):
226
227 2014-07-30  Andreas Kling  <akling@apple.com>
228
229         PropertyName's internal string is always atomic.
230         <https://webkit.org/b/135451>
231
232         Use PropertyName::publicName() directly instead of taking the slow route
233         through AtomicString::findStringWithHash().
234
235         These strings are always atomic, and findStringWithHash() would trudge
236         through a full hash lookup just to discover that indeed, they are!
237
238         Reviewed by Benjamin Poulain.
239
240         * bindings/js/JSDOMBinding.cpp:
241         (WebCore::findAtomicString): Deleted.
242         * bindings/js/JSDOMBinding.h:
243         * bindings/js/JSDOMWindowCustom.cpp:
244         (WebCore::namedItemGetter):
245         (WebCore::JSDOMWindow::getOwnPropertySlot):
246         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
247         * bindings/js/JSHTMLDocumentCustom.cpp:
248         (WebCore::JSHTMLDocument::canGetItemsForName):
249         (WebCore::JSHTMLDocument::nameGetter):
250
251 2014-07-30  Benjamin Poulain  <benjamin@webkit.org>
252
253         ElementRuleCollector: group the shadow tree code
254         https://bugs.webkit.org/show_bug.cgi?id=135410
255
256         Reviewed by Andreas Kling.
257
258         * css/ElementRuleCollector.cpp:
259         (WebCore::ElementRuleCollector::collectMatchingRules):
260         Little cleanup: group the shadow tree rule collection in the same block.
261
262 2014-07-30  Benjamin Poulain  <benjamin@webkit.org>
263
264         Cleanup DetailsMarkerControl
265         https://bugs.webkit.org/show_bug.cgi?id=135429
266
267         Reviewed by Andreas Kling.
268
269         Remove the override of shadowPseudoId(). This is a simple type of shadowId,
270         it should use the generic pseudo() path.
271
272         Move DetailsMarkerControl::create() out-of-line. One could justify inlining the constructor,
273         inlining the ::create() function has little value.
274
275         * html/shadow/DetailsMarkerControl.cpp:
276         (WebCore::DetailsMarkerControl::create):
277         (WebCore::DetailsMarkerControl::DetailsMarkerControl):
278         (WebCore::DetailsMarkerControl::rendererIsNeeded):
279         (WebCore::DetailsMarkerControl::shadowPseudoId): Deleted.
280         (WebCore::DetailsMarkerControl::summaryElement): Deleted.
281         * html/shadow/DetailsMarkerControl.h:
282         (WebCore::DetailsMarkerControl::create): Deleted.
283
284 2014-07-30  Benjamin Poulain  <bpoulain@apple.com>
285
286         Remove UploadButtonElement::shadowPseudoId()
287         https://bugs.webkit.org/show_bug.cgi?id=135435
288
289         Reviewed by Andreas Kling.
290
291         Use the generic pseudo() path instead of a custom shadowPseudoId().
292
293         * html/FileInputType.cpp:
294         (WebCore::UploadButtonElement::create):
295         (WebCore::UploadButtonElement::createForMultiple):
296         (WebCore::UploadButtonElement::UploadButtonElement):
297         Set the type in the common constructor instead of the call sites.
298         (WebCore::UploadButtonElement::shadowPseudoId): Deleted.
299         * html/FileInputType.h:
300
301 2014-07-30  Benjamin Poulain  <bpoulain@apple.com>
302
303         Remove SpinButtonElement::shadowPseudoId
304         https://bugs.webkit.org/show_bug.cgi?id=135436
305
306         Reviewed by Andreas Kling.
307
308         Use the generic pseudo.
309
310         * html/shadow/SpinButtonElement.cpp:
311         (WebCore::SpinButtonElement::SpinButtonElement):
312         (WebCore::SpinButtonElement::shadowPseudoId): Deleted.
313         * html/shadow/SpinButtonElement.h:
314
315 2014-07-30  Benjamin Poulain  <bpoulain@apple.com>
316
317         Clean up YouTubeEmbedShadowElement
318         https://bugs.webkit.org/show_bug.cgi?id=135437
319
320         Reviewed by Andreas Kling.
321
322         * html/shadow/YouTubeEmbedShadowElement.cpp:
323         (WebCore::YouTubeEmbedShadowElement::YouTubeEmbedShadowElement):
324         (WebCore::YouTubeEmbedShadowElement::pluginElement): Deleted.
325         This is unused in WebCore.
326
327         (WebCore::YouTubeEmbedShadowElement::shadowPseudoId): Deleted.
328         Use the generic pseudo path instead of a custom shadowPseudoId.
329         * html/shadow/YouTubeEmbedShadowElement.h:
330
331 2014-07-30  Benjamin Poulain  <bpoulain@apple.com>
332
333         Remove shadowPseudoId() from InputFieldSpeechButtonElement and SearchFieldCancelButtonElement
334         https://bugs.webkit.org/show_bug.cgi?id=135438
335
336         Reviewed by Andreas Kling.
337
338         Use the generic path.
339
340         * html/shadow/TextControlInnerElements.cpp:
341         (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
342         (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
343         (WebCore::SearchFieldCancelButtonElement::shadowPseudoId): Deleted.
344         (WebCore::InputFieldSpeechButtonElement::shadowPseudoId): Deleted.
345         * html/shadow/TextControlInnerElements.h:
346
347 2014-07-30  Andy Estes  <aestes@apple.com>
348
349         USE(CONTENT_FILTERING) should be ENABLE(CONTENT_FILTERING)
350         https://bugs.webkit.org/show_bug.cgi?id=135439
351
352         Reviewed by Tim Horton.
353
354         We now support two different platform content filters, and will soon support a mock content filter (as part of
355         webkit.org/b/128858). This makes content filtering a feature of WebKit, not just an adoption of a third-party
356         library. ENABLE() is the correct macro to use for such a feature.
357
358         * Configurations/FeatureDefines.xcconfig:
359         * WebCore.exp.in:
360         * loader/DocumentLoader.cpp:
361         (WebCore::DocumentLoader::finishedLoading):
362         (WebCore::DocumentLoader::responseReceived):
363         (WebCore::DocumentLoader::commitData):
364         (WebCore::DocumentLoader::dataReceived):
365         * loader/DocumentLoader.h:
366         * loader/FrameLoaderClient.h:
367         * platform/ContentFilter.h:
368         * platform/ios/ContentFilterIOS.mm:
369         * platform/mac/ContentFilterMac.mm:
370
371 2014-07-30  Andreas Kling  <akling@apple.com>
372
373         Static hash tables no longer need to be coupled with a VM.
374         <https://webkit.org/b/135421>
375
376         Update for JSC::ClassInfo changes.
377         
378         Remove the JSNoStaticTables mode for IDL code generation, which was used to
379         ensure that each VM had its own unique copy of certain static tables.
380         This was used for interfaces that could be used in workers, and now there's
381         no need to manually annotate these things anymore.
382
383         Also remove the DOMObjectHashTableMap class that was only used for this.
384
385         Reviewed by Geoffrey Garen.
386
387         * Modules/indexeddb/IDBAny.idl:
388         * Modules/indexeddb/IDBCursor.idl:
389         * Modules/indexeddb/IDBCursorWithValue.idl:
390         * Modules/indexeddb/IDBDatabase.idl:
391         * Modules/indexeddb/IDBFactory.idl:
392         * Modules/indexeddb/IDBIndex.idl:
393         * Modules/indexeddb/IDBKeyRange.idl:
394         * Modules/indexeddb/IDBObjectStore.idl:
395         * Modules/indexeddb/IDBOpenDBRequest.idl:
396         * Modules/indexeddb/IDBRequest.idl:
397         * Modules/indexeddb/IDBTransaction.idl:
398         * Modules/indexeddb/IDBVersionChangeEvent.idl:
399         * Modules/webdatabase/Database.idl:
400         * Modules/webdatabase/DatabaseSync.idl:
401         * Modules/webdatabase/SQLError.idl:
402         * Modules/webdatabase/SQLException.idl:
403         * Modules/webdatabase/SQLResultSet.idl:
404         * Modules/webdatabase/SQLResultSetRowList.idl:
405         * Modules/webdatabase/SQLTransaction.idl:
406         * Modules/webdatabase/SQLTransactionSync.idl:
407         * Modules/websockets/CloseEvent.idl:
408         * Modules/websockets/WebSocket.idl:
409         * WebCore.xcodeproj/project.pbxproj:
410         * bindings/js/DOMObjectHashTableMap.cpp: Removed.
411         * bindings/js/DOMObjectHashTableMap.h: Removed.
412         * bindings/js/JSDOMBinding.cpp:
413         (WebCore::getHashTableForGlobalData): Deleted.
414         * bindings/js/JSDOMBinding.h:
415         (WebCore::getStaticValueSlotEntryWithoutCaching):
416         * bindings/js/JSDOMGlobalObject.cpp:
417         * bindings/js/JSDOMWindowBase.cpp:
418         * bindings/js/JSDOMWindowCustom.cpp:
419         (WebCore::JSDOMWindow::getOwnPropertySlot):
420         (WebCore::JSDOMWindow::put):
421         * bindings/js/JSDOMWindowShell.cpp:
422         * bindings/js/JSImageConstructor.cpp:
423         * bindings/js/JSLocationCustom.cpp:
424         (WebCore::JSLocation::putDelegate):
425         * bindings/js/JSStorageCustom.cpp:
426         (WebCore::JSStorage::deleteProperty):
427         (WebCore::JSStorage::putDelegate):
428         * bindings/js/JSWorkerGlobalScopeBase.cpp:
429         * bindings/js/WebCoreJSClientData.h:
430         * bindings/scripts/CodeGeneratorJS.pm:
431         (GenerateGetOwnPropertySlotBody):
432         (GenerateImplementation):
433         (GenerateConstructorHelperMethods):
434         (hashTableAccessor): Deleted.
435         (prototypeHashTableAccessor): Deleted.
436         (constructorHashTableAccessor): Deleted.
437         * bindings/scripts/IDLAttributes.txt:
438         * bridge/c/CRuntimeObject.cpp:
439         * bridge/c/c_instance.cpp:
440         * bridge/objc/ObjCRuntimeObject.mm:
441         * bridge/objc/objc_instance.mm:
442         * bridge/objc/objc_runtime.mm:
443         * bridge/runtime_array.cpp:
444         * bridge/runtime_method.cpp:
445         * bridge/runtime_object.cpp:
446         * crypto/CryptoKey.idl:
447         * css/CSSFontFaceLoadEvent.idl:
448         * dom/DOMCoreException.idl:
449         * dom/DOMStringList.idl:
450         * dom/ErrorEvent.idl:
451         * dom/Event.idl:
452         * dom/EventException.idl:
453         * dom/EventListener.idl:
454         * dom/MessageChannel.idl:
455         * dom/MessageEvent.idl:
456         * dom/MessagePort.idl:
457         * dom/ProgressEvent.idl:
458         * fileapi/Blob.idl:
459         * fileapi/File.idl:
460         * fileapi/FileError.idl:
461         * fileapi/FileException.idl:
462         * fileapi/FileList.idl:
463         * fileapi/FileReader.idl:
464         * fileapi/FileReaderSync.idl:
465         * html/DOMURL.idl:
466         * page/EventSource.idl:
467         * page/WorkerNavigator.idl:
468         * workers/DedicatedWorkerGlobalScope.idl:
469         * workers/SharedWorkerGlobalScope.idl:
470         * workers/WorkerGlobalScope.idl:
471         * workers/WorkerLocation.idl:
472         * xml/XMLHttpRequest.idl:
473         * xml/XMLHttpRequestException.idl:
474         * xml/XMLHttpRequestProgressEvent.idl:
475         * xml/XMLHttpRequestUpload.idl:
476
477 2014-07-30  Dan Bernstein  <mitz@apple.com>
478
479         <rdar://problem/17199364> [Mac] Popup button arrows appear on the left, underlapping text, when the UI layout direction is right-to-left
480         https://bugs.webkit.org/show_bug.cgi?id=135426
481
482         Reviewed by Dean Jackson.
483
484         No test, because the UI layout direction in the test harness is always left-to-right.
485
486         * rendering/RenderThemeMac.mm:
487         (WebCore::RenderThemeMac::popupButton): Forced the user interface layout direction of the
488         NSPopUpButtonCell to left-to-right. Added a FIXME about how we could make this vary based on
489         the direction of the <select>, though that would require additional changes elsewhere.
490
491 2014-07-30  Dan Bernstein  <mitz@apple.com>
492
493         Made Credential hold onto an NSURLCredential when needed.
494         Work towards fixing https://bugs.webkit.org/show_bug.cgi?id=135327
495
496         Reviewed by Alexey Proskuryakov.
497
498         No change in functionality.
499
500         * WebCore.exp.in: Updated.
501
502         * platform/network/Credential.h: Removed definition of CERTIFICATE_CREDENTIALS_SUPPORTED,
503         which is not used anymore.
504
505         * platform/network/CredentialBase.h:
506         (WebCore::CredentialBase::encodingRequiresPlatformData): Added a base implementation that
507         returns false.
508
509         * platform/network/cf/AuthenticationCF.cpp:
510         Changed to use the Credential constructor that takes an CFURLCredential, and the new
511         cfCredential member function. Made the createCF and core functions Windows-only and
512         therefore removed the CERTIFICATE_CREDENTIALS_SUPPORTED code from them.
513         * platform/network/cf/AuthenticationCF.h:
514
515         * platform/network/cf/CredentialStorageCFNet.cpp:
516         (WebCore::CredentialStorage::getFromPersistentStorage): Changed to construct a Credential
517         from a CFURLCredential.
518         (WebCore::CredentialStorage::saveToPersistentStorage): Changed to use the new cfCredential
519         member function.
520
521         * platform/network/cf/ResourceHandleCFNet.cpp:
522         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Ditto to both.
523         (WebCore::ResourceHandle::receivedCredential): Ditto.
524
525         * platform/network/cocoa/CredentialCocoa.h:
526         Replaced the m_identity, m_certificates and m_type member variables with an m_nsCredential
527         one holding onto an NSURLCredential. Declared constructors from and getters for
528         NSURLCredential and CFURLCredentialRef.
529         (WebCore::Credential::encodingRequiresPlatformData): Override that checks the
530         NSURLCredential if necessary.
531
532         * platform/network/cocoa/CredentialCocoa.mm:
533         (WebCore::toNSURLCredentialPersistence): New helper function.
534         (WebCore::toCredentialPersistence): Ditto.
535         (WebCore::Credential::Credential): Defined constructors to create or take an
536         NSURLCredential.
537         (WebCore::Credential::cfCredential): Added.
538         (WebCore::Credential::nsCredential): Added. Returns nil for the empty credential.
539         (WebCore::Credential::isEmpty): Changed to check m_nsCredential.
540         (WebCore::Credential::platformCompare): Changed to compare m_nsCredential if needed.
541         (WebCore::Credential::encodingRequiresPlatformData): Returns true if the credential is not
542         a user and a password.
543
544         * platform/network/mac/AuthenticationMac.h: Removed mac and core functions for Credential.
545         * platform/network/mac/AuthenticationMac.mm:
546         (-[WebCoreAuthenticationClientAsChallengeSender useCredential:forAuthenticationChallenge:]):
547         Changed to use Credential constructor that takes an NSURLCredential.
548         (WebCore::AuthenticationChallenge::AuthenticationChallenge): Ditto. Also use the
549         nsCredential getter.
550
551         * platform/network/mac/CredentialStorageMac.mm:
552         (WebCore::CredentialStorage::getFromPersistentStorage): Use new Credential constructor.
553
554         * platform/network/mac/ResourceHandleMac.mm:
555         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Ditto. Also use the
556         nsCredential getter.
557         (WebCore::ResourceHandle::receivedCredential): Ditto.
558
559 2014-07-30  Sergio Villar Senin  <svillar@igalia.com>
560
561         [GTK] Build depends on OpenGL ES
562         https://bugs.webkit.org/show_bug.cgi?id=135289
563
564         Reviewed by Martin Robinson.
565
566         Guard the OpenGL ES code with USE(OPENGL_ES_2).
567
568         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
569         * platform/graphics/opengl/Extensions3DOpenGLES.h:
570
571 2014-07-30  Radu Stavila  <stavila@adobe.com>
572
573         Member name collision in RenderView and SelectionSubtreeRoot
574         https://bugs.webkit.org/show_bug.cgi?id=135233
575
576         Reviewed by Mihnea Ovidenie.
577
578         The selectionStart/End members in RenderView have been renamed to fix confusion caused by the fact that
579         RenderView inherits SelectionSubtreeRoot, which also has the same selectionStart/End members.
580
581         No new tests required, no new functionality.
582
583         * rendering/RenderBlock.cpp:
584         (WebCore::RenderBlock::isSelectionRoot):
585         * rendering/RenderView.cpp:
586         (WebCore::RenderView::RenderView):
587         (WebCore::RenderView::setSelection):
588         (WebCore::RenderView::getSelection):
589         * rendering/RenderView.h:
590
591 2014-07-30  Zan Dobersek  <zdobersek@igalia.com>
592
593         [TexMap] Move TextureMapperLayer::textureMapper() definition into the header
594         https://bugs.webkit.org/show_bug.cgi?id=135384
595
596         Reviewed by Martin Robinson.
597
598         Move the definitions of TextureMapperLayer::textureMapper() and TextureMapperLayer::rootLayer()
599         into the TextureMapperLayer header. This makes both functions inline-able, removing unnecessary
600         calling overhead in GraphicsLayerTextureMapper::flushCompositingState() and
601         GraphicsLayerTextureMapper::updateBackingStoreIfNeeded().
602
603         TextureMapperLayer::rootLayer() now also returns a reference.
604
605         * platform/graphics/texmap/TextureMapperLayer.cpp:
606         (WebCore::TextureMapperLayer::~TextureMapperLayer):
607         (WebCore::TextureMapperLayer::rootLayer): Deleted.
608         (WebCore::TextureMapperLayer::textureMapper): Deleted.
609         * platform/graphics/texmap/TextureMapperLayer.h:
610         (WebCore::TextureMapperLayer::textureMapper):
611         (WebCore::TextureMapperLayer::rootLayer):
612
613 2014-07-29  Andreas Kling  <akling@apple.com>
614
615         Crash when using 'em' units to specify font-size inside animation keyframe.
616         <https://webkit.org/b/135395>
617         <rdar://problem/17851910>
618
619         We'd forgotten to initialize the "parent style" when resolving keyframe
620         styles, and this led to a crash in length conversion where the code
621         assumes a parent style will be present.
622
623         To keep this fix minimal, simply make the "parent style" a clone of the
624         base element style.
625
626         Reviewed by Simon Fraser.
627
628         Test: fast/animation/keyframe-with-font-size-in-em-units.html
629
630         * css/StyleResolver.cpp:
631         (WebCore::StyleResolver::styleForKeyframe):
632
633 2014-07-29  Pratik Solanki  <psolanki@apple.com>
634
635         [iOS] REGRESSION(r171526): PDF documents fail to load in WebKit1 with disk image caching enabled
636         https://bugs.webkit.org/show_bug.cgi?id=135359
637         <rdar://problem/17824645>
638
639         Reviewed by Darin Adler.
640
641         r171526 broke the case where we have a memory mapped file from the DiskImageCache in the
642         SharedBuffer. In such a case, m_buffer is empty and createCFData() returned an
643         WebCoreSharedBufferData with an empty buffer.
644
645         Fix this by taking the easy route of bringing back the old code for the disk image cache
646         file backed case. In the long run we probably want to remove the iOS specific disk image
647         cache anyway.
648
649         Review also uncovered another bug in r171526 where we were balancing an Objective-C alloc
650         with a CFRelease which is incorrect when running under GC. Fix that by using adoptNS along
651         with adoptCF which is what the code did before.
652
653         No new tests because the bug only occurs on device and we can't run tests on device yet.
654
655         * platform/mac/SharedBufferMac.mm:
656         (-[WebCoreSharedBufferData initWithDiskImageSharedBuffer:]):
657         (-[WebCoreSharedBufferData length]):
658         (-[WebCoreSharedBufferData bytes]):
659         (WebCore::SharedBuffer::createCFData):
660
661 2014-07-29  Benjamin Poulain  <bpoulain@apple.com>
662
663         VisitedLinkState::determineLinkState should take a reference
664         https://bugs.webkit.org/show_bug.cgi?id=135375
665
666         Reviewed by Sam Weinig.
667
668         * css/StyleResolver.cpp:
669         (WebCore::StyleResolver::State::initElement):
670         * dom/VisitedLinkState.h:
671         (WebCore::VisitedLinkState::determineLinkState):
672
673 2014-07-29  Brady Eidson  <beidson@apple.com>
674
675         Make WKOriginDataManager actually operate on IndexedDatabases.
676         https://bugs.webkit.org/show_bug.cgi?id=135346
677
678         Reviewed by Sam Weinig (and David Kilzer and Alex Christensen)
679
680         * WebCore.exp.in:
681
682 2014-07-29  Dan Bernstein  <mitz@apple.com>
683
684         Moved the Cocoa-specific parts of CredentialBase into a Cocoa-specific Credential class.
685         Work towards fixing https://bugs.webkit.org/show_bug.cgi?id=135327
686
687         Reviewed by Alexey Proskuryakov.
688
689         No change in functionality.
690
691         * WebCore.exp.in: Updated for functions moved in the class hierarchy.
692
693         * WebCore.xcodeproj/project.pbxproj: Added CredentialCocoa.{h,mm}.
694
695         * platform/network/Credential.h: For Cocoa, include CredentialCocoa.h instead of the generic
696         class.
697         (WebCore::Credential::Credential): Removed #if CERTIFICATE_CREDENTIALS_SUPPORTED code.
698
699         * platform/network/CredentialBase.cpp:
700         (WebCore::CredentialBase::CredentialBase): Changed to use emptyString instead of "", removed
701         #if CERTIFICATE_CREDENTIALS_SUPPORTED code.
702         (WebCore::CredentialBase::isEmpty): Ditto.
703         (WebCore::CredentialBase::compare): Renamed operator== to this, removed
704         #if CERTIFICATE_CREDENTIALS_SUPPORTED code, but changed the end to call platformCompare.
705         (WebCore::CredentialBase::identity): Deleted.
706         (WebCore::CredentialBase::certificates): Deleted.
707         (WebCore::CredentialBase::type): Deleted.
708         * platform/network/CredentialBase.h: Removed #if CERTIFICATE_CREDENTIALS_SUPPORTED members.
709         (WebCore::CredentialBase::platformCompare): Added a base implementation that returns true.
710         (WebCore::operator==): Changed to use CredentialBase::compare.
711
712         * platform/network/cocoa/CredentialCocoa.h: Added.
713         (WebCore::Credential::Credential):
714         * platform/network/cocoa/CredentialCocoa.mm: Added.
715         (WebCore::Credential::Credential): Moved the constructor that takes an identity and
716         certificates here.
717         (WebCore::Credential::isEmpty): Moved here.
718         (WebCore::Credential::identity): Ditto.
719         (WebCore::Credential::certificates): Ditto.
720         (WebCore::Credential::type): Ditto.
721         (WebCore::Credential::platformCompare): Moved the code that compares client-certificate
722         credentials here.
723
724         * platform/network/mac/AuthenticationMac.mm:
725         (WebCore::mac): Removed #if CERTIFICATE_CREDENTIALS_SUPPORTED guards in this Cocoa-only
726         file.
727         (WebCore::core): Ditto.
728
729 2014-07-29  Daniel Bates  <dabates@apple.com>
730
731         Use WTF::move() instead of std::move() to help ensure move semantics
732         https://bugs.webkit.org/show_bug.cgi?id=135351
733
734         Reviewed by Alexey Proskuryakov.
735
736         * page/CaptionUserPreferences.cpp:
737         (WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride):
738
739 2014-07-29  Mihnea Ovidenie  <mihnea@adobe.com>
740
741         [CSSRegions] Assertion failure hit testing a region-based multicolumn in a region
742         https://bugs.webkit.org/show_bug.cgi?id=135385
743
744         Reviewed by Andrei Bucur.
745
746         When a region-based multicolumn element is displayed and hit tested in a region,
747         we have to disable the named flow region information not only for painting,
748         but also for hit-testing. This is a follow-up for https://bugs.webkit.org/show_bug.cgi?id=132121,
749         which provided the fix for painting.
750
751         Test: fast/regions/assert-hit-test-multicol-in-region.html
752
753         * rendering/RenderLayer.cpp:
754         (WebCore::RenderLayer::hitTestLayer):
755
756 2014-07-29  Zalan Bujtas  <zalan@apple.com>
757
758         Cleanup RenderSelectionInfoBase/RenderSelectionInfo/RenderBlockSelectionInfo.
759         https://bugs.webkit.org/show_bug.cgi?id=135326
760
761         Reviewed by Darin Adler.
762
763         1. Move implementation to RenderSelectInfo.cpp
764         2. RenderSelectionInfoBase/RenderSelectionInfo/RenderBlockSelectionInfo take Render* reference.
765         3. Remove unused functions.
766         4. Add RenderSelectionInfoBase::repaintRectangle()
767
768         No change in behavior.
769
770         * WebCore.xcodeproj/project.pbxproj:
771         * rendering/RenderSelectionInfo.cpp: Added.
772         (WebCore::RenderSelectionInfoBase::RenderSelectionInfoBase):
773         (WebCore::RenderSelectionInfoBase::repaintRectangle):
774         (WebCore::RenderSelectionInfo::RenderSelectionInfo):
775         (WebCore::RenderSelectionInfo::repaint):
776         (WebCore::RenderBlockSelectionInfo::RenderBlockSelectionInfo):
777         (WebCore::RenderBlockSelectionInfo::repaint):
778         * rendering/RenderSelectionInfo.h:
779         (WebCore::RenderSelectionInfo::collectedSelectionRects):
780         (WebCore::RenderSelectionInfoBase::RenderSelectionInfoBase): Deleted.
781         (WebCore::RenderSelectionInfoBase::object): Deleted.
782         (WebCore::RenderSelectionInfo::RenderSelectionInfo): Deleted.
783         (WebCore::RenderSelectionInfo::repaint): Deleted.
784         (WebCore::RenderSelectionInfo::rects): Deleted.
785         (WebCore::RenderBlockSelectionInfo::RenderBlockSelectionInfo): Deleted.
786         (WebCore::RenderBlockSelectionInfo::repaint): Deleted.
787         (WebCore::RenderBlockSelectionInfo::block): Deleted.
788         * rendering/RenderView.cpp:
789         (WebCore::RenderView::subtreeSelectionBounds):
790         (WebCore::RenderView::repaintSubtreeSelection):
791         (WebCore::RenderView::clearSubtreeSelection):
792         (WebCore::RenderView::applySubtreeSelection):
793
794 2014-07-28  Pratik Solanki  <psolanki@apple.com>
795
796         Get SharedBuffer.h out of ResourceBuffer.h (and a few other places)
797         https://bugs.webkit.org/show_bug.cgi?id=131782
798
799         Original patch by Tim Horton.
800         Reviewed by Darin Adler.
801
802         No new tests because no functional changes.
803
804         * Modules/indexeddb/IDBCallbacks.h:
805         * Modules/indexeddb/IDBCursorBackend.h:
806         * loader/ios/DiskImageCacheIOS.h:
807         Forward declare SharedBuffer in headers.
808
809         * Modules/indexeddb/IDBRequest.cpp:
810         * loader/cache/CachedImage.cpp:
811         * loader/icon/IconLoader.cpp:
812         * loader/ios/DiskImageCacheIOS.mm:
813         * loader/cache/MemoryCache.cpp:
814         * loader/mac/ResourceBuffer.mm:
815         Include SharedBuffer.h in implementation files.
816
817         * Modules/notifications/Notification.h:
818         * loader/appcache/ApplicationCacheGroup.h:
819         Remove unnecessary includes.
820
821         * loader/ResourceBuffer.cpp:
822         (WebCore::ResourceBuffer::adoptSharedBuffer):
823         * loader/ResourceBuffer.h:
824         Out-of-line adoptSharedBuffer so that the PassRefPtr doesn't require including SharedBuffer.h.
825
826         * platform/graphics/opentype/OpenTypeMathData.cpp:
827         * platform/graphics/opentype/OpenTypeMathData.h:
828         Out-of-line destructor to avoid requiring SharedBuffer.h for the RefPtr.
829         Forward-declare SharedBuffer in the header, include in implementation.
830
831 2014-07-29  Zan Dobersek  <zdobersek@igalia.com>
832
833         [TexMap] GraphicsLayerTextureMapper::addAnimation() box size parameter should be FloatSize
834         https://bugs.webkit.org/show_bug.cgi?id=135237
835
836         Reviewed by Martin Robinson.
837
838         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
839         (WebCore::GraphicsLayerTextureMapper::addAnimation):
840         * platform/graphics/texmap/GraphicsLayerTextureMapper.h: The boxSize parameter of the
841         addAnimation() method must be of the same type as the parameter in the base class
842         declaration -- a const FloatSize reference. Only then is the base virtual method
843         actually overriden.
844
845 2014-07-28  Dan Bernstein  <mitz@apple.com>
846
847         iOS build fix.
848
849         * WebCore.exp.in:
850
851 2014-07-28  Dan Bernstein  <mitz@apple.com>
852
853         Introduced CredentialBase and made Credential derive from it
854         Work towards fixing https://bugs.webkit.org/show_bug.cgi?id=135327
855
856         Reviewed by Darin Adler.
857
858         No change in functionality.
859
860         * CMakeLists.txt: Updated for source file rename.
861
862         * WebCore.exp.in: Changed to export CredentialBase symbols.
863
864         * WebCore.vcxproj/WebCore.vcxproj: Updated for source file rename and new header.
865         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
866
867         * WebCore.xcodeproj/project.pbxproj: Ditto.
868
869         * platform/network/Credential.cpp: Renamed to CredentialBase.cpp.
870
871         * platform/network/Credential.h: Defined Credential to derive from CredentialBase.
872
873         * platform/network/CredentialBase.cpp: Renamed Credential.cpp to this. Updated for the new
874         name.
875
876         * platform/network/CredentialBase.h: Copied from Credential.h, renamed the class to
877         CredentialBase, and made the constructors protected.
878
879 2014-07-28  Zalan Bujtas  <zalan@apple.com>
880
881         REGRESSION(r164133): Selection disappears after scrolling on nytimes.com
882         https://bugs.webkit.org/show_bug.cgi?id=135361
883
884         Reviewed by Ryosuke Niwa.
885
886         Ensure that when a RenderElement, part of the current selection is removed,
887         we recalculate and update the selection soon after layout.
888
889         Test: fast/dynamic/selection-gets-cleared-when-part-of-it-gets-removed.html
890
891         * editing/FrameSelection.cpp:
892         (WebCore::FrameSelection::setNeedsSelectionUpdate):
893         (WebCore::FrameSelection::didLayout): didLayout name reflects its functionality better.
894         (WebCore::FrameSelection::layoutDidChange): Deleted.
895         * editing/FrameSelection.h: : move some functions to private.
896         * page/FrameView.cpp:
897         (WebCore::FrameView::performPostLayoutTasks):
898         * rendering/RenderBlockFlow.cpp:
899         (WebCore::RenderBlockFlow::willBeDestroyed):
900         * rendering/RenderElement.cpp:
901         (WebCore::RenderElement::removeChildInternal):
902         * rendering/RenderInline.cpp:
903         (WebCore::RenderInline::willBeDestroyed):
904
905 2014-07-28  Dean Jackson  <dino@apple.com>
906
907         [Media iOS] Touching play button feels unresponsive
908         https://bugs.webkit.org/show_bug.cgi?id=135370
909         <rdar://problem/17756281>
910
911         Reviewed by Simon Fraser.
912
913         Add an :active rule that shows a slightly darker button when touched.
914
915         * Modules/mediacontrols/mediaControlsiOS.css:
916         (audio::-webkit-media-controls-start-playback-button:active):
917
918 2014-07-28  Brady Eidson  <beidson@apple.com>
919
920         REGRESSION(168376): Standalone images pasted to Outlook 2011 don't display
921         <rdar://problem/17768371> and https://bugs.webkit.org/show_bug.cgi?id=135363
922
923         Reviewed by Tim Horton.
924
925         Outlook isn’t prepared to handle the resource load callbacks when sent synchronously.
926
927         r168376 was an optimization that we no longer need, so the simplest fix is to roll it out.
928
929         * editing/mac/EditorMac.mm:
930         (WebCore::Editor::WebContentReader::readImage):
931
932         * loader/archive/ArchiveResource.cpp:
933         (WebCore::ArchiveResource::ArchiveResource):
934         * loader/archive/ArchiveResource.h:
935         (WebCore::ArchiveResource::setShouldLoadImmediately): Deleted.
936         (WebCore::ArchiveResource::shouldLoadImmediately): Deleted.
937
938         * loader/cache/CachedResourceLoader.cpp:
939         (WebCore::CachedResourceLoader::requestResource):
940
941 2014-07-28  Mark Hahnenberg  <mhahnenberg@apple.com>
942
943         ASSERTION FAILED: m_heap->vm()->currentThreadIsHoldingAPILock()
944         https://bugs.webkit.org/show_bug.cgi?id=135352
945
946         Reviewed by Oliver Hunt.
947
948         * Modules/plugins/QuickTimePluginReplacement.mm:
949         (WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected): This should be taking a 
950         JSLock like its sibling methods do (e.g. installReplacement).
951
952 2014-07-28  Antti Koivisto  <antti@apple.com>
953
954         <embed> videos flashes constantly while playing inline on iPad, making it unwatchable
955         https://bugs.webkit.org/show_bug.cgi?id=135356
956         <rdar://problem/16828238>
957
958         Reviewed by Simon Fraser.
959         
960         The shadow tree for media controls is scheduling style recalc. The general silliness of
961         HTMLPlugInImageElement::willRecalcStyle/willDetachRenderers is turning those into render
962         tree reconstructions causing flicker.
963
964         * html/HTMLPlugInImageElement.cpp:
965         (WebCore::HTMLPlugInImageElement::willRecalcStyle):
966         
967             Don't do the forced renderer reconstruction if there is no style change for the element
968             or its ancestors. This way recalcs scheduled by the shadow tree don't trigger the widget
969             update code path.
970
971 2014-07-27  Brent Fulgham  <bfulgham@apple.com>
972
973         [Mac, iOS] Paint-on closed captions get out-of-order in Safari
974         https://bugs.webkit.org/show_bug.cgi?id=135332
975         <rdar://problem/15317278>
976
977         Reviewed by Jer Noble.
978
979         * html/shadow/MediaControlElements.cpp:
980         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): If the
981         number of active cues is greater than the current set of CSS boxes representing
982         the cues, throw away the CSS boxes and re-layout all the cues.
983         * html/track/InbandGenericTextTrack.cpp:
984         (WebCore::InbandGenericTextTrack::addGenericCue): Add some logging.
985         (WebCore::InbandGenericTextTrack::removeGenericCue): Ditto.
986         * html/track/TextTrackCueGeneric.cpp:
987         (WebCore::TextTrackCueGeneric::isOrderedBefore): Revise ordering rules so that we put
988         newer cues earlier in the layout order so they are drawn towards the bottom
989         of the screen. Only do this for Generic captions.
990         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
991         (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Adjust logging
992         messages.
993         (WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): Add logging.
994
995 2014-07-28  Andreas Kling  <akling@apple.com>
996
997         REGRESSION (r160806): CSS zoom property doesn't work on anything inside anchors.
998         <https://webkit.org/b/135344>
999         <rdar://problem/17759577>
1000
1001         When DeprecatedStyleBuilder applies the CSS zoom property (ApplyPropertyZoom)
1002         it first resets the "effective zoom" by calling RenderStyle::setEffectiveZoom().
1003
1004         This mechanism was not resistent to being called multiple times, due to the
1005         optimization in RenderStyle::setZoom() to avoid copy-on-writing the shared data
1006         when setting some property to the already-set value.
1007
1008         The bug would happen in this sequence:
1009
1010         ApplyPropertyZoom:
1011             - setEffectiveZoom(1);
1012             - setZoom(2); // this updates the effective zoom
1013         ApplyPropertyZoom:
1014             - setEffectiveZoom(1);
1015             - setZoom(2); // this doesn't update the effective zoom
1016
1017         When we run the second setZoom(2); call, the RenderStyle's zoom value is 2
1018         already and we'll early return without updating the effective zoom.
1019
1020         This change moves the updating of the effective zoom in setZoom() to take place
1021         before the early return due to overwriting with the same value.
1022
1023         Note: the fact that we're apply the zoom property twice is an inefficiency that
1024         we should figure out a way to avoid in the future.
1025
1026         Reviewed by Simon Fraser.
1027
1028         Test: fast/css/zoom-inside-link.html
1029
1030         * rendering/style/RenderStyle.h:
1031         (WebCore::RenderStyle::setZoom):
1032
1033 2014-07-28  Bear Travis  <betravis@adobe.com>
1034
1035         [CSS Font Loading] Update Font Loading Code
1036         https://bugs.webkit.org/show_bug.cgi?id=135340
1037
1038         Reviewed by Antti Koivisto.
1039
1040         Update the Font Loading code to build again, as trunk has evolved
1041         since the feature was originally written. Mostly, this requires
1042         updating the code to work with the new Font representation.
1043
1044         The original tests were enabled only for the Chromium port.
1045         They will need to be updated when the feature is enabled by default.
1046
1047         * WebCore.xcodeproj/project.pbxproj: Add missing files.
1048         * css/FontLoader.cpp: Update to new Font representation.
1049         (WebCore::LoadFontCallback::createFromParams):
1050         (WebCore::LoadFontCallback::~LoadFontCallback):
1051         (WebCore::FontLoader::loadFont):
1052         (WebCore::FontLoader::checkFont):
1053         (WebCore::applyPropertyToCurrentStyle):
1054         (WebCore::FontLoader::resolveFontStyle):
1055
1056 2014-07-28  Wenson Hsieh  <wenson_hsieh@apple.com>
1057
1058         Let WheelEvent wrap a PlatformWheelEvent
1059         https://bugs.webkit.org/show_bug.cgi?id=135244
1060
1061         WheelEvent now wraps a PlatformWheelEvent. m_directionInvertedFromDevice, as well as m_phase and m_momentumPhase
1062         have been removed, since the information is redundant in PlatformWheelEvent. Note that deltaX and deltaY have
1063         NOT been replaced, since we need double precision instead of float precision.
1064
1065         Reviewed by Beth Dakin.
1066
1067         No new tests, since behavior should not have changed.
1068
1069         * dom/WheelEvent.cpp:
1070         (WebCore::WheelEvent::WheelEvent):
1071         (WebCore::WheelEvent::initWheelEvent):
1072         * dom/WheelEvent.h:
1073         (WebCore::WheelEvent::wheelEvent): Returns a non-null pointer to the PlatformWheelEvent iff WheelEvent was initialized by PlatformWheelEvent.
1074         (WebCore::WheelEvent::webkitDirectionInvertedFromDevice): Updated to use PlatformWheelEvent.
1075         (WebCore::WheelEvent::phase): Updated to use PlatformWheelEvent.
1076         (WebCore::WheelEvent::momentumPhase): Updated to use PlatformWheelEvent.
1077
1078 2014-07-28  Brent Fulgham  <bfulgham@apple.com>
1079
1080         Unreviewed 'merge' fix.
1081
1082         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
1083         Correct line endings to allow EWS merges again.
1084
1085 2014-07-28  Zoltan Horvath  <zoltan@webkit.org>
1086
1087         [CSS3-Text] Adjust text-justify implementation to the latest spec
1088         https://bugs.webkit.org/show_bug.cgi?id=135317
1089
1090         Reviewed by Darin Adler.
1091
1092         Text-justify no longer accepts the following values: Inter-ideograph, inter-
1093         cluster, and kashida. This patch removes them and updates the tests as well.
1094
1095         [1] http://dev.w3.org/csswg/css-text-3/#propdef-text-justify
1096
1097         Updated existing tests.
1098
1099         * css/CSSParser.cpp:
1100         (WebCore::isValidKeywordPropertyAndValue):
1101         * css/CSSPrimitiveValueMappings.h:
1102         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1103         (WebCore::CSSPrimitiveValue::operator TextJustify):
1104         * css/CSSValueKeywords.in:
1105         * rendering/style/RenderStyle.cpp:
1106         (WebCore::RenderStyle::changeRequiresLayout):
1107         * rendering/style/RenderStyleConstants.h:
1108         * rendering/style/StyleRareInheritedData.h:
1109
1110 2014-07-28  Radu Stavila  <stavila@adobe.com>
1111
1112         REGRESSION (r169105): Crash in selection
1113         https://bugs.webkit.org/show_bug.cgi?id=134303
1114
1115         Reviewed by Mihnea Ovidenie.
1116
1117         When splitting the selection between different subtrees, all subtrees must have their selection cleared before
1118         starting to apply the new selection. Otherwise, when selecting objects in a named flow thread and going up
1119         its containing block chain, we can end up in the view's selection root, which has not yet been updated and so
1120         we get inconsistent data.
1121
1122         To achieve this goal, the selection update was split into a "clear" and an "apply" method. The updateSelectionForSubtrees
1123         method first iterates through all subtrees and performs the "clear" method and then starts all over again
1124         and performs the "apply" method.
1125
1126         Test: fast/regions/selection/crash-deselect.html
1127
1128         * WebCore.xcodeproj/project.pbxproj:
1129         * rendering/RenderSelectionInfo.h:
1130         * rendering/RenderView.cpp:
1131         (WebCore::RenderView::setSelection):
1132         (WebCore::RenderView::splitSelectionBetweenSubtrees):
1133         (WebCore::RenderView::updateSelectionForSubtrees): Added, clears and re-applies selection for all selection subtrees.
1134         (WebCore::RenderView::clearSubtreeSelection): Added, clears selection and returns previously selected information.
1135         (WebCore::RenderView::applySubtreeSelection): Added, updates the selection status of all objects inside the selection tree, compares old and new data and repaints accordingly.
1136         (WebCore::RenderView::setSubtreeSelection): Deleted.
1137         * rendering/RenderView.h:
1138         * rendering/SelectionSubtreeRoot.cpp:
1139         (WebCore::SelectionSubtreeRoot::SelectionSubtreeRoot):
1140         * rendering/SelectionSubtreeRoot.h:
1141         (WebCore::SelectionSubtreeRoot::OldSelectionData::OldSelectionData):
1142
1143 2014-07-28  Yusuke Suzuki  <utatane.tea@gmail.com>
1144
1145         CSS: Fix :visited behavior for SubSelectors
1146         https://bugs.webkit.org/show_bug.cgi?id=135324
1147
1148         Reviewed by Benjamin Poulain.
1149
1150         Disable :visited match for the selectors that has SubSelectors.
1151
1152         Tests: fast/history/nested-visited-test-complex.html
1153                fast/history/sibling-visited-test-complex.html
1154
1155         * css/SelectorChecker.cpp:
1156         (WebCore::SelectorChecker::matchRecursively):
1157
1158 2014-07-27  Ryuan Choi  <ryuan.choi@samsung.com>
1159
1160         Remove GraphicsSurfaceGLX.cpp
1161         https://bugs.webkit.org/show_bug.cgi?id=135279
1162
1163         Reviewed by Darin Adler.
1164
1165         GraphicsSurfaceGLX.cpp is not used since Qt dropped and Efl port changed at r146458
1166
1167         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp: Removed.
1168
1169 2014-07-27  Bruno de Oliveira Abinader  <bruno.d@partner.samsung.com>
1170
1171         Support for :enabled selector on Anchor & Area elements
1172         https://bugs.webkit.org/show_bug.cgi?id=134826
1173
1174         Reviewed by Darin Adler.
1175
1176         Updates the PseudoClassEnabled selector checker to check for Anchor & Area
1177         elements with a 'href' attribute.
1178
1179         Spec: http://html.spec.whatwg.org/#selector-enabled
1180
1181         Test: fast/css/css-selector-enabled-links.html
1182
1183         * css/SelectorCheckerTestFunctions.h:
1184         (WebCore::isEnabled): Added check for anchor & area elements.
1185
1186 2014-07-27  Daniel Bates  <dabates@apple.com>
1187
1188         [WK2] Crash when accessing window.localStorage after calling window.close()
1189         https://bugs.webkit.org/show_bug.cgi?id=135328
1190         <rdar://problem/17315237>
1191
1192         Reviewed by Sam Weinig.
1193
1194         Fixes an issue where accessing local storage for the first time after calling window.close()
1195         causes a crash.
1196
1197         For now, we should disallow accessing local storage after calling window.close() regardless of
1198         whether it's the first access to local storage as this seems like a bad idiom to support. Note,
1199         this represents a change in behavior from WebKit1. If such usage of window.localStorage turns
1200         out to be reasonable then we can visit this decision again in <https://bugs.webkit.org/show_bug.cgi?id=135330>.
1201
1202         Tests: storage/domstorage/localstorage/access-storage-after-window-close.html
1203                storage/domstorage/localstorage/access-storage-then-set-value-in-storage-after-window-close.html
1204                storage/domstorage/localstorage/set-value-in-storage-after-window-close.html
1205
1206         * page/DOMWindow.cpp:
1207         (WebCore::DOMWindow::localStorage): Modified to only return the cached local storage or
1208         create a new local storage so long as the page isn't being closed. Also, substitute nullptr
1209         for 0.
1210         (WebCore::DOMWindow::close): Call Page::setIsClosing() to mark that the page is closing.
1211         * page/Page.cpp:
1212         (WebCore::Page::Page): Initialize m_isClosing to false.
1213         * page/Page.h:
1214         (WebCore::Page::setIsClosing): Added.
1215         (WebCore::Page::isClosing): Added.
1216
1217 2014-07-27  Filip Pizlo  <fpizlo@apple.com>
1218
1219         Merge r170090, r170092, r170129, r170141, r170161, r170215, r170275, r170375, r170376, r170382, r170383, r170399, r170436, r170489, r170490, r170556 from ftlopt.
1220         
1221         This fixes the previous mismerge and adds test coverage for the thing that went wrong.
1222         Also, this adds some helpers for making it easier to inspect JavaScript values.
1223
1224         * testing/Internals.cpp:
1225         (WebCore::Internals::description):
1226         * testing/Internals.h:
1227         * testing/Internals.idl:
1228
1229     2014-07-25  Mark Lam  <mark.lam@apple.com>
1230     
1231             [ftlopt] Renamed DebuggerActivation to DebuggerScope.
1232             <https://webkit.org/b/134273>
1233     
1234             Reviewed by Michael Saboff.
1235     
1236             No new tests.
1237     
1238             * ForwardingHeaders/debugger/DebuggerActivation.h: Removed.
1239             - Removed because this is not used.
1240     
1241 2014-07-26  Brian J. Burg  <burg@cs.washington.edu>
1242
1243         Web Replay: log and enforce session/segment state machine transitions
1244         https://bugs.webkit.org/show_bug.cgi?id=135224
1245
1246         Reviewed by Timothy Hatcher.
1247
1248         For debugging purposes, log session and segment state transitions.
1249         Assert that segment state transitions are valid.
1250
1251         No new tests. No behavior was changed.
1252
1253         * replay/ReplayController.cpp:
1254         (WebCore::logDispatchedDOMEvent):
1255         (WebCore::sessionStateToString):
1256         (WebCore::segmentStateToString):
1257         (WebCore::ReplayController::setSessionState):
1258         (WebCore::ReplayController::setSegmentState):
1259         (WebCore::ReplayController::createSegment):
1260         (WebCore::ReplayController::completeSegment): Remove a wrong state transition.
1261         (WebCore::ReplayController::loadSegmentAtIndex):
1262         (WebCore::ReplayController::unloadSegment): Fix a now-erroneous assertion.
1263         (WebCore::ReplayController::startPlayback):
1264         (WebCore::ReplayController::pausePlayback):
1265         (WebCore::ReplayController::willDispatchEvent):
1266         (WebCore::ReplayController::cancelPlayback):
1267         * replay/ReplayController.h:
1268
1269 2014-07-26  Filip Pizlo  <fpizlo@apple.com>
1270
1271         Unreviewed, roll out r171641-r171644. It broke some tests; will investigate and
1272         reland later.
1273
1274         * ForwardingHeaders/debugger/DebuggerActivation.h: Added.
1275
1276 2014-07-26  Timothy Horton  <timothy_horton@apple.com>
1277
1278         Crash in Web Content Process under ~PDFDocument under clearTouchEventListeners at topDocument()
1279         https://bugs.webkit.org/show_bug.cgi?id=135319
1280         <rdar://problem/17315168>
1281
1282         Reviewed by Darin Adler and Antti Koivisto.
1283
1284         * dom/Document.h:
1285         * dom/Document.cpp:
1286         (WebCore::Document::Document):
1287         (WebCore::Document::prepareForDestruction):
1288         Add a flag on Document, m_hasPreparedForDestruction, which ensures
1289         that each Document only goes through prepareForDestruction() once.
1290         prepareForDestruction() can be called a number of times during teardown,
1291         but it's only necessary to actually execute it once.
1292         
1293         This was previously achieved by virtue of all callers of prepareForDestruction()
1294         first checking hasLivingRenderTree, and prepareForDestruction() tearing down
1295         the render tree, but that meant that prepareForDestruction() was not called
1296         for Documents who never had a render tree in the first place.
1297
1298         The only part of prepareForDestruction() that is now predicated on hasLivingRenderTree()
1299         is the call to destroyRenderTree(); the rest of the function has the potential to be relevant
1300         for non-rendered placeholder documents and can safely deal with them in other ways.
1301
1302         It is important to call prepareForDestruction() on non-rendered placeholder documents
1303         because some of the cleanup (like disconnectFromFrame()) is critical to safe destruction.
1304
1305         * loader/FrameLoader.cpp:
1306         (WebCore::FrameLoader::clear):
1307         Call prepareForDestruction() even if we don't have a living render tree.
1308         For the sake of minimizing change, removeFocusedNodeOfSubtree still
1309         depends on having a living render tree before calling prepareForDestruction().
1310
1311         * page/Frame.cpp:
1312         (WebCore::Frame::setView):
1313         (WebCore::Frame::setDocument):
1314         Call prepareForDestruction() even if we don't have a living render tree.
1315
1316 2014-07-25  Filip Pizlo  <fpizlo@apple.com>
1317
1318         Merge r170090, r170092, r170129, r170141, r170161, r170215, r170275, r170375, r170376, r170382, r170383, r170399, r170436, r170489, r170490, r170556 from ftlopt.
1319
1320     2014-07-25  Mark Lam  <mark.lam@apple.com>
1321     
1322             [ftlopt] Renamed DebuggerActivation to DebuggerScope.
1323             <https://webkit.org/b/134273>
1324     
1325             Reviewed by Michael Saboff.
1326     
1327             No new tests.
1328     
1329             * ForwardingHeaders/debugger/DebuggerActivation.h: Removed.
1330             - Removed because this is not used.
1331     
1332 2014-07-25  Zalan Bujtas  <zalan@apple.com>
1333
1334         Subpixel rendering: Rounded rect gets non-renderable at certain subpixel size.
1335         https://bugs.webkit.org/show_bug.cgi?id=135314
1336         <rdar://problem/17812921>
1337
1338         Reviewed by Tim Horton.
1339
1340         While calculating the rounded rect for painting, the radius is adjusted to compensate
1341         for the pixel snapped size. However while scaling the radius, certain values overflow
1342         (float) mantissa and it produces a non-renderable rounded rect where the radius becomes bigger
1343         than the rectangle dimensions. In such cases, we need to shrink the radius to make it
1344         renderable again.
1345
1346         Test: transitions/rounded-rect-becomes-non-renderable-while-transitioning.html
1347
1348         * platform/graphics/RoundedRect.cpp:
1349         (WebCore::RoundedRect::pixelSnappedRoundedRectForPainting): shrink the radius by
1350         one device pixel. It is as good as any other small value.
1351
1352 2014-07-25  Jer Noble  <jer.noble@apple.com>
1353
1354         [EME][Mac] CDM error messages not piped through to MediaKeySession correctly; clients don't receive error events
1355         https://bugs.webkit.org/show_bug.cgi?id=135312
1356         <rdar://problem/17817223>
1357
1358         Reviewed by Brent Fulgham.
1359
1360         Set (and clear) the client interface so that errors can be piped from the CDMSession up to the MediaKeySession.
1361
1362         * Modules/encryptedmedia/MediaKeySession.cpp:
1363         (WebCore::MediaKeySession::MediaKeySession):
1364         (WebCore::MediaKeySession::close):
1365
1366 2014-07-25  Jer Noble  <jer.noble@apple.com>
1367
1368         [MSE] Playback stalls & readyState drops to HAVE_CURRENT_DATA at end of stream with unbalanced buffered SourceBuffers
1369         https://bugs.webkit.org/show_bug.cgi?id=135291
1370         <rdar://problem/17715503>
1371
1372         Reviewed by Sam Weinig.
1373
1374         Test: media/media-source/media-source-end-of-stream-buffered.html
1375
1376         When determining the correct ReadyState for the MediaSource in monitorSourceBuffers(), use the same
1377         definition of "buffered" as is used in the calculation of HTMLMediaElement.buffered and in the
1378         Stream Ended algorithm. Namely, when the stream has ended, treat each SourceBuffer as if its last
1379         buffered range extends to the duration of the stream. This allows playback to continue through to
1380         the duration without stalling due to monitorSourceBuffers().
1381
1382         * Modules/mediasource/SourceBuffer.cpp:
1383         (WebCore::SourceBuffer::bufferedAccountingForEndOfStream): Added; extends the last range in buffered
1384             to MediaSource::duration() if the MediaSource is ended.
1385         (WebCore::SourceBuffer::hasCurrentTime): Uses bufferedAccountingForEndOfStream().
1386         (WebCore::SourceBuffer::hasFutureTime): Ditto.
1387         (WebCore::SourceBuffer::canPlayThrough): Ditto.
1388         * Modules/mediasource/SourceBuffer.h:
1389
1390         Add a convenience method for determining whether the MediaSource has ended:
1391         * Modules/mediasource/MediaSource.cpp:
1392         (WebCore::MediaSource::isEnded):
1393         * Modules/mediasource/MediaSource.h:
1394
1395         Add start() and end() methods that don't take a (usually ignored) isValid inout parameter. Add duration()
1396         and maximumBufferedTime() convenience methods:
1397         * platform/graphics/PlatformTimeRanges.cpp:
1398         (WebCore::PlatformTimeRanges::start):
1399         (WebCore::PlatformTimeRanges::end):
1400         (WebCore::PlatformTimeRanges::duration):
1401         (WebCore::PlatformTimeRanges::maximumBufferedTime):
1402         * platform/graphics/PlatformTimeRanges.h:
1403
1404 2014-07-25  Pratik Solanki  <psolanki@apple.com>
1405
1406         [iOS] REGRESSION(r171526): Images fail to load sometimes
1407         https://bugs.webkit.org/show_bug.cgi?id=135304
1408         <rdar://problem/17811922>
1409
1410         Reviewed by Alexey Proskuryakov.
1411
1412         SharedBuffer::createCFData() calls data() as a way to coalesce the data array elements and
1413         segments into m_buffer. However, data() has an optimization where if we had a single element
1414         in the data array, it would just return that and not do coalescing. So when we passed
1415         m_buffer to WebCoreSharedData, we passed a buffer with no data in it.
1416
1417         Fix this by bringing the optimization to createCFData() and return the CFDataRef from the
1418         data array if we just have a single element.
1419
1420         No new tests. Should be covered by existing tests.
1421
1422         * platform/mac/SharedBufferMac.mm:
1423         (WebCore::SharedBuffer::createCFData):
1424
1425 2014-07-25  Jer Noble  <jer.noble@apple.com>
1426
1427         [MSE] High CPU usage in SampleMap::findSamplesWithinPresentationRange() with a large number of buffered samples.
1428         https://bugs.webkit.org/show_bug.cgi?id=135247
1429
1430         Reviewed by Geoffrey Garen.
1431
1432         Anchor our search for overlapping frames to the end of the search range when the overlap range is sufficiently
1433         close to the end of the search range. The common case for this search is when a sample is about to be appended
1434         to the end of the sample queue, so this should turn most searches into no-ops.
1435
1436         * Modules/mediasource/SampleMap.cpp:
1437         (WebCore::PresentationOrderSampleMap::findSamplesWithinPresentationRangeFromEnd):
1438         * Modules/mediasource/SampleMap.h:
1439         * Modules/mediasource/SourceBuffer.cpp:
1440         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
1441
1442 2014-07-25  Gavin Barraclough  <baraclough@apple.com>
1443
1444         Yosemite version number is 101000
1445         https://bugs.webkit.org/show_bug.cgi?id=135301
1446
1447         Reviewed by Sam Weinig.
1448
1449         * WebCore.exp.in:
1450         * platform/ContentFilter.h:
1451         * platform/mac/ScrollViewMac.mm:
1452         (WebCore::ScrollView::platformVisibleContentRect):
1453         * platform/mac/ThemeMac.mm:
1454         (WebCore::updateStates):
1455         (WebCore::paintToggleButton):
1456         * platform/network/cf/CookieJarCFNet.cpp:
1457         (WebCore::copyCookiesForURLWithFirstPartyURL):
1458         * platform/network/cf/ResourceRequest.h:
1459         (WebCore::ResourceRequest::resourcePrioritiesEnabled):
1460         * rendering/RenderThemeMac.mm:
1461         (WebCore::RenderThemeMac::search):
1462
1463 2014-07-25  David Hyatt  <hyatt@apple.com>
1464
1465         [New Multicolumn] RenderViews paginated as RL or LR don't handle percentage widths correctly.
1466         REGRESSION: Images don’t scale to fit in page in vertical text books
1467
1468         https://bugs.webkit.org/show_bug.cgi?id=135204
1469         <rdar://problem/17043792>
1470         
1471         Reviewed by Simon Fraser.
1472
1473         Added fast/multicol/pagination/RightToLeft-max-width.html
1474
1475         * rendering/RenderView.cpp:
1476         (WebCore::RenderView::availableLogicalHeight):
1477         Put back in the same code that used to exist for the old columns (but ported to the new
1478         columns).
1479     
1480 2014-07-25  Dan Bernstein  <mitz@apple.com>
1481
1482         [Mac] Unneeded MobileMe workaround in ResourceHandle::receivedCredential
1483         https://bugs.webkit.org/show_bug.cgi?id=135297
1484
1485         Reviewed by Alexey Proskuryakov.
1486
1487         * platform/network/mac/ResourceHandleMac.mm:
1488         (WebCore::ResourceHandle::receivedCredential): Removed the site-specific behavior for
1489         gallery.me.com.
1490
1491 2014-07-25  Commit Queue  <commit-queue@webkit.org>
1492
1493         Unreviewed, rolling out r171480.
1494         https://bugs.webkit.org/show_bug.cgi?id=135300
1495
1496         it broke replaced elements in pagination (Requested by dhyatt_
1497         on #webkit).
1498
1499         Reverted changeset:
1500
1501         "Ensure we compute the min and max height of replaced elements
1502         to 'none' or 0 when appropriate."
1503         https://bugs.webkit.org/show_bug.cgi?id=135181
1504         http://trac.webkit.org/changeset/171480
1505
1506 2014-07-25  Commit Queue  <commit-queue@webkit.org>
1507
1508         Unreviewed, rolling out r171587.
1509         https://bugs.webkit.org/show_bug.cgi?id=135294
1510
1511         Made fast/dom/HTMLObjectElement/beforeload-set-text-
1512         crash.xhtml crash again (Requested by ap on #webkit).
1513
1514         Reverted changeset:
1515
1516         "REGRESSION (r169105): Crash in selection"
1517         https://bugs.webkit.org/show_bug.cgi?id=134303
1518         http://trac.webkit.org/changeset/171587
1519
1520 2014-07-25  Dan Bernstein  <mitz@apple.com>
1521
1522         ResourceErrorBase::compare doesn’t call the right platformCompare override
1523         https://bugs.webkit.org/show_bug.cgi?id=135240
1524
1525         Reviewed by Alexey Proskuryakov.
1526
1527         * platform/network/ResourceErrorBase.cpp:
1528         (WebCore::ResourceErrorBase::compare): Changed to call ResourceError::platformCompare.
1529         * platform/network/cf/ResourceError.h: Made platformCompare public.
1530         * platform/network/soup/ResourceError.h: Ditto.
1531
1532 2014-07-25  Dan Bernstein  <mitz@apple.com>
1533
1534         [Cocoa] WebProtectionSpace::receivesCredentialSecurely incorrectly returns false in some cases
1535         https://bugs.webkit.org/show_bug.cgi?id=135241
1536
1537         Reviewed by Alexey Proskuryakov.
1538
1539         * WebCore.exp.in: Export ProtectionSpace::receivesCredentialSecurely.
1540
1541         * platform/network/cocoa/ProtectionSpaceCocoa.h: Declare override of receivesCredentialSecurely.
1542         * platform/network/cocoa/ProtectionSpaceCocoa.mm:
1543         (WebCore::ProtectionSpace::receivesCredentialSecurely): Use -[NSURLProtectionSpace receivesCredentialSecurely].
1544
1545 2014-07-25  Zalan Bujtas  <zalan@apple.com>
1546
1547         Subpixel rendering: iOS video playback controls look blurry.
1548         https://bugs.webkit.org/show_bug.cgi?id=135245
1549         <rdar://problem/16878037>
1550
1551         Reviewed by Simon Fraser.
1552
1553         This patch introduces a compositing parent of the overlay control panel so that
1554         the transformed overlay panel becomes sharp. This is a workaround for webkit.org/b/135246.
1555
1556         Can't find a way to test it yet.
1557
1558         * Modules/mediacontrols/mediaControlsApple.css:
1559         (video::-webkit-media-controls-panel-composited-parent):
1560         * Modules/mediacontrols/mediaControlsApple.js:
1561         (Controller.prototype.createControls):
1562         (Controller.prototype.addControls):
1563         * Modules/mediacontrols/mediaControlsiOS.css:
1564         (video::-webkit-media-controls-panel-composited-parent):
1565         * Modules/mediacontrols/mediaControlsiOS.js: This is a workaround for webkit.org/b/135248
1566         It pushes the overlay panel down to close the gap with the video element. Since the
1567         panel's size in css pixels is scale dependent, the gap needs to be scale dependent too.
1568         (ControllerIOS.prototype.set pageScaleFactor):
1569
1570 2014-07-24  Dirk Schulze  <krit@webkit.org>
1571
1572         Turn x/y to presentation attributes
1573         https://bugs.webkit.org/show_bug.cgi?id=135215
1574
1575         Reviewed by Dean Jackson.
1576
1577         This follows the patch for width and height presentation attributes and
1578         turns x and y to presentation attributes as well:
1579
1580         http://trac.webkit.org/changeset/171341
1581
1582         Tests: svg/css/parse-length.html
1583                transitions/svg-layout-transition.html
1584
1585         Added copyright where I forgot it in previous patch.
1586
1587         * css/CSSComputedStyleDeclaration.cpp: Computed style of x and y.
1588         (WebCore::ComputedStyleExtractor::propertyValue):
1589         * css/CSSParser.cpp:
1590         (WebCore::isSimpleLengthPropertyID): Add x and y to list.
1591         * css/DeprecatedStyleBuilder.cpp:
1592         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Resolve x and y.
1593         * css/SVGCSSParser.cpp:
1594         (WebCore::CSSParser::parseSVGValue): Parse x and y property.
1595         * css/SVGCSSPropertyNames.in: Add x and y to list of names.
1596         * css/StyleResolver.h:
1597         * page/animation/CSSPropertyAnimation.cpp: Animate x and y as Length.
1598         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
1599         * rendering/style/RenderStyle.h: Add x and y setters and getters.
1600         * rendering/style/SVGRenderStyle.cpp: Add x and y setters for StyleLayoutData.
1601         (WebCore::SVGRenderStyle::SVGRenderStyle):
1602         (WebCore::SVGRenderStyle::operator==):
1603         (WebCore::SVGRenderStyle::copyNonInheritedFrom):
1604         (WebCore::SVGRenderStyle::diff):
1605         * rendering/style/SVGRenderStyle.h:
1606         (WebCore::SVGRenderStyle::setX):
1607         (WebCore::SVGRenderStyle::setY):
1608         (WebCore::SVGRenderStyle::x):
1609         (WebCore::SVGRenderStyle::y):
1610         * rendering/style/SVGRenderStyleDefs.cpp: Add StyleLayoutData for style storing.
1611         (WebCore::StyleLayoutData::StyleLayoutData):
1612         (WebCore::StyleLayoutData::copy):
1613         (WebCore::StyleLayoutData::operator==):
1614         * rendering/style/SVGRenderStyleDefs.h:
1615         (WebCore::StyleLayoutData::create):
1616         (WebCore::StyleLayoutData::operator!=):
1617         * rendering/svg/RenderSVGRect.cpp:
1618         (WebCore::RenderSVGRect::updateShapeFromElement):
1619         * rendering/svg/SVGPathData.cpp: Use RenderStyle values rather than attribute values.
1620         (WebCore::updatePathFromRectElement):
1621         * svg/SVGAnimationElement.cpp:
1622         (WebCore::SVGAnimationElement::isTargetAttributeCSSProperty): Fix text detection.
1623         * svg/SVGElement.cpp: Add x and y to the relevant property lists.
1624         (WebCore::populateAttributeNameToCSSPropertyIDMap):
1625         (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap):
1626         * svg/SVGFilterElement.cpp: Style update on change of x and y.
1627         (WebCore::SVGFilterElement::svgAttributeChanged):
1628         * svg/SVGMaskElement.cpp: Ditto.
1629         (WebCore::SVGMaskElement::svgAttributeChanged):
1630         * svg/SVGPatternElement.cpp: Ditto.
1631         (WebCore::SVGPatternElement::svgAttributeChanged):
1632         * svg/SVGRectElement.cpp: Ditto.
1633         (WebCore::SVGRectElement::svgAttributeChanged):
1634         * svg/SVGTextPositioningElement.cpp: Exclude x and y of text elements since they
1635             are lists instead of individual values. Solution about to be discussed
1636             in the WG. Keep current behavior for now.
1637         (WebCore::SVGTextPositioningElement::collectStyleForPresentationAttribute):
1638         (WebCore::SVGTextPositioningElement::isPresentationAttribute):
1639         * svg/SVGTextPositioningElement.h:
1640
1641 2014-07-24  Yusuke Suzuki  <utatane.tea@gmail.com>
1642
1643         CSS JIT: Implement Pseudo Element
1644         https://bugs.webkit.org/show_bug.cgi?id=134835
1645
1646         Reviewed by Benjamin Poulain.
1647
1648         Implement Pseudo Element handling for CSS JIT SelectorCompiler.
1649         At first, we start with the simple implementation. We handle limited number of pseudo element,
1650         before, after, first-line, first-letter.
1651
1652         Tests: fast/selectors/pseudo-element-inside-any.html
1653                fast/selectors/querySelector-pseudo-element-inside-functional-pseudo-class-any.html
1654                fast/selectors/querySelector-pseudo-element-inside-functional-pseudo-class-not.html
1655                fast/selectors/querySelector-pseudo-element.html
1656
1657         * css/ElementRuleCollector.cpp:
1658         (WebCore::ElementRuleCollector::ruleMatches):
1659         * css/SelectorChecker.cpp:
1660         (WebCore::SelectorChecker::matchRecursively):
1661         * cssjit/SelectorCompiler.cpp:
1662         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
1663         (WebCore::SelectorCompiler::constructFragments):
1664         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
1665         (WebCore::SelectorCompiler::SelectorCodeGenerator::loadCheckingContext):
1666         (WebCore::SelectorCompiler::SelectorCodeGenerator::branchOnResolvingModeWithCheckingContext):
1667         (WebCore::SelectorCompiler::SelectorCodeGenerator::branchOnResolvingMode):
1668         (WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNotResolvingStyle):
1669         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1670         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
1671         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
1672         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPseudoElement):
1673         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement):
1674         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateMarkPseudoStyleForPseudoElement):
1675         * cssjit/SelectorCompiler.h:
1676         * rendering/style/RenderStyle.h:
1677         * rendering/style/RenderStyleConstants.h:
1678
1679 2014-07-24  Radu Stavila  <stavila@adobe.com>
1680
1681         REGRESSION (r169105): Crash in selection
1682         https://bugs.webkit.org/show_bug.cgi?id=134303
1683
1684         Patch by Radu Stavila <stavila@adobe.com> on 2014-07-24
1685         Reviewed by David Hyatt.
1686
1687         When splitting the selection between different subtrees, all subtrees must have their selection cleared before
1688         starting to apply the new selection. Otherwise, when selecting objects in a named flow thread and going up
1689         its containing block chain, we can end up in the view's selection root, which has not yet been updated and so
1690         we get inconsistent data.
1691
1692         To achieve this goal, the selection update was split into a "clear" and an "apply" method. The updateSelectionForSubtrees
1693         method first iterates through all subtrees and performs the "clear" method and then starts all over again
1694         and performs the "apply" method.
1695
1696         Test: fast/regions/selection/crash-deselect.html
1697
1698         * WebCore.xcodeproj/project.pbxproj:
1699         * rendering/RenderSelectionInfo.h:
1700         * rendering/RenderView.cpp:
1701         (WebCore::RenderView::setSelection):
1702         (WebCore::RenderView::splitSelectionBetweenSubtrees):
1703         (WebCore::RenderView::updateSelectionForSubtrees): Added, clears and re-applies selection for all selection subtrees.
1704         (WebCore::RenderView::clearSubtreeSelection): Added, clears selection and returns previously selected information.
1705         (WebCore::RenderView::applySubtreeSelection): Added, updates the selection status of all objects inside the selection tree, compares old and new data and repaints accordingly.
1706         (WebCore::RenderView::setSubtreeSelection): Deleted.
1707         * rendering/RenderView.h:
1708         * rendering/SelectionSubtreeRoot.cpp:
1709         (WebCore::SelectionSubtreeRoot::SelectionSubtreeRoot):
1710         * rendering/SelectionSubtreeRoot.h:
1711         (WebCore::SelectionSubtreeRoot::OldSelectionData::OldSelectionData):
1712
1713 2014-07-24  Ryosuke Niwa  <rniwa@webkit.org>
1714
1715         REGRESSION(r164401): Placing a caret doesn't bring up autocorrection panel
1716         https://bugs.webkit.org/show_bug.cgi?id=135278
1717
1718         Reviewed by Tim Horton.
1719
1720         The bug was caused by editorUIUpdateTimerFired calling respondToChangedSelection only if the selection was
1721         triggered by dictation instead of only if it was NOT triggered by dictation.
1722
1723         Prior to r164401, AlternativeTextController::respondToMarkerAtEndOfWord exited early when SetSelectionOptions
1724         had DictationTriggered set. r164401 intended to move this check to editorUIUpdateTimerFired to avoid passing
1725         options around but the boolean condition was erroneously flipped.
1726
1727         Fixed the bug by negating the condition in editorUIUpdateTimerFired.
1728
1729         No new tests for now since autocorrection panel cannot be tested automatically. (We should really automate this!)
1730
1731         * editing/Editor.cpp:
1732         (WebCore::Editor::editorUIUpdateTimerFired):
1733
1734 2014-07-24  Pratik Solanki  <psolanki@apple.com>
1735
1736         REGRESSION(r171526): [GTK] Massive crashes.
1737         https://bugs.webkit.org/show_bug.cgi?id=135283
1738
1739         Unreviewed. GTK build fix after r171526. Initialize m_buffer in SharedBuffer constructor.
1740
1741         * platform/soup/SharedBufferSoup.cpp:
1742         (WebCore::SharedBuffer::SharedBuffer):
1743
1744 2014-07-24  Tim Horton  <timothy_horton@apple.com>
1745
1746         Crashes under scanSelectionForTelephoneNumbers in Range::text() on some sites
1747         https://bugs.webkit.org/show_bug.cgi?id=135281
1748         <rdar://problem/17803347>
1749
1750         Reviewed by Ryosuke Niwa.
1751
1752         * editing/Editor.cpp:
1753         (WebCore::Editor::scanSelectionForTelephoneNumbers):
1754         toNormalizedRange is not guaranteed to return a non-null range.
1755         If it returns null, pass the empty markedRanges down to the client as our new set.
1756
1757 2014-07-24  Dan Bernstein  <mitz@apple.com>
1758
1759         WebCore part of <rdar://problem/17593701> Assertion failure in WebPage::reload (!m_pendingNavigationID) when reloading after a same-document back navigation
1760         https://bugs.webkit.org/show_bug.cgi?id=135129
1761
1762         Reviewed by Darin Adler.
1763
1764         * WebCore.exp.in: Exported equalIgnoringFragmentIdentifier(const URL&, const URL&).
1765
1766 2014-07-24  Simon Fraser  <simon.fraser@apple.com>
1767
1768         [iOS WK1] CSS viewport units use the wrong viewport size in WebKit1
1769         https://bugs.webkit.org/show_bug.cgi?id=135254
1770         <rdar://problem/17781423>
1771
1772         Reviewed by Tim Horton.
1773
1774         Test: fast/css/viewport-units-dynamic.html
1775         
1776         In WebKit1 on iOS, we want to resolve viewport units against the visible
1777         viewport, not the legacy WK1 notion of the "viewport" which is the entire document.
1778         
1779         Fixes rendering of medium.com articles in WK1 views on iPad.
1780
1781         * page/FrameView.cpp:
1782         (WebCore::FrameView::viewportSizeForCSSViewportUnits):
1783
1784 2014-07-24  Myles C. Maxfield  <mmaxfield@apple.com>
1785
1786         Crash when measuring a glyphs from a fallback SVG font
1787         https://bugs.webkit.org/show_bug.cgi?id=135264
1788
1789         Reviewed by Simon Fraser.
1790
1791         We can't realize font data for all fallback fonts ahead
1792         of time, but we don't have all the necessary context to
1793         realize SVG fallback data when it's needed. For now, we
1794         can just bail; however, a larger, more invasive fix is
1795         in order.
1796
1797         Test: svg/text/svg-fallback-font-crash.html
1798
1799         * platform/graphics/WidthIterator.cpp:
1800         (WebCore::applyFontTransforms):
1801
1802 2014-07-24  Daniel Bates  <dabates@apple.com>
1803             And Alexey Proskuryakov  <ap@apple.com>
1804
1805         [iOS] REGRESSION (WebKit2): Can't login to Wordpress.com, facebook.com when always allowing cookies
1806         https://bugs.webkit.org/show_bug.cgi?id=135273
1807         <rdar://problem/17598815>
1808
1809         Reviewed by Alexey Proskuryakov.
1810
1811         Fixes an issue where cookies may be created in the wrong cookie store.
1812
1813         Currently, when we update the CFURLRequest object associated with a ResourceRequest object
1814         we explicitly set a cookie storage, cookie accept policy, and SSL properties based on the
1815         corresponding values in the old CFURLRequest object (if we have one). This ultimately leads
1816         to CFNetwork associating the cookies for the request with a different cookie store when we
1817         handle the request in the NetworkProcess. Instead, we shouldn't set these properties
1818         explicitly as we already copy them implicitly earlier (via CFURLRequestCreateMutableCopy()).
1819
1820         * platform/network/cf/ResourceRequestCFNet.cpp:
1821         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1822
1823 2014-07-24  Peyton Randolph  <prandolph@apple.com>
1824
1825         Rename feature flag for long-press gesture on Mac.                                                                   
1826         https://bugs.webkit.org/show_bug.cgi?id=135259                                                                  
1827
1828         Reviewed by Beth Dakin.
1829
1830         * Configurations/FeatureDefines.xcconfig:
1831         Rename LINK_LONG_PRESS to MAC_LONG_PRESS.
1832
1833 2014-07-24  Dan Bernstein  <mitz@apple.com>
1834
1835         Fixed Windows build fix.
1836
1837         * platform/network/cf/AuthenticationCF.cpp:
1838
1839 2014-07-24  Dan Bernstein  <mitz@apple.com>
1840
1841         Attempted Windows build fix.
1842
1843         * platform/network/cf/AuthenticationCF.cpp:
1844         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
1845         * platform/network/cf/CredentialStorageCFNet.cpp:
1846         (WebCore::CredentialStorage::getFromPersistentStorage):
1847         * platform/network/cf/ProtectionSpaceCFNet.cpp:
1848         (WebCore::ProtectionSpace::receivesCredentialSecurely):
1849         (WebCore::ProtectionSpaceBase::receivesCredentialSecurely): Deleted.
1850
1851 2014-07-24  Dan Bernstein  <mitz@apple.com>
1852
1853         <rdar://problem/17766348> [Cocoa] WebCore::ProtectionSpace doesn’t preserve all NSURLProtectionSpace properties, such as the distinguishedNames array
1854         https://bugs.webkit.org/show_bug.cgi?id=135229
1855
1856         Reviewed by Alexey Proskuryakov.
1857
1858         * CMakeLists.txt: Updated for rename of a source file.
1859
1860         * WebCore.exp.in: Updated.
1861
1862         * WebCore.vcxproj/WebCore.vcxproj: Updated for rename of source files, added
1863         ProtectionSpaceCFNet.{cpp,h}.
1864         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1865
1866         * WebCore.xcodeproj/project.pbxproj: Updated for rename of source files, added
1867         ProtectionSpaceCococa.{h.mm}.
1868
1869         * platform/network/ProtectionSpace.cpp: Renamed to ProtectionSpaceBase.cpp.
1870         * platform/network/ProtectionSpace.h: This file was renamed to ProtectionSpaceBase.h, and
1871         in its place added a generic ProtectionSpace class that just derives from
1872         ProtectionSpaceBase. For Cocoa and CFNetwork, ProtectionSpace{Cocoa,CFNet}.h is included
1873         instead of the generic class.
1874
1875         * platform/network/ProtectionSpaceBase.cpp: Renamed ProtectionSpace.cpp to this.
1876         (WebCore::ProtectionSpaceBase::ProtectionSpaceBase): Updated for rename.
1877         (WebCore::ProtectionSpaceBase::host): Ditto.
1878         (WebCore::ProtectionSpaceBase::port): Ditto.
1879         (WebCore::ProtectionSpaceBase::serverType): Ditto.
1880         (WebCore::ProtectionSpaceBase::isProxy): Ditto.
1881         (WebCore::ProtectionSpaceBase::realm): Ditto.
1882         (WebCore::ProtectionSpaceBase::authenticationScheme): Ditto.
1883         (WebCore::ProtectionSpaceBase::receivesCredentialSecurely): Removed CFNetwork-specific part,
1884         which is now implemented in ProtectionSpaceCFNet.cpp.
1885         (WebCore::ProtectionSpaceBase::compare): Replaced operator== with this, and made it call
1886         ProtectionSpace::platformCompare at the end if needed.
1887
1888         * platform/network/ProtectionSpaceBase.h: Renamed ProtectionSpace.h to this.
1889         (WebCore::ProtectionSpaceBase::encodingRequiresPlatformData): Added with a default
1890         implementation that returns false, for ProtectionSpace implementations to override.
1891         (WebCore::ProtectionSpaceBase::platformCompare): Added with a default implementation that
1892         returns true, for ProtectionSpace implementations to override.
1893         (WebCore::operator==): Changed to call compare.
1894
1895         * platform/network/cf/AuthenticationCF.cpp:
1896         (WebCore::AuthenticationChallenge::AuthenticationChallenge): Changed to use the
1897         ProtectionSpace constructor that takes a CFURLProtectionSpaceRef.
1898         (WebCore::createCF): Changed to use ProtectionSpace::cfSpace.
1899
1900         * platform/network/cf/AuthenticationCF.h: Guarded a couple of functiosn that aren’t used in
1901         Cocoa with #if PLATFORM(WIN).
1902
1903         * platform/network/cf/CredentialStorageCFNet.cpp:
1904         (WebCore::CredentialStorage::getFromPersistentStorage): Changed to use
1905         ProtectionSpace::cfSpace.
1906         (WebCore::CredentialStorage::saveToPersistentStorage): Ditto.
1907
1908         * platform/network/cf/ProtectionSpaceCFNet.cpp: Added.
1909         (WebCore::ProtectionSpaceBase::receivesCredentialSecurely): Override with the
1910         CFNetwork-specific test that was previously in ProtectionSpace.cpp.
1911
1912         * platform/network/cf/ProtectionSpaceCFNet.h: Copied from Source/WebCore/platform/network/ProtectionSpace.h.
1913         Declare ProtectionSpace and override receivesCredentialSecurely.
1914
1915         * platform/network/mac/AuthenticationMac.h: Deleted the ProtectionSpace core() and mac().
1916         * platform/network/mac/AuthenticationMac.mm:
1917         (WebCore::AuthenticationChallenge::AuthenticationChallenge): Changed to use the
1918         ProtectionSpace constructor that takes an NSURLProtectionSpace.
1919         (WebCore::mac): Changed to use ProtectionSpace::nsSpace.
1920
1921         * platform/network/mac/CredentialStorageMac.mm:
1922         (WebCore::CredentialStorage::getFromPersistentStorage): Ditto.
1923
1924         * platform/network/mac/ResourceHandleMac.mm:
1925         (WebCore::ResourceHandle::receivedCredential): Changed to use the ProtectionSpace
1926         constructor that takes an NSURLProtectionSpace.
1927
1928         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
1929         (-[WebCoreResourceHandleAsDelegate connection:canAuthenticateAgainstProtectionSpace:]):
1930         Ditto.
1931
1932         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
1933         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:canAuthenticateAgainstProtectionSpace:]):
1934         Ditto.
1935
1936 2014-07-24  Benjamin Poulain  <benjamin@webkit.org>
1937
1938         [WK2] Fixed/Sticky layers can get mispositioned when the layer tree commit change their position or size
1939         https://bugs.webkit.org/show_bug.cgi?id=135227
1940         <rdar://problem/17279500>
1941
1942         Reviewed by Simon Fraser.
1943
1944         Keep track of the creation/destruction of Fixed and Sticky nodes in the ScrollingTree.
1945
1946         * page/scrolling/ScrollingTree.cpp:
1947         (WebCore::ScrollingTree::ScrollingTree):
1948         * page/scrolling/ScrollingTree.h:
1949         (WebCore::ScrollingTree::hasFixedOrSticky):
1950         (WebCore::ScrollingTree::fixedOrStickyNodeAdded):
1951         (WebCore::ScrollingTree::fixedOrStickyNodeRemoved):
1952         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
1953         (WebCore::ScrollingTreeFixedNode::ScrollingTreeFixedNode):
1954         (WebCore::ScrollingTreeFixedNode::~ScrollingTreeFixedNode):
1955         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
1956         (WebCore::ScrollingTreeStickyNode::ScrollingTreeStickyNode):
1957         (WebCore::ScrollingTreeStickyNode::~ScrollingTreeStickyNode):
1958
1959 2014-07-24  Wenson Hsieh  <wenson_hsieh@apple.com>
1960
1961         Let WheelEvent wrap a PlatformWheelEvent
1962         https://bugs.webkit.org/show_bug.cgi?id=135244
1963
1964         When WheelEvent is initialized with a PlatformWheelEvent, store that PlatformWheelEvent for future use.
1965
1966         Reviewed by Beth Dakin.
1967
1968         No new tests because behavior should not have changed.
1969
1970         * dom/WheelEvent.cpp: Added method to access the PlatformWheelEvent.
1971         (WebCore::WheelEvent::WheelEvent):
1972         * dom/WheelEvent.h: Added field to store PlatformWheelEvent, if initialized via PlatformWheelEvent.
1973         (WebCore::WheelEvent::wheelEvent):
1974
1975 2014-07-24  Brian J. Burg  <burg@cs.washington.edu>
1976
1977         Web Replay: don't encode/decode primitive types that lack explicit sizes
1978         https://bugs.webkit.org/show_bug.cgi?id=133430
1979
1980         Reviewed by Anders Carlsson.
1981
1982         Remove uses of unsigned long in encode/decode methods because the type lacks an
1983         explicit size. Move frame index serialization away from using unsigned long.
1984
1985         * replay/ReplayController.cpp:
1986         (WebCore::logDispatchedDOMEvent): Fix the format string.
1987         * replay/SerializationMethods.cpp:
1988         (WebCore::frameIndexFromDocument):
1989         (WebCore::frameIndexFromFrame):
1990         (WebCore::documentFromFrameIndex):
1991         (WebCore::frameFromFrameIndex):
1992         (JSC::EncodingTraits<PluginData>::encodeValue):
1993         (JSC::EncodingTraits<PluginData>::decodeValue):
1994         * replay/SerializationMethods.h:
1995         * replay/WebInputs.json: Remove primitive types without explicit sizes.
1996
1997 2014-07-24  Pratik Solanki  <psolanki@apple.com>
1998
1999         Sharing SharedBuffer between WebCore and ImageIO is racy and crash prone
2000         https://bugs.webkit.org/show_bug.cgi?id=135069
2001         <rdar://problem/17470655>
2002
2003         Reviewed by Simon Fraser.
2004
2005         When passing image data to ImageIO for decoding, we pass an NSData subclass that is a wraper
2006         around SharedBuffer. This can be a problem when ImageIO tries to access the data on the CA
2007         thread. End result is data corruption on large image loads and potential crashes. The fix is
2008         to have SharedBuffer create a copy of its data if the data has been passed to ImageIO and
2009         might be accessed concurrently.
2010
2011         Since Vector is not refcounted, we do this by having a new refcounted object in SharedBuffer
2012         that contains the buffer and we pass that in our NSData subclass WebCoreSharedBufferData.
2013         Code that would result in the Vector memory moving e.g. append(), resize(), now checks to
2014         see if the buffer was shared and if so, will create a new copy of the vector. This ensures
2015         that the main thread does not end up invalidating the vector memory that we have passed it
2016         to ImageIO.
2017
2018         No new tests because no functional changes.
2019
2020         * loader/cache/CachedResource.cpp:
2021         (WebCore::CachedResource::makePurgeable):
2022             Remove early return - createPurgeableMemory() has the correct check now.
2023         * platform/SharedBuffer.cpp:
2024         (WebCore::SharedBuffer::SharedBuffer):
2025         (WebCore::SharedBuffer::adoptVector):
2026         (WebCore::SharedBuffer::createPurgeableBuffer):
2027             Don't create purgeable buffer if we are sharing the buffer.
2028         (WebCore::SharedBuffer::append):
2029         (WebCore::SharedBuffer::clear):
2030         (WebCore::SharedBuffer::copy):
2031         (WebCore::SharedBuffer::duplicateDataBufferIfNecessary): Added.
2032             Create a new copy of the data if we have shared the buffer and if appending to it would
2033             exceed the capacity of the vector resulting in memmove.
2034         (WebCore::SharedBuffer::appendToInternalBuffer): Added.
2035         (WebCore::SharedBuffer::clearInternalBuffer): Added.
2036         (WebCore::SharedBuffer::buffer):
2037             Create a new copy of the buffer if we have shared it.
2038         (WebCore::SharedBuffer::getSomeData):
2039         * platform/SharedBuffer.h:
2040         * platform/cf/SharedBufferCF.cpp:
2041         (WebCore::SharedBuffer::SharedBuffer):
2042         (WebCore::SharedBuffer::singleDataArrayBuffer):
2043         (WebCore::SharedBuffer::maybeAppendDataArray):
2044         * platform/mac/SharedBufferMac.mm:
2045             Pass the InternalBuffer object to WebCoreSharedBufferData
2046         (-[WebCoreSharedBufferData dealloc]):
2047         (-[WebCoreSharedBufferData initWithSharedBufferInternalBuffer:]):
2048         (-[WebCoreSharedBufferData length]):
2049         (-[WebCoreSharedBufferData bytes]):
2050         (WebCore::SharedBuffer::createNSData):
2051             Call createCFData() instead of duplicating code.
2052         (WebCore::SharedBuffer::createCFData):
2053             If the data is in purgeable memory, make a copy of it since m_buffer was cleared when
2054             creating the purgeable buffer.
2055         (-[WebCoreSharedBufferData initWithSharedBuffer:]): Deleted.
2056
2057 2014-07-24  peavo@outlook.com  <peavo@outlook.com>
2058
2059         [Curl] Enable file logging.
2060         https://bugs.webkit.org/show_bug.cgi?id=135202
2061
2062         Reviewed by Alex Christensen.
2063
2064         The Curl api offers the possibility to write log messages to file. Enable this for debugging purposes.
2065
2066         * platform/network/curl/ResourceHandleManager.cpp:
2067         (WebCore::ResourceHandleManager::ResourceHandleManager):
2068         (WebCore::ResourceHandleManager::~ResourceHandleManager):
2069         (WebCore::ResourceHandleManager::initializeHandle):
2070         * platform/network/curl/ResourceHandleManager.h:
2071
2072 2014-07-24  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
2073
2074         Sort WebCore.exp.in after r171252
2075         https://bugs.webkit.org/show_bug.cgi?id=135239
2076
2077         Reviewed by Csaba Osztrogonác.
2078
2079         * WebCore.exp.in:
2080
2081 2014-07-24  Mihnea Ovidenie  <mihnea@adobe.com>
2082
2083         [New Multicolumn] Assertion failure when an input element has multicolumn style
2084         https://bugs.webkit.org/show_bug.cgi?id=135234
2085
2086         Reviewed by Andrei Bucur.
2087
2088         Restrict the assertion in RenderBlock::canComputeRegionRangeForBox
2089         only to RenderNamedFlowThread objects since for RenderMultiColumnFlowThread
2090         objects we can compute a range of regions during their parent block layout.   
2091
2092         Test: fast/multicol/newmulticol/input-as-multicol.html
2093
2094         * rendering/RenderBlock.cpp:
2095         (WebCore::canComputeRegionRangeForBox):
2096
2097 2014-07-23  Jeremy Jones  <jeremyj@apple.com>
2098
2099         Transparent fullscreen background when video is not present.
2100         https://bugs.webkit.org/show_bug.cgi?id=135226
2101
2102         Reviewed by Simon Fraser.
2103
2104         Set background to black just before beginning the animation to fullscreen.
2105
2106         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2107         (WebVideoFullscreenInterfaceAVKit::enterFullscreen): set background color black.
2108
2109 2014-07-23  Joseph Pecoraro  <pecoraro@apple.com>
2110
2111         ScriptController::updateDocument ASSERT mutating map while iterating map
2112         https://bugs.webkit.org/show_bug.cgi?id=135211
2113
2114         Reviewed by Oliver Hunt.
2115
2116         Avoid iterating over m_windowShells in more places. This prevents
2117         the possibility of a collection during JSC allocation which might
2118         cause a mutation to m_windowShells (HTMLMediaElement destruction).
2119
2120         Have ScriptController defriend ScriptCachedFrameData by providing
2121         a getter for the list of window shells.
2122
2123         * bindings/js/ScriptCachedFrameData.cpp:
2124         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
2125         (WebCore::ScriptCachedFrameData::restore):
2126         * bindings/js/ScriptController.cpp:
2127         (WebCore::ScriptController::windowShells):
2128         (WebCore::ScriptController::clearWindowShell):
2129         (WebCore::ScriptController::attachDebugger):
2130         (WebCore::ScriptController::updateDocument):
2131         * bindings/js/ScriptController.h:
2132
2133 2014-07-23  Commit Queue  <commit-queue@webkit.org>
2134
2135         Unreviewed, rolling out r171498.
2136         https://bugs.webkit.org/show_bug.cgi?id=135223
2137
2138         It will regress some scroll position restoration on navigation
2139         (r167916). (Requested by smfr on #webkit).
2140
2141         Reverted changeset:
2142
2143         "[iOS WK2] Header bar on nytimes articles lands in the wrong
2144         place after rubberbanding"
2145         https://bugs.webkit.org/show_bug.cgi?id=135221
2146         http://trac.webkit.org/changeset/171498
2147
2148 2014-07-23  Tim Horton  <timothy_horton@apple.com>
2149
2150         REGRESSION (r171376): Sometimes we detect less than the whole phone number
2151         https://bugs.webkit.org/show_bug.cgi?id=135220
2152         <rdar://problem/17783423>
2153
2154         Reviewed by Brady Eidson.
2155
2156         * editing/Editor.cpp:
2157         (WebCore::Editor::scanSelectionForTelephoneNumbers):
2158         Use the visible selection's start and end instead of base and extent, because they'll
2159         always be in the right order in the case of a directional selection (base can be *after* extent
2160         if you select from right to left). This fixes the code that expands the selection.
2161
2162         Pass the *entire* expanded selection to DataDetectors, instead of using TextIterator.
2163         This way, we will find each number only once, and will never get part of a phone number once
2164         and then the whole phone number later.
2165
2166 2014-07-23  Simon Fraser  <simon.fraser@apple.com>
2167
2168         [iOS WK2] Header bar on nytimes articles lands in the wrong place after rubberbanding
2169         https://bugs.webkit.org/show_bug.cgi?id=135221
2170
2171         Reviewed by Tim Horton.
2172
2173         Add a function on GraphicsLayer to force a flush of the layer position
2174         to the underlying graphics system, so that when layers cease being
2175         scroll-coordinated, we can ensure that their layers are repositioned
2176         in the correct location.
2177
2178         * WebCore.exp.in:
2179         * platform/graphics/GraphicsLayer.h:
2180         (WebCore::GraphicsLayer::forcePositionUpdate):
2181         * platform/graphics/ca/GraphicsLayerCA.cpp:
2182         (WebCore::GraphicsLayerCA::forcePositionUpdate):
2183         * platform/graphics/ca/GraphicsLayerCA.h:
2184         * rendering/RenderLayerCompositor.cpp:
2185         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
2186
2187 2014-07-23  Pratik Solanki  <psolanki@apple.com>
2188
2189         Get rid of SharedBuffer::NSDataRetainPtrWithoutImplicitConversionOperator
2190         https://bugs.webkit.org/show_bug.cgi?id=135219
2191
2192         Reviewed by Anders Carlsson.
2193
2194         No new tests because no functional changes.
2195
2196         * loader/ResourceBuffer.h:
2197         * loader/mac/ResourceBuffer.mm:
2198         (WebCore::ResourceBuffer::createNSData):
2199         * platform/SharedBuffer.h:
2200         (WebCore::SharedBuffer::NSDataRetainPtrWithoutImplicitConversionOperator::NSDataRetainPtrWithoutImplicitConversionOperator): Deleted.
2201         * platform/mac/SharedBufferMac.mm:
2202         (WebCore::SharedBuffer::createNSData):
2203
2204 2014-07-23  Zalan Bujtas  <zalan@apple.com>
2205
2206         Subpixel rendering: Cleanup RenderLayerCompositor::deviceScaleFactor()
2207         https://bugs.webkit.org/show_bug.cgi?id=135208
2208
2209         Reviewed by Simon Fraser.
2210
2211         Use m_renderView.document() to retrieve device scale factor value. m_renderView.document()
2212         is always available while this->page() is not.
2213
2214         No change in behavior.
2215
2216         * rendering/RenderLayerBacking.cpp:
2217         (WebCore::RenderLayerBacking::updateTransform):
2218         (WebCore::RenderLayerBacking::computeTransformOriginForPainting):
2219         * rendering/RenderLayerCompositor.cpp:
2220         (WebCore::RenderLayerCompositor::deviceScaleFactor):
2221
2222 2014-07-23  peavo@outlook.com  <peavo@outlook.com>
2223
2224         [WinCairo] Gstreamer rendering is not working.
2225         https://bugs.webkit.org/show_bug.cgi?id=135201
2226
2227         Reviewed by Alex Christensen.
2228
2229         WinCairo does not support accelerated rendering yet.
2230
2231         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2232         (WebCore::MediaPlayerPrivateGStreamerBase::supportsAcceleratedRendering):
2233
2234 2014-07-23  Commit Queue  <commit-queue@webkit.org>
2235
2236         Unreviewed, rolling out r171455.
2237         https://bugs.webkit.org/show_bug.cgi?id=135209
2238
2239         completely broke selection highlight invalidation (Requested
2240         by thorton on #webkit).
2241
2242         Reverted changeset:
2243
2244         "REGRESSION (r169105): Crash in selection"
2245         https://bugs.webkit.org/show_bug.cgi?id=134303
2246         http://trac.webkit.org/changeset/171455
2247
2248 2014-07-23  Alex Christensen  <achristensen@webkit.org>
2249
2250         Compile window-inactive and fullscreen pseudoclasses in css selectors.
2251         https://bugs.webkit.org/show_bug.cgi?id=135200
2252
2253         Reviewed by Benjamin Poulain.
2254
2255         * css/SelectorChecker.cpp:
2256         (WebCore::SelectorChecker::checkOne):
2257         Removed the check of context.hasSelectionPseudo for a window-inactive pseudoclass.
2258         Moved logic to SelectorCheckerTestFunctions.h to share with the selector compiler.
2259         * css/SelectorCheckerTestFunctions.h:
2260         (WebCore::isWindowInactive):
2261         (WebCore::matchesFullScreenAnimatingFullScreenTransitionPseudoClass):
2262         (WebCore::matchesFullScreenAncestorPseudoClass):
2263         (WebCore::matchesFullScreenDocumentPseudoClass):
2264         Added from SelectorChecker.cpp.
2265         * cssjit/SelectorCompiler.cpp:
2266         (WebCore::SelectorCompiler::addPseudoClassType):
2267         Added unoptimized pseudoclass cases for window-inactive and fullscreen pseudoclasses.
2268         Explicitly listed uncompiled pseudoclasses for future work instead of using a default.
2269
2270 2014-07-23  Brent Fulgham  <bfulgham@apple.com>
2271
2272         [Win] Use NO_RETURN_DUE_TO_CRASH on Windows.
2273         https://bugs.webkit.org/show_bug.cgi?id=13519
2274
2275         Reviewed by Mark Lam.
2276
2277         * svg/SVGZoomAndPan.h: Add NO_RETURN_DUE_TO_CRASH to
2278         header so function declarations match implementation.
2279
2280 2014-07-23  Joseph Pecoraro  <pecoraro@apple.com>
2281
2282         JSDOMWindowShell leaks on pages with media elements
2283         https://bugs.webkit.org/show_bug.cgi?id=135178
2284
2285         Reviewed by Oliver Hunt.
2286
2287         The DOMWindowWorld for HTMLMediaElements with MEDIA_CONTROLS_SCRIPT
2288         was not getting cleared and removed.
2289
2290         * bindings/js/ScriptController.cpp:
2291         (WebCore::ScriptController::clearWindowShell):
2292         Iterate over a copy of the values. A sweep / garbage collection caused by
2293         any JSC allocation during iteration could trigger a mutation of the m_windowShells
2294         table that was being iterating. So instead iterate a list that won't mutate.
2295
2296         * html/HTMLMediaElement.cpp:
2297         (WebCore::HTMLMediaElement::~HTMLMediaElement):
2298         If we had an isolated world, release as much memory as possible.
2299
2300 2014-07-23  Bem Jones-Bey  <bjonesbe@adobe.com>
2301
2302         Ensure we compute the min and max height of replaced elements to 'none' or 0 when appropriate.
2303         https://bugs.webkit.org/show_bug.cgi?id=135181
2304
2305         Reviewed by David Hyatt.
2306
2307         If a replaced element has a percentage min or max height specified then that height value should
2308         compute to 'none' for max-height and 0 for min-height when its containing block
2309         does not have a height 'specified explicitly'.
2310
2311         This is based on a Blink patch by Robert Hogan.
2312
2313         Tests: css2.1/20110323/max-height-percentage-003.html
2314                fast/replaced/max-height-percentage-quirks.html
2315                fast/replaced/min-height-percentage-quirks.html
2316                fast/replaced/min-height-percentage.html
2317
2318         * rendering/RenderBox.cpp:
2319         (WebCore::RenderBox::logicalHeightComputesAsNone):
2320         (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
2321         * rendering/RenderBox.h:
2322
2323 2014-07-23  Bem Jones-Bey  <bjonesbe@adobe.com>
2324
2325         Remove CSS_EXCLUSIONS compile flag and leftover code
2326         https://bugs.webkit.org/show_bug.cgi?id=135175
2327
2328         Reviewed by Zoltan Horvath.
2329
2330         At this point, the CSS_EXCLUSIONS flag guards nothing but some useless
2331         stubs. This removes the flag and the useless code.
2332
2333         No new tests, just removing code.
2334
2335         * Configurations/FeatureDefines.xcconfig:
2336         * bindings/generic/RuntimeEnabledFeatures.cpp:
2337         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
2338         * bindings/generic/RuntimeEnabledFeatures.h:
2339         (WebCore::RuntimeEnabledFeatures::setCSSExclusionsEnabled): Deleted.
2340         (WebCore::RuntimeEnabledFeatures::cssExclusionsEnabled): Deleted.
2341         * testing/InternalSettings.cpp:
2342         (WebCore::InternalSettings::Backup::Backup):
2343         (WebCore::InternalSettings::Backup::restoreTo):
2344         (WebCore::InternalSettings::setCSSExclusionsEnabled): Deleted.
2345         * testing/InternalSettings.h:
2346         * testing/InternalSettings.idl:
2347
2348 2014-07-23  Jer Noble  <jer.noble@apple.com>
2349
2350         [MSE][Mac] Support abort() in SourceBufferPrivateAVFObjC.
2351         https://bugs.webkit.org/show_bug.cgi?id=135163
2352
2353         Reviewed by Brent Fulgham.
2354
2355         Recreate the parser when asked to abort().
2356
2357         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2358         (WebCore::SourceBufferPrivateAVFObjC::abort):
2359
2360 2014-07-23  Myles C. Maxfield  <mmaxfield@apple.com>
2361
2362         Migrate accessibility/ to using nullptr instead of 0
2363         https://bugs.webkit.org/show_bug.cgi?id=135185
2364
2365         Reviewed by Simon Fraser.
2366
2367         No new tests because there is no behavior change.
2368
2369         * accessibility/AXObjectCache.cpp:
2370         (WebCore::AXObjectCache::focusedImageMapUIElement):
2371         (WebCore::AXObjectCache::focusedUIElementForPage):
2372         (WebCore::AXObjectCache::get):
2373         (WebCore::AXObjectCache::getOrCreate):
2374         (WebCore::AXObjectCache::rootObject):
2375         (WebCore::AXObjectCache::rootObjectForFrame):
2376         * accessibility/AXObjectCache.h:
2377         (WebCore::AXObjectCache::focusedUIElementForPage):
2378         (WebCore::AXObjectCache::get):
2379         (WebCore::AXObjectCache::getOrCreate):
2380         (WebCore::AXObjectCache::rootObject):
2381         (WebCore::AXObjectCache::rootObjectForFrame):
2382         (WebCore::AXObjectCache::rootAXEditableElement):
2383         * accessibility/AccessibilityARIAGridRow.cpp:
2384         (WebCore::AccessibilityARIAGridRow::disclosedByRow):
2385         * accessibility/AccessibilityImageMapLink.cpp:
2386         (WebCore::AccessibilityImageMapLink::AccessibilityImageMapLink):
2387         (WebCore::AccessibilityImageMapLink::parentObject):
2388         * accessibility/AccessibilityListBox.cpp:
2389         (WebCore::AccessibilityListBox::listBoxOptionAccessibilityObject):
2390         (WebCore::AccessibilityListBox::elementAccessibilityHitTest):
2391         * accessibility/AccessibilityListBoxOption.cpp:
2392         (WebCore::AccessibilityListBoxOption::AccessibilityListBoxOption):
2393         (WebCore::AccessibilityListBoxOption::parentObject):
2394         (WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
2395         * accessibility/AccessibilityMenuListPopup.cpp:
2396         (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
2397         * accessibility/AccessibilityMockObject.cpp:
2398         (WebCore::AccessibilityMockObject::AccessibilityMockObject):
2399         * accessibility/AccessibilityMockObject.h:
2400         * accessibility/AccessibilityNodeObject.cpp:
2401         (WebCore::AccessibilityNodeObject::detach):
2402         (WebCore::AccessibilityNodeObject::firstChild):
2403         (WebCore::AccessibilityNodeObject::lastChild):
2404         (WebCore::AccessibilityNodeObject::previousSibling):
2405         (WebCore::AccessibilityNodeObject::nextSibling):
2406         (WebCore::AccessibilityNodeObject::parentObject):
2407         (WebCore::AccessibilityNodeObject::document):
2408         (WebCore::AccessibilityNodeObject::anchorElement):
2409         (WebCore::nativeActionElement):
2410         (WebCore::AccessibilityNodeObject::actionElement):
2411         (WebCore::AccessibilityNodeObject::mouseButtonListener):
2412         (WebCore::AccessibilityNodeObject::labelForElement):
2413         (WebCore::AccessibilityNodeObject::menuItemElementForMenu):
2414         (WebCore::AccessibilityNodeObject::menuButtonForMenu):
2415         * accessibility/AccessibilityObject.cpp:
2416         (WebCore::AccessibilityObject::AccessibilityObject):
2417         (WebCore::AccessibilityObject::detach):
2418         (WebCore::AccessibilityObject::firstAccessibleObjectFromNode):
2419         (WebCore::AccessibilityObject::findMatchingObjects):
2420         (WebCore::renderListItemContainerForNode):
2421         (WebCore::AccessibilityObject::accessibilityObjectForPosition):
2422         (WebCore::AccessibilityObject::document):
2423         (WebCore::AccessibilityObject::page):
2424         (WebCore::AccessibilityObject::documentFrameView):
2425         (WebCore::AccessibilityObject::anchorElementForNode):
2426         (WebCore::AccessibilityObject::headingElementForNode):
2427         (WebCore::AccessibilityObject::firstAnonymousBlockChild):
2428         (WebCore::AccessibilityObject::element):
2429         (WebCore::AccessibilityObject::focusedUIElement):
2430         (WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):
2431         * accessibility/AccessibilityObject.h:
2432         (WebCore::AccessibilityObject::node):
2433         (WebCore::AccessibilityObject::renderer):
2434         (WebCore::AccessibilityObject::selectedRadioButton):
2435         (WebCore::AccessibilityObject::selectedTabItem):
2436         (WebCore::AccessibilityObject::accessibilityHitTest):
2437         (WebCore::AccessibilityObject::firstChild):
2438         (WebCore::AccessibilityObject::lastChild):
2439         (WebCore::AccessibilityObject::previousSibling):
2440         (WebCore::AccessibilityObject::nextSibling):
2441         (WebCore::AccessibilityObject::parentObjectIfExists):
2442         (WebCore::AccessibilityObject::observableObject):
2443         (WebCore::AccessibilityObject::titleUIElement):
2444         (WebCore::AccessibilityObject::correspondingLabelForControlElement):
2445         (WebCore::AccessibilityObject::correspondingControlForLabelElement):
2446         (WebCore::AccessibilityObject::scrollBar):
2447         (WebCore::AccessibilityObject::anchorElement):
2448         (WebCore::AccessibilityObject::actionElement):
2449         (WebCore::AccessibilityObject::widget):
2450         (WebCore::AccessibilityObject::widgetForAttachmentView):
2451         (WebCore::AccessibilityObject::activeDescendant):
2452         (WebCore::AccessibilityObject::mathRadicandObject):
2453         (WebCore::AccessibilityObject::mathRootIndexObject):
2454         (WebCore::AccessibilityObject::mathUnderObject):
2455         (WebCore::AccessibilityObject::mathOverObject):
2456         (WebCore::AccessibilityObject::mathNumeratorObject):
2457         (WebCore::AccessibilityObject::mathDenominatorObject):
2458         (WebCore::AccessibilityObject::mathBaseObject):
2459         (WebCore::AccessibilityObject::mathSubscriptObject):
2460         (WebCore::AccessibilityObject::mathSuperscriptObject):
2461         (WebCore::AccessibilityObject::getScrollableAreaIfScrollable):
2462         * accessibility/AccessibilityProgressIndicator.cpp:
2463         (WebCore::AccessibilityProgressIndicator::progressElement):
2464         (WebCore::AccessibilityProgressIndicator::meterElement):
2465         * accessibility/AccessibilityRenderObject.cpp:
2466         (WebCore::AccessibilityRenderObject::detach):
2467         (WebCore::AccessibilityRenderObject::renderBoxModelObject):
2468         (WebCore::AccessibilityRenderObject::firstChild):
2469         (WebCore::AccessibilityRenderObject::lastChild):
2470         (WebCore::startOfContinuations):
2471         (WebCore::childBeforeConsideringContinuations):
2472         (WebCore::AccessibilityRenderObject::previousSibling):
2473         (WebCore::AccessibilityRenderObject::nextSibling):
2474         (WebCore::nextContinuation):
2475         (WebCore::AccessibilityRenderObject::renderParentObject):
2476         (WebCore::AccessibilityRenderObject::parentObject):
2477         (WebCore::AccessibilityRenderObject::anchorElement):
2478         (WebCore::AccessibilityRenderObject::textUnderElement):
2479         (WebCore::AccessibilityRenderObject::node):
2480         (WebCore::AccessibilityRenderObject::labelElementContainer):
2481         (WebCore::AccessibilityRenderObject::internalLinkElement):
2482         (WebCore::AccessibilityRenderObject::titleUIElement):
2483         (WebCore::AccessibilityRenderObject::setFocused):
2484         (WebCore::AccessibilityRenderObject::topRenderer):
2485         (WebCore::AccessibilityRenderObject::document):
2486         (WebCore::AccessibilityRenderObject::widget):
2487         (WebCore::AccessibilityRenderObject::accessibilityParentForImageMap):
2488         (WebCore::AccessibilityRenderObject::documentFrameView):
2489         (WebCore::AccessibilityRenderObject::widgetForAttachmentView):
2490         (WebCore::AccessibilityRenderObject::rootEditableElementForPosition):
2491         (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
2492         (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
2493         (WebCore::AccessibilityRenderObject::remoteSVGElementHitTest):
2494         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
2495         (WebCore::AccessibilityRenderObject::correspondingControlForLabelElement):
2496         (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement):
2497         (WebCore::AccessibilityRenderObject::observableObject):
2498         (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
2499         (WebCore::AccessibilityRenderObject::detachRemoteSVGRoot):
2500         (WebCore::AccessibilityRenderObject::addHiddenChildren):
2501         (WebCore::AccessibilityRenderObject::setAccessibleName):
2502         (WebCore::AccessibilityRenderObject::getScrollableAreaIfScrollable):
2503         (WebCore::AccessibilityRenderObject::mathRadicandObject):
2504         (WebCore::AccessibilityRenderObject::mathRootIndexObject):
2505         (WebCore::AccessibilityRenderObject::mathNumeratorObject):
2506         (WebCore::AccessibilityRenderObject::mathDenominatorObject):
2507         (WebCore::AccessibilityRenderObject::mathUnderObject):
2508         (WebCore::AccessibilityRenderObject::mathOverObject):
2509         (WebCore::AccessibilityRenderObject::mathBaseObject):
2510         (WebCore::AccessibilityRenderObject::mathSubscriptObject):
2511         (WebCore::AccessibilityRenderObject::mathSuperscriptObject):
2512         * accessibility/AccessibilitySVGRoot.cpp:
2513         (WebCore::AccessibilitySVGRoot::AccessibilitySVGRoot):
2514         * accessibility/AccessibilityScrollView.cpp:
2515         (WebCore::AccessibilityScrollView::detach):
2516         (WebCore::AccessibilityScrollView::scrollBar):
2517         (WebCore::AccessibilityScrollView::updateScrollbars):
2518         (WebCore::AccessibilityScrollView::addChildScrollbar):
2519         (WebCore::AccessibilityScrollView::clearChildren):
2520         (WebCore::AccessibilityScrollView::webAreaObject):
2521         (WebCore::AccessibilityScrollView::accessibilityHitTest):
2522         (WebCore::AccessibilityScrollView::documentFrameView):
2523         (WebCore::AccessibilityScrollView::parentObject):
2524         (WebCore::AccessibilityScrollView::parentObjectIfExists):
2525         * accessibility/AccessibilityScrollbar.cpp:
2526         (WebCore::AccessibilityScrollbar::document):
2527         * accessibility/AccessibilitySpinButton.cpp:
2528         (WebCore::AccessibilitySpinButton::AccessibilitySpinButton):
2529         * accessibility/AccessibilityTable.cpp:
2530         (WebCore::AccessibilityTable::AccessibilityTable):
2531         (WebCore::AccessibilityTable::clearChildren):
2532         (WebCore::AccessibilityTable::cellForColumnAndRow):
2533         * accessibility/AccessibilityTableCell.cpp:
2534         (WebCore::AccessibilityTableCell::parentTable):
2535         (WebCore::AccessibilityTableCell::titleUIElement):
2536         * accessibility/AccessibilityTableColumn.cpp:
2537         (WebCore::AccessibilityTableColumn::headerObject):
2538         (WebCore::AccessibilityTableColumn::headerObjectForSection):
2539         * accessibility/AccessibilityTableRow.cpp:
2540         (WebCore::AccessibilityTableRow::parentTable):
2541         (WebCore::AccessibilityTableRow::headerObject):
2542         * accessibility/ios/AXObjectCacheIOS.mm:
2543         (WebCore::AXObjectCache::detachWrapper):
2544         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2545         (-[WebAccessibilityObjectWrapper detach]):
2546         (-[WebAccessibilityObjectWrapper tableCellParent]):
2547         (-[WebAccessibilityObjectWrapper tableParent]):
2548         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
2549         (-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]):
2550         (rendererForView):
2551         (-[WebAccessibilityObjectWrapper _convertToDOMRange:]):
2552         * accessibility/mac/AXObjectCacheMac.mm:
2553         (WebCore::AXObjectCache::detachWrapper):
2554         * accessibility/mac/AccessibilityObjectMac.mm:
2555         (WebCore::AccessibilityObject::detachFromParent):
2556         (WebCore::AccessibilityObject::accessibilityIgnoreAttachment):
2557         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
2558         (-[WebAccessibilityObjectWrapperBase detach]):
2559         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2560         (CreateCGColorIfDifferent):
2561         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
2562         (rendererForView):
2563         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2564         * accessibility/win/AccessibilityObjectWrapperWin.h:
2565         (WebCore::AccessibilityObjectWrapper::AccessibilityObjectWrapper):
2566
2567 2014-07-23  Mihnea Ovidenie  <mihnea@adobe.com>
2568
2569         ASSERTION FAILED: generatingElement() in WebCore::RenderNamedFlowFragment::regionOversetState
2570         https://bugs.webkit.org/show_bug.cgi?id=135153
2571
2572         Reviewed by David Hyatt.
2573
2574         Even though the CSSRegions spec defines the behaviour of a multicolumn region,
2575         we currently do not support this functionality. This patch ensures that a multicolumn
2576         element does not become a region. In the future, when we will implement the multicolumn
2577         as region functionality, http://dev.w3.org/csswg/css-regions/#multi-column-regions, we
2578         will remove this restriction.
2579
2580         Test: fast/regions/multicol-as-region-prevented.html
2581
2582         * rendering/RenderBlockFlow.cpp:
2583         (WebCore::RenderBlockFlow::createRenderNamedFlowFragmentIfNeeded):
2584
2585 2014-07-23  Zan Dobersek  <zdobersek@igalia.com>
2586
2587         [CMake] Avoid building WebCore with ANGLE's OpenGL/EGL headers
2588         https://bugs.webkit.org/show_bug.cgi?id=135167
2589
2590         Reviewed by Martin Robinson.
2591
2592         * CMakeLists.txt: Don't add ANGLE/include to the WebCore_INCLUDE_DIRECTORIES list
2593         as this results in ANGLE's OpenGL and EGL headers being included, instead of the
2594         headers that are provided by the system. Only the ANGLESupport library should be built
2595         with that specific header inclusion path.
2596
2597 2014-07-10  Radu Stavila  <stavila@adobe.com>
2598
2599         REGRESSION (r169105): Crash in selection
2600         https://bugs.webkit.org/show_bug.cgi?id=134303
2601
2602         Reviewed by David Hyatt.
2603
2604         When splitting the selection between different subtrees, all subtrees must have their selection cleared before
2605         starting to apply the new selection. Otherwise, when selecting objects in a named flow thread and going up
2606         its containing block chain, we can end up in the view's selection root, which has not yet been updated and so
2607         we get inconsistent data.
2608
2609         To achieve this goal, the selection update was split into a "clear" and an "apply" method. The updateSelectionForSubtrees
2610         method first iterates through all subtrees and performs the "clear" method and then starts all over again
2611         and performs the "apply" method.
2612
2613         Also, the selectionStart/End members in RenderView have been renamed to fix problems caused by the fact that
2614         RenderView inherits SelectionSubtreeRoot, which also has the same selectionStart/End members.
2615
2616         Test: fast/regions/selection/crash-deselect.html
2617
2618         * WebCore.xcodeproj/project.pbxproj:
2619         * rendering/RenderBlock.cpp:
2620         (WebCore::RenderBlock::isSelectionRoot):
2621         * rendering/RenderSelectionInfo.h:
2622         * rendering/RenderView.cpp:
2623         (WebCore::RenderView::RenderView):
2624         (WebCore::RenderView::setSelection): Renamed m_selectionStart/End to m_unsplitSelectionStart/End
2625         (WebCore::RenderView::splitSelectionBetweenSubtrees):
2626         (WebCore::RenderView::updateSelectionForSubtrees): Added, clears and re-applies selection for all selection subtrees.
2627         (WebCore::RenderView::clearSubtreeSelection): Added, clears selection and returns previously selected information.
2628         (WebCore::RenderView::applySubtreeSelection): Added, updates the selection status of all objects inside the selection tree, compares old and new data and repaints accordingly.
2629         (WebCore::RenderView::getSelection): Renamed m_selectionStart/End to m_unsplitSelectionStart/End
2630         (WebCore::RenderView::setSubtreeSelection): Deleted.
2631         * rendering/RenderView.h:
2632         * rendering/SelectionSubtreeRoot.cpp:
2633         (WebCore::SelectionSubtreeRoot::SelectionSubtreeRoot):
2634         * rendering/SelectionSubtreeRoot.h:
2635         (WebCore::SelectionSubtreeRoot::OldSelectionData::OldSelectionData):
2636
2637 2014-07-22  Brent Fulgham  <bfulgham@apple.com>
2638
2639         [Win] Build fix for bot.
2640
2641         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2642         (WebCore::createLegibleOutputSubtypes): Declare 'wvtt' locally, rather
2643         than relying on potentially unavailable declaration.
2644
2645 2014-07-22  Brent Fulgham  <bfulgham@apple.com>
2646
2647         [Win] Build fix for Windows bots
2648
2649         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: Provide missing
2650         structure definition when needed by bot.
2651
2652 2014-07-22  Brent Fulgham  <bfulgham@apple.com>
2653
2654         [Win] Build fix for EWS bots.
2655
2656         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: Forward declare
2657         structure definition.
2658
2659 2014-07-22  Brent Fulgham  <bfulgham@apple.com>
2660
2661         [Win] Fix Crash when handling Legible Output callbacks
2662         https://bugs.webkit.org/show_bug.cgi?id=134946
2663
2664         Reviewed by Dean Jackson.
2665
2666         Relanding after adding fixes to support build bots.
2667
2668         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2669         (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): Remove
2670         Windows-specific 'ASSERT_NOT_REACHED' code path.
2671         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2672         (WebCore::createLegibleOutputSubtypes): Added.
2673         (WebCore::AVFWrapper::createPlayerItem): Updated to request native
2674         samples from AVFoundationCF.
2675
2676 2014-07-16  Myles C. Maxfield  <mmaxfield@apple.com>
2677
2678         Copying and pasting trivial H2 content causes a crash in firstPositionInNode
2679         https://bugs.webkit.org/show_bug.cgi?id=134897
2680
2681         Reviewed by Ryosuke Niwa.
2682
2683         ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder() attempts
2684         to move pasted headings out of existed headings, with out regard to if the existing
2685         heading is the contenteditable root.
2686
2687         Test: editing/pasteboard/heading-crash.html
2688
2689         * editing/ReplaceSelectionCommand.cpp:
2690         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
2691
2692 2014-07-22  Ryuan Choi  <ryuan.choi@samsung.com>
2693
2694         Remove dead APIs from TiledBackingStore
2695         https://bugs.webkit.org/show_bug.cgi?id=135158
2696
2697         Reviewed by Gyuyoung Kim.
2698
2699         setContentsFrozen and related code of TiledBackingStore are not used since Qt port is removed.
2700
2701         * platform/graphics/TiledBackingStore.cpp:
2702         (WebCore::TiledBackingStore::TiledBackingStore):
2703         (WebCore::TiledBackingStore::updateTileBuffers):
2704         (WebCore::TiledBackingStore::setContentsScale):
2705         (WebCore::TiledBackingStore::createTiles):
2706         (WebCore::TiledBackingStore::startTileBufferUpdateTimer):
2707         (WebCore::TiledBackingStore::startBackingStoreUpdateTimer):
2708         (WebCore::TiledBackingStore::commitScaleChange): Deleted.
2709         (WebCore::TiledBackingStore::isBackingStoreUpdatesSuspended): Deleted.
2710         (WebCore::TiledBackingStore::isTileBufferUpdatesSuspended): Deleted.
2711         (WebCore::TiledBackingStore::setContentsFrozen): Deleted.
2712         * platform/graphics/TiledBackingStore.h:
2713         (WebCore::TiledBackingStore::contentsFrozen): Deleted.
2714
2715 2014-07-22  Alex Christensen  <achristensen@webkit.org>
2716
2717         Fix window-inactive css selectors when using querySelector.
2718         https://bugs.webkit.org/show_bug.cgi?id=135149
2719
2720         Reviewed by Tim Horton.
2721
2722         Test: fast/selectors/querySelector-window-inactive.html
2723
2724         * css/SelectorChecker.cpp:
2725         (WebCore::SelectorChecker::checkOne):
2726         Removed default and implemented case PseudoClassWindowInactive.
2727
2728 2014-07-22  Tim Horton  <timothy_horton@apple.com>
2729
2730         REGRESSION (r171016): Reproducible infinite spin selecting phone number
2731         https://bugs.webkit.org/show_bug.cgi?id=135183
2732         <rdar://problem/17727342>
2733
2734         Reviewed by Ryosuke Niwa.
2735
2736         * editing/Editor.cpp:
2737         (WebCore::Editor::scanRangeForTelephoneNumbers):
2738         Make use of TextIterator::subrange, which knows how to make a subrange from character positions,
2739         instead of assuming that our character positions translate directly to positions in the incoming range.
2740         Make use of DocumentMarkerController::addMarker, which takes a range and applies the marker to
2741         all text nodes inside the range as appropriate.
2742         Fix naming of the shadowed 'length' local.
2743         Fix a typo in the comment.
2744
2745 2014-07-22  Myles C. Maxfield  <mmaxfield@apple.com>
2746
2747         [iOS] [OSX] Don't transcode WOFF on platforms that support it natively
2748         https://bugs.webkit.org/show_bug.cgi?id=134904
2749
2750         Reviewed by Andreas Kling.
2751
2752         No new tests because there is no behavior change.
2753
2754         * loader/cache/CachedFont.cpp:
2755         (WebCore::CachedFont::ensureCustomFontData):
2756
2757 2014-07-22  peavo@outlook.com  <peavo@outlook.com>
2758
2759         [Win] Crash after plugin is unloaded.
2760         https://bugs.webkit.org/show_bug.cgi?id=119044
2761
2762         Reviewed by Darin Adler.
2763
2764         We need to invalidate all runtime objects when a plugin view is destroyed, in case the plugin is unloaded,
2765         and one of these runtime objects accesses the plugin function table upon destruction afterwards, which will cause a crash.
2766         If we use the weak pointer to the runtime object when invalidating, it will be null if it's in the WeakImpl::Dead state.
2767         This means the runtime object will not be invalidated, possibly causing a crash if the plugin is unloaded.
2768         It should be safe to use the raw pointer to the runtime object when invalidating, since finalized runtime objects
2769         will be removed from the set of runtime objects in the method RootObject::finalize().
2770
2771         * bridge/runtime_root.cpp:
2772         (JSC::Bindings::RootObject::invalidate): Make sure all runtime objects are invalidated by getting the raw runtime object pointer from the hash key.
2773
2774 2014-07-22  Enrica Casucci  <enrica@apple.com>
2775
2776         REGRESSION (WebKit2): Selection inside accelerated overflow:scroll doesn't track scrolling.
2777         https://bugs.webkit.org/show_bug.cgi?id=135180
2778         <rdar://problem/16721055>
2779
2780         Reviewed by Simon Fraser.
2781
2782         AsyncScrollingCoordinator will force a selection update on iOS
2783         when scrolling terminates in an overflow scroll.
2784
2785         * loader/EmptyClients.h:
2786         * page/EditorClient.h:
2787         * page/scrolling/AsyncScrollingCoordinator.cpp:
2788         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
2789         * page/scrolling/ScrollingTree.h:
2790         (WebCore::ScrollingTree::scrollingTreeNodeWillStartScroll):
2791         (WebCore::ScrollingTree::scrollingTreeNodeDidEndScroll):
2792
2793 2014-07-22  Myles C. Maxfield  <mmaxfield@apple.com>
2794
2795         [Mac] Cocoa throws exception when the return type of NSAccessibilityLinkedUIElementsAttribute is not an array
2796         https://bugs.webkit.org/show_bug.cgi?id=135165
2797
2798         Reviewed by Simon Fraser.
2799
2800         Return an empty array instead of nil.
2801
2802         Updated tests.
2803
2804         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2805         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2806
2807 2014-07-22  Commit Queue  <commit-queue@webkit.org>
2808
2809         Unreviewed, rolling out r171357.
2810         https://bugs.webkit.org/show_bug.cgi?id=135173
2811
2812         broke Windows build. (Requested by bfulgham on #webkit).
2813
2814         Reverted changeset:
2815
2816         "[Win] Fix Crash when handling Legible Output callbacks"
2817         https://bugs.webkit.org/show_bug.cgi?id=134946
2818         http://trac.webkit.org/changeset/171357
2819
2820 2014-07-22  Brent Fulgham  <bfulgham@apple.com>
2821
2822         [Win] Fix Crash when handling Legible Output callbacks
2823         https://bugs.webkit.org/show_bug.cgi?id=134946
2824
2825         Reviewed by Dean Jackson.
2826
2827         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2828         (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): Remove
2829         Windows-specific 'ASSERT_NOT_REACHED' code path.
2830         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2831         (WebCore::createLegibleOutputSubtypes): Added.
2832         (WebCore::AVFWrapper::createPlayerItem): Updated to request native
2833         samples from AVFoundationCF.
2834
2835 2014-07-21  Sam Weinig  <sam@webkit.org>
2836
2837         [Cocoa] WKScriptMessageHandlers don't seem to function properly after navigating
2838         https://bugs.webkit.org/show_bug.cgi?id=135148
2839
2840         Reviewed by Geoffrey Garen.
2841
2842         The "webkit" property on the window was not getting installed for subsequent
2843         loads due to intricate dance playing setting the JSDOMWindow where the DOMWindow
2844         object is not yet in a Frame when the JSDOMWindow is created. Since we were
2845         adding the "webkit" property on construction, the property was returning null
2846         thinking it had no Frame and was in a bad state. We can fix this by making the
2847         "webkit" property behave like all the other window properties moving its getting
2848         to JSDOMWindow::getOwnPropertySlot.
2849
2850         Added API test (WebKit2Cocoa/UserContentController).
2851
2852         * bindings/js/JSDOMWindowBase.cpp:
2853         (WebCore::JSDOMWindowBase::finishCreation):
2854         * bindings/js/JSDOMWindowCustom.cpp:
2855         (WebCore::jsDOMWindowWebKit):
2856         (WebCore::JSDOMWindow::getOwnPropertySlot):
2857
2858 2014-07-22  Brent Fulgham  <bfulgham@apple.com>
2859
2860         [Win] Fix Leak in WebCore::createGlobalImageFileDescriptor 
2861         https://bugs.webkit.org/show_bug.cgi?id=134423
2862         <rdar://problem/17492758>
2863
2864         Reviewed by Geoffrey Garen.
2865
2866         * platform/win/PasteboardWin.cpp:
2867         (WebCore::createGlobalImageFileDescriptor): Unlock and release the
2868         HGLOBAL when exiting early.
2869
2870 2014-07-21  Myles C. Maxfield  <mmaxfield@apple.com>
2871
2872         Clicking on links while accessibility is enabled sometimes crashes
2873         https://bugs.webkit.org/show_bug.cgi?id=135074
2874
2875         Reviewed by Chris Fleizach.
2876
2877         When an accessibility request comes in from the system, we call updateBackingStore() on the
2878         relevant AccessibilityObject, which triggers a relayout of the entire document. This relayout
2879         might delete that accessibility node and its parent, which would cause the node to be deleted.
2880         After the stack unwinds, we then call a member function on the node without checking for this
2881         condition.
2882
2883         Test: accessibility/parent-delete.html
2884
2885         * accessibility/AccessibilityObject.cpp:
2886         (WebCore::AccessibilityObject::updateBackingStore): Retain the node for the duration of the
2887         function.
2888
2889 2014-07-22  Jeremy Jones  <jeremyj@apple.com>
2890
2891         Don't create new UIWindow for video fullscreen.
2892         https://bugs.webkit.org/show_bug.cgi?id=135038
2893
2894         Reviewed by Darin Adler.
2895
2896         * WebCore.exp.in:
2897         * platform/ios/WebVideoFullscreenControllerAVKit.h: use UIView instead of UIScreen.
2898         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2899         (-[WebVideoFullscreenController enterFullscreen:]): provide parent UIView.
2900         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: remove UIWindow.
2901         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: 
2902         (WebVideoFullscreenInterfaceAVKit::setupFullscreen): ditto 
2903         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen): ditto
2904         (WebVideoFullscreenInterfaceAVKit::invalidate): ditto
2905         (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): ditto
2906
2907 2014-07-22  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2908
2909         [GTK] Rollout r170529 due to ~10% performance regression on the
2910         perf test Animation/balls.
2911         https://bugs.webkit.org/show_bug.cgi?id=134972
2912
2913         Reviewed by Martin Robinson.
2914
2915         Reverted changeset:
2916         "Increase priority on SharedTimer source."
2917         https://trac.webkit.org/r170529
2918
2919 2014-07-18  Dirk Schulze  <krit@webkit.org>
2920
2921         Turn width/height to presentation attributes
2922         https://bugs.webkit.org/show_bug.cgi?id=135046
2923
2924         Reviewed by Dean Jackson.
2925
2926         The elements <svg>, <image>, <pattern>, <mask> and <foreignObject> have the
2927         'width' and 'height' attributes. So far they can just be set by SVG DOM or
2928         setAttribute. Furthermore, animations just work with SVG Animation - No support
2929         for CSS Animations and CSS Transitions. We started to turn the width and height
2930         attributes on SVG roots to presentation attributes already. A presentation
2931         attribute is a CSS property that can also be set by DOM (or now by SVG DOM).
2932
2933         This patch turns all width and height attributes to presentation attributes. It
2934         basically allows authors to style width and height with CSS as well. Width and
2935         height can now be set with CSS style sheets and can be animated with CSS.
2936
2937         To some degree it made it possible to remove code duplication. However, since
2938         SVG DOM requires us to use SVGLength types and since we did not turn all
2939         SVG attributes to the CSS length values (and our internal Length struct) yet,
2940         we still need a hybrid - a bridge between SVGLength (for SVG DOM) and Length (for
2941         RenderStyle). Once we move all attributes to use the Length struct, we can make SVGLength
2942         a wrapper for Length and can move more code to the render tree.
2943
2944         The current challenge is to synchronize SVG DOM, normal DOM and RenderStyle.
2945         With this patch we handle most part in RenderStyle. SVG DOM changes are
2946         synchronized to DOM and RenderStyle will call needsStyleRecalc. Furthermore,
2947         SVG Animations will continue to animate the SVG DOM (and synchronize the changes
2948         back to RenderStyle) if the element has a JS property for the currently animated
2949         attribute.
2950
2951         Short example:
2952
2953             <rect>
2954                 <animate attributeName="width">
2955             </rect>
2956
2957         The <rect> element has the SVG DOM property 'width'. Therefore, we animate the SVG DOM
2958         property and synchronize RenderStyle.
2959
2960             <ellipse>
2961                 <animate attributeName="width">
2962             </ellipse>
2963
2964         The <ellipse> element does NOT have the SVG DOM property 'width'. Therefore, we
2965         animate the CSS property directly. With synchronizing RenderStyle in all cases, we
2966         make sure that the CSS cascade works even on animating on multiple SVG hierarchy
2967         levels (animation of 'width' on <g> and inheriting the property value on a child
2968         <rect>).
2969
2970         With using presentation attributes, we also inherit the CSS property parsing for
2971         SVG attributes. <rect width="  100px  "> is possible now. (Note the trailing whitespaces.)
2972         This follows a recent resolution of the SVG WG.
2973
2974         Since we turned width and height to presentation attributes, the layout optimization
2975         selfHasRelativeLengths() in the DOM can't be used anymore. selfHasRelativeLengths() was
2976         intended to solve a problem where we did not layout relatively position/sized elements
2977         when the parent changes its size. However, as a side effect it did not call layout
2978         for absolutely positioned/sized elements since the layout does not change. I run
2979         all performance tests that we have and even wrote a test with hundreds of elements
2980         that would be affected by this optimization. The differences were inside the sigma
2981         of a normal test run. (Means I couldn't measure a performance difference.)
2982         Therefore, it is not worth it to keep the "optimization" around and I will probably
2983         remove it entirely for all basic shapes but <path> and <polygon> in future patches.
2984
2985         Tests: svg/css/parse-height.html
2986                svg/css/parse-width.html
2987                svg/css/width-height-presentation-attribute-expected.svg
2988                svg/css/width-height-presentation-attribute.svg
2989
2990         * css/CSSComputedStyleDeclaration.cpp:
2991         (WebCore::ComputedStyleExtractor::propertyValue): We never calculated the computed
2992             value of width/height for SVG elements and returned auto instead. This is based
2993             on a rule of CSS 2 and needs to be fixed in CSS3.
2994         * css/DeprecatedStyleBuilder.cpp:
2995         (WebCore::ApplyPropertyLength::applyValue): Length always incorporates the zoom level.
2996             In SVG we still apply the zoom after all operations by scaling the context. We need
2997             to take this in account for Length and don't apply zoom on SVG inline elements.
2998         * css/StyleResolver.cpp:
2999         (WebCore::StyleResolver::useSVGZoomRulesForLength):
3000             See above.
3001         * css/StyleResolver.h:
3002         * rendering/svg/RenderSVGRect.cpp:
3003         (WebCore::RenderSVGRect::updateShapeFromElement): Do not call width() and height() on
3004             SVG DOM but use the values of RenderStyle instead.
3005         * rendering/svg/SVGPathData.cpp:
3006         (WebCore::updatePathFromRectElement): Ditto.
3007         * svg/SVGAnimateElement.cpp:
3008         (WebCore::SVGAnimateElement::resetAnimatedType): We need to differ between CSS properties
3009             with and without SVG DOM on the current element. In the later case we animate the 
3010             SVG DOM and need to synch RenderStyle.
3011         (WebCore::SVGAnimateElement::clearAnimatedType): Ditto.
3012         (WebCore::SVGAnimateElement::applyResultsToTarget): Ditto.
3013         * svg/SVGAnimationElement.cpp:
3014         (WebCore::SVGAnimationElement::isTargetAttributeCSSProperty): This checks if the CSS property
3015             has to be synched with SVG DOM.
3016         (WebCore::SVGAnimationElement::shouldApplyAnimation): Ditto.
3017         * svg/SVGAnimationElement.h:
3018         * svg/SVGElement.cpp:
3019         (WebCore::populateAttributeNameToCSSPropertyIDMap): Add width and heigth to the CSS property
3020             list for presentation attributes.
3021         (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): CSS properties with
3022             SVG DOM synchronization need to be treated differently. Collect them in a separate map.
3023         (WebCore::cssPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): Caller for the map.
3024         (WebCore::SVGElement::animatedPropertyTypeForAttribute): We need to check both maps here:
3025             CSS properties and CSS properties with SVG DOM synch.
3026         (WebCore::SVGElement::isAnimatableCSSProperty): Ditto.
3027         (WebCore::SVGElement::isPresentationAttributeWithSVGDOM): Just return true if the property name
3028             is in the map of properties with SVG DOM for the current element.
3029         * svg/SVGElement.h:
3030         (WebCore::SVGElement::invalidateSVGPresentationAttributeStyle): Call needsStyleRecalc.
3031         * svg/SVGFilterElement.cpp: Make width/height presentation attribute.
3032         (WebCore::SVGFilterElement::svgAttributeChanged):
3033         (WebCore::SVGFilterElement::selfHasRelativeLengths): Deleted.
3034         * svg/SVGFilterElement.h: Ditto.
3035         * svg/SVGForeignObjectElement.cpp:
3036         (WebCore::SVGForeignObjectElement::svgAttributeChanged):
3037         (WebCore::SVGForeignObjectElement::selfHasRelativeLengths): Deleted.
3038         * svg/SVGForeignObjectElement.h:
3039         * svg/SVGImageElement.cpp: Ditto.
3040         (WebCore::SVGImageElement::svgAttributeChanged):
3041         (WebCore::SVGImageElement::isPresentationAttribute): Deleted.
3042         (WebCore::SVGImageElement::collectStyleForPresentationAttribute): Deleted.
3043         (WebCore::SVGImageElement::selfHasRelativeLengths): Deleted.
3044         * svg/SVGImageElement.h:
3045         * svg/SVGLength.h: Transform an Length value to an absolute value by taking the SVG viewport
3046             into account. (An SVG viewport is not the same as the CSS viewport.)
3047         * svg/SVGLengthContext.cpp: Ditto.
3048         (WebCore::SVGLengthContext::valueForLength):
3049         * svg/SVGLengthContext.h:
3050         * svg/SVGMaskElement.cpp: Make width/height presentation attribute.
3051         (WebCore::SVGMaskElement::svgAttributeChanged):
3052         (WebCore::SVGMaskElement::selfHasRelativeLengths): Deleted.
3053         * svg/SVGMaskElement.h:
3054         * svg/SVGPatternElement.cpp: Ditto.
3055         (WebCore::SVGPatternElement::svgAttributeChanged):
3056         (WebCore::SVGPatternElement::selfHasRelativeLengths): Deleted.
3057         * svg/SVGPatternElement.h:
3058         * svg/SVGRectElement.cpp: Ditto.
3059         (WebCore::SVGRectElement::svgAttributeChanged):
3060         (WebCore::SVGRectElement::selfHasRelativeLengths): Deleted.
3061         * svg/SVGRectElement.h:
3062         * svg/SVGSVGElement.cpp: Ditto.
3063         (WebCore::SVGSVGElement::svgAttributeChanged): Clean up redundant layout calls.
3064         (WebCore::SVGSVGElement::isPresentationAttribute): Deleted.
3065         (WebCore::SVGSVGElement::collectStyleForPresentationAttribute): Deleted.
3066         * svg/SVGSVGElement.h:
3067         * svg/properties/SVGAnimatedProperty.cpp: Synchronize SVG DOM with DOM.
3068         (WebCore::SVGAnimatedProperty::commitChange):
3069
3070 2014-07-22  Adrian Perez de Castro  <aperez@igalia.com>
3071
3072         [GStreamer] [GTK] WebKit does not build with GStreamer 1.4
3073         https://bugs.webkit.org/show_bug.cgi?id=135114
3074
3075         Reviewed by Philippe Normand.
3076
3077         Fix build with GStreamer 1.4
3078
3079         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3080         Change GstMpegTs-prefixed types to use the GstMpegts prefix.
3081         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
3082         (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
3083         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3084         Ditto.
3085
3086 2014-07-21  Benjamin Poulain  <bpoulain@apple.com>
3087
3088         [iOS][WK2] Improve event throttling for Scroll Events
3089         https://bugs.webkit.org/show_bug.cgi?id=135082
3090         <rdar://problem/17445266>
3091
3092         Reviewed by Simon Fraser.
3093
3094         This patch is composed of two parts. The first part in the WebKit layer
3095         track an approximate measurement of the main thread responsiveness.
3096         The second part in WebCore use that information to avoid sending events
3097         if a page is unresponsive.
3098
3099         In WebCore, this patch only consider scroll events so far. Hopefully the concept
3100         should be easy to generalize.
3101
3102         * loader/EmptyClients.h:
3103         * page/ChromeClient.h:
3104         Chrome client provides us with one information: how long an incoming event should be delayed.
3105         Every port is free to implement whatever logic is suitable for them.
3106
3107         * page/FrameView.cpp:
3108         (WebCore::FrameView::FrameView):
3109         (WebCore::FrameView::reset):
3110         (WebCore::FrameView::delayedScrollEventTimerFired):
3111         (WebCore::FrameView::scrollPositionChanged):
3112         (WebCore::FrameView::sendScrollEvent):
3113         * page/FrameView.h:
3114         Scroll events do not have any associated information so they can be coalesced by just skipping
3115         all input hapenning during the throttling delay.
3116
3117         The implementation is done by using a timer to delay the events.
3118
3119 2014-07-21  Tim Horton  <timothy_horton@apple.com>
3120
3121         Avoid putting empty-sized surfaces into IOSurfacePool
3122         https://bugs.webkit.org/show_bug.cgi?id=135136
3123
3124         Reviewed by Simon Fraser.
3125
3126         * platform/graphics/cg/IOSurfacePool.cpp:
3127         (WebCore::IOSurfacePool::addSurface):
3128         Avoid adding 0x0 surfaces to the pool, because they will wreak havoc
3129         when their size is used as the key in the CachedSurfaceMap.
3130         Additionally, avoid any empty sizes, because they're just pointless.
3131
3132 2014-07-21  Beth Dakin  <bdakin@apple.com>
3133
3134         WK1 should always setAcceleratedCompositingForFixedPositionEnabled(true) on 
3135         Yosemite
3136         https://bugs.webkit.org/show_bug.cgi?id=135135
3137
3138         Reviewed by Darin Adler.
3139
3140         This patch gets rid of the ChromeClient function that was introduced with 
3141         http://trac.webkit.org/changeset/171308 We’ll just enable the Setting instead.
3142         * css/StyleResolver.cpp:
3143         (WebCore::StyleResolver::adjustRenderStyle):
3144         (WebCore::fixedPositionCreatesStackingContext): Deleted.
3145         * page/ChromeClient.h:
3146         (WebCore::ChromeClient::requiresAcceleratedCompositingForViewportConstrainedPosition): Deleted.
3147         * rendering/RenderLayerCompositor.cpp:
3148         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
3149
3150 2014-07-21  Simon Fraser  <simon.fraser@apple.com>
3151
3152         [iOS WK2] Turn off position:fixed behavior when the keyboard is up
3153         https://bugs.webkit.org/show_bug.cgi?id=132537
3154
3155         Reviewed by Benjamin Poulain.
3156
3157         Export RenderObject::localToContainerPoint().
3158
3159         * WebCore.exp.in:
3160
3161 2014-07-21  Jer Noble  <jer.noble@apple.com>
3162
3163         [MSE] YouTube video decode error when variant-switching
3164         https://bugs.webkit.org/show_bug.cgi?id=135128
3165
3166         Reviewed by Brent Fulgham.
3167
3168         Test: media/media-source/media-source-overlapping-decodetime.html
3169
3170         When variant-switching, the situation can arise where an existing sample with a presentation
3171         timestamp of N and a decode timestamp of M, and a new sample with a presentation timestamp > N
3172         and the same decode timestamp of M, will keep the new sample from being added to the SampleMap.
3173         This can result in a decode error when samples depending on that new, missing sample are enqueued.
3174
3175         The MSE spec is silent on the issue of overlapping decode timestamps. However, it guarantees that
3176         presentation timestamps are non-overlapping. So instead of using just the decode timestamp as a key
3177         for storing the samples in decode order, use both the decode timestamp and the presentation timestamp.
3178         That ensures that samples with different presentation times but equal decode times are both inserted
3179         into the decode queue, and in the correct order.
3180
3181         * Modules/mediasource/SampleMap.cpp:
3182         (WebCore::SampleIsRandomAccess::operator()): Update the parameter type to match the new KeyType.
3183         (WebCore::SampleMap::addSample): Pass both decodeTime and presentationTime as the key to decodeOrder.
3184         (WebCore::SampleMap::removeSample): Ditto.
3185         (WebCore::DecodeOrderSampleMap::findSampleWithDecodeKey): Renamed from findSampleWithDecodeTime.
3186         (WebCore::DecodeOrderSampleMap::reverseFindSampleWithDecodeKey): renamed from reverseFindSampleWithDecodeTime.
3187         (WebCore::DecodeOrderSampleMap::findSyncSamplePriorToPresentationTime): Use renamed version of above.
3188         (WebCore::DecodeOrderSampleMap::findSyncSampleAfterPresentationTime): Ditto.
3189         (WebCore::DecodeOrderSampleMap::findDependentSamples): Ditto.
3190         (WebCore::DecodeOrderSampleMap::findSampleWithDecodeTime): Deleted.
3191         (WebCore::DecodeOrderSampleMap::reverseFindSampleWithDecodeTime): Deleted.
3192         * Modules/mediasource/SampleMap.h:
3193         * Modules/mediasource/SourceBuffer.cpp:
3194         (WebCore::SourceBuffer::removeCodedFrames): Ditto.
3195         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Ditto.
3196         (WebCore::SourceBuffer::reenqueueMediaForTime): Ditto.
3197
3198 2014-07-21  Andy Estes  <aestes@apple.com>
3199
3200         [iOS] Handle QuickLook ResourceLoaders in the web process
3201         https://bugs.webkit.org/show_bug.cgi?id=135113
3202
3203         Reviewed by David Kilzer.
3204
3205         No new tests. QuickLook is not testable from WebKit.
3206
3207         * WebCore.exp.in:
3208         * loader/ResourceLoadScheduler.cpp:
3209         (WebCore::ResourceLoadScheduler::maybeLoadQuickLookResource): Start loading the ResourceLoader if it is for a QuickLook resource.
3210         * loader/ResourceLoadScheduler.h:
3211
3212 2014-07-21  Alexey Proskuryakov  <ap@apple.com>
3213
3214         Case sensitive file system build fix.
3215
3216         * page/scrolling/ScrollingStateTree.cpp:
3217
3218 2014-07-21  Beth Dakin  <bdakin@apple.com>
3219
3220         Put position:fixed elements into layers when a WK1 view is layer-backed
3221         https://bugs.webkit.org/show_bug.cgi?id=135075
3222
3223         Reviewed by Darin Adler.
3224
3225         This patch adds a new ChromeClient function called 
3226         requiresAcceleratedCompositingForViewportConstrainedPosition(). Since a view can 
3227         go in and out of layer backing, we need a ChromeClient method that can be 
3228         dynamically re-evaluated rather than using the existing settings for enabling 
3229         accelerated fixed and fixed that creates a stacking context.
3230
3231         Ensure that fixed elements create a stacking context when 
3232         requiresAcceleratedCompositingForViewportConstrainedPosition is true.
3233         * css/StyleResolver.cpp:
3234         (WebCore::StyleResolver::adjustRenderStyle):
3235
3236         New ChromeClient function.
3237         * page/ChromeClient.h:
3238
3239 2014-07-21  Simon Fraser  <simon.fraser@apple.com>
3240
3241         Add helper functions to dump the scrolling state tree from the debugger
3242         https://bugs.webkit.org/show_bug.cgi?id=135101
3243
3244         Reviewed by Darin Adler.
3245
3246         Add debug-only showScrollingStateTree() functions that take a ScrollingStateTree* and ScrollingStateNode*
3247         for use while debugging.
3248
3249         * page/scrolling/ScrollingStateTree.cpp:
3250         (showScrollingStateTree):
3251         * page/scrolling/ScrollingStateTree.h:
3252
3253 2014-07-20  Simon Fraser  <simon.fraser@apple.com>
3254
3255         [iOS WK1] Single touch div scrolling doesn't work in framesets (breaks Word previews)
3256         https://bugs.webkit.org/show_bug.cgi?id=135103
3257         <rdar://problem/11830219>
3258
3259         Reviewed by Darin Adler.
3260
3261         After r166117 all layer flushing starts on the root frame; we no longer flush layers
3262         for each frame during painting. However, flushing GraphicsLayers can set some state
3263         on a subframe RenderLayerCompositor that is now never processed, which breaks scroll
3264         layer registration.
3265         
3266         Fix by doing a walk of the Frame tree, and calling didFlushLayers() on subframe RenderLayerCompositors
3267         before calling didFlushLayers() on self.
3268
3269         * rendering/RenderLayerCompositor.cpp:
3270         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
3271         (WebCore::RenderLayerCompositor::didFlushLayers):
3272         (WebCore::RenderLayerCompositor::notifySubframesAfterLayerFlush):
3273         (WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers): Drive-by nullptr.
3274         * rendering/RenderLayerCompositor.h:
3275
3276 2014-07-21  Eric Carlson  <eric.carlson@apple.com>
3277
3278         [iOS] a Paused media session is not active
3279         https://bugs.webkit.org/show_bug.cgi?id=135108
3280
3281         Reviewed by Darin Adler.
3282
3283         Activating the shared AudioSession will pause audio playing in another application,
3284         so only report a Playing media sessions as active.
3285
3286         * platform/audio/MediaSessionManager.cpp:
3287         * platform/audio/MediaSessionManager.h:
3288         (WebCore::MediaSessionManager::activeAudioSessionRequired): Renamed from hasActive to make
3289         clear what it does. Only return true for a session that is Playing.
3290
3291         * platform/audio/mac/MediaSessionManagerMac.cpp:
3292         (MediaSessionManager::updateSessionState): hasActive renamed to activeAudioSessionRequired.
3293
3294 2014-07-21  Carlos Garcia Campos  <cgarcia@igalia.com>
3295
3296         Unreviewed. Update GObject DOM bindings test results after r171285.
3297
3298         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
3299         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
3300         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
3301         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
3302         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
3303         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
3304         * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.cpp:
3305         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
3306         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
3307         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
3308         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
3309         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.cpp:
3310         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
3311         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp:
3312         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
3313         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
3314         * bindings/scripts/test/GObject/WebKitDOMattribute.cpp:
3315         * bindings/scripts/test/GObject/WebKitDOMreadonly.cpp:
3316
3317 2014-07-20  Pratik Solanki  <psolanki@apple.com>
3318
3319         Reduce the chances of a race condition when sharing SharedBuffer
3320         https://bugs.webkit.org/show_bug.cgi?id=135060
3321         <rdar://problem/17729444>
3322
3323         Reviewed by Darin Adler.
3324
3325         We currently pass a SharedBuffer wrapped in WebCoreSharedBufferData to ImageIO for image
3326         decoding. This is not thread safe since ImageIO will access this buffer on a separate
3327         thread. We access SharedBuffer::buffer() on the other thread which resizes the Vector
3328         m_buffer if m_size is greater than the vector size. Since the code in SharedBuffer::append()
3329         sets m_size before appending the data to the buffer, m_size is out of sync with the m_buffer
3330         size for the entire duration of the Vector append which could be doing a lot of copying if
3331         the resource is large. While this change does not fix the race condition, we can at least
3332         reduce the chances of SharedBuffer::buffer() calling resize() by setting m_size after the
3333         cector has finished appending.
3334
3335         No new tests because no functional changes.
3336
3337         * platform/SharedBuffer.cpp:
3338         (WebCore::SharedBuffer::append):
3339
3340 2014-07-20  Jeremy Jones  <jeremyj@apple.com>
3341
3342         Fix test crashes when cloning video layer since r171286
3343         https://bugs.webkit.org/show_bug.cgi?id=135112
3344
3345         Unreviewed. Fix crashing tests by conditionalizing inline video layer change.
3346         compositing/video/video-reflection.html [ Crash ]
3347         media/video-layer-crash.html [ Crash ]
3348
3349         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: add conditional
3350         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: ditto
3351         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): ditto
3352         (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer): ditto
3353         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer): ditto
3354
3355 2014-07-20  Jeremy Jones  <jeremyj@apple.com>
3356
3357         Disable ff/rw based on canPlayFastForward and canPlayFastRewind.
3358         https://bugs.webkit.org/show_bug.cgi?id=134894
3359
3360         Reviewed by Darin Adler.
3361
3362         * WebCore.exp.in: add symbol for canPlayFastReverse
3363         * html/HTMLMediaElement.cpp: Add two new accessors
3364         (WebCore::HTMLMediaElement::nextScanRate): possibly limit scanRate
3365         (WebCore::HTMLMediaElement::canPlayFastForward): added
3366         (WebCore::HTMLMediaElement::canPlayFastReverse): added
3367         * html/HTMLMediaElement.h: declare two new methods
3368         * platform/graphics/MediaPlayer.cpp: Plumb through two new accessors
3369         (WebCore::MediaPlayer::maxFastForwardRate): added
3370         (WebCore::MediaPlayer::minFastReverseRate): added
3371         * platform/graphics/MediaPlayer.h: Declare new methods
3372         * platform/graphics/MediaPlayerPrivate.h: Added two new methods.
3373         (WebCore::MediaPlayerPrivateInterface::maxFastForwardRate): added
3374         (WebCore::MediaPlayerPrivateInterface::minFastReverseRate): added
3375         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: member to cache ff/rw enabled state
3376         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3377         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): observe on item canPlayFastForward canPlayFastReverse
3378         (WebCore::MediaPlayerPrivateAVFoundationObjC::canPlayFastForwardDidChange): added
3379         (WebCore::MediaPlayerPrivateAVFoundationObjC::canPlayFastReverseDidChange): added
3380         (WebCore::itemKVOProperties): observe canPlayFastForward canPlayFastRewind
3381         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): ditto
3382         * platform/ios/WebVideoFullscreenInterface.h: add new method
3383         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: ditto
3384         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: ditto
3385         (WebVideoFullscreenInterfaceAVKit::setCanPlayFastReverse): Set value on WebAVPlayerController.
3386         (-[WebAVPlayerController canScanBackward]): Deleted.
3387         (+[WebAVPlayerController keyPathsForValuesAffectingCanScanBackward]): Deleted.
3388         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
3389         (WebVideoFullscreenModelMediaElement::updateForEventName): update canPlayFastReverse.
3390
3391 2014-07-18  Gavin Barraclough  <baraclough@apple.com>
3392
3393         HTMLMediaElement should registerWithDocument on iOS
3394         https://bugs.webkit.org/show_bug.cgi?id=135084
3395         <rdar://problem/17702531>
3396
3397         Reviewed by Andreas Kling.
3398
3399         Otherwise it won't know when the visibility changes!
3400
3401         * html/HTMLMediaElement.cpp:
3402         (WebCore::HTMLMediaElement::registerWithDocument):
3403         (WebCore::HTMLMediaElement::unregisterWithDocument):
3404
3405 2014-07-20  Jeremy Jones  <jeremyj@apple.com>
3406
3407         Decrease flicker when enter and exit fullscreen.
3408         https://bugs.webkit.org/show_bug.cgi?id=134919
3409
3410         Reviewed by Simon Fraser.
3411
3412         Put AVPlayerLayer in a container layer so moving it between inline and fullscreen
3413         is as easy as adding and removing it from a containter layer; no need to do a layout.
3414
3415         Make sure fullscreen layers are transparent before moving moving the AVPlayerLayer
3416         between inline and fullscreen so you don't briefly see the empty fullscreen layers.
3417
3418         * html/HTMLMediaElement.cpp:
3419         (WebCore::HTMLMediaElement::platformLayer): remove fullscreen special case.