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