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