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