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