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