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