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