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