[Win] Unreviewed gardening.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-08-07  Brent Fulgham  <bfulgham@apple.com>
2
3         [Win] Unreviewed gardening.
4
5         Don't build the JSFileException and JSFileReaderSync files in 64-bit; they are already part
6         of DerivedObjects.cpp.
7
8         * WebCore.vcxproj/WebCore.vcxproj: Exclude JSFileException and JSFileReaderSync to avoid
9         multiple definitions of symbols.
10
11 2014-08-07  Enrica Casucci  <enrica@apple.com>
12
13         [Services with UI] Action menu does not appear if selection includes both text and an image.
14         https://bugs.webkit.org/show_bug.cgi?id=135731
15         <rdar://problem/17837491>
16
17         Reviewed by Brady Eidson.
18
19         When collecting selection rects via SelectionRectGatherer we should also note if the selection
20         contains non text elements. This way the Notifier class can send that information to ServicesOverlayController
21         to properly handle the highlight for the service.
22
23         * editing/SelectionRectGatherer.cpp:
24         (WebCore::SelectionRectGatherer::SelectionRectGatherer):
25         (WebCore::SelectionRectGatherer::Notifier::~Notifier):
26         (WebCore::SelectionRectGatherer::clearAndCreateNotifier):
27         * editing/SelectionRectGatherer.h:
28         (WebCore::SelectionRectGatherer::setTextOnly):
29         (WebCore::SelectionRectGatherer::isTextOnly):
30         * page/EditorClient.h:
31         (WebCore::EditorClient::selectionRectsDidChange):
32         * rendering/RenderView.cpp:
33         (WebCore::RenderView::applySubtreeSelection):
34
35 2014-08-07  Andy Estes  <aestes@apple.com>
36
37         [Mac] Parental Controls content filter is mistakenly enabled for HTTP responses
38         https://bugs.webkit.org/show_bug.cgi?id=135730
39
40         Reviewed by Brady Eidson.
41
42         On the Mac, the WebFilterEvaluator (Parental Controls) content filter should only be enabled for HTTPS
43         responses. During iOS upstreaming we mistakenly enabled it for HTTP responses as well, and this causes HTTP
44         responses to be filtered twice -- once by the Parental Controls HTTP proxy and once by WebCore. Revert to the
45         pre-upstreaming behavior and only enable the content filter for HTTPS responses.
46
47         No new tests. Content filtering is not testable from WebKit.
48
49         * loader/DocumentLoader.cpp:
50         (WebCore::DocumentLoader::responseReceived): Passed the response to ContentFilter::canHandleResponse().
51         * platform/ContentFilter.h:
52         * platform/mac/ContentFilterMac.mm:
53         (WebCore::ContentFilter::canHandleResponse): Renamed from isEnabled(). Checks the response's scheme on Mac to
54         determine whether WebFilterEvaluator should be used.
55         (WebCore::ContentFilter::isEnabled): Deleted.
56
57 2014-08-07  Beth Dakin  <bdakin@apple.com>
58
59         Fixed backgrounds don't paint in blurred inset areas
60         https://bugs.webkit.org/show_bug.cgi?id=135712
61
62         Reviewed by Simon Fraser.
63
64         Background geometry calculations for fixed background need to use the larger 
65         visible rect. 
66
67         * rendering/RenderBoxModelObject.cpp:
68         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
69
70 2014-08-07  Jer Noble  <jer.noble@apple.com>
71
72         [EME][Mac] Error codes returned by AVSampleBufferDisplayLayer are negative; clip when passed to JavaScript as doubles.
73         https://bugs.webkit.org/show_bug.cgi?id=135710
74
75         Reviewed by Brent Fulgham.
76
77         Return the absolute value of the error codes returned by AVSampleBufferDisplayLayer, so that the conversion from
78         unsigned -> double does not clip due to the (converted) value being greater than 2^53.
79
80         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
81         (WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError):
82         (WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError):
83
84 2014-08-07  Daniel Bates  <dabates@apple.com>
85
86         Sometimes Gmail cannot load messages, particularly on refresh ("...the application ran into an unexpected error...")
87         https://bugs.webkit.org/show_bug.cgi?id=135688
88         <rdar://problem/17886686>
89
90         Reviewed by Alexey Proskuryakov.
91
92         Fixes an issue where gmail.com may fail to load the list of messages. In particular, a SQLTransactionCallback
93         function may not be executed and hence Gmail will not display the list of messages and
94         will subsequently display an error message.
95
96         When a WebKit client defers loading of a page (e.g. -[WebView setDefersCallbacks:YES]), WebCore
97         may still load the main resource, say if substitute data is available for it, and defer executing
98         tasks, such as a SQLTransactionCallback function, by appending such tasks to the end of the list
99         of pending tasks for the associated Document. This list of pending tasks is never processed when
100         a client subsequently allows loading (e.g. -[WebView setDefersCallbacks:NO])). Therefore, we never
101         execute a SQLTransactionCallback function that was deferred.
102
103         Ideally WebCore would defer loading of substitute data when a WebKit client requests that loading
104         be deferred and hence a SQLTransactionCallback function would be deferred as a consequence of the
105         lack of JavaScript script execution (since substitute data wasn't loaded and hence any JavaScript
106         script contained in the substitute data that initiates a SQL transaction isn't executed). For now,
107         it's sufficient to only defer executing tasks when either there are existing pending tasks or the
108         page defers loading and active DOM objects in the document are suspended (e.g. Document::suspendActiveDOMObjects() was called).
109
110         * dom/Document.cpp:
111         (WebCore::Document::postTask):
112
113 2014-08-07  Benjamin Poulain  <bpoulain@apple.com>
114
115         Get rid of INPUT_SPEECH
116         https://bugs.webkit.org/show_bug.cgi?id=135672
117
118         Reviewed by Andreas Kling.
119
120         * CMakeLists.txt:
121         * Configurations/FeatureDefines.xcconfig:
122         * DerivedSources.make:
123         * Modules/speech/SpeechSynthesis.cpp:
124         * WebCore.vcxproj/WebCore.vcxproj:
125         * WebCore.vcxproj/WebCore.vcxproj.filters:
126         * WebCore.xcodeproj/project.pbxproj:
127         * bindings/generic/RuntimeEnabledFeatures.cpp:
128         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
129         * bindings/generic/RuntimeEnabledFeatures.h:
130         (WebCore::RuntimeEnabledFeatures::setSpeechInputEnabled): Deleted.
131         (WebCore::RuntimeEnabledFeatures::speechInputEnabled): Deleted.
132         (WebCore::RuntimeEnabledFeatures::webkitSpeechEnabled): Deleted.
133         (WebCore::RuntimeEnabledFeatures::webkitGrammarEnabled): Deleted.
134         * css/CSSPrimitiveValueMappings.h:
135         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
136         * css/CSSValueKeywords.in:
137         * css/html.css:
138         (input::-webkit-input-speech-button): Deleted.
139         * dom/Element.h:
140         (WebCore::Element::isInputFieldSpeechButtonElement): Deleted.
141         * dom/EventNames.in:
142         * html/HTMLInputElement.cpp:
143         (WebCore::HTMLInputElement::parseAttribute):
144         (WebCore::HTMLInputElement::speechButtonElement): Deleted.
145         (WebCore::HTMLInputElement::isSpeechEnabled): Deleted.
146         * html/HTMLInputElement.h:
147         * html/HTMLInputElement.idl:
148         * html/InputType.cpp:
149         (WebCore::InputType::shouldRespectListAttribute):
150         (WebCore::InputType::shouldRespectSpeechAttribute): Deleted.
151         * html/InputType.h:
152         (WebCore::InputType::speechButtonElement): Deleted.
153         * html/NumberInputType.cpp:
154         (WebCore::NumberInputType::shouldRespectSpeechAttribute): Deleted.
155         * html/NumberInputType.h:
156         * html/PasswordInputType.cpp:
157         (WebCore::PasswordInputType::shouldRespectSpeechAttribute): Deleted.
158         * html/PasswordInputType.h:
159         * html/SearchInputType.cpp:
160         (WebCore::SearchInputType::shouldRespectSpeechAttribute): Deleted.
161         * html/SearchInputType.h:
162         * html/TelephoneInputType.cpp:
163         (WebCore::TelephoneInputType::shouldRespectSpeechAttribute): Deleted.
164         * html/TelephoneInputType.h:
165         * html/TextFieldInputType.cpp:
166         (WebCore::TextFieldInputType::needsContainer):
167         (WebCore::TextFieldInputType::createShadowSubtree):
168         (WebCore::TextFieldInputType::destroyShadowSubtree):
169         (WebCore::TextFieldInputType::speechButtonElement): Deleted.
170         * html/TextFieldInputType.h:
171         * html/TextInputType.cpp:
172         (WebCore::TextInputType::shouldRespectSpeechAttribute): Deleted.
173         * html/TextInputType.h:
174         * html/shadow/TextControlInnerElements.cpp:
175         (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement): Deleted.
176         (WebCore::InputFieldSpeechButtonElement::~InputFieldSpeechButtonElement): Deleted.
177         (WebCore::InputFieldSpeechButtonElement::create): Deleted.
178         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): Deleted.
179         (WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents): Deleted.
180         (WebCore::InputFieldSpeechButtonElement::setState): Deleted.
181         (WebCore::InputFieldSpeechButtonElement::speechInput): Deleted.
182         (WebCore::InputFieldSpeechButtonElement::didCompleteRecording): Deleted.
183         (WebCore::InputFieldSpeechButtonElement::didCompleteRecognition): Deleted.
184         (WebCore::InputFieldSpeechButtonElement::setRecognitionResult): Deleted.
185         (WebCore::InputFieldSpeechButtonElement::willAttachRenderers): Deleted.
186         (WebCore::InputFieldSpeechButtonElement::willDetachRenderers): Deleted.
187         (WebCore::InputFieldSpeechButtonElement::startSpeechInput): Deleted.
188         (WebCore::InputFieldSpeechButtonElement::stopSpeechInput): Deleted.
189         * html/shadow/TextControlInnerElements.h:
190         (WebCore::toInputFieldSpeechButtonElement): Deleted.
191         * page/SpeechInput.cpp: Removed.
192         * page/SpeechInput.h: Removed.
193         * page/SpeechInputClient.h: Removed.
194         * page/SpeechInputEvent.cpp: Removed.
195         * page/SpeechInputEvent.h: Removed.
196         * page/SpeechInputEvent.idl: Removed.
197         * page/SpeechInputListener.h: Removed.
198         * page/SpeechInputResult.cpp: Removed.
199         * page/SpeechInputResult.h: Removed.
200         * page/SpeechInputResult.idl: Removed.
201         * page/SpeechInputResultList.cpp: Removed.
202         * page/SpeechInputResultList.h: Removed.
203         * page/SpeechInputResultList.idl: Removed.
204         * platform/ThemeTypes.h:
205         * rendering/RenderInputSpeech.cpp: Removed.
206         * rendering/RenderInputSpeech.h: Removed.
207         * rendering/RenderTheme.cpp:
208         (WebCore::RenderTheme::adjustStyle):
209         (WebCore::RenderTheme::paint):
210         (WebCore::RenderTheme::paintBorderOnly):
211         (WebCore::RenderTheme::paintDecorations):
212         (WebCore::RenderTheme::adjustInputFieldSpeechButtonStyle): Deleted.
213         (WebCore::RenderTheme::paintInputFieldSpeechButton): Deleted.
214         * rendering/RenderTheme.h:
215         * rendering/RenderThemeMac.mm:
216         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
217
218 2014-08-07  Eric Carlson  <eric.carlson@apple.com>
219
220         Create UTF-8 string from in-band VTT cues
221         https://bugs.webkit.org/show_bug.cgi?id=135716
222
223         Reviewed by Brent Fulgham.
224
225         Tests will be added in https://bugs.webkit.org/show_bug.cgi?id=135717.
226
227         * platform/graphics/ISOVTTCue.cpp:
228         (WebCore::ISOBox::peekString): Call String::fromUTF8 because we know that VTT is always
229             UTF-8.
230
231 2014-08-06  Jeremy Jones  <jeremyj@apple.com>
232
233         Disable implicit animations on video layer.
234         https://bugs.webkit.org/show_bug.cgi?id=135679
235
236         Reviewed by Eric Carlson.
237
238         Disable implicit animations on AVPlayerLayer except when setting fullscreen frame.
239         This prevents unwanted animations.
240
241         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
242         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): disable implicit animations
243         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame): allow implicit animations while changing fullscreen frame.
244
245 2014-08-07  Gordon Sheridan  <gordon_sheridan@apple.com>
246
247         Provide methods to clear undesired references to HistoryItems that have been removed from the back/forard list.
248         https://bugs.webkit.org/show_bug.cgi?id=135634
249         <rdar://problem/17388461>
250
251         Reviewed by Brady Eidson.
252
253         No new tests.  Would require an API test that also needs an httpd, which we don't currently support.
254
255         * WebCore.exp.in:
256         Added export for Page::clearPreviousItemFromAllPages.
257
258         * loader/HistoryController.cpp:
259         (WebCore::HistoryController::clearPreviousItem):
260         Clear m_previousItem and iterate over children recursively calling clearPreviousItem().
261         The m_previousItem is cleared for the target HistoryController, and all of its descendents.
262
263         * loader/HistoryController.h:
264         Declared HistoryController::clearPreviousItem.
265
266         * page/Page.cpp:
267         (WebCore::Page::clearPreviousItemFromAllPages):
268         Iterate over each page in the web process, checking if the previous item of
269         the HistoryController for the main frame is the same as the item being removed. If so, the
270         frameTree is traversed and each associated HistoryController has its m_previousItem cleared.
271
272         * page/Page.h:
273         Declared Page::clearPreviousItemFromAllPages.
274
275 2014-08-07  Roger Fong  <roger_fong@apple.com>
276
277         Unreviewed build fix attempt #2 following r172224.
278
279         * html/track/VTTCue.cpp:
280         (WebCore::VTTCueBox::applyCSSProperties):
281
282 2014-08-07  Roger Fong  <roger_fong@apple.com>
283
284         Unreviewed build fix following r172224.
285
286         * html/track/TextTrackCueGeneric.cpp:
287         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
288         * html/track/VTTCue.cpp:
289         (WebCore::VTTCueBox::applyCSSProperties):
290         * html/track/VTTCue.h:
291
292 2014-08-07  Daniel Bates  <dabates@apple.com>
293
294         Unreviewed, rolling out r172219.
295
296         Caused some /fast/workers tests to fail; will investigate
297         offline.
298
299         Reverted changeset:
300
301         "Sometimes Gmail cannot load messages, particularly on refresh
302         ("...the application ran into an unexpected error...")"
303         https://bugs.webkit.org/show_bug.cgi?id=135688
304         http://trac.webkit.org/changeset/172219
305
306 2014-08-06  Roger Fong  <roger_fong@apple.com>
307
308         Increase width of caption container if a larger font size is selected from user prefs.
309         https://bugs.webkit.org/show_bug.cgi?id=135677.
310
311         Reviewed by Brent Fulgham.
312
313         * html/shadow/MediaControlElements.cpp:
314         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
315         Upon creation of a VTTCueBox make sure to supply the font size set by the user prefs.
316         * html/track/TextTrackCueGeneric.cpp:
317         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
318         Increase the width of the cue box based on user prefs font size selection.
319
320         * html/track/VTTCue.h:
321         Keep track of the font size set in the user prefs for use when the cue boxes are created.
322         (WebCore::VTTCueBox::setFontSizeFromCaptionUserPrefs):
323         * html/track/VTTCue.cpp:
324         (WebCore::VTTCueBox::applyCSSProperties):
325         Increase the width of the cue box based on user prefs font size selection.
326         (WebCore::VTTCue::getDisplayTree):
327         (WebCore::VTTCue::setFontSize):
328         If the font size set is important then we don't want to use the font size set by user prefs, set it to 0.
329
330 2014-08-07  Alex Christensen  <achristensen@webkit.org>
331
332         Unreviewed build fix after r172220.
333
334         * css/SelectorChecker.cpp:
335         (WebCore::hasScrollbarPseudoElement):
336         Use ASSERT_UNUSED instead of just ASSERT.
337
338 2014-08-07  Alex Christensen  <achristensen@webkit.org>
339
340         Compile scrollbar pseudoclass css selectors.
341         https://bugs.webkit.org/show_bug.cgi?id=135242
342
343         Reviewed by Benjamin Poulain.
344
345         Tests: scrollbars/corner-resizer-window-inactive.html
346                scrollbars/scrollbar-selectors.html
347
348         * css/ElementRuleCollector.cpp:
349         (WebCore::ElementRuleCollector::ruleMatches):
350         Changed assertion because there are pseudo-elements selectors that return CannotCompileAnything now, which
351         make SimpleSelectorCheckers.
352         Add scrollbar, scrollbarPart, and document to the CheckingContext and compile scrollbar pseudo-element selectors.
353         * css/SelectorChecker.cpp:
354         (WebCore::hasScrollbarPseudoElement):
355         Added.  Logic moved from matchRecursively to be easier to read and to add assertions.
356         context.scrollbar is always non-null when dynamicPseudo is SCROLLBAR_CORNER.
357         (WebCore::SelectorChecker::matchRecursively):
358         Moved logic to hasScrollbarPseudoElement.
359         (WebCore::SelectorChecker::checkOne):
360         checkScrollbarPseudoClass accesses the document through the element now.
361         (WebCore::SelectorChecker::checkScrollbarPseudoClass):
362         * css/SelectorChecker.h:
363         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
364         * css/SelectorCheckerTestFunctions.h:
365         (WebCore::scrollbarMatchesEnabledPseudoClass):
366         (WebCore::scrollbarMatchesDisabledPseudoClass):
367         (WebCore::scrollbarMatchesHoverPseudoClass):
368         (WebCore::scrollbarMatchesActivePseudoClass):
369         (WebCore::scrollbarMatchesHorizontalPseudoClass):
370         (WebCore::scrollbarMatchesVerticalPseudoClass):
371         (WebCore::scrollbarMatchesDecrementPseudoClass):
372         (WebCore::scrollbarMatchesIncrementPseudoClass):
373         (WebCore::scrollbarMatchesStartPseudoClass):
374         (WebCore::scrollbarMatchesEndPseudoClass):
375         (WebCore::scrollbarMatchesDoubleButtonPseudoClass):
376         (WebCore::scrollbarMatchesSingleButtonPseudoClass):
377         (WebCore::scrollbarMatchesNoButtonPseudoClass):
378         (WebCore::scrollbarMatchesCornerPresentPseudoClass):
379         Move scrollbar selector logic from SelectorChecker.cpp to SelectorCheckerTestFunctions.h
380         For window-inactive pseudo classes, we now access the document through the element instead of as a separate parameter.
381         * cssjit/SelectorCompiler.cpp:
382         (WebCore::SelectorCompiler::SelectorFragment::appendUnoptimizedPseudoClassWithContext):
383         (WebCore::SelectorCompiler::addScrollbarPseudoClassType):
384         (WebCore::SelectorCompiler::addPseudoClassType):
385         (WebCore::SelectorCompiler::isScrollbarPseudoElement):
386         (WebCore::SelectorCompiler::constructFragments):
387         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
388         Call functions for unoptimized pseudo classes that require a context.
389         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateContextFunctionCallTest):
390         Added.  Similar to generateElementFunctionCallTest, but the CheckingContext pointer is stored on the stack instead of a dedicated register.
391         * cssjit/SelectorCompiler.h:
392         Added scrollbar, scrollbarPart, and document to the CheckingContext.
393         (WebCore::SelectorCompiler::CheckingContext::document):
394         Added method to access the document in a way that is syntactically equal to SelectorCheckingContext.
395         This way, the template functions in SelectorCheckerTestFunctions.h can be compiled with both context types,
396         but the context types store the document differently.
397
398 2014-08-07  Daniel Bates  <dabates@apple.com>
399
400         Sometimes Gmail cannot load messages, particularly on refresh ("...the application ran into an unexpected error...")
401         https://bugs.webkit.org/show_bug.cgi?id=135688
402         <rdar://problem/17886686>
403
404         Reviewed by Maciej Stachowiak.
405
406         Fixes an issue where gmail.com may fail to load the list of messages. In particular, a SQLTransactionCallback
407         function may not be executed and hence Gmail will not display the list of messages and
408         will subsequently display an error message.
409
410         When a WebKit client defers loading of a page (e.g. -[WebView setDefersCallbacks:YES]), WebCore
411         may still load the main resource, say if substitute data is available for it, and defer executing
412         tasks, such as a SQLTransactionCallback function, by appending such tasks to the end of the list
413         of pending tasks for the associated Document. This list of pending tasks is never processed when
414         a client subsequently allows loading (e.g. -[WebView setDefersCallbacks:NO])). Therefore, we never
415         execute a SQLTransactionCallback function that was deferred.
416
417         Ideally WebCore would defer loading of substitute data when a WebKit client requests that loading
418         be deferred and hence a SQLTransactionCallback function would be deferred as a consequence of the
419         lack of JavaScript script execution (since substitute data wasn't loaded and hence any JavaScript
420         script contained in the substitute data that initiates a SQL transaction isn't executed). For now,
421         it's sufficient to only defer executing tasks when either there are existing pending tasks or the
422         active DOM objects for the document are suspended (e.g. Document::suspendActiveDOMObjects() was called).
423
424         * dom/Document.cpp:
425         (WebCore::Document::postTask):
426
427 2014-08-07  Zalan Bujtas  <zalan@apple.com>
428
429         border-radius on html does not render properly.
430         https://bugs.webkit.org/show_bug.cgi?id=135706
431
432         Reviewed by Simon Fraser.
433
434         Ensure that background is initialized when border-radius is present.
435
436         Test: fast/borders/border-radius-on-html.html
437
438         * rendering/RenderView.cpp:
439         (WebCore::rendererObscuresBackground):
440
441 2014-08-07  Pratik Solanki  <psolanki@apple.com>
442
443         Random resource replacement on beta.icloud.com
444         https://bugs.webkit.org/show_bug.cgi?id=135685
445         <rdar://problem/17937975>
446
447         Reviewed by Alexey Proskuryakov.
448
449         Revert the performance optimization in r170499. It turns out we could get a delayed disk
450         cache notification for a resource that has since been changed in WebCore. In such a case, we
451         were replacing the newer resource data with the older disk cached resource data. This was
452         happening for cached POST content on beta.icloud.com. Fix this by forcing a memcmp of data
453         contents before replacing it which is what we used to do before.
454
455         * loader/cache/CachedResource.cpp:
456         (WebCore::CachedResource::tryReplaceEncodedData):
457
458 2014-08-06  Brent Fulgham  <bfulgham@apple.com>
459
460         [Mac, iOS] Captions are appearing multiple times during repeated video play through
461         https://bugs.webkit.org/show_bug.cgi?id=135680
462         <rdar://problem/17926802>
463
464         Reviewed by Eric Carlson.
465
466         Test: media/track/track-in-band-cues-added-once.html
467
468         Revert TextTrackCueGeneric::isOrderedBefore logic to its original form, and add
469         a new 'isOrderedBeforeDuringDisplay' for the special case of displaying captions.
470
471         * html/shadow/MediaControlElements.cpp:
472         (WebCore::compareCueIntervalForDisplay): Added helper function.
473         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Use the new
474         'isOrderedBeforeDuringDisplay' to order the cues for display.
475         * html/track/TextTrackCue.h:
476         (WebCore::TextTrackCue::isOrderedBeforeDuringDisplay): Added. This just
477         calls the existing 'isOrderedBefore' method.
478         * html/track/TextTrackCueGeneric.cpp:
479         (WebCore::TextTrackCueGeneric::isOrderedBefore): Revert to logic used
480         prior to r171700.
481         (WebCore::TextTrackCueGeneric::isOrderedBeforeDuringDisplay): New method that
482         implements the behavior in r171700.
483         * html/track/TextTrackCueGeneric.h:
484
485 2014-08-07  Jer Noble  <jer.noble@apple.com>
486
487         [Mac] Taking a paused video full screen flashes black at beginning of animation.
488         https://bugs.webkit.org/show_bug.cgi?id=135668
489
490         Reviewed by Eric Carlson.
491
492         When entering fullscreen, the full screen window will momentarily occlude the browser
493         window, causing a visiblity change notification. To avoid flickering when client buffering
494         is disabled, throttle calls to updateClientDataBuffering by delaying those calls for a
495         short period.
496
497         * platform/audio/MediaSession.cpp:
498         (WebCore::MediaSession::MediaSession):
499         (WebCore::MediaSession::clientWillPausePlayback):
500         (WebCore::MediaSession::visibilityChanged):
501         (WebCore::MediaSession::clientDataBufferingTimerFired):
502         (WebCore::MediaSession::updateClientDataBuffering):
503         * platform/audio/MediaSession.h:
504
505 2014-08-07  Zan Dobersek  <zdobersek@igalia.com>
506
507         ASSERT in Document::unregisterCollection reloading apple.com
508         https://bugs.webkit.org/show_bug.cgi?id=135168
509
510         Reviewed by Andreas Kling.
511
512         * dom/Document.cpp:
513         (WebCore::Document::unregisterCollection): This assertion was failing
514         because the passed-in HTMLCollection was not invalidated for a non-related
515         attribute, but was instead unregistered during destruction, at which point
516         the m_collectionsInvalidatedAtDocument HashSet was empty.
517         The assertion could be trivially reduced into checking that the HashSet is
518         empty when it was moved out of in Document::invalidateNodeListAndCollectionCaches(),
519         but that just checks that the move semantics on HashSet work properly. Removing
520         a non-existent element from a HashSet is harmless, so the assertion can be removed
521         completely.
522
523 2014-08-06  Brent Fulgham  <bfulgham@apple.com>
524
525         [Win] Correct build errors when WebGL Disabled
526         https://bugs.webkit.org/show_bug.cgi?id=135687
527
528         Unreviewed build fix.
529
530         * WebCore.vcxproj/WebCore.vcxproj: Don't build Cairo files
531         when building CG.
532         * platform/graphics/GLContext.cpp: Correct use of 3D_GRAPHICS macro.
533         * platform/graphics/GraphicsContext3DPrivate.cpp: Ditto.
534         * platform/graphics/opengl/GLPlatformContext.cpp: Ditto.
535         * platform/graphics/opengl/GLPlatformSurface.cpp: Ditto.
536
537 2014-08-06  Ryuan Choi  <ryuan.choi@samsung.com>
538
539         Unreviewed build fix on non Cocoa port since r172172
540
541         * platform/text/TextEncodingRegistry.cpp:
542         (WebCore::defaultTextEncodingNameForSystemLanguage):
543         * platform/text/TextEncodingRegistry.h:
544
545 2014-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
546
547         [iOS] Make document marker assets not specific to particular scale factors
548         https://bugs.webkit.org/show_bug.cgi?id=135671
549
550         Reviewed by Simon Fraser.
551
552         No new tests.
553
554         * WebCore.xcodeproj/project.pbxproj:
555         * platform/ios/wak/WKGraphics.mm:
556         (imageResourcePath):
557         (WKGraphicsCreateImageFromBundleWithName):
558
559 2014-08-06  Enrica Casucci  <enrica@apple.com>
560
561         Services menu doesn't show up after you defocus/refocus the Safari window.
562         https://bugs.webkit.org/show_bug.cgi?id=135678
563         <rdar://problem/17929247>
564
565         Reviewed by Tim Horton.
566
567         In setSelection we create a SelectionRectGatherer::Notifier object that will notify
568         SelectionOverlayController about changes to the selection rects.
569         Upon creation, the list of selections rects is cleared, since it is populated by
570         the code that collects the selection rects. That code is never called
571         when setSelection won't change the selection, which the case when the window is
572         activated. The fix consists in postponing the SelectionRectGatherer::Notifier object
573         creation until we know for sure that the selection is indeed going to change.
574         
575         * rendering/RenderView.cpp:
576         (WebCore::RenderView::setSelection):
577
578 2014-08-06  Dean Jackson  <dino@apple.com>
579
580         ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED is not used anywhere. Remove it.
581         https://bugs.webkit.org/show_bug.cgi?id=135675
582
583         Reviewed by Sam Weinig.
584
585         * Configurations/FeatureDefines.xcconfig:
586
587 2014-08-06  Brady Eidson  <beidson@apple.com>
588
589         IDB transactions never reset if the Web Process ends before cleaning up
590         https://bugs.webkit.org/show_bug.cgi?id=135218
591
592         Reviewed by David Kilzer.
593
594         No new tests (Covered by existing tests).
595
596         * Modules/indexeddb/IDBServerConnection.h: Add sync versions of reset/rollback.
597
598         * Modules/indexeddb/IDBTransactionBackend.cpp:
599         (WebCore::IDBTransactionBackend::abort): Call the sync versions.
600
601 2014-08-06  Wenson Hsieh <wenson_hsieh@apple.com>
602
603         Implement parsing for CSS scroll snap points
604         https://bugs.webkit.org/show_bug.cgi?id=134301
605
606         Provided support for parsing -webkit-scroll-snap-* properties, i.e.  type, points-x, points-y, destination, and coordinates.
607         The exact syntax of the scroll snap CSS properties follow the W3C spec at http://dev.w3.org/csswg/css-snappoints/
608
609         Reviewed by Dean Jackson.
610
611         Tests: css3/scroll-snap/scroll-snap-property-parsing.html,
612             css3/scroll-snap/scroll-snap-property-computed-style.html
613
614         * CMakeLists.txt: Added StyleScrollSnapPoints.h, StyleScrollSnapPoints.cpp
615         * Configurations/FeatureDefines.xcconfig: Added ENABLE_CSS_SCROLL_SNAP
616         * WebCore.vcxproj/WebCore.vcxproj: Added StyleScrollSnapPoints.h, StyleScrollSnapPoints.cpp
617         * WebCore.vcxproj/WebCore.vcxproj.filters: Added StyleScrollSnapPoints.h, StyleScrollSnapPoints.cpp
618         * WebCore.xcodeproj/project.pbxproj: Added StyleScrollSnapPoints.h, StyleScrollSnapPoints.cpp, LengthRepeat.h
619         * css/CSSCalculationValue.cpp: Support for LengthRepeat
620         (WebCore::hasDoubleValue):
621         * css/CSSComputedStyleDeclaration.cpp: Support for showing computed style for snap point properties.
622         (WebCore::scrollSnapDestination):
623         (WebCore::scrollSnapPoints):
624         (WebCore::scrollSnapCoordinates):
625         (WebCore::ComputedStyleExtractor::propertyValue):
626         * css/CSSParser.cpp: Support for parsing snap point properties.
627         (WebCore::isValidKeywordPropertyAndValue): handle snap point type
628         (WebCore::isKeywordPropertyID):
629         (WebCore::CSSParser::parseValue): Added support for parsing snap points.
630         (WebCore::CSSParser::parseNonElementSnapPoints): Helper for parsing snap points-x/y.
631         (WebCore::CSSParser::parseScrollSnapDestination): Helper for parsing snap point destinations.
632         (WebCore::CSSParser::parseScrollSnapCoordinate): Helper for parsing snap point coordinates.
633         * css/CSSParser.h: Support for parsing snap point properties.
634         * css/CSSParserValues.cpp:
635         (WebCore::CSSParserValue::createCSSValue):
636         * css/CSSPrimitiveValue.cpp:
637         (WebCore::isValidCSSUnitTypeForDoubleConversion):
638         (WebCore::CSSPrimitiveValue::init):
639         (WebCore::CSSPrimitiveValue::cleanup):
640         (WebCore::CSSPrimitiveValue::getLengthRepeatValue):
641         (WebCore::CSSPrimitiveValue::formatNumberForcustomCSSText):
642         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
643         (WebCore::CSSPrimitiveValue::equals):
644         * css/CSSPrimitiveValue.h:
645         (WebCore::CSSPrimitiveValue::isLengthRepeat):
646         (WebCore::CSSPrimitiveValue::getLengthRepeatValue):
647         * css/CSSPrimitiveValueMappings.h: Added converters for snap point type properties.
648         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
649         (WebCore::CSSPrimitiveValue::operator ScrollSnapType):
650         * css/CSSPropertyNames.in: Added relevant snap point property names.
651         * css/CSSValueKeywords.in: Added "proximity", "mandatory" and "elements".
652         * css/LengthRepeat.h: Added to represent values of repeat(<length>)
653         (WebCore::LengthRepeat::create):
654         (WebCore::LengthRepeat::cloneForCSSOM):
655         (WebCore::LengthRepeat::interval):
656         (WebCore::LengthRepeat::setInterval):
657         (WebCore::LengthRepeat::equals):
658         (WebCore::LengthRepeat::cssText):
659         (WebCore::LengthRepeat::LengthRepeat):
660         * css/StyleResolver.cpp: Support for handling snap point properties
661         (WebCore::StyleResolver::applyProperty):Updated switch case to build snap-point-related style data
662         * rendering/style/RenderStyle.h: Added methods to access and modify snap point data
663         * rendering/style/RenderStyleConstants.h: Added scroll snap type flags.
664         * rendering/style/StyleAllInOne.cpp: Added StyleScrollSnapPoints.cpp
665         * rendering/style/StyleRareNonInheritedData.cpp: Added initiazing for m_scrollSnapPoints, updated equality check
666         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
667         (WebCore::StyleRareNonInheritedData::operator==):
668         * rendering/style/StyleRareNonInheritedData.h: Added field for StyleScrollSnapPoints
669         * rendering/style/StyleScrollSnapPoints.cpp: Added. Wrapper for basic snap point data structures.
670         (WebCore::StyleScrollSnapPoints::StyleScrollSnapPoints):
671         (WebCore::StyleScrollSnapPoints::copy):
672         (WebCore::StyleScrollSnapPoints::operator==):
673         * rendering/style/StyleScrollSnapPoints.h: Added.
674         (WebCore::StyleScrollSnapPoints::create):
675         (WebCore::StyleScrollSnapPoints::defaultRepeatOffset): Creates a new Length representing the default repeat value of repeat(100%)
676         (WebCore::StyleScrollSnapPoints::defaultDestinationOffset): Creates a new Length representing a default destination value (0px)
677         (WebCore::StyleScrollSnapPoints::operator!=):
678
679 2014-08-06  Andy Estes  <aestes@apple.com>
680
681         [iOS] Subresources referenced in converted QuickLook documents sometimes fail to load
682         https://bugs.webkit.org/show_bug.cgi?id=135676
683
684         Reviewed by David Kilzer.
685
686         * loader/DocumentLoader.h:
687         (WebCore::DocumentLoader::setQuickLookHandle):
688         (WebCore::DocumentLoader::quickLookHandle):
689
690 2014-08-06  Simon Fraser  <simon.fraser@apple.com>
691
692         REGRESSION (r168119): Album flipping animation doesn’t work
693         https://bugs.webkit.org/show_bug.cgi?id=132801
694         <rdar://problem/16878497>, <rdar://problem/17908085>
695
696         Reviewed by Dean Jackson.
697         
698         In r168119 I avoided creating backing store for backface-visibility:hidden unless
699         some ancestor was 3d-transformed. However, when starting transitions or animations
700         that apply transforms, we don't do a layout, and therefore don't update the RenderLayer
701         flags that mark an ancestor as having a transform. This broke various content which
702         used backface-visibility:hidden for "flip" animations.
703         
704         Make a low-risk fix that looks for the pattern of CSS properties used for flipping,
705         making a compositing layer for backface-visibility:hidden if the stacking context element
706         has transform-style: preserve-3d.
707
708         Test: compositing/backing/backface-visibility-flip.html
709
710         * rendering/RenderLayerCompositor.cpp:
711         (WebCore::RenderLayerCompositor::requiresCompositingForBackfaceVisibility):
712
713 2014-08-06  Brent Fulgham  <bfulgham@apple.com>
714
715         Consolidate logic for calculating scrollbar page step size
716         https://bugs.webkit.org/show_bug.cgi?id=135670
717
718         Reviewed by Simon Fraser.
719
720         Consolidate the calculation of the scroll step size into a single place.
721         Improve the handling of sub-pixel layout behavior by performing proper
722         rounding on the fractional scroll ranges.
723
724         * editing/EditorCommand.cpp:
725         (WebCore::verticalScrollDistance): Switch to Scrollbar::pageStep method.
726         * platform/ScrollAnimator.cpp:
727         (WebCore::ScrollAnimator::handleWheelEvent): Ditto.
728         * platform/ScrollView.cpp:
729         (WebCore::ScrollView::updateScrollbars): Ditto.
730         * platform/Scrollbar.h:
731         (WebCore::Scrollbar::pageStep): Added.
732         (WebCore::Scrollbar::pageStepDelta): Added.
733         * rendering/RenderLayer.cpp:
734         (WebCore::RenderLayer::updateScrollbarsAfterLayout): Switch to Scrollbar method.
735
736 2014-08-06  Brian J. Burg  <burg@cs.washington.edu>
737
738         Web Replay: dispatch timing information should be stored out-of-line in a replay segment
739         https://bugs.webkit.org/show_bug.cgi?id=135295
740
741         Reviewed by Timothy Hatcher.
742
743         We need to save a timestamp for each event loop input so that replay can
744         simulate the original user and network delays. Currently that timestamp
745         is stored on each EventLoopInput instance.
746
747         This patch stores timestamp data in a separate vector attached to the segment.
748         The event loop input class is now immutable, and new auxiliary data can be added
749         without adding members to the EventLoopInput class.
750
751         As part of the refactoring, InputCursors now keep a reference to the relevant
752         session segment instead of a reference to their input storage. InputCursors can
753         be created directly, instead of through ReplaySessionSegment.
754
755         No new tests. No behavior was changed.
756
757         * inspector/InspectorReplayAgent.cpp:
758         (WebCore::buildInspectorObjectForInput): Don't send the timestamp with the input.
759         (WebCore::buildInspectorObjectForSegment):
760         * inspector/protocol/Replay.json: Remove optional timestamp field for ReplayInput.
761         * replay/CapturingInputCursor.cpp:
762         (WebCore::CapturingInputCursor::CapturingInputCursor):
763         (WebCore::CapturingInputCursor::create):
764         (WebCore::CapturingInputCursor::storeInput): Save event loop input timings here.
765         * replay/CapturingInputCursor.h:
766         * replay/EventLoopInput.h:
767         (WebCore::EventLoopInputBase::EventLoopInputBase): Deleted.
768         (WebCore::EventLoopInputBase::timestamp): Deleted.
769         (WebCore::EventLoopInputBase::setTimestamp): Deleted.
770         * replay/EventLoopInputDispatcher.cpp: Use a struct for dispatch information.
771         (WebCore::EventLoopInputDispatcher::EventLoopInputDispatcher):
772         (WebCore::EventLoopInputDispatcher::dispatchInputSoon):
773         (WebCore::EventLoopInputDispatcher::dispatchInput):
774         * replay/EventLoopInputDispatcher.h:
775         * replay/FunctorInputCursor.h:
776         (WebCore::FunctorInputCursor::forEachInputInQueue):
777         (WebCore::FunctorInputCursor::FunctorInputCursor):
778         * replay/ReplayController.cpp:
779         (WebCore::ReplayController::createSegment):
780         (WebCore::ReplayController::loadSegmentAtIndex):
781         (WebCore::ReplayController::unloadSegment): Deleted.
782         (WebCore::ReplayController::startPlayback): Deleted.
783         * replay/ReplaySessionSegment.cpp:
784         (WebCore::ReplaySessionSegment::createCapturingCursor): Deleted.
785         (WebCore::ReplaySessionSegment::createReplayingCursor): Deleted.
786         (WebCore::ReplaySessionSegment::createFunctorCursor): Deleted.
787         * replay/ReplaySessionSegment.h:
788         (WebCore::ReplaySessionSegment::storage):
789         (WebCore::ReplaySessionSegment::eventLoopTimings):
790         * replay/ReplayingInputCursor.cpp:
791         (WebCore::ReplayingInputCursor::ReplayingInputCursor):
792         (WebCore::ReplayingInputCursor::create):
793         (WebCore::ReplayingInputCursor::uncheckedLoadInput):
794         (WebCore::ReplayingInputCursor::loadEventLoopInput): Added. This method collates
795         and returns the next event loop input with its associated dispatch information.
796         * replay/ReplayingInputCursor.h:
797
798 2014-08-06  Tim Horton  <timothy_horton@apple.com>
799
800         Document-relative overlays disappear after doing page-cache navigations
801         https://bugs.webkit.org/show_bug.cgi?id=135669
802         <rdar://problem/17929171>
803
804         Reviewed by Simon Fraser.
805
806         * rendering/RenderLayerCompositor.cpp:
807         (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
808         When navigating from one page to another, the document-relative overlay
809         layer is moved from the layer tree of the RenderLayerCompositor of the
810         first RenderView to the layer tree of the RenderLayerCompositor of the
811         new RenderView, upon layer tree construction.
812         When going "back" via a page cache navigation, we don't rebuild the
813         layer tree, and just assume that it is in a valid state.
814         However, the document-relative overlay layer was *moved*, and as such,
815         needs to be moved back. To do this, reattach the document-relative
816         overlay layer whenever the root layer attachment of a RenderLayerCompositor
817         changes, which will happen in the right order when going back to a cached page.
818
819 2014-08-06  Filip Pizlo  <fpizlo@apple.com>
820
821         Merge r171389, r171495, r171508, r171510, r171605, r171606, r171611, r171614, r171763 from ftlopt.
822
823     2014-08-06  Mark Hahnenberg  <mhahnenberg@apple.com>
824     
825             Refactor our current implementation of for-in
826             https://bugs.webkit.org/show_bug.cgi?id=134142
827     
828             Reviewed by Filip Pizlo.
829     
830             No new tests.
831     
832             This patch splits for-in loops into three distinct parts:
833     
834             - Iterating over the indexed properties in the base object.
835             - Iterating over the Structure properties in the base object.
836             - Iterating over any other enumerable properties for that object and any objects in the prototype chain.
837      
838             It does this by emitting these explicit loops in bytecode, using a new set of bytecodes to 
839             support the various operations required for each loop.
840     
841             * bindings/js/JSDOMWindowCustom.cpp:
842             (WebCore::JSDOMWindow::getEnumerableLength):
843             (WebCore::JSDOMWindow::getStructurePropertyNames):
844             (WebCore::JSDOMWindow::getGenericPropertyNames):
845             * bindings/scripts/CodeGeneratorJS.pm:
846             (GenerateHeader):
847             * bridge/runtime_array.cpp:
848             (JSC::RuntimeArray::getOwnPropertyNames):
849     
850 2014-08-06  Alexey Proskuryakov  <ap@apple.com>
851
852         REGRESSION (WebKit2): iOS Safari default encoding doesn't follow system language
853         https://bugs.webkit.org/show_bug.cgi?id=135667
854         <rdar://problem/17862892>
855
856         Reviewed by Anders Carlsson.
857
858         Moved a function that computes default encoding from WebKit to WebCore, so that
859         it could be shared with WebKit2.
860
861         * WebCore.exp.in:
862         * platform/ios/WebCoreSystemInterfaceIOS.mm:
863         * platform/mac/WebCoreSystemInterface.h:
864         * platform/mac/WebCoreSystemInterface.mm:
865         * platform/text/TextEncodingRegistry.cpp:
866         (WebCore::defaultTextEncodingNameForSystemLanguage):
867         * platform/text/TextEncodingRegistry.h:
868
869 2014-08-06  Andreas Kling  <akling@apple.com>
870
871         Remove unused RenderBox::reflectionBox().
872         <https://webkit.org/b/135661>
873
874         Reviewed by Antti Koivisto.
875
876         * rendering/RenderBox.cpp:
877         (WebCore::RenderBox::reflectionBox): Deleted.
878         * rendering/RenderBox.h:
879
880 2014-08-06  Brian J. Burg  <burg@cs.washington.edu>
881
882         Web Inspector: convert ReplayManager to a promise-based API
883         https://bugs.webkit.org/show_bug.cgi?id=135249
884
885         Reviewed by Timothy Hatcher.
886
887         Fix some assertions to match ReplayController's preconditions.
888
889         * inspector/InspectorReplayAgent.cpp:
890         (WebCore::InspectorReplayAgent::replayToPosition):
891         (WebCore::InspectorReplayAgent::replayToCompletion):
892
893 2014-08-05  Brent Fulgham  <bfulgham@apple.com>
894
895         [Mac] Unable to scroll to bottom of nested scrollable areas
896         https://bugs.webkit.org/show_bug.cgi?id=135637
897         <rdar://problem/17910241>
898
899         Reviewed by Zalan Bujtas.
900
901         Test: platform/mac/fast/scrolling/scroll-latched-nested-div.html
902
903         Avoid truncating the fractional portion of scroll ranges.
904
905         * rendering/RenderLayer.cpp:
906         (WebCore::RenderLayer::updateScrollbarsAfterLayout): Round
907         the LayoutUnit values for scroll width and height rather than
908         truncating.
909
910 2014-08-06  Andy Estes  <aestes@apple.com>
911
912         [iOS] QuickLook returns an invalid MIME type for some documents
913         https://bugs.webkit.org/show_bug.cgi?id=135651
914
915         Reviewed by David Kilzer.
916
917         r172151 ensured that we ignore QuickLook delegate messages after an error, but neglected to do so for
918         connectionDidFinishLoading:. Do not call ResourceLoader::didFinishLoading() if an error has occurred.
919
920         * platform/network/ios/QuickLook.mm:
921         (-[WebResourceLoaderQuickLookDelegate connectionDidFinishLoading:]):
922
923 2014-08-06  Commit Queue  <commit-queue@webkit.org>
924
925         Unreviewed, rolling out r172155.
926         https://bugs.webkit.org/show_bug.cgi?id=135659
927
928         ChangeLog and commit message are wrong (Requested by estes on
929         #webkit).
930
931         Reverted changeset:
932
933         "Unreviewed, rolling out r172145."
934         https://bugs.webkit.org/show_bug.cgi?id=135657
935         http://trac.webkit.org/changeset/172155
936
937 2014-07-28  Myles C. Maxfield  <mmaxfield@apple.com>
938
939         Unreviewed build fix
940
941         * rendering/TextPainter.cpp: Used incorrect variable name
942  
943 2014-08-06  Commit Queue  <commit-queue@webkit.org>
944
945         Unreviewed, rolling out r172145.
946         https://bugs.webkit.org/show_bug.cgi?id=135657
947
948         caused 1 API test to fail (Requested by zalan on #webkit).
949
950         Reverted changeset:
951
952         "Cleanup InlineTextBox::paintSelection and
953         ::localSelectionRect."
954         https://bugs.webkit.org/show_bug.cgi?id=135631
955         http://trac.webkit.org/changeset/172145
956
957 2014-07-28  Myles C. Maxfield  <mmaxfield@apple.com>
958
959         Text-shadow with (0, 0) offset and radius = 0 is ugly
960         https://bugs.webkit.org/show_bug.cgi?id=135357
961
962         Reviewed by Darin Adler.
963
964         Instead, check for this kind of shadow and don't draw it.
965
966         Test: fast/text/empty-shadow.html
967
968         * rendering/TextPainter.cpp:
969         (WebCore::isEmptyShadow): Does a shadow match these criteria?
970         (WebCore::paintTextWithShadows): If so, don't draw it.
971
972 2014-08-06  Andy Estes  <aestes@apple.com>
973
974         [iOS] QuickLook returns an invalid MIME type for some documents
975         https://bugs.webkit.org/show_bug.cgi?id=135651
976
977         Reviewed by David Kilzer.
978
979         In some cases QuickLook indicates a failure by returning a nil MIME type in -[QLPreviewConverter previewResponse]
980         rather than calling connection:didFailWithError:. Calling ResourceLoader::didReceiveResponse() with a response
981         containing a nil MIME type leads to a crash.
982
983         Stop loading the resource and display an error page if QuickLook cannot provide a MIME type for the converted response.
984
985         No new tests. QuickLook is not testable from WebKit.
986
987         * platform/network/ios/QuickLook.mm:
988         (-[WebResourceLoaderQuickLookDelegate _sendDidReceiveResponseIfNecessary]): Called ResourceLoader::didFail() if
989         MIME type was nil. Called ResourceLoader::didReceiveResponse() otherwise.
990         (-[WebResourceLoaderQuickLookDelegate connection:didReceiveDataArray:]): Called -_sendDidReceiveResponseIfNecessary.
991         (-[WebResourceLoaderQuickLookDelegate connection:didReceiveData:lengthReceived:]): Ditto.
992         (-[WebResourceLoaderQuickLookDelegate connection:didFailWithError:]): Ditto.
993
994 2014-08-06  Radu Stavila  <stavila@adobe.com>
995
996         REGRESSION (r163382): Overflow hidden for inner elements breaks blurring
997         https://bugs.webkit.org/show_bug.cgi?id=135318
998
999         Reviewed by Zalan Bujtas.
1000
1001         For elements with border radius, clipping must be applied using clipRoundedRect.
1002         This regressed in r163382, when normal clipping started being applied also
1003         for elements having border radius.
1004
1005         Test: fast/filter-image/clipped-filter.html
1006
1007         * rendering/RenderLayer.cpp:
1008         (WebCore::RenderLayer::clipToRect):
1009         (WebCore::RenderLayer::restoreClip):
1010
1011 2014-08-06  Zalan Bujtas  <zalan@apple.com>
1012
1013         Cleanup InlineTextBox::paintSelection and ::localSelectionRect.
1014         https://bugs.webkit.org/show_bug.cgi?id=135631
1015
1016         Reviewed by Darin Adler.
1017
1018         Covered by existing tests.
1019
1020         * rendering/InlineTextBox.cpp: Ideally these 2 functions should share some more code.
1021         (WebCore::InlineTextBox::localSelectionRect): Local coordinates should not be snapped/enclosed.
1022         This change could potentially break some selections. Should that be the case, they need to be addressed
1023         separately.
1024         (WebCore::InlineTextBox::paint):
1025         (WebCore::InlineTextBox::paintSelection): Minor cleanup.
1026         * rendering/InlineTextBox.h:
1027
1028 2014-08-06  Carlos Garcia Campos  <cgarcia@igalia.com>
1029
1030         [GTK] Be able to disable gtk2 dependency
1031         https://bugs.webkit.org/show_bug.cgi?id=135505
1032
1033         Reviewed by Gustavo Noronha Silva.
1034
1035         Do not build WebCorePlatformGTK2 when ENABLE_PLUGIN_PROCESS_GTK2
1036         is OFF.
1037
1038         * PlatformGTK.cmake:
1039
1040 2014-08-06  Mark Lam  <mark.lam@apple.com>
1041
1042         Gardening: fix bindings test breakage for for r170564 merged in r172129.
1043         <https://webkit.org/b/134333>
1044
1045         Not reviewed.
1046
1047         No new tests.
1048
1049         * bindings/scripts/test/JS/JSTestEventTarget.h:
1050         (WebCore::JSTestEventTarget::create):
1051
1052 2014-08-06  Ryuan Choi  <ryuan.choi@samsung.com>
1053
1054         Unreviewed typo correction.
1055
1056         * bindings/scripts/CodeGeneratorJS.pm: removed unnecessary space.
1057         (GenerateImplementation):
1058
1059 2014-08-05  James Craig  <jcraig@apple.com>
1060
1061         Web Inspector: AXI: Add label string once AccessibilityObject::computedLabel() is available
1062         https://bugs.webkit.org/show_bug.cgi?id=129940
1063
1064         Reviewed by Chris Fleizach.
1065
1066         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt
1067
1068         * accessibility/AccessibilityObject.cpp: Fixed crash.
1069         (WebCore::AccessibilityObject::accessibilityComputedLabel): 
1070         * accessibility/AccessibilityObject.h: Method name update.
1071         * inspector/InspectorDOMAgent.cpp: New support for getting Node label from AccessibilityObject.
1072         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
1073
1074 2014-07-29  Filip Pizlo  <fpizlo@apple.com>
1075
1076         Merge r170564, r170571, r170604, r170628, r170672, r170680, r170724, r170728, r170729, r170819, r170821, r170836, r170855, r170860, r170890, r170907, r170929, r171052, r171106, r171152, r171153, r171214 from ftlopt.
1077
1078     2014-07-01  Mark Lam  <mark.lam@apple.com>
1079     
1080             [ftlopt] DebuggerCallFrame::scope() should return a DebuggerScope.
1081             <https://webkit.org/b/134420>
1082     
1083             Reviewed by Geoffrey Garen.
1084     
1085             No new tests.
1086     
1087             * ForwardingHeaders/debugger/DebuggerCallFrame.h: Removed.
1088             - This is not in use.  Hence, we can remove it.
1089             * bindings/js/ScriptController.cpp:
1090             (WebCore::ScriptController::attachDebugger):
1091             - We should acquire the JSLock before modifying a JS global object.
1092     
1093     2014-06-25  Filip Pizlo  <fpizlo@apple.com>
1094     
1095             [ftlopt] If a CodeBlock is jettisoned due to a watchpoint then it should be possible to figure out something about that watchpoint
1096             https://bugs.webkit.org/show_bug.cgi?id=134333
1097     
1098             Reviewed by Geoffrey Garen.
1099     
1100             No new tests because no change in behavior.
1101     
1102             * bindings/scripts/CodeGeneratorJS.pm:
1103             (GenerateHeader):
1104     
1105 2014-08-05  Ryuan Choi  <ryuan.choi@samsung.com>
1106
1107         Build break since r172093
1108         https://bugs.webkit.org/show_bug.cgi?id=135636
1109
1110         Reviewed by Gyuyoung Kim.
1111
1112         Since r172093, AbstractView.idl is added in CMake Build but CodeGeneratorJS.pm does not take care of it.
1113
1114         No new tests required, no new functionality.
1115
1116         * bindings/scripts/CodeGeneratorJS.pm:
1117         (ShouldGenerateToJSDeclaration):
1118         (ShouldGenerateToJSImplementation):
1119         (GetImplClassName): Added to rename implClassName to DOMWindow if interface name is AbstractView.
1120         (GenerateHeader):
1121         (GenerateImplementation):
1122
1123 2014-08-05  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
1124
1125         [CG] strokeRect does not honor lineJoin
1126         https://bugs.webkit.org/show_bug.cgi?id=132948
1127
1128         Reviewed by Darin Adler.
1129
1130         Replaced use of CGContextStrokeRectWithWidth convenience function with explicit 
1131         call to CGContextAddRect and CGContextStrokePath.  The convenience functions
1132         CGContextStrokeRect and CGContextStrokeRectWithWidth fail to apply some attributes
1133         (e.g. stroke join) of the graphics state in certain cases.
1134
1135         Test: fast/canvas/canvas-strokeRect-lineJoin.html
1136
1137         * platform/graphics/cg/GraphicsContextCG.cpp:
1138         (WebCore::GraphicsContext::strokeRect):
1139
1140 2014-08-05  Brent Fulgham  <bfulgham@apple.com>
1141
1142         [Win] Build attempts to use ANGLE when not building WebGL.
1143         https://bugs.webkit.org/show_bug.cgi?id=135630
1144         <rdar://problem/135630>
1145
1146         Unreviewed build fix.
1147
1148         * platform/graphics/win/GraphicsContext3DWin.cpp: Move #include of GraphicsContext3D.h
1149         inside USE(3D_GRAPHICS) guard.
1150
1151 2014-08-05  Simon Fraser  <simon.fraser@apple.com>
1152
1153         [iOS WK2] Crash going back on a specific tumblr blog (under ScrollingStateTree::removeNodeAndAllDescendants)
1154         https://bugs.webkit.org/show_bug.cgi?id=135629
1155         <rdar://problem/17802174>
1156
1157         Reviewed by Tim Horton.
1158         
1159         In r170198 I added an "orphan scrolling nodes" code path that sets aside subtrees
1160         of scrolling nodes into an m_orphanedSubframeNodes map, which keeps them alive until
1161         they get reparented or destroyed. The nodes in that subtree remain in m_stateNodeMap,
1162         which holds raw pointers to them.
1163         
1164         However, ScrollingStateTree::commit() can clear m_orphanedSubframeNodes, which is
1165         sometimes non-empty at this point. When that happened, we would destroy nodes which
1166         were still referenced by m_stateNodeMap, with the result that a later query for the
1167         same nodeID would hand back a pointer to a deleted object.
1168         
1169         Fix by calling recursiveNodeWillBeRemoved() on nodes in the m_orphanedSubframeNodes
1170         before clearing it, which removes them and all their descendants from the state node map.
1171
1172         Test: platform/mac-wk2/tiled-drawing/scrolling/frames/orphaned-subtree.html
1173
1174         * page/scrolling/ScrollingStateTree.cpp:
1175         (WebCore::ScrollingStateTree::clear):
1176         (WebCore::ScrollingStateTree::commit):
1177
1178 2014-08-05  Peyton Randolph  <prandolph@apple.com>
1179
1180         Add the ability to force text to render in white, not just black
1181         https://bugs.webkit.org/show_bug.cgi?id=135625
1182
1183         Reviewed by Beth Dakin.
1184
1185         This patch introduces PaintBehaviorForceWhiteText, a complement to PaintBehaviorForceBlackText. If
1186         a client specifies both PaintBehaviorForceWhiteText and PaintBehaviorForceBlackText, the text will be
1187         painted black.
1188
1189         No new tests.
1190
1191         * rendering/EllipsisBox.cpp:
1192         (WebCore::EllipsisBox::paint): Use the forced text color to paint the text if requested.
1193         * rendering/InlineTextBox.cpp:
1194         (WebCore::InlineTextBox::paint): Disable the text shadow if a text color has been forced.
1195         * rendering/PaintInfo.h:
1196         (WebCore::PaintInfo::forceTextColor): 
1197         Return true iff the client has requested to force a black or white text color.
1198         (WebCore::PaintInfo::forceWhiteText):
1199         Return true iff forcing white text has been requested.
1200         (WebCore::PaintInfo::forcedTextColor): 
1201         Return the forced text color. Currently only white and black are supported.
1202         * rendering/PaintPhase.h:
1203         * rendering/RenderLayer.cpp:
1204         (WebCore::RenderLayer::paintLayerContents): Remove the forceBlackText-related code as it is redundant.
1205         (WebCore::RenderLayer::paintForegroundForFragments): 
1206         Remove forceBlackText parameter and infer the correct behavior from the given paint behavior.
1207         * rendering/RenderLayer.h:
1208         * rendering/TextPaintStyle.cpp:
1209         (WebCore::computeTextPaintStyle): Use the forced text color if available.
1210         (WebCore::computeTextSelectionPaintStyle): Use the forced text color if available.
1211
1212 2014-08-05  Alex Christensen  <achristensen@webkit.org>
1213
1214         More work on CMake.
1215         https://bugs.webkit.org/show_bug.cgi?id=135620
1216
1217         Reviewed by Reviewed by Laszlo Gombos.
1218
1219         * CMakeLists.txt:
1220         Added missing idls.
1221         * PlatformMac.cmake:
1222         Added additional include directories and source files.
1223         * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
1224         * css/makeSelectorPseudoElementsMap.py:
1225         The Windows distribution of gperf doesn't like single quotes for its key-positions parameters.
1226         * page/Chrome.h:
1227         Compile fix.
1228
1229 2014-08-05  Brian J. Burg  <burg@cs.washington.edu>
1230
1231         Web Inspector: ReplayManager shouldn't assume replay status when the inspector is opened
1232         https://bugs.webkit.org/show_bug.cgi?id=135212
1233
1234         Reviewed by Timothy Hatcher.
1235
1236         The frontend should be able to introspect the session and segment state machines,
1237         currently loaded segment and session identifiers, and replay position.
1238
1239         * inspector/InspectorReplayAgent.cpp:
1240         (WebCore::buildInspectorObjectForSessionState): Added.
1241         (WebCore::buildInspectorObjectForSegmentState): Added.
1242         (WebCore::InspectorReplayAgent::currentReplayState): Added.
1243         * inspector/InspectorReplayAgent.h:
1244         * inspector/protocol/Replay.json: Add currentReplayState query command.
1245         * replay/ReplayController.h: Add some accessors.
1246
1247 2014-08-05  Dean Jackson  <dino@apple.com>
1248
1249         [iOS] Media controls layout incorrectly in RTL content
1250         https://bugs.webkit.org/show_bug.cgi?id=135621
1251         <rdar://problem/17849206>
1252
1253         Reviewed by Eric Carlson.
1254
1255         Media controls should always layout in LTR mode, even when the
1256         page content is RTL. There already was a rule to do this on
1257         non-iOS systems, but it wasn't getting included for iOS.
1258         In this case I put the rule on the composited parent of the
1259         controls in order to maintain the padding of the control panel.
1260         This should still leave the captions unaffected.
1261
1262         * Modules/mediacontrols/mediaControlsiOS.css:
1263         (video::-webkit-media-controls-panel-composited-parent): Add direction: ltr.
1264
1265 2014-08-05  Brian J. Burg  <burg@cs.washington.edu>
1266
1267         Web Replay: rename protocol methods for getting replay session/segment data
1268         https://bugs.webkit.org/show_bug.cgi?id=135618
1269
1270         Reviewed by Timothy Hatcher.
1271
1272         * inspector/InspectorReplayAgent.cpp:
1273         (WebCore::InspectorReplayAgent::getSessionData):
1274         (WebCore::InspectorReplayAgent::getSegmentData):
1275         (WebCore::InspectorReplayAgent::getSerializedSession): Deleted.
1276         (WebCore::InspectorReplayAgent::getSerializedSegment): Deleted.
1277         * inspector/InspectorReplayAgent.h:
1278         * inspector/protocol/Replay.json:
1279
1280 2014-08-05  Antti Koivisto  <antti@apple.com>
1281
1282         REGRESSION: Extremely flashy scrolling while a page is still loading (because of flush throttling)
1283         https://bugs.webkit.org/show_bug.cgi?id=135603
1284         <rdar://problem/17876385>
1285         
1286         This hit ASSERT(frame().isMainFrame()) in FrameView::updateLayerFlushThrottling
1287         running scrollbars/scrollbar-iframe-click-does-not-blur-content.html and a few other tests.
1288
1289         * page/FrameView.cpp:
1290         (WebCore::FrameView::setWasScrolledByUser): Only invoke updateLayerFlushThrottling for the main frame.
1291
1292 2014-08-05  Peyton Randolph  <prandolph@apple.com>
1293
1294         Rename MAC_LONG_PRESS feature flag to LONG_MOUSE_PRESS.
1295         https://bugs.webkit.org/show_bug.cgi?id=135276
1296
1297         Reviewed by Beth Dakin.
1298
1299         No new tests. Just a compiler flag.
1300
1301         * Configurations/FeatureDefines.xcconfig:
1302
1303 2014-08-05  Dean Jackson  <dino@apple.com>
1304
1305         [Media iOS] Ensure there is a nice default fallback for missing wireless target names
1306         https://bugs.webkit.org/show_bug.cgi?id=135488
1307         <rdar://problem/17879156>
1308
1309         Reviewed by Antoine Quint.
1310
1311         Antoine found me on iMessage to tell me I'm an idiot and that I've
1312         forgotten how to write JavaScript. Embarrassingly, this code is what
1313         I originally had, but then second-guessed myself.
1314
1315         * Modules/mediacontrols/mediaControlsiOS.js:
1316         (ControllerIOS.prototype.updateWirelessPlaybackStatus): No need for the local
1317         variable or conditional statement, since null and "" both evaluate as false.
1318
1319 2014-08-05  Antti Koivisto  <antti@apple.com>
1320
1321         REGRESSION: Extremely flashy scrolling while a page is still loading (because of flush throttling)
1322         https://bugs.webkit.org/show_bug.cgi?id=135603
1323         <rdar://problem/17876385>
1324
1325         Reviewed by Andreas Kling.
1326
1327         * page/FrameView.cpp:
1328         (WebCore::determineLayerFlushThrottleState):
1329         
1330             Disable throttling after user has scrolled the page.
1331             This is consistent with the speculative tiling. It also gets enabled on first scroll.
1332
1333         (WebCore::FrameView::setWasScrolledByUser):
1334
1335 2014-08-05  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
1336
1337         ASSERTION FAILED: name[0] == '@' && length >= 2 in WebCore::CSSParser::detectAtToken
1338         https://bugs.webkit.org/show_bug.cgi?id=134632
1339
1340         At-rules must consist of at least two characters: the '@' symbol followed by
1341         an identifier name. The failure of this condition makes the assertion fail.
1342
1343         The length of an at-rule is currently calculated by pointer arithmetic on
1344         the 'result' pointer, which is expected to be set to the end of the at-rule
1345         identifier by the WebCore::*CSSTokenizer::parseIdentifier method.
1346         If the at-rule token is a sequence of 8-bit-only characters then
1347         'result' will point correctly at the end of the identifier. However, if
1348         the at-rule contains a 16-bit Unicode escape then 'result' will not be
1349         updated correctly anymore, hence it cannot be used for length calculation.
1350         The patch makes the parseIdentifier bump the result pointer even in the 16-bit slow case.
1351
1352         Patch by Renata Hodovan, backported from Chromium: https://codereview.chromium.org/241053002
1353
1354         Reviewed by Darin Adler.
1355
1356         Test: fast/css/atrule-with-escape-character-crash.html
1357
1358         * css/CSSParser.cpp:
1359         (WebCore::CSSParser::realLex):
1360
1361 2014-08-04  Andy Estes  <aestes@apple.com>
1362
1363         [iOS] The raw bytes of an iWork document's PDF preview are displayed rather than the PDF itself
1364         https://bugs.webkit.org/show_bug.cgi?id=135596
1365
1366         Reviewed by David Kilzer.
1367
1368         Some iWork documents contain pre-rendered PDF previews. When WebKit asks QuickLook to convert such a document,
1369         QuickLook will return this PDF as the converted response. However, until WebKit has sent the document's data to
1370         QuickLook, -[QLPreviewConverter previewResponse] will misleadingly tell WebKit that the converted resource will
1371         be of type 'text/html'. This leads WebKit to render the PDF preview as HTML.
1372
1373         Instead of querying QLPreviewConverter for the previewResponse before we've sent it any data, postpone calling
1374         ResourceLoader::didReceiveResponse until we've begun to receive data via the QLPreviewConverter delegate. At
1375         that point -[QLPreviewConverter previewResponse] will have the correct MIME type and we can call didReceiveResponse.
1376
1377         No new tests. QuickLook is not testable from WebKit.
1378
1379         * platform/network/ios/QuickLook.mm:
1380         (-[WebResourceLoaderQuickLookDelegate connection:didReceiveDataArray:]): If didReceiveResponse has yet to be
1381         called, call it now with QuickLookHandle::nsResponse().
1382         (-[WebResourceLoaderQuickLookDelegate connection:didReceiveData:lengthReceived:]): Ditto.
1383         (-[WebResourceLoaderQuickLookDelegate connection:didFailWithError:]): Ditto.
1384         (-[WebResourceLoaderQuickLookDelegate connectionDidFinishLoading:]): Assert that didReceiveResponse has been called.
1385         (-[WebResourceLoaderQuickLookDelegate clearHandle]): Cleared the raw pointer to QuickLookHandle.
1386         (WebCore::QuickLookHandle::create): Pointed WebResourceLoaderQuickLookDelegate's quickLookHandle property to
1387         the newly created QuickLookHandle.
1388
1389 2014-08-05  Renata Hodovan  <rhodovan.u-szeged@partner.samsung.com>
1390
1391         Fixing calc() parameter parsing in cubic-bezier functions
1392         https://bugs.webkit.org/show_bug.cgi?id=135605
1393
1394         Reviewed by Andreas Kling.
1395
1396         Before this patch, calc values in cubic-bezier functions weren't being read correctly
1397         since they were handled as simple floats.
1398
1399         This is a backport of my fix in Blink: https://codereview.chromium.org/369313002/
1400
1401         Test: css3/calc/cubic-bezier-with-multiple-calcs-crash.html.html
1402
1403         * css/CSSParser.cpp:
1404         (WebCore::CSSParser::parseCubicBezierTimingFunctionValue):
1405
1406 2014-08-05  Jer Noble  <jer.noble@apple.com>
1407
1408         [MSE] Seeking occasionally causes many frames to be displayed in "fast forward" mode
1409         https://bugs.webkit.org/show_bug.cgi?id=135422
1410
1411         Reviewed by Eric Carlson.
1412
1413         Three related fixes:
1414
1415         In reenqueueMediaForTime(), update TrackBuffer.lastEnqueuedPresentationTime when we flush
1416         samples, so that the next time samples are re-enqueued, the starting point for re-enqueueing
1417         is correct.
1418
1419         In sourceBufferPrivateDidReceiveSample(), do not add samples to the decode queue
1420         if they are before the current media time.
1421
1422         When a seek is pending, but samples for the new time is not yet present in the SourceBuffer,
1423         the SourceBufferPrivate may signal that it's ready for new samples through the
1424         sourceBufferPrivateDidBecomeReadyForMoreSamples() method. In this situation, we should not
1425         continue to provideMediaData(), as that will append samples from the prior-to-seeking media
1426         timeline. Since the timeline may have moved forward due to the seek, a decoder may decide to
1427         display those frames as quickly as possible (the "fast forward" behavior) in order to catch
1428         up to the new current time.
1429
1430         If a re-enqueue is pending, don't provide media data in response to being notified that the
1431         SourceBufferPrivate is ready for more samples. Wait until samples for the new current time
1432         are appended.
1433
1434         Also, don't provide media data if we are waiting for a seek to complete.
1435
1436         * Modules/mediasource/MediaSource.h:
1437         (WebCore::MediaSource::isSeeking): Convenience method.
1438         * Modules/mediasource/SourceBuffer.cpp:
1439         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
1440         (WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
1441         (WebCore::SourceBuffer::reenqueueMediaForTime):
1442
1443 2014-08-05  Chris Fleizach  <cfleizach@apple.com>
1444
1445         AX: Select text activity should return replaced text instead of previously selected text
1446         https://bugs.webkit.org/show_bug.cgi?id=135595
1447
1448         Reviewed by Mario Sanchez Prada.
1449
1450         When the select activity API is used to replace text, the replacement string should be returned instead of the old selected text.
1451
1452         Updated existing test: platform/mac/accessibility/select-text.html
1453
1454         * accessibility/AccessibilityObject.cpp:
1455         (WebCore::AccessibilityObject::selectText):
1456
1457 2014-08-04  Chris Fleizach  <cfleizach@apple.com>
1458
1459         AX: Select activity behavior does not work when an existing range is already selected
1460         https://bugs.webkit.org/show_bug.cgi?id=135579
1461
1462         Reviewed by Mario Sanchez Prada.
1463
1464         If you have an existing range selected, and try to apply a select and replace operation, like capitalize,
1465         searching for that range will fail because it skips the currently selected range.
1466
1467         For these cases, it seems the best way is to start the search from the start position, rather than relying on the
1468         entire range.
1469
1470         Updated existing test: platform/mac/accessibility/select-text.html
1471
1472         * accessibility/AccessibilityObject.cpp:
1473         (WebCore::AccessibilityObject::selectText):
1474
1475 2014-08-04  Jer Noble  <jer.noble@apple.com>
1476
1477         [MSE][Mac] Seeking past buffered range will not resume playback when seek completes.
1478         https://bugs.webkit.org/show_bug.cgi?id=135591
1479
1480         Reviewed by Eric Carlson.
1481
1482         If a seek is delayed due to seeking into an unbuffered area, playback will not be restarted
1483         at that point. Instead, playback must resume when enough media data has been added, and
1484         the MediaSource indicates the seek should complete.
1485
1486         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1487         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekCompleted):
1488
1489 2014-08-04  Jer Noble  <jer.noble@apple.com>
1490
1491         [MSE] Videos will report a stall when within 1 frame-duration before the end of a movie.
1492         https://bugs.webkit.org/show_bug.cgi?id=135586
1493
1494         Reviewed by Eric Carlson.
1495
1496         Under certain circumstances, videos which are within 1/24 seconds before the end of a media stream when
1497         monitorSourceBuffers() is called will fail the hasFutureTime() check. This is because hasFutureTime()
1498         checks whether enough media is buffered to play back at least some time in the future, but when the
1499         current time is close to the duration, not enough data is buffered to satisfy that check.
1500
1501         Add some logic which will break out early when the SourceBuffer has buffered up to and including the
1502         media's duration, and return that the buffer indeed hasFutureTime() available.
1503
1504         * Modules/mediasource/SourceBuffer.cpp:
1505         (WebCore::SourceBuffer::hasFutureTime):
1506
1507 2014-08-04  Benjamin Poulain  <benjamin@webkit.org>
1508
1509         Simplify the StyleInvalidation mode of rule collection
1510         https://bugs.webkit.org/show_bug.cgi?id=135521
1511
1512         Reviewed by Antti Koivisto.
1513
1514         There are two branches where StyleInvalidation code is removed:
1515         -Pseudo elements for shadow dom elements.
1516         -Pseudo elements without dom tree counterpart.
1517
1518         The first can never be hit because StyleInvalidationAnalysis does a complete invalidation
1519         when there is any shadow dom styling involved in the stylesheets.
1520
1521         Even if that branch was hit, not failing on custom pseudo elements would be equivalent
1522         to ignoring those pseudo elements from the Selector. By doing so, we would match elements
1523         that do not have shadow dom and invalidate pretty much everything.
1524
1525         Unlike pseudo elements without real elements, shadow dom elements are not matched separately with a different
1526         context, thus we could generalize StyleInvalidationAnalysis to handle this case.
1527
1528
1529         The second case handle pseudo elements that do not have a real element. That case no longer need to be handled
1530         separately at the filter time, it has become a special case of SelectorChecker::match() after everything else
1531         has matched.
1532
1533         The only condition for this to work is that the Context's pseudoId must be NOPSEUDO. This is the case
1534         in practice since matching specific pseudo types would be a waste of time. ElementRuleCollector::collectMatchingRules()
1535         has a new assertion to enforce that.
1536
1537         Test: fast/css/stylesheet-change-updates-pseudo-elements.html
1538
1539         * css/ElementRuleCollector.cpp:
1540         (WebCore::ElementRuleCollector::collectMatchingRules):
1541         * css/SelectorChecker.cpp:
1542         (WebCore::SelectorChecker::matchRecursively):
1543         * cssjit/SelectorCompiler.cpp:
1544         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement):
1545
1546 2014-08-04  Benjamin Poulain  <benjamin@webkit.org>
1547
1548         Add a flag for the CSS Selectors level 4 implementation
1549         https://bugs.webkit.org/show_bug.cgi?id=135535
1550
1551         Reviewed by Andreas Kling.
1552
1553         * Configurations/FeatureDefines.xcconfig:
1554
1555 2014-08-04  Chris Fleizach  <cfleizach@apple.com>
1556
1557         AX: add AccessibilityObject::computedLabelString() for WebAXI
1558         https://bugs.webkit.org/show_bug.cgi?id=129939
1559
1560         Reviewed by Mario Sanchez Prada.
1561
1562         Provide a method that the WebKit Inspector can call in order to 
1563         display an accessible name for an AX node.
1564
1565         * accessibility/AccessibilityObject.cpp:
1566         (WebCore::AccessibilityObject::accessibilityComputedLabel):
1567         * accessibility/AccessibilityObject.h:
1568
1569 2014-08-04  Tim Horton  <timothy_horton@apple.com>
1570
1571         Lots of crashes in WebKit1 after r172013.
1572         https://bugs.webkit.org/show_bug.cgi?id=135582
1573         <rdar://problem/17837636>
1574
1575         Reviewed by Enrica Casucci.
1576
1577         * editing/SelectionRectGatherer.cpp:
1578         (WebCore::SelectionRectGatherer::addRect):
1579         (WebCore::SelectionRectGatherer::addGapRects):
1580         Don't try to do local-to-absolute coordinate conversion if we don't have
1581         a repaint container, which happens a lot in WebKit1.
1582
1583 2014-08-04  Alex Christensen  <achristensen@webkit.org>
1584
1585         Progress towards CMake on Mac.
1586         https://bugs.webkit.org/show_bug.cgi?id=135528
1587
1588         Reviewed by Gyuyoung Kim.
1589
1590         * PlatformMac.cmake: Added.
1591
1592 2014-08-04  Tim Horton  <timothy_horton@apple.com>
1593
1594         Selection services menu dropdown is in the wrong place when selecting some text on Yelp
1595         https://bugs.webkit.org/show_bug.cgi?id=135582
1596         <rdar://problem/17837636>
1597
1598         Reviewed by Simon Fraser.
1599
1600         * editing/SelectionRectGatherer.cpp:
1601         (WebCore::SelectionRectGatherer::addRect):
1602         (WebCore::SelectionRectGatherer::addGapRects):
1603         (WebCore::SelectionRectGatherer::addRects): Deleted.
1604         Rename addRects to addGapRects for clarity.
1605         Map rects and gapRects to absolute RenderView coordinates so that
1606         they are in a form WebKit2 can use. Previously they were sometimes
1607         relative to a different repaint container, but that information was
1608         lost when moving through SelectionRectGatherer.
1609
1610         Ideally we would keep selection rects as full quads instead of rects
1611         for more of their life, but that problem is much deeper than just SelectionRectGatherer.
1612
1613         * editing/SelectionRectGatherer.h:
1614         Add a comment clarifying the coordinate space of the stored selection rects.
1615
1616         * rendering/RenderView.cpp:
1617         (WebCore::RenderView::applySubtreeSelection):
1618         Rename addRects to addGapRects for clarity.
1619
1620 2014-08-04  Bem Jones-Bey  <bjonesbe@adobe.com>
1621
1622         [CSS Shapes] shape-margin not respected when it extends beyond an explicitly set margin
1623         https://bugs.webkit.org/show_bug.cgi?id=135308
1624
1625         Reviewed by Dean Jackson.
1626
1627         When a zero height line is supplied and the image shape extends into
1628         the margin box (only possible when a shape-margin is supplied), then
1629         only an empty interval was being returned. This patch makes it
1630         properly return the interval for the line in question.
1631
1632         Test: fast/shapes/shape-outside-floats/shape-outside-image-shape-margin.html
1633
1634         * rendering/shapes/RasterShape.cpp:
1635         (WebCore::RasterShape::getExcludedIntervals): Handle the zero height
1636         line case.
1637
1638 2014-08-04  Zalan Bujtas  <zalan@apple.com>
1639
1640         Subpixel rendering: InlineTextBox mistakenly rounds offset value before painting.
1641         https://bugs.webkit.org/show_bug.cgi?id=135470
1642
1643         Reviewed by Simon Fraser.
1644
1645         This patch removes the premature paint offset adjustment for inlines. Premature snapping
1646         could alter the final painting coordinates and push content to wrong positions.
1647
1648         This patch also enforces WebCore's pixel snapping strategy (round) on text painting.
1649         It ensures that text positioning is in sync with other painting related operations including
1650         clipping, box decorations etc. Underlying graphics libraries can take different directions on
1651         text snapping, for example CG ceils text coordinates vertically (in horizontal context,
1652         with the current settings). It can lead to undesired side effects.
1653
1654         Test: fast/inline/hidpi-inline-selection-leaves-gap.html
1655
1656         * rendering/InlineTextBox.cpp:
1657         (WebCore::InlineTextBox::paint):
1658         * rendering/RenderLayer.cpp:
1659         (WebCore::RenderLayer::calculateClipRects): wrong direction used at r171896.
1660         * rendering/SimpleLineLayoutFunctions.cpp: we don't paint vertical content here.
1661         (WebCore::SimpleLineLayout::paintFlow):
1662
1663 2014-08-04  Jer Noble  <jer.noble@apple.com>
1664
1665         Unreviewed, rolling out r171992, r171995, & r172000.
1666
1667         The cumulative effect of those revisions was to cause decoding errors when switching resolutions on YouTube.
1668
1669         Reverted changesets:
1670
1671         https://bugs.webkit.org/show_bug.cgi?id=135422 / http://trac.webkit.org/changeset/171992
1672         https://bugs.webkit.org/show_bug.cgi?id=135424 / http://trac.webkit.org/changeset/171995
1673         https://bugs.webkit.org/show_bug.cgi?id=135572 / http://trac.webkit.org/changeset/172000
1674
1675 2014-08-04  Joseph Pecoraro  <pecoraro@apple.com>
1676
1677         Always clear ConsoleClient when Page/WindowShell is destroyed
1678         https://bugs.webkit.org/show_bug.cgi?id=135569
1679
1680         Reviewed by Mark Lam.
1681
1682         * bindings/js/ScriptController.cpp:
1683         (WebCore::ScriptController::~ScriptController):
1684         Whenever a window shell goes away, clear the console client.
1685         We did this in clearWindowShell but not before destroying.
1686
1687 2014-08-04  Chris Fleizach  <cfleizach@apple.com>
1688
1689         AX: isWordEndMatch should allow for multiple word selections
1690         https://bugs.webkit.org/show_bug.cgi?id=135573
1691
1692         Reviewed by Mario Sanchez Prada.
1693
1694         isWordEndMatch was searching from the beginning of the selected range, which meant
1695         that if the result was multiple words, we'd reject the result. 
1696         Instead, we should search from the end of the range, so that we encompass all words.
1697
1698         Modified existing test: platform/mac/accessibility/select-text-should-match-whole-words.html
1699
1700         * editing/TextIterator.cpp:
1701         (WebCore::SearchBuffer::isWordEndMatch):
1702
1703 2014-08-04  Chris Fleizach  <cfleizach@apple.com>
1704
1705         AX: Secure text fields need to support Search parameterized attributes
1706         https://bugs.webkit.org/show_bug.cgi?id=135568
1707
1708         Reviewed by Mario Sanchez Prada.
1709  
1710         Secure text fields still need to support the fast searching that WebKit exposes, even though they don't support
1711         other parameterized attributes.
1712   
1713         Test: platform/mac/accessibility/secure-text-field-supports-fast-search.html
1714
1715         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1716         (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
1717
1718 2014-08-04  Jer Noble  <jer.noble@apple.com>
1719
1720         [MSE] Further fixes for "fast forward" playback after seeking in YouTube behavior.
1721         https://bugs.webkit.org/show_bug.cgi?id=135572
1722
1723         Reviewed by Eric Carlson.
1724
1725         Two related fixes:
1726
1727         In reenqueueMediaForTime(), update TrackBuffer.lastEnqueuedPresentationTime when we flush samples, so that
1728         the next time samples are re-enqueued, the starting point for re-enqueueing is correct.
1729
1730         In sourceBufferPrivateDidReceiveSample(), do not add samples to the decode queue if they are before the
1731         current media time.
1732
1733         * Modules/mediasource/SourceBuffer.cpp:
1734         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
1735         (WebCore::SourceBuffer::reenqueueMediaForTime):
1736
1737 2014-08-04  Matt Baker  <mattbaker@apple.com>
1738
1739         Web Inspector: All-caps CSS properties are not shown in Computed pane
1740         https://bugs.webkit.org/show_bug.cgi?id=133700
1741
1742         Reviewed by Timothy Hatcher.
1743
1744         * inspector/InspectorStyleSheet.cpp:
1745         (WebCore::InspectorStyle::styleWithProperties):
1746
1747 2014-08-04  Chris Fleizach  <cfleizach@apple.com>
1748
1749         AX: SelectText functionality always selects text after current selection even if closer selection is behind it
1750         https://bugs.webkit.org/show_bug.cgi?id=135546
1751
1752         Reviewed by Mario Sanchez Prada.
1753
1754         Logic was incorrect for comparing ranges found before the current selection.
1755         ASSERT was incorrect for allowed ranges. We need to allow ranges that are right at the boundaries of our found ranges.
1756
1757         Extended existing test: platform/mac/accessibility/select-text.html
1758
1759         * accessibility/AccessibilityObject.cpp:
1760         (WebCore::rangeClosestToRange):
1761
1762 2014-08-04  Chris Fleizach  <cfleizach@apple.com>
1763
1764         AX: AXSelectTextWithCriteriaParameterizedAttribute incorrectly selects the beginning letters of a word
1765         https://bugs.webkit.org/show_bug.cgi?id=135547
1766
1767         Reviewed by Mario Sanchez Prada.
1768
1769         Allow text search to specify that it wants to match end of words as well as start of words.
1770         This allows select text criteria to match on whole words only.
1771
1772         Test: platform/mac/accessibility/select-text-should-match-whole-words.html
1773
1774         * accessibility/AccessibilityObject.cpp:
1775         (WebCore::AccessibilityObject::rangeOfStringClosestToRangeInDirection):
1776         * editing/FindOptions.h:
1777         * editing/TextIterator.cpp:
1778         (WebCore::SearchBuffer::isWordEndMatch):
1779         (WebCore::SearchBuffer::search):
1780
1781 2014-08-04  Jer Noble  <jer.noble@apple.com>
1782
1783         [MSE] Re-enqueing due to overlapping appended samples can cause stuttering playback
1784         https://bugs.webkit.org/show_bug.cgi?id=135424
1785
1786         Reviewed by Eric Carlson.
1787
1788         If it become necessary to re-enqueue samples (due to appending overlapping samples which cause
1789         existing samples to be removed), the previous behavior was to flush and re-enqueue the new
1790         samples dependencies; i.e., everything up to and including the previous sync sample. This causes
1791         the decoder to visibly stall while it decodes those non-displaying samples, which could be
1792         a second or more worth of encoded video samples, depending on the frequency of sync samples.
1793
1794         Instead, when we are asked to re-enqueue, we will look for the next occurring sync sample.
1795         If found, we can switch over to the replacement samples at that point in the decode queue.
1796         This limits the overhead of a stream switch, and should allow for a visually seamless switch,
1797         at the cost of having to wait for the next sync sample to occur to affect the switch.
1798
1799         * Modules/mediasource/SourceBuffer.cpp:
1800         (WebCore::SourceBuffer::seekToTime): Clear the decode queue when seeking.
1801         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Call reenqueueMediaForCurrentTime.
1802         (WebCore::SourceBuffer::reenqueueMediaForCurrentTime): Switch over to the new stream only
1803             at the next sync sample.
1804
1805 2014-08-04  Chris Fleizach  <cfleizach@apple.com>
1806
1807         AX: The Dictation command "Replace <phrase> with <phrase>" always capitalizes the replacement string
1808         https://bugs.webkit.org/show_bug.cgi?id=135557
1809
1810         Reviewed by Mario Sanchez Prada.
1811
1812         When replacing text, we should match the capitalization of the word being replaced 
1813         (unless the replacement looks like an abbreviation).   
1814  
1815         Test: platform/mac/accessibility/find-and-replace-match-capitalization.html
1816
1817         * accessibility/AccessibilityObject.cpp:
1818         (WebCore::AccessibilityObject::selectText):
1819
1820 2014-08-04  Pratik Solanki  <psolanki@apple.com>
1821
1822         QuickLook resources are cache-replaced with their original binary data causing ASSERT(m_data->size() == newBuffer->size()) in CachedResource.cpp
1823         https://bugs.webkit.org/show_bug.cgi?id=135548
1824         <rdar://problem/17891321>
1825
1826         Reviewed by David Kilzer.
1827
1828         When loading QuickLook resources, the SharedBuffer in the CachedResource is actually a
1829         converted representation of the real QuickLook resource. Replacing this with the actual
1830         network resource (which is what tryReplaceEncodedData() tried to do) is wrong and triggered
1831         asserts in the code.
1832
1833         Fix this by having CachedRawResource::mayTryReplaceEncodedData() return false if we are
1834         loading a QuickLook resource.
1835
1836         No new tests because we don't have a way to test QuickLook documents.
1837
1838         * loader/ResourceLoader.cpp:
1839         (WebCore::ResourceLoader::ResourceLoader):
1840         (WebCore::ResourceLoader::didCreateQuickLookHandle):
1841             Set a flag to indicate that we are loading a QuickLook document.
1842         * loader/ResourceLoader.h:
1843         (WebCore::ResourceLoader::isQuickLookResource):
1844         * loader/cache/CachedRawResource.cpp:
1845         (WebCore::CachedRawResource::CachedRawResource):
1846         (WebCore::CachedRawResource::finishLoading):
1847             Check if we were loading a QuickLook document and if so disable encoded data
1848             replacement.
1849         * loader/cache/CachedRawResource.h:
1850             Add a new bool field returned by mayTryReplaceEncodedData(). Default is true but it is
1851             set to false in finishLoading() if we were loading QuickLook document.
1852
1853 2014-08-04  Jer Noble  <jer.noble@apple.com>
1854
1855         [MSE] Seeking occasionally causes many frames to be displayed in "fast forward" mode
1856         https://bugs.webkit.org/show_bug.cgi?id=135422
1857
1858         Reviewed by Eric Carlson.
1859
1860         When a seek is pending, but samples for the new time is not yet present in the SourceBuffer,
1861         the SourceBufferPrivate may signal that it's ready for new samples through the
1862         sourceBufferPrivateDidBecomeReadyForMoreSamples() method. In this situation, we should not
1863         continue to provideMediaData(), as that will append samples from the prior-to-seeking media
1864         timeline. Since the timeline may have moved forward due to the seek, a decoder may decide to
1865         display those frames as quickly as possible (the "fast forward" behavior) in order to catch
1866         up to the new current time.
1867
1868         If a re-enqueue is pending, don't provide media data in response to being notified that the
1869         SourceBufferPrivate is ready for more samples. Wait until samples for the new current time
1870         are appended.
1871
1872         * Modules/mediasource/SourceBuffer.cpp:
1873         (WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
1874         * dom/Document.cpp:
1875         (WebCore::Document::unregisterCollection):
1876
1877 2014-08-04  Carlos Garcia Campos  <cgarcia@igalia.com>
1878
1879         [GTK] Install all unstable webkitdom headers
1880         https://bugs.webkit.org/show_bug.cgi?id=135544
1881
1882         Reviewed by Gustavo Noronha Silva.
1883
1884         We were checking whether generated file existed before they had
1885         been generated.
1886
1887         * PlatformGTK.cmake: Add Unstable.h header for all stable classes
1888         to GObjectDOMBindingsUnstable_INSTALLED_HEADERS and split the
1889         install command for stable and unstable headers making unstable
1890         headers optional.
1891
1892 2014-08-04  peavo@outlook.com  <peavo@outlook.com>
1893
1894         [WinCairo] Compile error in OpenTypeMathData.cpp.
1895         https://bugs.webkit.org/show_bug.cgi?id=135541
1896
1897         Reviewed by Brent Fulgham.
1898
1899         The SharedBuffer class needs to be defined.
1900         Also, the OpenTypeMathData constructor should be implemented when OPENTYPE_MATH is not enabled.
1901
1902         * platform/graphics/opentype/OpenTypeMathData.cpp:
1903
1904 2014-08-03  Dan Bernstein  <mitz@apple.com>
1905
1906         <rdar://problem/17782529> REGRESSION: OS marketing version in iOS Simulator user-agent string is the host OS’s
1907         https://bugs.webkit.org/show_bug.cgi?id=135549
1908
1909         Reviewed by Mark Rowe.
1910
1911         * platform/cocoa/SystemVersion.mm:
1912         (WebCore::createSystemMarketingVersion): On the iOS Simulator, locate the system Library
1913         directory relative to the Simulator root.
1914
1915 2014-08-02  Jeremy Jones  <jeremyj@apple.com>
1916
1917         Support both window and view based video fullscreen.
1918         https://bugs.webkit.org/show_bug.cgi?id=135525
1919
1920         Reviewed by Simon Fraser.
1921
1922         Presenting in a separate window gives greater flexibility for rotation separately from the app.
1923         Presenting in the same window works better if the interface is rehosted in another process.
1924
1925         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
1926         (-[WebVideoFullscreenController enterFullscreen:]): Use clientRect instead of screenRect.
1927         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Add m_window and m_parentView.
1928         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: 
1929         (-[WebAVVideoLayer setBounds:]): Parent view might not be fullscreen; use window instead.
1930         (WebVideoFullscreenInterfaceAVKit::setupFullscreen): Conditionally create UIWindow and UIViewController for fullscreen.
1931         (WebVideoFullscreenInterfaceAVKit::enterFullscreen): Video, not the container should have black background.
1932         (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Conditionally translate finalRect.
1933         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen): Clean up UIWindow and force status bar to correct orientation.
1934         (WebVideoFullscreenInterfaceAVKit::invalidate): Clean up UIWindow.
1935         (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): Hide window and exit without animation.
1936         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
1937         (WebVideoFullscreenModelMediaElement::setVideoFullscreenLayer): Apply frame, because it may have been set before the layer.
1938
1939 2014-08-02  Benjamin Poulain  <bpoulain@apple.com>
1940
1941         Update the SearchFieldResultsButtonElement shadow Pseudo Id when HTMLInputElement's maxResults change
1942         https://bugs.webkit.org/show_bug.cgi?id=135491
1943
1944         Reviewed by Ryosuke Niwa.
1945
1946         Replace the shadowPseudoId() override + manual style invalidation by the generic pseudo ID update.
1947
1948         * html/HTMLInputElement.cpp:
1949         (WebCore::HTMLInputElement::parseAttribute):
1950         * html/InputType.cpp:
1951         (WebCore::InputType::maxResultsAttributeChanged):
1952         * html/InputType.h:
1953         * html/SearchInputType.cpp:
1954         (WebCore::SearchInputType::SearchInputType):
1955         (WebCore::updateResultButtonPseudoType):
1956         (WebCore::SearchInputType::maxResultsAttributeChanged):
1957         (WebCore::SearchInputType::createShadowSubtree):
1958         (WebCore::SearchInputType::destroyShadowSubtree):
1959         * html/SearchInputType.h:
1960         * html/shadow/TextControlInnerElements.cpp:
1961         (WebCore::SearchFieldResultsButtonElement::shadowPseudoId): Deleted.
1962         * html/shadow/TextControlInnerElements.h:
1963
1964 2014-08-02  Benjamin Poulain  <bpoulain@apple.com>
1965
1966         Add warnings for the buggy implementations of shadowPseudoId()
1967         https://bugs.webkit.org/show_bug.cgi?id=135477
1968
1969         Reviewed by Ryosuke Niwa.
1970
1971         Dean is going to look into fixing media element styling.
1972         In the meantime, add warnings to prevent this from spreading.
1973
1974         * dom/Element.h:
1975         * html/shadow/SliderThumbElement.cpp:
1976         (WebCore::SliderThumbElement::shadowPseudoId):
1977         (WebCore::SliderContainerElement::shadowPseudoId):
1978
1979 2014-08-01  Commit Queue  <commit-queue@webkit.org>
1980
1981         Unreviewed, rolling out r171957.
1982         https://bugs.webkit.org/show_bug.cgi?id=135538
1983
1984         Caused GTK assertions and test failures (Requested by smfr on
1985         #webkit).
1986
1987         Reverted changeset:
1988
1989         "Clean up image subsampling code, make it less iOS-specific"
1990         https://bugs.webkit.org/show_bug.cgi?id=134916
1991         http://trac.webkit.org/changeset/171957
1992
1993 2014-08-01  Myles C. Maxfield  <litherum@gmail.com>
1994
1995         [CMake] Allow CMake to find GLib on FreeBSD
1996         https://bugs.webkit.org/show_bug.cgi?id=132530
1997
1998         Reviewed by Gustavo Noronha Silva.
1999
2000         On FreeBSD, glibconfig.h is at /usr/local/include/glib-2.0/glibconfig.h.
2001
2002         * Source/cmake/FindGLIB.cmake:
2003
2004 2014-08-01  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2005
2006         REGRESSION(r171942): [CMAKE] [GTK] build broken (clean build).
2007         https://bugs.webkit.org/show_bug.cgi?id=135522
2008
2009         Reviewed by Martin Robinson.
2010
2011         No new tests required, no new functionality.
2012
2013         * CMakeLists.txt: Add missing include to the inspector headers
2014         and fix the path to InspectorJSTypeBuilders.h
2015
2016 2014-08-01  Simon Fraser  <simon.fraser@apple.com>
2017
2018         Fix resource leak in FillLayersPropertyWrapper object member
2019         https://bugs.webkit.org/show_bug.cgi?id=135462
2020
2021         Reviewed by Andreas Kling.
2022
2023         Fix leak of m_fillLayerPropertyWrapper by using unique_ptr<>.
2024         Based on patch by Przemyslaw Kuczynski.
2025
2026         * page/animation/CSSPropertyAnimation.cpp:
2027         (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
2028
2029 2014-08-01  Simon Fraser  <simon.fraser@apple.com>
2030
2031         Clean up image subsampling code, make it less iOS-specific
2032         https://bugs.webkit.org/show_bug.cgi?id=134916
2033
2034         Reviewed by Dean Jackson.
2035
2036         Compile the image subsampling code on both Mac and iOS, and make it more platform
2037         neutral in general. Add a setting to allow it to be enabled on Mac for testing.
2038         
2039         The most significant changes are in ImageSourceCG and BitmapImageCG. CG's ImageSource
2040         is no longer stateful with respect to subsampling; its functions take a SubsamplingLevel
2041         when appropriate. CG's BitmapImage now determines which level of subsampling to use
2042         for a given frame, storing the subsampling level in the frame data. It can replace
2043         an aggressively subsampled frame with a less subsampled frame if necessary.
2044         
2045         To reduce the chances of subsampling affecting rendering, BitmapImage::size() now
2046         always returns the non-subsampled size; subsampling is strictly internal to BitmapImage.
2047         BitmapImage::draw() takes care of scaling the srcRect for subsampled images.
2048         
2049         iOS had a code path that enabled caching of frame metadata in BitmapImage without
2050         actually decoding the frame; make this cross-platform.
2051
2052         * WebCore.exp.in: Changed signature for GraphicsContext::drawNativeImage().
2053         * WebCore.xcodeproj/project.pbxproj: Added ImageSource.cpp, which is not built
2054         for Cocoa but useful for reference.
2055         * loader/cache/CachedImage.cpp:
2056         (WebCore::CachedImage::imageSizeForRenderer): Remove iOS-specific subsampling code.
2057         (WebCore::CachedImage::createImage): Call setAllowSubsampling() on the image if we
2058         can get to Settings (m_loader is null for image documents).
2059         (WebCore::CachedImage::currentFrameKnownToBeOpaque): This forced decode always
2060         caused creation of the non-subsampled image, so remove it. There's no reason to
2061         eagerly decode the frame here.
2062         * loader/cache/CachedImage.h: Fix comment.
2063         * page/Settings.cpp: Add defaultImageSubsamplingEnabled, true for iOS and false for Mac.
2064         * page/Settings.in: Added imageSubsamplingEnabled.
2065         * platform/graphics/BitmapImage.cpp:
2066         (WebCore::BitmapImage::BitmapImage): Init some more things. Default m_allowSubsampling to
2067         true for iOS to catch images created in code paths where we can't get to Settings.
2068         (WebCore::BitmapImage::haveFrameAtIndex): Handy helper.
2069         (WebCore::BitmapImage::cacheFrame): Now takes the subsampling level and whether to cache
2070         just metadata, or also the frame.
2071         (WebCore::BitmapImage::didDecodeProperties): No need to store originalSize.
2072         (WebCore::BitmapImage::updateSize): When we get the size for the first time, call
2073         determineMinimumSubsamplingLevel() to choose a reasonable subsampling level which takes
2074         platform-specific limits into account.
2075         (WebCore::BitmapImage::dataChanged): Comment.
2076         (WebCore::BitmapImage::ensureFrameIsCached): Take ImageFrameCaching into account.
2077         (WebCore::BitmapImage::frameAtIndex): Choose a subsampling level given the scale,
2078         then determine if we can use the currently cached frame, or whether we should resample.
2079         (WebCore::BitmapImage::frameIsCompleteAtIndex): Caching m_isComplete is now done when caching
2080         frame metadata.
2081         (WebCore::BitmapImage::frameDurationAtIndex):
2082         (WebCore::BitmapImage::frameHasAlphaAtIndex): The 'true' return is the safe return value.
2083         (WebCore::BitmapImage::frameOrientationAtIndex): Caching m_orientation is now done when caching
2084         frame metadata.
2085         (WebCore::BitmapImage::cacheFrameInfo): Deleted.
2086         (WebCore::BitmapImage::originalSize): Deleted.
2087         (WebCore::BitmapImage::originalSizeRespectingOrientation): Deleted.
2088         (WebCore::BitmapImage::currentFrameSize): Deleted.
2089         (WebCore::BitmapImage::ensureFrameInfoIsCached): Deleted.
2090         * platform/graphics/BitmapImage.h:
2091         (WebCore::FrameData::FrameData):
2092         * platform/graphics/GraphicsContext.h: No need to pass a scale param now.
2093         * platform/graphics/ImageSource.cpp: Non-Cocoa changes.
2094         (WebCore::ImageSource::subsamplingLevelForScale):
2095         (WebCore::ImageSource::allowSubsamplingOfFrameAtIndex):
2096         (WebCore::ImageSource::size):
2097         (WebCore::ImageSource::frameSizeAtIndex):
2098         (WebCore::ImageSource::createFrameAtIndex):
2099         (WebCore::ImageSource::frameBytesAtIndex):
2100         * platform/graphics/ImageSource.h: No longer stores subsampling state.
2101         (WebCore::ImageSource::isSubsampled): Deleted.
2102         * platform/graphics/cairo/BitmapImageCairo.cpp:
2103         (WebCore::BitmapImage::determineMinimumSubsamplingLevel):
2104         * platform/graphics/cg/BitmapImageCG.cpp:
2105         (WebCore::FrameData::clear):
2106         (WebCore::BitmapImage::BitmapImage): Init more members.
2107         (WebCore::BitmapImage::determineMinimumSubsamplingLevel): Choose a minimum subsampling
2108         level for the platform (subsample until the image area falls under a threshold).
2109         (WebCore::BitmapImage::checkForSolidColor): Don't bother decoding frames if the image
2110         is not 1x1. Also take care not to decode a non-subsampled image.
2111         (WebCore::BitmapImage::draw): The actual bug fix is here; remove logic that
2112         computed srcRectForCurrentFrame from m_size and m_originalSize; for some callers
2113         srcRect was computed using the pre-subsampled size, and for others it was the subsampled size.
2114         Instead, scale srcRect by mapping between the non-subsampled size, and the size of the CGImageRef
2115         which is affected by subsampling.
2116         (WebCore::BitmapImage::copyUnscaledFrameAtIndex):
2117         * platform/graphics/cg/GraphicsContext3DCG.cpp:
2118         (WebCore::GraphicsContext3D::ImageExtractor::extractImage): Remove #ifdeffed code.
2119         (WebCore::GraphicsContext3D::paintToCanvas):
2120         * platform/graphics/cg/GraphicsContextCG.cpp:
2121         (WebCore::GraphicsContext::drawNativeImage): No more weird scaling!
2122         * platform/graphics/cg/ImageBufferCG.cpp:
2123         (WebCore::ImageBuffer::draw):
2124         * platform/graphics/cg/ImageSourceCG.cpp:
2125         (WebCore::ImageSource::ImageSource):
2126         (WebCore::createImageSourceOptions): Helper that always returns a new CFDictionaryRef.
2127         (WebCore::imageSourceOptions): If not subsampling, return the cached CFDictionaryRef, otherwise
2128         make a new options dict and return it.
2129         (WebCore::ImageSource::subsamplingLevelForScale): Helper that returns a subsampling level
2130         between 0 and 3 given a scale.
2131         (WebCore::ImageSource::isSizeAvailable): SkipMetadata is a default value for the param now.
2132         (WebCore::ImageSource::allowSubsamplingOfFrameAtIndex): We turn off subsampling for progressive
2133         JPEGs because of a bug, so need this to know if a frame should be subsampled.
2134         (WebCore::ImageSource::frameSizeAtIndex): The looping to find a subsampling level is now in BitmapImageCG.
2135         (WebCore::ImageSource::orientationAtIndex):
2136         (WebCore::ImageSource::size): Always use a subsampling level of 0 for size().
2137         (WebCore::ImageSource::getHotSpot):
2138         (WebCore::ImageSource::repetitionCount):
2139         (WebCore::ImageSource::createFrameAtIndex): The caller mapped a scale to a level.
2140         (WebCore::ImageSource::frameDurationAtIndex):
2141         (WebCore::ImageSource::frameBytesAtIndex):
2142         (WebCore::ImageSource::imageSourceOptions): Deleted.
2143         (WebCore::ImageSource::originalSize): Deleted.
2144         * platform/graphics/mac/ImageMac.mm:
2145         (WebCore::BitmapImage::invalidatePlatformData): 0 -> nullptr
2146         * platform/graphics/wince/ImageWinCE.cpp:
2147         (WebCore::BitmapImage::determineMinimumSubsamplingLevel):
2148
2149 2014-08-01  Andreas Kling  <akling@apple.com>
2150
2151         Many DOM objects have InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero for no reason.
2152         <https://webkit.org/b/135519>
2153
2154         Don't set this structure flag unless the object actually has an override
2155         for getOwnPropertySlotByIndex().
2156
2157         Reviewed by Geoffrey Garen.
2158
2159         * bindings/scripts/CodeGeneratorJS.pm:
2160         (GenerateHeader):
2161         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
2162         * bindings/scripts/test/JS/JSTestException.h:
2163         * bindings/scripts/test/JS/JSTestInterface.h:
2164         * bindings/scripts/test/JS/JSTestObj.h:
2165         * bindings/scripts/test/JS/JSTestTypedefs.h:
2166
2167 2014-08-01  Myles C. Maxfield  <mmaxfield@apple.com>
2168
2169         SVG Font kerning can take an early out if the font has no kerning information
2170         https://bugs.webkit.org/show_bug.cgi?id=135524
2171
2172         Reviewed by Dean Jackson.
2173
2174         Rather than calling SVGFontElement::horizontalKerningForPairOfStringsAndGlyphs() again
2175         and again, skip the iteration entirely if every call would return 0.
2176
2177         No new tests because there is no behavior change.
2178
2179         * rendering/svg/SVGTextRunRenderingContext.cpp:
2180         (WebCore::SVGTextRunRenderingContext::applySVGKerning):
2181         * svg/SVGFontElement.h:
2182
2183 2014-08-01  Beth Dakin  <bdakin@apple.com>
2184
2185         Inspector highlights clipped at the bottom on the page in WK1 views with 
2186         contentInsets
2187         https://bugs.webkit.org/show_bug.cgi?id=135480
2188         -and corresponding-
2189         <rdar://problem/17850323>
2190
2191         Forgot to commit this one very critical part with 
2192         http://trac.webkit.org/changeset/171951 
2193
2194         * platform/ScrollView.cpp:
2195         (WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea):
2196
2197 2014-08-01  Beth Dakin  <bdakin@apple.com>
2198
2199         Inspector highlights clipped at the bottom on the page in WK1 views with 
2200         contentInsets
2201         https://bugs.webkit.org/show_bug.cgi?id=135480
2202         -and corresponding-
2203         <rdar://problem/17850323>
2204
2205         Reviewed by Simon Fraser.
2206
2207         unscaledTotalVisibleContentSize() was the main function on Mac that was expected 
2208         to return the rect representing ALL visible content, including content that might 
2209         be in an inset area and obscured by UI elements. This patch re-names that function 
2210         to unscaledVisibleContentSizeIncludingObscuredArea(), and that patch makes that 
2211         function return the right thing in the platformWidget() case.
2212
2213         Re-name.
2214         * inspector/InspectorOverlay.cpp:
2215         (WebCore::InspectorOverlay::update):
2216
2217         Return platformVisibleContentSizeIncludingObscuredArea() for the platformWidget() 
2218         case and re-name.
2219         * platform/ScrollView.cpp:
2220         (WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea):
2221
2222         This was just wrong. It was returning the big rectangle instead of the small one 
2223         for platformWidget().
2224         (WebCore::ScrollView::unscaledUnobscuredVisibleContentSize):
2225
2226         New platform functions.
2227         (WebCore::ScrollView::platformVisibleContentRectIncludingObscuredArea):
2228         (WebCore::ScrollView::platformVisibleContentSizeIncludingObscuredArea):
2229         (WebCore::ScrollView::unscaledTotalVisibleContentSize): Deleted.
2230         * platform/ScrollView.h:
2231         * platform/ios/ScrollViewIOS.mm:
2232         (WebCore::ScrollView::platformVisibleContentRectIncludingObscuredArea):
2233         (WebCore::ScrollView::platformVisibleContentSizeIncludingObscuredArea):
2234         * platform/mac/ScrollViewMac.mm:
2235         (WebCore::ScrollView::platformVisibleContentRect):
2236         (WebCore::ScrollView::platformVisibleContentSize):
2237         (WebCore::ScrollView::platformVisibleContentRectIncludingObscuredArea):
2238         (WebCore::ScrollView::platformVisibleContentSizeIncludingObscuredArea):
2239
2240         Re-name.
2241         * rendering/RenderLayerCompositor.cpp:
2242         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
2243         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
2244         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
2245         (WebCore::RenderLayerCompositor::ensureRootLayer):
2246
2247 2014-08-01  Myles C. Maxfield  <mmaxfield@apple.com>
2248
2249         SVGGlyph wastes space due to padding
2250         https://bugs.webkit.org/show_bug.cgi?id=135520
2251
2252         Reviewed by Dean Jackson.
2253
2254         Rearrange members in SVGGlyph so there is no wasted padding space.
2255
2256         No new tests because there is no behavior change.
2257
2258         * platform/graphics/SVGGlyph.h:
2259         (WebCore::SVGGlyph::SVGGlyph):
2260
2261 2014-07-31  Dean Jackson  <dino@apple.com>
2262
2263         [Media iOS] Ensure there is a nice default fallback for missing wireless target names
2264         https://bugs.webkit.org/show_bug.cgi?id=135488
2265         <rdar://problem/17879156>
2266
2267         Reviewed by Eric Carlson.
2268
2269         We occasionally run into cases where this.host.externalDeviceDisplayName
2270         is empty or null, creating a pretty ugly/confusing string in the
2271         wireless playback status screen.
2272
2273         If this happens, we should default to using "Apple TV".
2274
2275         * Modules/mediacontrols/mediaControlsiOS.js:
2276         (ControllerIOS.prototype.updateWirelessPlaybackStatus): Check if the externalDeviceDisplayName
2277         is empty or null, and fall back to "Apple TV" if so.
2278
2279 2014-07-30  Myles C. Maxfield  <mmaxfield@apple.com>
2280
2281         URLs in srcset attributes are not made absolute upon copy and paste
2282         https://bugs.webkit.org/show_bug.cgi?id=135448
2283
2284         Reviewed by Ryosuke Niwa.
2285
2286         When pasting, canonicalize URLs in srcset the same way we do with src.
2287
2288         Test: editing/pasteboard/img-srcset-copy-paste-canonicalization.html
2289
2290         * dom/Element.cpp:
2291         (WebCore::Element::completeURLsInAttributeValue): Initial implemention, moved from markup.cpp.
2292         * dom/Element.h:
2293         (WebCore::Element::attributeContainsURL): New function for completeURLs to call.
2294         (WebCore::Element::completeURLsInAttributeValue): Only called if attributeContainsURL returns
2295         true. Default implementation simply calls isURLAttribute().
2296         * editing/markup.cpp:
2297         (WebCore::completeURLs): Call attributeContainsURL() and completeURLsInAttributeValue() to
2298         complete the URL, so nodes can perform their own behavior.
2299         * html/HTMLImageElement.cpp:
2300         (WebCore::HTMLImageElement::attributeContainsURL): Return true for srcset.
2301         (WebCore::HTMLImageElement::completeUrlAttributeValue): Use our existing srcset parser to
2302         parse the srcset attribute, then use its output to canonicalize URLs, and build it back up
2303         into a string.
2304         * html/HTMLImageElement.h:
2305         (WebCore::HTMLImageElement::attributeContainsURL):
2306         (WebCore::HTMLImageElement::completeUrlAttributeValue):
2307         * html/parser/HTMLSrcsetParser.cpp: Make parseImageCandidatesFromSrcsetAttribute() public
2308         and change its signature to return its result.
2309         (WebCore::parseImageCandidatesFromSrcsetAttribute):
2310         * html/parser/HTMLSrcsetParser.h: Ditto.
2311
2312 2014-07-31  Andreas Kling  <akling@apple.com>
2313
2314         Remove the JSC::OverridesVisitChildren flag.
2315         <https://webkit.org/b/135489>
2316
2317         Tweak the bindings code generator to stop spitting out the flag.
2318
2319         Reviewed by Geoffrey Garen.
2320
2321         * bindings/js/JSDOMBinding.h:
2322         * bindings/js/JSDOMGlobalObject.cpp:
2323         (WebCore::JSDOMGlobalObject::visitChildren):
2324         * bindings/scripts/CodeGeneratorJS.pm:
2325         (GenerateHeader):
2326         (GenerateImplementation):
2327
2328 2014-08-01  Jer Noble  <jer.noble@apple.com>
2329
2330         [MSE][Mac] Volume is not remembered between items in a YouTube playlist
2331         https://bugs.webkit.org/show_bug.cgi?id=135479
2332
2333         Reviewed by Eric Carlson.
2334
2335         When an AVSampleBufferAudioRenderer is added to the player, set its -volume and -muted
2336         properties with the current values from the HTMLMediaElement. 
2337
2338         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2339         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
2340
2341 2014-08-01  Tim Horton  <timothy_horton@apple.com>
2342
2343         Fix the iOS build after r171891
2344
2345         * platform/ios/ScrollViewIOS.mm:
2346         (WebCore::ScrollView::platformTopContentInset):
2347         (WebCore::ScrollView::platformSetTopContentInset):
2348
2349 2014-08-01  Pratik Solanki  <psolanki@apple.com>
2350
2351         Remove EventNames.h include from header files
2352         https://bugs.webkit.org/show_bug.cgi?id=135486
2353
2354         Reviewed by Alexey Proskuryakov.
2355
2356         No new tests because no functional changes.
2357
2358         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
2359         * Modules/gamepad/GamepadEvent.h:
2360         * Modules/indexeddb/IDBRequest.h:
2361         * Modules/indexeddb/IDBTransaction.h:
2362         * Modules/mediastream/RTCStatsResponse.h:
2363         * Modules/websockets/WebSocket.h:
2364         * css/FontLoader.h:
2365         * dom/SecurityPolicyViolationEvent.h:
2366         * loader/appcache/DOMApplicationCache.h:
2367         * workers/AbstractWorker.h:
2368         * workers/Worker.h:
2369         * workers/WorkerGlobalScope.h:
2370         * xml/XMLHttpRequest.h:
2371         * xml/XMLHttpRequestProgressEvent.h:
2372
2373 2014-08-01  Simon Fraser  <simon.fraser@apple.com>
2374
2375         nullptr goodness in RenderLayer
2376         https://bugs.webkit.org/show_bug.cgi?id=135512
2377
2378         Reviewed by Brent Fulgham.
2379
2380         Use nullptr in RenderLayer.
2381
2382         * rendering/RenderLayer.cpp:
2383         (WebCore::RenderLayer::RenderLayer):
2384         (WebCore::RenderLayer::updateDescendantDependentFlags):
2385         (WebCore::accumulateOffsetTowardsAncestor):
2386         (WebCore::RenderLayer::scrollRectToVisible):
2387         (WebCore::RenderLayer::destroyScrollbar):
2388         (WebCore::RenderLayer::paintLayerContents):
2389         (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
2390         (WebCore::RenderLayer::hitTestLayer):
2391         (WebCore::RenderLayer::hitTestList):
2392         (WebCore::RenderLayer::calculateClipRects):
2393
2394 2014-08-01  Tim Horton  <timothy_horton@apple.com>
2395
2396         Build fix for iOS
2397
2398         * bindings/objc/DOM.mm:
2399         (-[DOMRange renderedImageForcingBlackText:renderedImageForcingBlackText:]):
2400         We use CGImageRef instead of NSImage here on iOS.
2401
2402 2014-08-01  Renato Nagy  <nagy.renato@stud.u-szeged.hu>
2403
2404         ASSERTION FAILED: listNode in WebCore::RenderListItem::updateListMarkerNumbers
2405         https://bugs.webkit.org/show_bug.cgi?id=134970
2406
2407         Reviewed by Zalan Bujtas.
2408
2409         Removed an unnecessary assert, because the null return value of enclosingList() is
2410         handled properly after this assert.
2411
2412         * rendering/RenderListItem.cpp:
2413         (WebCore::RenderListItem::updateListMarkerNumbers):
2414
2415 2014-08-01  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2416
2417         Replace DEPRECATED_DEFINE_STATIC_LOCAL with NeverDestroyed<T> in NavigatorContentUtils
2418         https://bugs.webkit.org/show_bug.cgi?id=135494
2419
2420         Reviewed by Andrei Bucur.
2421
2422         Use static NeverDestroyed<T> variables instead of the DEPRECATED_DEFINE_STATIC_LOCAL macro.
2423
2424         No new tests, no behavior changes.
2425
2426         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
2427         (WebCore::customHandlersStateString):
2428         (WebCore::NavigatorContentUtils::isProtocolHandlerRegistered):
2429
2430 2014-07-31  Benjamin Poulain  <bpoulain@apple.com>
2431
2432         Remove shadowPseudoId() override from the shadow media controls
2433         https://bugs.webkit.org/show_bug.cgi?id=135474
2434
2435         Reviewed by Eric Carlson.
2436
2437         Small cleanup.
2438
2439         * html/shadow/MediaControlElementTypes.h:
2440         * html/shadow/MediaControlElements.cpp:
2441         (WebCore::MediaControlPanelElement::MediaControlPanelElement):
2442         (WebCore::MediaControlPanelEnclosureElement::MediaControlPanelEnclosureElement):
2443         (WebCore::MediaControlOverlayEnclosureElement::MediaControlOverlayEnclosureElement):
2444         (WebCore::MediaControlTimelineContainerElement::MediaControlTimelineContainerElement):
2445         (WebCore::MediaControlVolumeSliderContainerElement::MediaControlVolumeSliderContainerElement):
2446         (WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement):
2447         (WebCore::MediaControlPanelMuteButtonElement::MediaControlPanelMuteButtonElement):
2448         (WebCore::MediaControlVolumeSliderMuteButtonElement::MediaControlVolumeSliderMuteButtonElement):
2449         (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement):
2450         (WebCore::MediaControlOverlayPlayButtonElement::MediaControlOverlayPlayButtonElement):
2451         (WebCore::MediaControlSeekForwardButtonElement::MediaControlSeekForwardButtonElement):
2452         (WebCore::MediaControlSeekBackButtonElement::MediaControlSeekBackButtonElement):
2453         (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement):
2454         (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement):
2455         (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
2456         (WebCore::MediaControlClosedCaptionsContainerElement::MediaControlClosedCaptionsContainerElement):
2457         (WebCore::MediaControlClosedCaptionsTrackListElement::MediaControlClosedCaptionsTrackListElement):
2458         (WebCore::MediaControlTimelineElement::MediaControlTimelineElement):
2459         (WebCore::MediaControlPanelVolumeSliderElement::MediaControlPanelVolumeSliderElement):
2460         (WebCore::MediaControlFullscreenVolumeSliderElement::MediaControlFullscreenVolumeSliderElement):
2461         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement):
2462         (WebCore::MediaControlFullscreenVolumeMinButtonElement::MediaControlFullscreenVolumeMinButtonElement):
2463         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::MediaControlFullscreenVolumeMaxButtonElement):
2464         (WebCore::MediaControlTimeRemainingDisplayElement::MediaControlTimeRemainingDisplayElement):
2465         (WebCore::MediaControlCurrentTimeDisplayElement::MediaControlCurrentTimeDisplayElement):
2466         (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement):
2467         (WebCore::MediaControlPanelElement::shadowPseudoId): Deleted.
2468         (WebCore::MediaControlPanelEnclosureElement::shadowPseudoId): Deleted.
2469         (WebCore::MediaControlOverlayEnclosureElement::shadowPseudoId): Deleted.
2470         (WebCore::MediaControlTimelineContainerElement::shadowPseudoId): Deleted.
2471         (WebCore::MediaControlVolumeSliderContainerElement::shadowPseudoId): Deleted.
2472         (WebCore::MediaControlStatusDisplayElement::shadowPseudoId): Deleted.
2473         (WebCore::MediaControlPanelMuteButtonElement::shadowPseudoId): Deleted.
2474         (WebCore::MediaControlVolumeSliderMuteButtonElement::shadowPseudoId): Deleted.
2475         (WebCore::MediaControlPlayButtonElement::shadowPseudoId): Deleted.
2476         (WebCore::MediaControlOverlayPlayButtonElement::shadowPseudoId): Deleted.
2477         (WebCore::MediaControlSeekForwardButtonElement::shadowPseudoId): Deleted.
2478         (WebCore::MediaControlSeekBackButtonElement::shadowPseudoId): Deleted.
2479         (WebCore::MediaControlRewindButtonElement::shadowPseudoId): Deleted.
2480         (WebCore::MediaControlReturnToRealtimeButtonElement::shadowPseudoId): Deleted.
2481         (WebCore::MediaControlToggleClosedCaptionsButtonElement::shadowPseudoId): Deleted.
2482         (WebCore::MediaControlClosedCaptionsContainerElement::shadowPseudoId): Deleted.
2483         (WebCore::MediaControlClosedCaptionsTrackListElement::shadowPseudoId): Deleted.
2484         (WebCore::MediaControlTimelineElement::shadowPseudoId): Deleted.
2485         (WebCore::MediaControlPanelVolumeSliderElement::shadowPseudoId): Deleted.
2486         (WebCore::MediaControlFullscreenVolumeSliderElement::shadowPseudoId): Deleted.
2487         (WebCore::MediaControlFullscreenButtonElement::shadowPseudoId): Deleted.
2488         (WebCore::MediaControlFullscreenVolumeMinButtonElement::shadowPseudoId): Deleted.
2489         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::shadowPseudoId): Deleted.
2490         (WebCore::MediaControlTimeRemainingDisplayElement::shadowPseudoId): Deleted.
2491         (WebCore::MediaControlCurrentTimeDisplayElement::shadowPseudoId): Deleted.
2492         (WebCore::MediaControlTextTrackContainerElement::textTrackContainerElementShadowPseudoId): Deleted.
2493         (WebCore::MediaControlTextTrackContainerElement::shadowPseudoId): Deleted.
2494         * html/shadow/MediaControlElements.h:
2495         * html/shadow/MediaControls.cpp:
2496         (WebCore::MediaControls::MediaControls):
2497         (WebCore::MediaControls::shadowPseudoId): Deleted.
2498         * html/shadow/MediaControls.h:
2499
2500 2014-07-31  Timothy Horton  <timothy_horton@apple.com>
2501
2502         Build fix for platforms where we should have automaticallyAdjustsContentInsets but it isn't public yet
2503
2504         * platform/mac/ScrollViewMac.mm:
2505
2506 2014-07-31  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2507
2508         [EFL] Add support for building with Geoclue2.
2509         https://bugs.webkit.org/show_bug.cgi?id=135455
2510
2511         Reviewed by Gyuyoung Kim.
2512
2513         No new tests required, no new functionality.
2514
2515         * PlatformEfl.cmake: Generate derived sources for Geoclue2Interface
2516         and include gio-unix path.
2517
2518 2014-07-31  Zalan Bujtas  <zalan@apple.com>
2519
2520         Subpixel rendering: Region painting needs to take subpixel accumulation into account.
2521         https://bugs.webkit.org/show_bug.cgi?id=135469
2522
2523         Similar to non-region painting, when the context is translated, we need to propagate
2524         the subpixel difference so that renderers get snapped to the same position as if they
2525         were not part of a region.
2526
2527         Reviewed by Simon Fraser.
2528
2529         Covered by existing tests/not testable (webkit.org/b/135470)
2530
2531         * html/shadow/MediaControlElements.cpp:
2532         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
2533         * page/FrameView.cpp:
2534         (WebCore::FrameView::paintContents):
2535         * rendering/RenderLayer.cpp:
2536         (WebCore::RenderLayer::paint):
2537         (WebCore::RenderLayer::calculateClipRects):
2538         * rendering/RenderLayer.h:
2539
2540 2014-07-31  Jer Noble  <jer.noble@apple.com>
2541
2542         [iOS] Video in an <embed> has a bad aspect ratio when in fullscreen mode.
2543         https://bugs.webkit.org/show_bug.cgi?id=135481
2544
2545         Reviewed by Simon Fraser.
2546
2547         Do not change the gravity of our AVPlayerLayer when in full screen mode; its gravity
2548         is controlled by setVideoFullscreenGravity(), and should not be affected by style changes.
2549
2550         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2551         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity):
2552
2553 2014-07-31  Beth Dakin  <bdakin@apple.com>
2554
2555         Hit-testing broken in WebKit 1 views with AppKit's contentInsets
2556         https://bugs.webkit.org/show_bug.cgi?id=135434
2557         -and corresponding-
2558         <rdar://problem/17850323>
2559
2560         Reviewed by Benjamin Poulain.
2561
2562         AppKit's contentInsets are factored into scroll positions and mouse positions, but
2563         in WebCore, we generally want all of those things to be factored out so that, for
2564         example, the scroll position of a document pinned to the top is the same whether
2565         or not there is a contentInset. So to fix hit-testing in WebKit 1 views with
2566         contentInsets, this patch factors the inset out or into of all coordinate
2567         conversion methods just like we do for the WebKit2 contentInset.
2568         
2569         This patch also adds the ability to test WK1 platformContentInsets with
2570         window.internals, and it re-names convertFromRenderer to 
2571         convertFromRendererToContainingView and also re-names convertToRenderer to
2572         convertFromContainingViewToRenderer.
2573
2574         ScrollView::topContentInset() takes an optional parameter indicating whether the
2575         caller wants the WebCore::Page contentInset or the platform content inset. It’s
2576         necessary to distinguish between these cases because there is a lot of code that
2577         only wants the WebCore::Page contentInset since that feature is actually
2578         implemented in WebCore as opposed to being implemented at the platform level.
2579         * WebCore.exp.in:
2580         * page/FrameView.cpp:
2581         (WebCore::FrameView::topContentInset):
2582
2583         For layout test purposes, set the platforTopContentInset here if there is a 
2584         platformWidget().
2585         (WebCore::FrameView::topContentInsetDidChange):
2586
2587         Re-named functions, also all coordinate conversion functions call 
2588         topContentInset(ManualOrPlatformContentInset)
2589         (WebCore::FrameView::convertFromContainingViewToRenderer):
2590         (WebCore::FrameView::convertToContainingView):
2591         (WebCore::FrameView::convertFromContainingView):
2592         (WebCore::FrameView::convertFromRenderer): Deleted.
2593         (WebCore::FrameView::convertToRenderer): Deleted.
2594         * page/FrameView.h:
2595         * page/Page.cpp:
2596         (WebCore::Page::setTopContentInset):
2597         * platform/ScrollView.cpp:
2598         (WebCore::ScrollView::documentScrollOffsetRelativeToViewOrigin):
2599         (WebCore::ScrollView::documentScrollPositionRelativeToViewOrigin):
2600         (WebCore::ScrollView::contentsToRootView):
2601         (WebCore::ScrollView::rootViewToTotalContents):
2602         (WebCore::ScrollView::contentsToWindow):
2603         (WebCore::ScrollView::platformTopContentInset):
2604         (WebCore::ScrollView::platformSetTopContentInset):
2605         * platform/ScrollView.h:
2606         (WebCore::ScrollView::topContentInset):
2607         * platform/ios/ScrollViewIOS.mm:
2608         (WebCore::ScrollView::platformTopContentInset):
2609         (WebCore::ScrollView::platformSetTopContentInset):
2610
2611         Implement new platform inset-related functions using AppKit's implementation.
2612         * platform/mac/ScrollViewMac.mm:
2613         (WebCore::ScrollView::platformTopContentInset):
2614         (WebCore::ScrollView::platformSetTopContentInset):
2615         
2616         When we set the scroll position for the documentView, we have to factor the inset
2617         back into the WebCore scroll position.
2618         (WebCore::ScrollView::platformSetScrollPosition):
2619         
2620         Re-named functions.
2621         * rendering/RenderLayer.cpp:
2622         (WebCore::RenderLayer::convertFromScrollbarToContainingView):
2623         (WebCore::RenderLayer::convertFromContainingViewToScrollbar):
2624         * rendering/RenderListBox.cpp:
2625         (WebCore::RenderListBox::convertFromScrollbarToContainingView):
2626         (WebCore::RenderListBox::convertFromContainingViewToScrollbar):
2627
2628 2014-07-31  Dean Jackson  <dino@apple.com>
2629
2630         Default buttons do not pulse in OS X 10.10
2631         https://bugs.webkit.org/show_bug.cgi?id=135447
2632         <rdar://problem/17875896>
2633
2634         Reviewed by Dan Bernstein.
2635
2636         OS X Yosemite does not have the animated pulsing default
2637         buttons seen in previous releases. We don't need to have
2638         a timer in RenderButton constantly triggering repaints.
2639
2640         * platform/mac/ThemeMac.mm:
2641         (WebCore::paintButton): No need to advance the animation.
2642         * rendering/RenderButton.cpp:
2643         (WebCore::RenderButton::styleDidChange): Ask the theme if it
2644         should advance the animation.
2645         * rendering/RenderTheme.h:
2646         (WebCore::RenderTheme::defaultButtonHasAnimation): Virtual function
2647         indicating if the button needs to repaint.
2648         * rendering/RenderThemeMac.h:
2649         * rendering/RenderThemeMac.mm:
2650         (WebCore::RenderThemeMac::defaultButtonHasAnimation): Provide platform
2651         specific result on Yosemite and above.
2652
2653 2014-07-31  Tim Horton  <timothy_horton@apple.com>
2654
2655         DOM::renderedImageForcingBlackText returns an image with the wrong logical size on 2x displays
2656         https://bugs.webkit.org/show_bug.cgi?id=135442
2657         <rdar://problem/17614632>
2658
2659         Reviewed by Simon Fraser.
2660
2661         * bindings/objc/DOM.mm:
2662         (-[DOMRange renderedImageForcingBlackText:renderedImageForcingBlackText:]):
2663         Scale the NSImage size by the device scale factor,
2664         similar to what we did for drag images in r167403.
2665         Ideally this scaling would happen in the code that
2666         generates the images, but this is a much larger change
2667         with much more regression potential.
2668
2669 2014-07-31  Bear Travis  <betravis@adobe.com>
2670
2671         [CSS Font Loading] Rename document.fontloader to document.fonts
2672         https://bugs.webkit.org/show_bug.cgi?id=135393
2673
2674         Reviewed by Bem Jones-Bey.
2675
2676         The most recent version of the specification has renamed
2677         document.fontloader to document.fonts. This change updates the
2678         names in WebCore and LayoutTests.
2679
2680         Fixed up existing tests under LayoutTests/fast/css/fontloader-*
2681         and LayoutTests/http/webfont/fontloader-*
2682
2683         * css/CSSFontFace.cpp:
2684         (WebCore::CSSFontFace::notifyFontLoader):
2685         (WebCore::CSSFontFace::notifyLoadingDone):
2686         * dom/Document.cpp:
2687         (WebCore::Document::fonts):
2688         (WebCore::Document::fontloader): Deleted.
2689         * dom/Document.h:
2690         * dom/Document.idl:
2691         * page/FrameView.cpp:
2692         (WebCore::FrameView::performPostLayoutTasks):
2693
2694 2014-07-31  Andrei Bucur  <abucur@adobe.com>
2695
2696         REGRESSION: Search highlight is broken in RTL multicolumn content
2697         https://bugs.webkit.org/show_bug.cgi?id=135452
2698
2699         Reviewed by Simon Fraser.
2700
2701         The offsets for elements inside RTL multi-column elements are incorrectly computed because
2702         the columns don't calculate their left position according to the writing direction.
2703
2704         The patch extracts the column position computation in two helper functions (for top and left)
2705         so they can be used when needed in different parts of the code. In our case, the |columnLogicalLeft|
2706         function should be used inside |columnTranslationForOffset|.
2707
2708         Test: fast/multicol/content-bounding-box-rtl.html
2709
2710         * rendering/RenderMultiColumnSet.cpp:
2711         (WebCore::RenderMultiColumnSet::columnLogicalLeft): Return the logical left of a column relative to the set.
2712         (WebCore::RenderMultiColumnSet::columnLogicalTop): Return the logical top of a column relative to the set.
2713         (WebCore::RenderMultiColumnSet::columnRectAt): Split the code between columnLogicalLeft and columnLogicalTop.
2714         (WebCore::RenderMultiColumnSet::collectLayerFragments): Make code clearer by adding a new line.
2715         (WebCore::RenderMultiColumnSet::columnTranslationForOffset): Use columnLogicalLeft instead of duplicating logic.
2716         * rendering/RenderMultiColumnSet.h:
2717
2718 2014-07-31  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
2719
2720         Eliminate "FractionConversion" from CSSPrimitiveValue::convertToLength
2721         https://bugs.webkit.org/show_bug.cgi?id=135377
2722
2723         Reviewed by Darin Adler.
2724
2725         The FractionConversion argument in CSSPrimitiveValue::convertToLength
2726         doesn't seem to actually have a purpose. It is for converting numbers
2727         into Length(x * 100, Percent), but this case shouldn't be reachable.
2728         The original patch introducing it doesn't shed any light either:
2729         [https://bugs.webkit.org/show_bug.cgi?id=74913
2730
2731         This patch removes the now unused FractionConversion argument. Note
2732         that we can probably also merge the two Fixed conversions, as the
2733         two only differ in clamping large numbers (probably unintended).
2734
2735         Patch by Timothy Loh, backported from Blink: https://codereview.chromium.org/71253002
2736
2737         No new tests.
2738
2739         * css/CSSCalculationValue.cpp:
2740         (WebCore::determineCategory):
2741         * css/CSSParser.cpp:
2742         (WebCore::parseTransformTranslateArguments):
2743         (WebCore::parseTranslateTransformValue):
2744         (WebCore::parseTransformArguments): Deleted.
2745         * css/CSSPrimitiveValueMappings.h:
2746         (WebCore::CSSPrimitiveValue::convertToLength):
2747         * css/DeprecatedStyleBuilder.cpp:
2748         (WebCore::ApplyPropertyClip::convertToLength):
2749         * css/StyleResolver.cpp:
2750         (WebCore::StyleResolver::convertToIntLength):
2751         (WebCore::StyleResolver::convertToFloatLength):
2752         * css/TransformFunctions.cpp:
2753         (WebCore::convertToFloatLength):
2754
2755 2014-07-31  Joseph Pecoraro  <pecoraro@apple.com>
2756
2757         Web Inspector: console.profile missing profile information
2758         https://bugs.webkit.org/show_bug.cgi?id=135432
2759
2760         Reviewed by Timothy Hatcher.
2761
2762         By switching console.profile to start/stop the timeline we would
2763         not have a chance to recompile JS functions with profiling information.
2764         This used to work because whenever the inspector was open we would
2765         have profiling information enabled. Go back to that behavior.
2766
2767         * inspector/InspectorController.cpp:
2768         (WebCore::InspectorController::profilerEnabled):
2769         Instead of checking if the timeline agent has started, check if the
2770         timeline agent has been created. Going back to the normal behavior
2771         of always having profiling information when the inspector is open.
2772
2773         * inspector/InspectorTimelineAgent.h:
2774         * inspector/InspectorTimelineAgent.cpp:
2775         (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
2776         Recompile initializing the timeline agent to include profiling information.
2777
2778         (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
2779         Recompile destrying the timeline agent, only if needed.
2780
2781         (WebCore::InspectorTimelineAgent::willCallFunction):
2782         (WebCore::InspectorTimelineAgent::didCallFunction):
2783         (WebCore::InspectorTimelineAgent::willEvaluateScript):
2784         (WebCore::InspectorTimelineAgent::didEvaluateScript):
2785         Using a boolean to track nested calls would not give expected
2786         behavior when un-nesting. Switch to a counter to ensure that
2787         as we start profiling in the outermost level we then stop
2788         profiling at that same level and not inside an inner nesting.
2789
2790 2014-07-31  Wenson Hsieh  <wenson_hsieh@apple.com>
2791
2792         Refactor EventHandler to call ScrollAnimator::handleWheelEvent for overflow scrolling
2793         https://bugs.webkit.org/show_bug.cgi?id=135195
2794
2795         Reviewed by Beth Dakin.
2796
2797         ScrollableArea::handleWheelEvent is not currently being used to handle wheel events for overflow scrolling; it instead directly invokes ScrollableArea::scroll.
2798         In order to expose wheel phases on Mac, the PlatformWheelEvent itself should propagate down to ScrollableArea, not just the scroll granularity, direction and
2799         multiplier required by ScrollableArea::scroll. With this patch, PlatformWheelEvent will be "shipped" along with the WheelEvent.
2800
2801         No new tests, since behavior should not have changed.
2802
2803         * page/EventHandler.cpp:
2804         (WebCore::didScrollInScrollableAreaForSingleAxis): Calls ScrollableArea::scroll directly using WheelEvent's data. Used to handle programmatic WheelEvents, e.g. from JavaScript.
2805         (WebCore::handleWheelEventInAppropriateEnclosingBoxForSingleAxis): Finds the correct ScrollableArea and attempts to scroll it using the information contained in the WheelEvent via ScrollableArea::handleWheelEvent
2806         (WebCore::EventHandler::defaultWheelEventHandler): Updated to use handleWheelEventInAppropriateEnclosingBoxForSingleAxis instead of scrollNode.
2807         (WebCore::scrollNode): Deleted.
2808         * rendering/RenderListBox.h: Made RenderListBox::scroll public so it can be invoked from EventHandler::handleWheelEventInAppropriateEnclosingBoxForSingleAxis.
2809         * rendering/RenderNamedFlowThread.cpp: Refactored to let EventHandler update nextScrollBlock in the case of isRenderNamedFlowThread().
2810         (WebCore::RenderNamedFlowThread::fragmentFromRenderBoxAsRenderBlock): 
2811         * rendering/RenderNamedFlowThread.h:
2812
2813 2014-07-31  Dan Bernstein  <mitz@apple.com>
2814
2815         WebCore part of: Server trust authentication challenges aren’t sent to the navigation delegate
2816         https://bugs.webkit.org/show_bug.cgi?id=135327
2817
2818         Reviewed by Alexey Proskuryakov.
2819
2820         * platform/network/cf/ResourceHandleCFNet.cpp:
2821         (WebCore::ResourceHandle::receivedCredential): Don’t try to change the persistence of
2822         credentials used for server trust, because the platform doesn’t support persistence values
2823         other than Session for server trust.
2824         * platform/network/mac/ResourceHandleMac.mm:
2825         (WebCore::ResourceHandle::receivedCredential): Ditto.
2826
2827 2014-07-31  Dan Bernstein  <mitz@apple.com>
2828
2829         Tried to fix building with the OS X 10.9 SDK while targeting OS X 10.8.
2830
2831         * platform/network/cocoa/CredentialCocoa.mm:
2832         (WebCore::toCredentialPersistence):
2833
2834 2014-07-31  Dan Bernstein  <mitz@apple.com>
2835
2836         Reverted r171854, because it broke building with the OS X 10.8 SDK.
2837
2838         * platform/network/cocoa/CredentialCocoa.mm:
2839         (WebCore::toCredentialPersistence):
2840
2841 2014-07-31  Dan Bernstein  <mitz@apple.com>
2842
2843         Tried to fix building with the OS X 10.9 SDK while targeting OS X 10.8.
2844
2845         * platform/network/cocoa/CredentialCocoa.mm:
2846         (WebCore::toCredentialPersistence):
2847
2848 2014-07-31  Jer Noble  <jer.noble@apple.com>
2849
2850         REGRESSION(??): [iOS] Disabling MediaPlaybackRequiresUserGesture does not remove user gesture requirement for entering full screen.
2851         https://bugs.webkit.org/show_bug.cgi?id=135443
2852
2853         Reviewed by Dean Jackson.
2854
2855         Allow full screen mode to be entered without a user gesture if the gesture requirement for media playback
2856         has been unset.
2857
2858         * html/HTMLMediaElement.cpp:
2859         (WebCore::HTMLMediaElement::HTMLMediaElement):
2860
2861 2014-07-31  Andrei Bucur  <abucur@adobe.com>
2862
2863         [CSS Multicolumn] Clear the lines when switching to multi-column layout
2864         https://bugs.webkit.org/show_bug.cgi?id=135127
2865
2866         Reviewed by Alexandru Chiculita.
2867
2868         When switching an element to multi-column layout it becomes a container of block
2869         children. When this happens the existing line boxes must be deleted in addition
2870         to clearing the hasInlineChildren flag.
2871
2872         Tests: fast/multicol/inline-container-to-multicol.html
2873                fast/multicol/inline-container-to-multicol-float.html
2874                fast/multicol/inline-container-to-multicol-positioned.html
2875
2876         * rendering/RenderBlockFlow.cpp:
2877         (WebCore::RenderBlockFlow::createMultiColumnFlowThread):
2878
2879 2014-07-30  Andreas Kling  <akling@apple.com>
2880
2881         PropertyName's internal string is always atomic.
2882         <https://webkit.org/b/135451>
2883
2884         Use PropertyName::publicName() directly instead of taking the slow route
2885         through AtomicString::findStringWithHash().
2886
2887         These strings are always atomic, and findStringWithHash() would trudge
2888         through a full hash lookup just to discover that indeed, they are!
2889
2890         Reviewed by Benjamin Poulain.
2891
2892         * bindings/js/JSDOMBinding.cpp:
2893         (WebCore::findAtomicString): Deleted.
2894         * bindings/js/JSDOMBinding.h:
2895         * bindings/js/JSDOMWindowCustom.cpp:
2896         (WebCore::namedItemGetter):
2897         (WebCore::JSDOMWindow::getOwnPropertySlot):
2898         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
2899         * bindings/js/JSHTMLDocumentCustom.cpp:
2900         (WebCore::JSHTMLDocument::canGetItemsForName):
2901         (WebCore::JSHTMLDocument::nameGetter):
2902
2903 2014-07-30  Benjamin Poulain  <benjamin@webkit.org>
2904
2905         ElementRuleCollector: group the shadow tree code
2906         https://bugs.webkit.org/show_bug.cgi?id=135410
2907
2908         Reviewed by Andreas Kling.
2909
2910         * css/ElementRuleCollector.cpp:
2911         (WebCore::ElementRuleCollector::collectMatchingRules):
2912         Little cleanup: group the shadow tree rule collection in the same block.
2913
2914 2014-07-30  Benjamin Poulain  <benjamin@webkit.org>
2915
2916         Cleanup DetailsMarkerControl
2917         https://bugs.webkit.org/show_bug.cgi?id=135429
2918
2919         Reviewed by Andreas Kling.
2920
2921         Remove the override of shadowPseudoId(). This is a simple type of shadowId,
2922         it should use the generic pseudo() path.
2923
2924         Move DetailsMarkerControl::create() out-of-line. One could justify inlining the constructor,
2925         inlining the ::create() function has little value.
2926
2927         * html/shadow/DetailsMarkerControl.cpp:
2928         (WebCore::DetailsMarkerControl::create):
2929         (WebCore::DetailsMarkerControl::DetailsMarkerControl):
2930         (WebCore::DetailsMarkerControl::rendererIsNeeded):
2931         (WebCore::DetailsMarkerControl::shadowPseudoId): Deleted.
2932         (WebCore::DetailsMarkerControl::summaryElement): Deleted.
2933         * html/shadow/DetailsMarkerControl.h:
2934         (WebCore::DetailsMarkerControl::create): Deleted.
2935
2936 2014-07-30  Benjamin Poulain  <bpoulain@apple.com>
2937
2938         Remove UploadButtonElement::shadowPseudoId()
2939         https://bugs.webkit.org/show_bug.cgi?id=135435
2940
2941         Reviewed by Andreas Kling.
2942
2943         Use the generic pseudo() path instead of a custom shadowPseudoId().
2944
2945         * html/FileInputType.cpp:
2946         (WebCore::UploadButtonElement::create):
2947         (WebCore::UploadButtonElement::createForMultiple):
2948         (WebCore::UploadButtonElement::UploadButtonElement):
2949         Set the type in the common constructor instead of the call sites.
2950         (WebCore::UploadButtonElement::shadowPseudoId): Deleted.
2951         * html/FileInputType.h:
2952
2953 2014-07-30  Benjamin Poulain  <bpoulain@apple.com>
2954
2955         Remove SpinButtonElement::shadowPseudoId
2956         https://bugs.webkit.org/show_bug.cgi?id=135436
2957
2958         Reviewed by Andreas Kling.
2959
2960         Use the generic pseudo.
2961
2962         * html/shadow/SpinButtonElement.cpp:
2963         (WebCore::SpinButtonElement::SpinButtonElement):
2964         (WebCore::SpinButtonElement::shadowPseudoId): Deleted.
2965         * html/shadow/SpinButtonElement.h:
2966
2967 2014-07-30  Benjamin Poulain  <bpoulain@apple.com>
2968
2969         Clean up YouTubeEmbedShadowElement
2970         https://bugs.webkit.org/show_bug.cgi?id=135437
2971
2972         Reviewed by Andreas Kling.
2973
2974         * html/shadow/YouTubeEmbedShadowElement.cpp:
2975         (WebCore::YouTubeEmbedShadowElement::YouTubeEmbedShadowElement):
2976         (WebCore::YouTubeEmbedShadowElement::pluginElement): Deleted.
2977         This is unused in WebCore.
2978
2979         (WebCore::YouTubeEmbedShadowElement::shadowPseudoId): Deleted.
2980         Use the generic pseudo path instead of a custom shadowPseudoId.
2981         * html/shadow/YouTubeEmbedShadowElement.h:
2982
2983 2014-07-30  Benjamin Poulain  <bpoulain@apple.com>
2984
2985         Remove shadowPseudoId() from InputFieldSpeechButtonElement and SearchFieldCancelButtonElement
2986         https://bugs.webkit.org/show_bug.cgi?id=135438
2987
2988         Reviewed by Andreas Kling.
2989
2990         Use the generic path.
2991
2992         * html/shadow/TextControlInnerElements.cpp:
2993         (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
2994         (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
2995         (WebCore::SearchFieldCancelButtonElement::shadowPseudoId): Deleted.
2996         (WebCore::InputFieldSpeechButtonElement::shadowPseudoId): Deleted.
2997         * html/shadow/TextControlInnerElements.h:
2998
2999 2014-07-30  Andy Estes  <aestes@apple.com>
3000
3001         USE(CONTENT_FILTERING) should be ENABLE(CONTENT_FILTERING)
3002         https://bugs.webkit.org/show_bug.cgi?id=135439
3003
3004         Reviewed by Tim Horton.
3005
3006         We now support two different platform content filters, and will soon support a mock content filter (as part of
3007         webkit.org/b/128858). This makes content filtering a feature of WebKit, not just an adoption of a third-party
3008         library. ENABLE() is the correct macro to use for such a feature.
3009
3010         * Configurations/FeatureDefines.xcconfig:
3011         * WebCore.exp.in:
3012         * loader/DocumentLoader.cpp:
3013         (WebCore::DocumentLoader::finishedLoading):
3014         (WebCore::DocumentLoader::responseReceived):
3015         (WebCore::DocumentLoader::commitData):
3016         (WebCore::DocumentLoader::dataReceived):
3017         * loader/DocumentLoader.h:
3018         * loader/FrameLoaderClient.h:
3019         * platform/ContentFilter.h:
3020         * platform/ios/ContentFilterIOS.mm:
3021         * platform/mac/ContentFilterMac.mm:
3022
3023 2014-07-30  Andreas Kling  <akling@apple.com>
3024
3025         Static hash tables no longer need to be coupled with a VM.
3026         <https://webkit.org/b/135421>
3027
3028         Update for JSC::ClassInfo changes.
3029         
3030         Remove the JSNoStaticTables mode for IDL code generation, which was used to
3031         ensure that each VM had its own unique copy of certain static tables.
3032         This was used for interfaces that could be used in workers, and now there's
3033         no need to manually annotate these things anymore.
3034
3035         Also remove the DOMObjectHashTableMap class that was only used for this.
3036
3037         Reviewed by Geoffrey Garen.
3038
3039         * Modules/indexeddb/IDBAny.idl:
3040         * Modules/indexeddb/IDBCursor.idl:
3041         * Modules/indexeddb/IDBCursorWithValue.idl:
3042         * Modules/indexeddb/IDBDatabase.idl:
3043         * Modules/indexeddb/IDBFactory.idl:
3044         * Modules/indexeddb/IDBIndex.idl:
3045         * Modules/indexeddb/IDBKeyRange.idl:
3046         * Modules/indexeddb/IDBObjectStore.idl:
3047         * Modules/indexeddb/IDBOpenDBRequest.idl:
3048         * Modules/indexeddb/IDBRequest.idl:
3049         * Modules/indexeddb/IDBTransaction.idl:
3050         * Modules/indexeddb/IDBVersionChangeEvent.idl:
3051         * Modules/webdatabase/Database.idl:
3052         * Modules/webdatabase/DatabaseSync.idl:
3053         * Modules/webdatabase/SQLError.idl:
3054         * Modules/webdatabase/SQLException.idl:
3055         * Modules/webdatabase/SQLResultSet.idl:
3056         * Modules/webdatabase/SQLResultSetRowList.idl:
3057         * Modules/webdatabase/SQLTransaction.idl:
3058         * Modules/webdatabase/SQLTransactionSync.idl:
3059         * Modules/websockets/CloseEvent.idl:
3060         * Modules/websockets/WebSocket.idl:
3061         * WebCore.xcodeproj/project.pbxproj:
3062         * bindings/js/DOMObjectHashTableMap.cpp: Removed.
3063         * bindings/js/DOMObjectHashTableMap.h: Removed.
3064         * bindings/js/JSDOMBinding.cpp:
3065         (WebCore::getHashTableForGlobalData): Deleted.
3066         * bindings/js/JSDOMBinding.h:
3067         (WebCore::getStaticValueSlotEntryWithoutCaching):
3068         * bindings/js/JSDOMGlobalObject.cpp:
3069         * bindings/js/JSDOMWindowBase.cpp:
3070         * bindings/js/JSDOMWindowCustom.cpp:
3071         (WebCore::JSDOMWindow::getOwnPropertySlot):
3072         (WebCore::JSDOMWindow::put):
3073         * bindings/js/JSDOMWindowShell.cpp:
3074         * bindings/js/JSImageConstructor.cpp:
3075         * bindings/js/JSLocationCustom.cpp:
3076         (WebCore::JSLocation::putDelegate):
3077         * bindings/js/JSStorageCustom.cpp:
3078         (WebCore::JSStorage::deleteProperty):
3079         (WebCore::JSStorage::putDelegate):
3080         * bindings/js/JSWorkerGlobalScopeBase.cpp:
3081         * bindings/js/WebCoreJSClientData.h:
3082         * bindings/scripts/CodeGeneratorJS.pm:
3083         (GenerateGetOwnPropertySlotBody):
3084         (GenerateImplementation):
3085         (GenerateConstructorHelperMethods):
3086         (hashTableAccessor): Deleted.
3087         (prototypeHashTableAccessor): Deleted.
3088         (constructorHashTableAccessor): Deleted.
3089         * bindings/scripts/IDLAttributes.txt:
3090         * bridge/c/CRuntimeObject.cpp:
3091         * bridge/c/c_instance.cpp:
3092         * bridge/objc/ObjCRuntimeObject.mm:
3093         * bridge/objc/objc_instance.mm:
3094         * bridge/objc/objc_runtime.mm:
3095         * bridge/runtime_array.cpp:
3096         * bridge/runtime_method.cpp:
3097         * bridge/runtime_object.cpp:
3098         * crypto/CryptoKey.idl:
3099         * css/CSSFontFaceLoadEvent.idl:
3100         * dom/DOMCoreException.idl:
3101         * dom/DOMStringList.idl:
3102         * dom/ErrorEvent.idl:
3103         * dom/Event.idl:
3104         * dom/EventException.idl:
3105         * dom/EventListener.idl:
3106         * dom/MessageChannel.idl:
3107         * dom/MessageEvent.idl:
3108         * dom/MessagePort.idl:
3109         * dom/ProgressEvent.idl:
3110         * fileapi/Blob.idl:
3111         * fileapi/File.idl:
3112         * fileapi/FileError.idl:
3113         * fileapi/FileException.idl:
3114         * fileapi/FileList.idl:
3115         * fileapi/FileReader.idl:
3116         * fileapi/FileReaderSync.idl:
3117         * html/DOMURL.idl:
3118         * page/EventSource.idl:
3119         * page/WorkerNavigator.idl:
3120         * workers/DedicatedWorkerGlobalScope.idl:
3121         * workers/SharedWorkerGlobalScope.idl:
3122         * workers/WorkerGlobalScope.idl:
3123         * workers/WorkerLocation.idl:
3124         * xml/XMLHttpRequest.idl:
3125         * xml/XMLHttpRequestException.idl:
3126         * xml/XMLHttpRequestProgressEvent.idl:
3127         * xml/XMLHttpRequestUpload.idl:
3128
3129 2014-07-30  Dan Bernstein  <mitz@apple.com>
3130
3131         <rdar://problem/17199364> [Mac] Popup button arrows appear on the left, underlapping text, when the UI layout direction is right-to-left
3132         https://bugs.webkit.org/show_bug.cgi?id=135426
3133
3134         Reviewed by Dean Jackson.
3135
3136         No test, because the UI layout direction in the test harness is always left-to-right.
3137
3138         * rendering/RenderThemeMac.mm:
3139         (WebCore::RenderThemeMac::popupButton): Forced the user interface layout direction of the
3140         NSPopUpButtonCell to left-to-right. Added a FIXME about how we could make this vary based on
3141         the direction of the <select>, though that would require additional changes elsewhere.
3142
3143 2014-07-30  Dan Bernstein  <mitz@apple.com>
3144
3145         Made Credential hold onto an NSURLCredential when needed.
3146         Work towards fixing https://bugs.webkit.org/show_bug.cgi?id=135327
3147
3148         Reviewed by Alexey Proskuryakov.
3149
3150         No change in functionality.
3151
3152         * WebCore.exp.in: Updated.
3153
3154         * platform/network/Credential.h: Removed definition of CERTIFICATE_CREDENTIALS_SUPPORTED,
3155         which is not used anymore.
3156
3157         * platform/network/CredentialBase.h:
3158         (WebCore::CredentialBase::encodingRequiresPlatformData): Added a base implementation that
3159         returns false.
3160
3161         * platform/network/cf/AuthenticationCF.cpp:
3162         Changed to use the Credential constructor that takes an CFURLCredential, and the new
3163         cfCredential member function. Made the createCF and core functions Windows-only and
3164         therefore removed the CERTIFICATE_CREDENTIALS_SUPPORTED code from them.
3165         * platform/network/cf/AuthenticationCF.h:
3166
3167         * platform/network/cf/CredentialStorageCFNet.cpp:
3168         (WebCore::CredentialStorage::getFromPersistentStorage): Changed to construct a Credential
3169         from a CFURLCredential.
3170         (WebCore::CredentialStorage::saveToPersistentStorage): Changed to use the new cfCredential
3171         member function.
3172
3173         * platform/network/cf/ResourceHandleCFNet.cpp:
3174         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Ditto to both.
3175         (WebCore::ResourceHandle::receivedCredential): Ditto.
3176
3177         * platform/network/cocoa/CredentialCocoa.h:
3178         Replaced the m_identity, m_certificates and m_type member variables with an m_nsCredential
3179         one holding onto an NSURLCredential. Declared constructors from and getters for
3180         NSURLCredential and CFURLCredentialRef.
3181         (WebCore::Credential::encodingRequiresPlatformData): Override that checks the
3182         NSURLCredential if necessary.
3183
3184         * platform/network/cocoa/CredentialCocoa.mm:
3185         (WebCore::toNSURLCredentialPersistence): New helper function.
3186         (WebCore::toCredentialPersistence): Ditto.
3187         (WebCore::Credential::Credential): Defined constructors to create or take an
3188         NSURLCredential.
3189         (WebCore::Credential::cfCredential): Added.
3190         (WebCore::Credential::nsCredential): Added. Returns nil for the empty credential.
3191         (WebCore::Credential::isEmpty): Changed to check m_nsCredential.
3192         (WebCore::Credential::platformCompare): Changed to compare m_nsCredential if needed.
3193         (WebCore::Credential::encodingRequiresPlatformData): Returns true if the credential is not
3194         a user and a password.
3195
3196         * platform/network/mac/AuthenticationMac.h: Removed mac and core functions for Credential.
3197         * platform/network/mac/AuthenticationMac.mm:
3198         (-[WebCoreAuthenticationClientAsChallengeSender useCredential:forAuthenticationChallenge:]):
3199         Changed to use Credential constructor that takes an NSURLCredential.
3200         (WebCore::AuthenticationChallenge::AuthenticationChallenge): Ditto. Also use the
3201         nsCredential getter.
3202
3203         * platform/network/mac/CredentialStorageMac.mm:
3204         (WebCore::CredentialStorage::getFromPersistentStorage): Use new Credential constructor.
3205
3206         * platform/network/mac/ResourceHandleMac.mm:
3207         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Ditto. Also use the
3208         nsCredential getter.
3209         (WebCore::ResourceHandle::receivedCredential): Ditto.
3210
3211 2014-07-30  Sergio Villar Senin  <svillar@igalia.com>
3212
3213         [GTK] Build depends on OpenGL ES
3214         https://bugs.webkit.org/show_bug.cgi?id=135289
3215
3216         Reviewed by Martin Robinson.
3217
3218         Guard the OpenGL ES code with USE(OPENGL_ES_2).
3219
3220         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
3221         * platform/graphics/opengl/Extensions3DOpenGLES.h:
3222
3223 2014-07-30  Radu Stavila  <stavila@adobe.com>
3224
3225         Member name collision in RenderView and SelectionSubtreeRoot
3226         https://bugs.webkit.org/show_bug.cgi?id=135233
3227
3228         Reviewed by Mihnea Ovidenie.
3229
3230         The selectionStart/End members in RenderView have been renamed to fix confusion caused by the fact that
3231         RenderView inherits SelectionSubtreeRoot, which also has the same selectionStart/End members.
3232
3233         No new tests required, no new functionality.
3234
3235         * rendering/RenderBlock.cpp:
3236         (WebCore::RenderBlock::isSelectionRoot):
3237         * rendering/RenderView.cpp:
3238         (WebCore::RenderView::RenderView):
3239         (WebCore::RenderView::setSelection):
3240         (WebCore::RenderView::getSelection):
3241         * rendering/RenderView.h:
3242
3243 2014-07-30  Zan Dobersek  <zdobersek@igalia.com>
3244
3245         [TexMap] Move TextureMapperLayer::textureMapper() definition into the header
3246         https://bugs.webkit.org/show_bug.cgi?id=135384
3247
3248         Reviewed by Martin Robinson.
3249
3250         Move the definitions of TextureMapperLayer::textureMapper() and TextureMapperLayer::rootLayer()
3251         into the TextureMapperLayer header. This makes both functions inline-able, removing unnecessary
3252         calling overhead in GraphicsLayerTextureMapper::flushCompositingState() and
3253         GraphicsLayerTextureMapper::updateBackingStoreIfNeeded().
3254
3255         TextureMapperLayer::rootLayer() now also returns a reference.
3256
3257         * platform/graphics/texmap/TextureMapperLayer.cpp:
3258         (WebCore::TextureMapperLayer::~TextureMapperLayer):
3259         (WebCore::TextureMapperLayer::rootLayer): Deleted.
3260         (WebCore::TextureMapperLayer::textureMapper): Deleted.
3261         * platform/graphics/texmap/TextureMapperLayer.h:
3262         (WebCore::TextureMapperLayer::textureMapper):
3263         (WebCore::TextureMapperLayer::rootLayer):
3264
3265 2014-07-29  Andreas Kling  <akling@apple.com>
3266
3267         Crash when using 'em' units to specify font-size inside animation keyframe.
3268         <https://webkit.org/b/135395>
3269         <rdar://problem/17851910>
3270
3271         We'd forgotten to initialize the "parent style" when resolving keyframe
3272         styles, and this led to a crash in length conversion where the code
3273         assumes a parent style will be present.
3274
3275         To keep this fix minimal, simply make the "parent style" a clone of the
3276         base element style.
3277
3278         Reviewed by Simon Fraser.
3279
3280         Test: fast/animation/keyframe-with-font-size-in-em-units.html
3281
3282         * css/StyleResolver.cpp:
3283         (WebCore::StyleResolver::styleForKeyframe):
3284
3285 2014-07-29  Pratik Solanki  <psolanki@apple.com>
3286
3287         [iOS] REGRESSION(r171526): PDF documents fail to load in WebKit1 with disk image caching enabled
3288         https://bugs.webkit.org/show_bug.cgi?id=135359
3289         <rdar://problem/17824645>
3290
3291         Reviewed by Darin Adler.
3292
3293         r171526 broke the case where we have a memory mapped file from the DiskImageCache in the
3294         SharedBuffer. In such a case, m_buffer is empty and createCFData() returned an
3295         WebCoreSharedBufferData with an empty buffer.
3296
3297         Fix this by taking the easy route of bringing back the old code for the disk image cache
3298         file backed case. In the long run we probably want to remove the iOS specific disk image
3299         cache anyway.
3300
3301         Review also uncovered another bug in r171526 where we were balancing an Objective-C alloc
3302         with a CFRelease which is incorrect when running under GC. Fix that by using adoptNS along
3303         with adoptCF which is what the code did before.
3304
3305         No new tests because the bug only occurs on device and we can't run tests on device yet.
3306
3307         * platform/mac/SharedBufferMac.mm:
3308         (-[WebCoreSharedBufferData initWithDiskImageSharedBuffer:]):
3309         (-[WebCoreSharedBufferData length]):
3310         (-[WebCoreSharedBufferData bytes]):
3311         (WebCore::SharedBuffer::createCFData):
3312
3313 2014-07-29  Benjamin Poulain  <bpoulain@apple.com>
3314
3315         VisitedLinkState::determineLinkState should take a reference
3316         https://bugs.webkit.org/show_bug.cgi?id=135375
3317
3318         Reviewed by Sam Weinig.
3319
3320         * css/StyleResolver.cpp:
3321         (WebCore::StyleResolver::State::initElement):
3322         * dom/VisitedLinkState.h:
3323         (WebCore::VisitedLinkState::determineLinkState):
3324
3325 2014-07-29  Brady Eidson  <beidson@apple.com>
3326
3327         Make WKOriginDataManager actually operate on IndexedDatabases.
3328         https://bugs.webkit.org/show_bug.cgi?id=135346
3329
3330         Reviewed by Sam Weinig (and David Kilzer and Alex Christensen)
3331
3332         * WebCore.exp.in:
3333
3334 2014-07-29  Dan Bernstein  <mitz@apple.com>
3335
3336         Moved the Cocoa-specific parts of CredentialBase into a Cocoa-specific Credential class.
3337         Work towards fixing https://bugs.webkit.org/show_bug.cgi?id=135327
3338
3339         Reviewed by Alexey Proskuryakov.
3340
3341         No change in functionality.
3342
3343         * WebCore.exp.in: Updated for functions moved in the class hierarchy.
3344
3345         * WebCore.xcodeproj/project.pbxproj: Added CredentialCocoa.{h,mm}.
3346
3347         * platform/network/Credential.h: For Cocoa, include CredentialCocoa.h instead of the generic
3348         class.
3349         (WebCore::Credential::Credential): Removed #if CERTIFICATE_CREDENTIALS_SUPPORTED code.
3350
3351         * platform/network/CredentialBase.cpp:
3352         (WebCore::CredentialBase::CredentialBase): Changed to use emptyString instead of "", removed
3353         #if CERTIFICATE_CREDENTIALS_SUPPORTED code.
3354         (WebCore::CredentialBase::isEmpty): Ditto.
3355         (WebCore::CredentialBase::compare): Renamed operator== to this, removed
3356         #if CERTIFICATE_CREDENTIALS_SUPPORTED code, but changed the end to call platformCompare.
3357         (WebCore::CredentialBase::identity): Deleted.
3358         (WebCore::CredentialBase::certificates): Deleted.
3359         (WebCore::CredentialBase::type): Deleted.
3360         * platform/network/CredentialBase.h: Removed #if CERTIFICATE_CREDENTIALS_SUPPORTED members.
3361         (WebCore::CredentialBase::platformCompare): Added a base implementation that returns true.
3362         (WebCore::operator==): Changed to use CredentialBase::compare.
3363
3364         * platform/network/cocoa/CredentialCocoa.h: Added.
3365         (WebCore::Credential::Credential):
3366         * platform/network/cocoa/CredentialCocoa.mm: Added.
3367         (WebCore::Credential::Credential): Moved the constructor that takes an identity and
3368         certificates here.
3369         (WebCore::Credential::isEmpty): Moved here.
3370         (WebCore::Credential::identity): Ditto.
3371         (WebCore::Credential::certificates): Ditto.
3372         (WebCore::Credential::type): Ditto.
3373         (WebCore::Credential::platformCompare): Moved the code that compares client-certificate
3374         credentials here.
3375
3376         * platform/network/mac/AuthenticationMac.mm:
3377         (WebCore::mac): Removed #if CERTIFICATE_CREDENTIALS_SUPPORTED guards in this Cocoa-only
3378         file.
3379         (WebCore::core): Ditto.
3380
3381 2014-07-29  Daniel Bates  <dabates@apple.com>
3382
3383         Use WTF::move() instead of std::move() to help ensure move semantics
3384         https://bugs.webkit.org/show_bug.cgi?id=135351
3385
3386         Reviewed by Alexey Proskuryakov.
3387
3388         * page/CaptionUserPreferences.cpp:
3389         (WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride):
3390
3391 2014-07-29  Mihnea Ovidenie  <mihnea@adobe.com>
3392
3393         [CSSRegions] Assertion failure hit testing a region-based multicolumn in a region
3394         https://bugs.webkit.org/show_bug.cgi?id=135385
3395
3396         Reviewed by Andrei Bucur.
3397
3398         When a region-based multicolumn element is displayed and hit tested in a region,
3399         we have to disable the named flow region information not only for painting,
3400         but also for hit-testing. This is a follow-up for https://bugs.webkit.org/show_bug.cgi?id=132121,
3401         which provided the fix for painting.
3402
3403         Test: fast/regions/assert-hit-test-multicol-in-region.html
3404
3405         * rendering/RenderLayer.cpp:
3406         (WebCore::RenderLayer::hitTestLayer):
3407
3408 2014-07-29  Zalan Bujtas  <zalan@apple.com>
3409
3410         Cleanup RenderSelectionInfoBase/RenderSelectionInfo/RenderBlockSelectionInfo.
3411         https://bugs.webkit.org/show_bug.cgi?id=135326
3412
3413         Reviewed by Darin Adler.
3414
3415         1. Move implementation to RenderSelectInfo.cpp
3416         2. RenderSelectionInfoBase/RenderSelectionInfo/RenderBlockSelectionInfo take Render* reference.