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