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