[iOS] update control type when playback state changes
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-07-12  Eric Carlson  <eric.carlson@apple.com>
2
3         [iOS] update control type when playback state changes
4         https://bugs.webkit.org/show_bug.cgi?id=134856
5
6         Reviewed by Dean Jackson.
7
8         Check to make sure the correct type of media controls are showing when playback state
9         changes so we don't end up with the wrong type of controls during playback.
10
11         * Modules/mediacontrols/mediaControlsApple.js: 
12         (Controller.prototype.HandledVideoEvents): Drive-by fix, call handlePlay on 'playing' instead
13             of 'play' so controls don't hide too early.
14         * Modules/mediacontrols/mediaControlsiOS.js:
15         (ControllerIOS.prototype.setPlaying): New, call updateControls to make sure inline
16             controls are shown when appropriate.
17
18 2014-07-12  Dean Jackson  <dino@apple.com>
19
20         [iOS Media] Start playback button should indicate when it can't play
21         https://bugs.webkit.org/show_bug.cgi?id=134851
22
23         Post-commit review with Eric Carlson on IRC.
24
25         * Modules/mediacontrols/mediaControlsiOS.js:
26         (ControllerIOS.prototype.updateStatusDisplay): Remove the line that sets the
27         class on the inline play button.
28
29 2014-07-11  Dean Jackson  <dino@apple.com>
30
31         [iOS Media] Start playback button should indicate when it can't play
32         https://bugs.webkit.org/show_bug.cgi?id=134851
33
34         Reviewed by Sam Weinig.
35
36         If a video element has errors and cannot play, then the start
37         playback button should use the "broken" icon.
38
39         * Modules/mediacontrols/mediaControlsApple.js: Add a new "failed" class.
40         * Modules/mediacontrols/mediaControlsiOS.js:
41         (ControllerIOS.prototype.shouldHaveStartPlaybackButton): We need a playback button
42         even when there is an error.
43         (ControllerIOS.prototype.handleWirelessPickerButtonTouchStart): Don't offer Airplay
44         if we're in an error state.
45         (ControllerIOS.prototype.updateStatusDisplay): Set the "failed" class on
46         the playback buttons if we are in an error state.
47
48 2014-07-11  Benjamin Poulain  <benjamin@webkit.org>
49
50         Partition the CSS rules based on the most specific filter of the rightmost fragment
51         https://bugs.webkit.org/show_bug.cgi?id=134828
52
53         Reviewed by Andreas Kling.
54
55         Previously, RuleSet was partitioning each rule based on the rightmost filter.
56         While fast, this had the side effect of putting many selectors with ID match in the class
57         bucket (because the selectors are generally written starting with the ID).
58
59         This patch replace the code of findBestRuleSetAndAdd() by a simple loop going over all
60         the simple selectors in the rightmost fragment to find the best bucket.
61
62         * css/ElementRuleCollector.cpp:
63         (WebCore::ElementRuleCollector::ruleMatches):
64         * css/RuleSet.cpp:
65         (WebCore::isSelectorMatchingHTMLBasedOnRuleHash):
66         I unified ruleData.hasRightmostSelectorMatchingHTMLBasedOnRuleHash() and hasMultipartSelector().
67
68         (WebCore::RuleData::RuleData):
69         (WebCore::rulesCountForName):
70         (WebCore::RuleSet::addRule):
71         I removed the recursive part of findBestRuleSetAndAdd() (which was wrong anyway). The function
72         was useless so I just moved the algorithm to addRule() directly.
73
74         We first loop over all the CSSSelectors related by SubSelector, this correspond to the rightmost fragment.
75         If a filter with high specificity is found, we add the rule immediately and end there.
76         If a filter that is not very specific is found, we keep a pointer to the selector to use it later.
77
78         (WebCore::RuleSet::findBestRuleSetAndAdd): Deleted.
79         * css/RuleSet.h:
80         (WebCore::RuleData::hasMultipartSelector): Deleted.
81
82 2014-07-11  Alex Christensen  <achristensen@webkit.org>
83
84         [WinCairo] Unreviewed build fix after r170937.
85
86         * WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
87         Update and apply changes applied to WebCoreGenerated.make in r170937.
88
89 2014-07-11  Joseph Pecoraro  <pecoraro@apple.com>
90
91         Web Inspector: Crash when using a stale InspectableNode Node
92         https://bugs.webkit.org/show_bug.cgi?id=134849
93
94         Reviewed by Timothy Hatcher.
95
96         * inspector/PageConsoleAgent.cpp:
97
98 2014-07-11  Jer Noble  <jer.noble@apple.com>
99
100         [MSE] Separate MediaSource logging into its own log channel
101         https://bugs.webkit.org/show_bug.cgi?id=134809
102
103         Reviewed by Eric Carlson.
104
105         Separate out MediaSource logging (which can be quite verbose) into its own log channel,
106         distinct from the Media log channel. Add some per-sample logging and further sequester that
107         logging into its own MediaSourceSamples log channel.
108
109         Add the MediaSource and MediaSourceSamples channels:
110         * platform/Logging.h:
111
112         Move LOG(Media) -> LOG(MediaSource):
113         * Modules/mediasource/MediaSource.cpp:
114         (WebCore::MediaSource::MediaSource):
115         (WebCore::MediaSource::~MediaSource):
116         (WebCore::MediaSource::setReadyState):
117         (WebCore::MediaSource::addSourceBuffer):
118         (WebCore::MediaSource::removeSourceBuffer):
119         (WebCore::MediaSource::isTypeSupported):
120         * Modules/mediasource/SourceBuffer.cpp:
121         (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime):
122         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
123         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
124         (WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
125         (WebCore::SourceBuffer::provideMediaData):
126         (WebCore::SourceBuffer::monitorBufferingRate):
127         (WebCore::SourceBuffer::textTrackAddCues):
128         (WebCore::SourceBuffer::hasFutureTime):
129         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
130         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
131         (WebCore::SourceBufferPrivateAVFObjC::didFailToParseStreamDataWithError):
132         (WebCore::SourceBufferPrivateAVFObjC::processCodedFrame):
133         (WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
134         (WebCore::SourceBufferPrivateAVFObjC::append):
135         (WebCore::SourceBufferPrivateAVFObjC::layerDidReceiveError):
136         (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError):
137         (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples):
138         (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
139
140 2014-07-11  Brady Eidson  <beidson@apple.com>
141
142         Phone numbers that span two lines are not detected.
143         <rdar://problem/17601146> and https://bugs.webkit.org/show_bug.cgi?id=134808
144
145         Reviewed by Tim Horton.
146
147         * editing/Editor.cpp:
148         (WebCore::Editor::scanSelectionForTelephoneNumbers): After scanning a range from the TextIterator,
149             create an "edge range" window around the end of the TextIterator range, and scan it.
150             Also make sure to not accumulate duplicate ranges that might have showed up in both the
151             TextIterator range and the edge window range.
152
153 2014-07-11  Enrica Casucci  <enrica@apple.com>
154
155         Implement textStylingAtPosition in WK2.
156         https://bugs.webkit.org/show_bug.cgi?id=134843
157         <rdar://problem/17614981>
158         
159         Reviewed by Benjamin Poulain.
160
161         Adding some exports and making styleForSelectionStart public.
162
163         * WebCore.exp.in:
164         * editing/Editor.h:
165
166 2014-07-11  Zalan Bujtas  <zalan@apple.com>
167
168         REGRESSION (r168868): eBay 'see all' links fail due to different JS bindings conversion behavior.
169         https://bugs.webkit.org/show_bug.cgi?id=134841
170         <rdar://problem/17577563>
171
172         Reviewed by Simon Fraser.
173
174         Revert back to type int for Element.scroll* APIs in order to preserve exception handling
175         behavior.
176
177         Test: cssom/non-subpixel-scroll-top-left-values.html
178
179         * dom/Element.cpp:
180         (WebCore::Element::scrollLeft):
181         (WebCore::Element::scrollTop):
182         (WebCore::Element::setScrollLeft):
183         (WebCore::Element::setScrollTop):
184         (WebCore::Element::scrollWidth):
185         (WebCore::Element::scrollHeight):
186         * dom/Element.h:
187         * dom/Element.idl:
188         * html/HTMLBodyElement.cpp:
189         (WebCore::adjustForZoom):
190         (WebCore::HTMLBodyElement::scrollLeft):
191         (WebCore::HTMLBodyElement::setScrollLeft):
192         (WebCore::HTMLBodyElement::scrollTop):
193         (WebCore::HTMLBodyElement::setScrollTop):
194         (WebCore::HTMLBodyElement::scrollHeight):
195         (WebCore::HTMLBodyElement::scrollWidth):
196         * html/HTMLBodyElement.h:
197
198 2014-07-11  Joseph Pecoraro  <pecoraro@apple.com>
199
200         Web Inspector: Debugger Pause button does not work
201         https://bugs.webkit.org/show_bug.cgi?id=134785
202
203         Reviewed by Timothy Hatcher.
204
205         * CMakeLists.txt:
206         * DerivedSources.make:
207         * inspector/CommandLineAPIModuleSource.js:
208         Minification strips the sourceURL command. Add it back with minification.
209
210 2014-07-11  Andreas Kling  <akling@apple.com>
211
212         Use the bare minimum tile coverage rect when under memory pressure.
213         <https://webkit.org/b/134837>
214
215         When the browser is under critical memory pressure, don't generate any
216         more tiles than are needed to cover the exposed viewport rect.
217
218         Reviewed by Pratik Solanki.
219
220         * page/FrameView.cpp:
221         (WebCore::FrameView::computeCoverageRect):
222
223 2014-07-11  Javier Fernandez  <jfernandez@igalia.com>
224
225         [CSS Grid Layout] Implement justify-self css property
226         https://bugs.webkit.org/show_bug.cgi?id=134419
227
228         Reviewed by Dean Jackson.
229
230         This change adds the justify-self property from CSS 3 Box Alignment
231         and implements the parsing.
232
233         From Blink r164685 by <jchaffraix@chromium.org>
234
235         Test: fast/css/parse-justify-self.html
236
237         * css/CSSComputedStyleDeclaration.cpp:
238         (WebCore::ComputedStyleExtractor::propertyValue):
239         * css/CSSParser.cpp:
240         (WebCore::isValidKeywordPropertyAndValue):
241         (WebCore::CSSParser::parseValue):
242         (WebCore::isItemPositionKeyword):
243         (WebCore::CSSParser::parseJustifySelf):
244         * css/CSSParser.h:
245         * css/CSSPrimitiveValueMappings.h:
246         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
247         (WebCore::CSSPrimitiveValue::operator EJustifySelf):
248         (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment):
249         * css/CSSPropertyNames.in:
250         * css/CSSValueKeywords.in:
251         * css/DeprecatedStyleBuilder.cpp:
252         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
253         * css/StyleResolver.cpp:
254         (WebCore::StyleResolver::applyProperty):
255         * rendering/style/RenderStyle.h:
256         * rendering/style/RenderStyleConstants.h:
257         * rendering/style/StyleRareNonInheritedData.cpp:
258         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
259         (WebCore::StyleRareNonInheritedData::operator==):
260         * rendering/style/StyleRareNonInheritedData.h:
261
262 2014-07-11  Bear Travis  <betravis@adobe.com>
263
264         [Feature Queries] Feature Query CSS Grammar Productions Should Return a Value
265         https://bugs.webkit.org/show_bug.cgi?id=134810
266
267         Reviewed by Antti Koivisto.
268
269         The parsing return values are used to determine if a feature query is valid. Two
270         grammar productions have been updated to correctly return a value.
271
272         Tests exist for this feature but will not be run until the feature is turned on.
273         See https://bugs.webkit.org/show_bug.cgi?id=134404.
274
275         * css/CSSGrammar.y.in: Adding return values for two valid feature query productions.
276
277 2014-07-10  Brent Fulgham  <bfulgham@apple.com>
278
279         Use a separate backdrop element to allow cues to have highlight and background color
280         https://bugs.webkit.org/show_bug.cgi?id=134821
281         <rdar://problem/15999721>
282
283         Reviewed by Eric Carlson.
284
285         Add a new <div> element wrapping the existing cue <span>. This allows
286         us to have a highlight on the cue (in the <span> background), as well
287         as an overall background color.
288
289         * Modules/mediacontrols/mediaControlsApple.css:
290         (video::-webkit-media-text-track-display-backdrop): New markup for
291         the backdrop element of the caption.
292         * html/track/VTTCue.cpp:
293         (WebCore::VTTCue::cueBackdropShadowPseudoId): Added to
294         allow user customization of the cue backdrop.
295         (WebCore::VTTCue::initialize): Rename the old "m_cueBackgroundBox" to
296         "m_cueHighlightBox" and add a new "m_cueBackdropBox" member.
297         (WebCore::VTTCue::updateDisplayTree): Update for m_cueHighlightBox.
298         (WebCore::VTTCue::getDisplayTree): Make m_cueHighlightBox a child
299         of the new m_cueBackdropBox element, and add m_cueBackdropBox to
300         the display tree.
301         * html/track/VTTCue.h:
302         (WebCore::VTTCue::element):
303         * page/CaptionUserPreferencesMediaAF.cpp:
304         (WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges):
305         Fix for missing caption style updates. Even if we are already
306         listening for caption changes, we still want to update the new
307         instance's style sheet to match.
308         (WebCore::CaptionUserPreferencesMediaAF::captionsStyleSheetOverride):
309         * rendering/RenderVTTCue.cpp:
310         (WebCore::RenderVTTCue::initializeLayoutParameters): Take the new
311         <div> into consideration when looking for the Cue text element.
312
313 2014-07-11  Zalan Bujtas  <zalan@apple.com>
314
315         Subpixel layout: return integral results for offset*, client*, scroll* by default.
316         https://bugs.webkit.org/show_bug.cgi?id=134651
317
318         Reviewed by Simon Fraser.
319
320         Revert to returning integral values for Element.offset* client* scroll* by default.
321         Fractional values break number of sites(tight design) and JS frameworks(fail to handle fractional values).
322
323         Since snapped dimension depends on both the original point and the width/height of the box,
324         we need to call RenderBoxModelObject::pixelSnapped*() helpers, instead of round().
325
326         Covered by existing tests
327  
328         * dom/Element.cpp:
329         (WebCore::subpixelMetricsEnabled):
330         (WebCore::convertToNonSubpixelValueIfNeeded):
331         (WebCore::Element::offsetLeft):
332         (WebCore::Element::offsetTop):
333         (WebCore::Element::offsetWidth):
334         (WebCore::Element::offsetHeight):
335         (WebCore::Element::clientLeft):
336         (WebCore::Element::clientTop):
337         (WebCore::Element::clientWidth):
338         (WebCore::Element::clientHeight):
339         * page/Settings.in:
340
341 2014-07-11  Zalan Bujtas  <zalan@apple.com>
342
343         Subpixel rendering: icloud.com password arrow has clipped circle at some window sizes.
344         https://bugs.webkit.org/show_bug.cgi?id=134824
345         <rdar://problem/17612729>
346
347         Reviewed by Simon Fraser.
348
349         Transparent layer clipping needs device pixel offset adjusting.
350
351         Test: fast/layers/wrong-clipping-semi-transparent-compositing-layer-on-subpixel-position.html
352
353         * rendering/RenderLayer.cpp:
354         (WebCore::RenderLayer::beginTransparencyLayers):
355         (WebCore::RenderLayer::paintLayer):
356         (WebCore::RenderLayer::paintLayerContents):
357         (WebCore::RenderLayer::paintBackgroundForFragments):
358         (WebCore::RenderLayer::paintForegroundForFragments):
359         * rendering/RenderLayer.h:
360
361 2014-07-11  Carlos Garcia Campos  <cgarcia@igalia.com>
362
363         Unreviewed. Remove unused file.
364
365         * html/shadow/MediaControlsGtk.h: Removed.
366
367 2014-07-11  Manuel Rego Casasnovas  <rego@igalia.com>
368
369         [CSS Grid Layout] Update grid-auto-flow to the new syntax
370         https://bugs.webkit.org/show_bug.cgi?id=134057
371
372         Reviewed by Sergio Villar Senin.
373
374         In last versions of the spec grid-auto-flow syntax has changed. New
375         syntax is:
376         [ row | column ] && dense? | stack && [ row | column ]?
377
378         Implemented parsing for new syntax and added/modified test cases in
379         current layout tests.
380
381         For the moment, the implementation keeps working in the same way, but
382         using "stack" value for grid-auto-flow property instead of "none". This
383         should be fixed in a follow-up patch once "stack" is properly
384         implemented.
385
386         Also "dense" needs to be reviewed. Right now auto-placement algorithm is
387         always "dense" and never "sparse".
388
389         No new tests, update current tests to add new cases.
390
391         * css/CSSComputedStyleDeclaration.cpp:
392         (WebCore::ComputedStyleExtractor::propertyValue): Adapt to new syntax.
393         * css/CSSParser.cpp:
394         (WebCore::isValidKeywordPropertyAndValue): Removed grid-auto-flow as it
395         is not a keyword anymore.
396         (WebCore::isKeywordPropertyID): Ditto.
397         (WebCore::CSSParser::parseValue): Add specific method for parsing
398         grid-auto-flow.
399         (WebCore::CSSParser::parseGridShorthand): Adapt parsing for
400         grid-auto-flow property inside the shorthand.
401         (WebCore::isValidGridAutoFlowId): Helper method to check if the CSSValue
402         id is a valid keyword for grid-auto-flow property.
403         (WebCore::CSSParser::parseGridAutoFlow): Implement new parsing for
404         grid-auto-flow.
405         * css/CSSParser.h: Method header for grid-auto-flow parsing.
406         * css/CSSPrimitiveValueMappings.h:
407         (WebCore::CSSPrimitiveValue::operator GridAutoFlow): Deleted.
408         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Deleted.
409         * css/CSSValueKeywords.in: Add new keywords required by grid-auto-flow:
410         "dense" and "stack".
411         * css/DeprecatedStyleBuilder.cpp:
412         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Remove
413         default handler as grid-auto-flow is not a keyword now.
414         * css/StyleResolver.cpp:
415         (WebCore::StyleResolver::applyProperty): Implement particular handler
416         for new grid-auto-flow syntax.
417         * rendering/RenderGrid.cpp:
418         (WebCore::RenderGrid::placeItemsOnGrid): Keep old "none" behavior as
419         "stack" behavior for the moment.
420         (WebCore::RenderGrid::autoPlacementMajorAxisDirection): Use the new
421         helper methods in RenderStyle.
422         (WebCore::RenderGrid::autoPlacementMinorAxisDirection): Ditto.
423         * rendering/style/GridResolvedPosition.cpp:
424         (WebCore::GridResolvedPosition::resolveGridPositionsFromStyle): Again
425         keep old "none" behavior for "stack".
426         * rendering/style/RenderStyle.h: Add new helper methods to know the
427         direction and algorithm of grid-auto-flow property.
428         * rendering/style/RenderStyleConstants.h: Redefine GridAutoFlow enum
429         using flags for algorithm and direction.
430         * rendering/style/StyleGridData.h: Change m_gridAutoFlow type to
431         unsigned.
432
433 2014-07-10  Myles C. Maxfield  <mmaxfield@apple.com>
434
435         [iOS] Pasting rich content does not perform a two-step paste
436         https://bugs.webkit.org/show_bug.cgi?id=134795
437
438         Reviewed by Benjamin Poulain.
439
440         UIKit requires writing something (anything!) to a particular pasteboard
441         during copy in order to flag the content as rich. When a paste occurs,
442         UIKit will read this flag and perform a two-step paste.
443
444         Test: platform/ios-sim/editing/pasteboard/two-step-paste.html
445
446         * platform/ios/PlatformPasteboardIOS.mm:
447         (WebCore::PlatformPasteboard::write):
448
449 2014-07-09  Andy Estes  <aestes@apple.com>
450
451         [iOS] Some QuickLook documents are not displayed as previews
452         https://bugs.webkit.org/show_bug.cgi?id=134788
453         <rdar://problem/17278194>
454
455         Reviewed by Pratik Solanki.
456
457         ResourceRequest::isMainResourceRequest() is not reliable (e.g. ResourceRequests reconstituted from an
458         NSURLRequest have no way to set this bit properly) and should probably be removed. Instead of using
459         isMainResourceRequest() to check if a QuickLookHandle should be created when the Network Process is in use,
460         just check if the current ResourceLoader is the same as the DocumentLoader's ResourceLoader.
461
462         No new tests. QuickLook is not testable from WebKit.
463
464         * platform/network/ios/QuickLook.mm:
465         (WebCore::QuickLookHandle::create):
466
467 2014-07-10  Andreas Kling  <akling@apple.com>
468
469         [iOS WebKit2] Don't uninstall the memory pressure listener after first signal.
470         <https://webkit.org/b/134814>
471
472         The call to uninstall() should not be made on iOS since iOS doesn't use the
473         hold-off mechanism in MemoryPressureHandler.
474
475         Reviewed by Benjamin Poulain.
476
477         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
478         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
479
480 2014-07-10  Jer Noble  <jer.noble@apple.com>
481
482         [MSE] Overlapping appended ranges must cause the decoder to flush and re-enqueue.
483         https://bugs.webkit.org/show_bug.cgi?id=134805
484
485         Reviewed by Eric Carlson.
486
487         When appending a range of media data which overlaps with an existing range, SourceBuffer
488         must cause the decoder to flush and re-enqueue samples. Those samples removed by appending
489         the overlapping range may have already been enqueued for display, and unless the decode
490         queue is flushed, corruption or decode errors may occur as the new samples are enqueued for
491         display.
492
493         Add a boolean flag onto TrackBuffer to indicate whether the decoder needs to be flushed and
494         re-enqueued the next time an append operation completes. Set this flag whenever samples are
495         removed due to overlapping or an explicit call to removeCodedFrames(). Move the contents of
496         sourceBufferPrivateSeekToTime() (which previously did flushing and re-enqueueing) into a new
497         function, reenqueueMediaForTime(), which can be called from sourceBufferPrivateAppendComplete().
498
499         Drive-by fix: findSyncSampleAfterDecodeIterator() would return the passed in iterator if that
500         sample is a sync-sample. Fix this to correctly return the next sync sample.
501
502         Drive-by fix: Use a SampleMap, rather than a DecodeOrderSampleMap, to track erased samples
503         so that the erasedSamples are correctly accounted for in both presentation and decode orders.
504
505         * Modules/mediasource/SampleMap.cpp:
506         (WebCore::SampleMap::empty): Add convenience method.
507         (WebCore::DecodeOrderSampleMap::findSyncSampleAfterDecodeIterator): Drive-by fix.
508         * Modules/mediasource/SampleMap.h:
509         (WebCore::SampleMap::decodeOrder): Added const accessor.
510         (WebCore::SampleMap::presentationOrder): Ditto.
511         (WebCore::SampleMap::addRange): Added.
512         * Modules/mediasource/SourceBuffer.cpp:
513         (WebCore::SourceBuffer::TrackBuffer::TrackBuffer): Add needsReenqueeing flag.
514         (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime): Move contents into reenqueueMediaForTime().
515         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Call reenqueMediaForTime() if necessary.
516         (WebCore::SourceBuffer::removeCodedFrames): Set needsReenqueing.
517         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Ditto.
518         (WebCore::SourceBuffer::provideMediaData): Drive-by fix.
519         (WebCore::SourceBuffer::reenqueueMediaForTime): Moved from sourceBufferPrivateSeekToTime().
520         * Modules/mediasource/SourceBuffer.h:
521
522 2014-07-10  Pratik Solanki  <psolanki@apple.com>
523
524         ASSERT in SharedBuffer::maybeAppendDataArray() on MobileSafari launch
525         https://bugs.webkit.org/show_bug.cgi?id=134812
526         <rdar://problem/17628434>
527
528         Reviewed by Joseph Pecoraro.
529
530         Fix bug in my fix in r170930. Initialize the badly named m_shouldUsePurgeableMemory field to
531         false. This field indicates when it is okay to use purgeable memory and is set to true once
532         the resource is finished loading. By setting it to true in the constructor we were creating
533         purgeable memory while the resource was still being loaded and this triggered the assert.
534
535         No new tests. Should be covered by existing tests.
536
537         * platform/cf/SharedBufferCF.cpp:
538         (WebCore::SharedBuffer::SharedBuffer):
539
540 2014-07-10  Andreas Kling  <akling@apple.com>
541
542         [iOS WebKit2] Some memory pressure relief tweaks.
543         <https://webkit.org/b/134811>
544
545         Split memory pressure relief into critical and non-critical sections.
546         Non-critical relief is for clearing out things that are really not
547         essential, e.g unused font data, text measurement caches, etc.
548
549         On iOS, only flip the "WebKit is under memory pressure" flag when we
550         are under *critical* memroy pressure, rather than doing it early on
551         and gimping ourselves because other processes are too big.
552
553         Also added logging for when we transition in/out of system pressure.
554
555         Reviewed by Geoffrey Garen.
556
557         * platform/MemoryPressureHandler.cpp:
558         (WebCore::MemoryPressureHandler::releaseNoncriticalMemory):
559         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
560         (WebCore::MemoryPressureHandler::releaseMemory):
561         * platform/MemoryPressureHandler.h:
562         (WebCore::MemoryPressureHandler::ReliefLogger::loggingEnabled):
563         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
564         (WebCore::MemoryPressureHandler::install):
565
566 2014-07-10  Beth Dakin  <bdakin@apple.com>
567
568         Need Setting/WKPreference that allows clients to prevent scrollbars from drawing 
569         on a secondary thread
570         https://bugs.webkit.org/show_bug.cgi?id=134778
571         -and corresponding-
572         <rdar://problem/17595333>
573
574         Reviewed by Tim Horton.
575
576         This is a requirement for some types of performance tests. The patch adds a new 
577         virtual function to ScrollableArea that forces subclasses to indicate the value of 
578         the Setting. This is required because Scrollbar and ScrollableArea can’t get to 
579         Settings on their own.
580
581         * page/FrameView.cpp:
582         (WebCore::FrameView::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
583         * page/FrameView.h:
584         * page/Settings.in:
585         * platform/ScrollableArea.h:
586         * platform/Scrollbar.cpp:
587         (WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
588         * platform/win/PopupMenuWin.h:
589         * rendering/RenderLayer.cpp:
590         (WebCore::RenderLayer::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
591         * rendering/RenderLayer.h:
592         * rendering/RenderListBox.cpp:
593         (WebCore::RenderListBox::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
594         * rendering/RenderListBox.h:
595
596 2014-07-10  Brady Eidson  <beidson@apple.com>
597
598         Phone number highlights should always be visible if the mouse hovers over.
599         <rdar://problem/17527476> and https://bugs.webkit.org/show_bug.cgi?id=134784
600
601         Reviewed by Tim Horton.
602
603         * WebCore.exp.in:
604
605 2014-07-10  Timothy Horton  <timothy_horton@apple.com>
606
607         Assertions or crashes under _takeViewSnapshot when restoring windows
608         https://bugs.webkit.org/show_bug.cgi?id=134792
609
610         Reviewed by Simon Fraser.
611
612         * platform/graphics/cocoa/IOSurface.mm:
613         (IOSurface::createFromImage):
614
615 2014-07-10  Youenn Fablet  <youenn.fablet@crf.canon.fr>
616
617         [XHR] overrideMimeType() should be able to change encoding in HEADERS RECEIVED state
618         https://bugs.webkit.org/show_bug.cgi?id=128968
619
620         Reviewed by Alexey Proskuryakov.
621
622         Moved response encoding computation from didReceiveResponse to didReceiveData, just before the decoder is instantiated.
623         This allows overrideMimeType to be changed within readystatechange event callback and have an impact on selected encoding.
624
625         Test: http/tests/xmlhttprequest/overridemimetype-headers-received-state-force-shiftjis.html
626
627         * xml/XMLHttpRequest.cpp:
628         (WebCore::XMLHttpRequest::didReceiveResponse): Removed m_responseEncoding computation from response and mimeTypeOverride.
629         (WebCore::XMLHttpRequest::didReceiveData): Added m_responseEncoding computation from response and mimeTypeOverride.
630
631 2014-07-09  Brady Eidson  <beidson@apple.com>
632
633         Fire connected/disconnected events for Gamepads.
634         https://bugs.webkit.org/show_bug.cgi?id=134386
635
636         Reviewed by Dean Jackson.
637
638         No new tests (No effect in a currently tested config)
639
640         * Modules/gamepad/GamepadManager.cpp:
641         (WebCore::navigatorGamepadFromDOMWindow): Handling converting a possibly-null Navigator into
642             a possibly null NavigatorGamepad.
643         (WebCore::GamepadManager::platformGamepadConnected): Notify blind Navigator/DOMWindows of all
644             previously attached Gamepads, then notify everybody of this new gamepad.
645         (WebCore::GamepadManager::platformGamepadDisconnected): Handle dispatching the disconnected
646             event to all registered DOMWindows.
647         (WebCore::GamepadManager::platformGamepadInputActivity): Notify blind Navigator/DOMWindows of all
648             attached Gamepads.
649         (WebCore::GamepadManager::makeGamepadVisible): Handles notifying setting up a new gamepads
650             with all NavigatorGamepads as well as dispatching the connected even to DOMWindows.
651         (WebCore::GamepadManager::registerDOMWindow):
652         (WebCore::GamepadManager::unregisterDOMWindow):
653         (WebCore::GamepadManager::makeGamepadsVisibileToBlindNavigators): Deleted.
654         * Modules/gamepad/GamepadManager.h:
655
656         * Modules/gamepad/NavigatorGamepad.cpp:
657         (WebCore::NavigatorGamepad::gamepadAtIndex):
658         * Modules/gamepad/NavigatorGamepad.h:
659
660 2014-07-09  Benjamin Poulain  <bpoulain@apple.com>
661
662         [iOS][WK2] Disable text quantization while actively changing the page's scale factor
663         https://bugs.webkit.org/show_bug.cgi?id=134781
664
665         Reviewed by Tim Horton and Myles C. Maxfield.
666
667         Query the chrome client to setup quantization on each layers.
668
669         * page/ChromeClient.h:
670         (WebCore::ChromeClient::hasStablePageScaleFactor):
671         * platform/graphics/mac/FontMac.mm:
672         (WebCore::Font::drawGlyphs):
673         * rendering/RenderLayer.cpp:
674         (WebCore::RenderLayer::setupFontSubpixelQuantization):
675
676 2014-07-09  peavo@outlook.com  <peavo@outlook.com>
677
678         [Curl] Cache entry invalidated too early.
679         https://bugs.webkit.org/show_bug.cgi?id=134681
680
681         Reviewed by Alex Christensen.
682
683         When a cache entry has expired, it is invalidated when a request for the corresponding url is started.
684         This is too early, since the resource is possibly not modified (even though it has expired),
685         and the server might respond with a 304 (not modified) response.
686         When we then receive a 304 response, the cache entry is deleted, and we have no cached response/data to provide.
687         This can be solved by not invalidating the entry when a request for that url is started,
688         but instead invalidate when a 200 OK response is received (which means the resource has been modified).
689
690         * platform/network/curl/CurlCacheManager.cpp:
691         (WebCore::CurlCacheManager::isCached): Avoid invalidating cache entry when it has expired, wait until we know the server response.
692         * platform/network/curl/CurlCacheManager.h: Added const modifier.
693
694 2014-07-09  Myles C. Maxfield  <mmaxfield@apple.com>
695
696         Revert r170413 and r170390
697         https://bugs.webkit.org/show_bug.cgi?id=134741
698
699         Reviewed by Benjamin Poulain.
700
701         These patches caused a variety of failures. I'm going to break them up into
702         smaller chunks and commit them separately at some point in the future.
703
704         Requesting a review from Ben Poulain because there were some conflicts with
705         r170561 in InlineTextBox.cpp and InlineTextBox.h.
706
707         * WebCore.exp.in:
708         * platform/graphics/Font.cpp:
709         (WebCore::Font::drawText):
710         (WebCore::Font::drawEmphasisMarks):
711         (WebCore::Font::adjustSelectionRectForText):
712         (WebCore::computeUnderlineType):
713         * platform/graphics/Font.h:
714         * platform/graphics/FontFastPath.cpp:
715         (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
716         (WebCore::Font::drawSimpleText):
717         (WebCore::Font::drawEmphasisMarksForSimpleText):
718         (WebCore::Font::drawGlyphBuffer):
719         (WebCore::Font::drawEmphasisMarks):
720         (WebCore::Font::adjustSelectionRectForSimpleText):
721         * platform/graphics/GlyphBuffer.h:
722         (WebCore::GlyphBuffer::size):
723         (WebCore::GlyphBuffer::glyphs):
724         (WebCore::GlyphBuffer::advances):
725         (WebCore::GlyphBuffer::fontDataAt):
726         (WebCore::GlyphBuffer::advanceAt):
727         (WebCore::GlyphBuffer::offsetAt):
728         (WebCore::GlyphBuffer::reverse):
729         (WebCore::GlyphBuffer::offsetInString):
730         (WebCore::GlyphBuffer::swap):
731         * platform/graphics/GraphicsContext.cpp:
732         * platform/graphics/Latin1TextIterator.h:
733         (WebCore::Latin1TextIterator::Latin1TextIterator):
734         (WebCore::Latin1TextIterator::currentCharacter):
735         * platform/graphics/SimpleFontData.h:
736         * platform/graphics/SurrogatePairAwareTextIterator.cpp:
737         (WebCore::SurrogatePairAwareTextIterator::SurrogatePairAwareTextIterator):
738         * platform/graphics/SurrogatePairAwareTextIterator.h:
739         (WebCore::SurrogatePairAwareTextIterator::currentCharacter):
740         * platform/graphics/TextRun.h:
741         (WebCore::TextRun::length):
742         (WebCore::TextRun::charactersLength):
743         * platform/graphics/WidthIterator.cpp:
744         (WebCore::WidthIterator::glyphDataForCharacter):
745         (WebCore::applyFontTransforms):
746         (WebCore::WidthIterator::advanceInternal):
747         (WebCore::WidthIterator::advance):
748         (WebCore::WidthIterator::advanceOneCharacter):
749         * platform/graphics/WidthIterator.h:
750         * platform/graphics/cairo/FontCairo.cpp:
751         (WebCore::Font::drawGlyphs):
752         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
753         (WebCore::Font::drawComplexText):
754         (WebCore::Font::drawEmphasisMarksForComplexText):
755         (WebCore::Font::adjustSelectionRectForComplexText):
756         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
757         (WebCore::HarfBuzzShaper::setNormalizedBuffer):
758         * platform/graphics/mac/FontComplexTextMac.cpp:
759         (WebCore::Font::adjustSelectionRectForComplexText):
760         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
761         (WebCore::Font::drawComplexText):
762         (WebCore::Font::drawEmphasisMarksForComplexText):
763         * platform/graphics/mac/FontMac.mm:
764         (WebCore::Font::drawGlyphs):
765         * platform/graphics/win/FontCGWin.cpp:
766         (WebCore::Font::drawGlyphs):
767         * platform/graphics/win/FontWin.cpp:
768         (WebCore::Font::adjustSelectionRectForComplexText):
769         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
770         (WebCore::Font::drawComplexText):
771         (WebCore::Font::drawEmphasisMarksForComplexText):
772         * platform/graphics/wince/FontWinCE.cpp:
773         (WebCore::Font::drawGlyphs):
774         (WebCore::Font::drawComplexText):
775         (WebCore::Font::drawEmphasisMarksForComplexText):
776         (WebCore::Font::selectionRectForComplexText):
777         * rendering/InlineTextBox.cpp:
778         (WebCore::InlineTextBox::isSelected):
779         (WebCore::InlineTextBox::selectionState):
780         (WebCore::InlineTextBox::localSelectionRect):
781         (WebCore::InlineTextBox::paint):
782         (WebCore::InlineTextBox::selectionStartEnd):
783         (WebCore::InlineTextBox::paintSelection):
784         (WebCore::InlineTextBox::paintCompositionBackground):
785         (WebCore::InlineTextBox::paintDocumentMarker):
786         (WebCore::InlineTextBox::paintTextMatchMarker):
787         (WebCore::InlineTextBox::computeRectForReplacementMarker):
788         (WebCore::InlineTextBox::paintCompositionUnderline):
789         (WebCore::InlineTextBox::positionForOffset):
790         (WebCore::InlineTextBox::constructTextRun):
791         * rendering/InlineTextBox.h:
792         (WebCore::InlineTextBox::truncation):
793         * rendering/RenderCombineText.cpp:
794         (WebCore::RenderCombineText::getStringToRender):
795         * rendering/RenderCombineText.h:
796         * rendering/RenderTextLineBoxes.cpp:
797         (WebCore::ellipsisRectForBox):
798         * rendering/svg/SVGInlineFlowBox.cpp:
799         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
800         * rendering/svg/SVGInlineTextBox.cpp:
801         (WebCore::SVGInlineTextBox::positionForOffset):
802         (WebCore::SVGInlineTextBox::localSelectionRect):
803         (WebCore::SVGInlineTextBox::paintSelectionBackground):
804         (WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
805         (WebCore::SVGInlineTextBox::paintText):
806         * rendering/svg/SVGInlineTextBox.h:
807         * rendering/svg/SVGTextMetricsBuilder.cpp:
808         (WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair):
809         (WebCore::SVGTextMetricsBuilder::advance):
810         * rendering/svg/SVGTextQuery.cpp:
811         (WebCore::SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates):
812         (WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
813         (WebCore::SVGTextQuery::subStringLengthCallback):
814         (WebCore::SVGTextQuery::startPositionOfCharacterCallback):
815         (WebCore::SVGTextQuery::endPositionOfCharacterCallback):
816         (WebCore::SVGTextQuery::rotationOfCharacterCallback):
817         (WebCore::SVGTextQuery::extentOfCharacterCallback):
818         (WebCore::SVGTextQuery::characterNumberAtPositionCallback):
819         * rendering/svg/SVGTextQuery.h:
820         * rendering/svg/SVGTextRunRenderingContext.cpp:
821         (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
822         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
823         * rendering/svg/SVGTextRunRenderingContext.h:
824         * svg/SVGFontData.cpp:
825         (WebCore::SVGFontData::applySVGGlyphSelection):
826         * svg/SVGFontData.h:
827
828 2014-07-08  Jeffrey Pfau  <jpfau@apple.com>
829
830         Fix flaky loading tests
831         https://bugs.webkit.org/show_bug.cgi?id=133696
832
833         Reviewed by Ryosuke Niwa.
834
835         In some cases, the Frame may be destroyed while the loader is
836         initializing. Make sure we don't delete it too early.
837
838         * loader/FrameLoader.cpp:
839         (WebCore::FrameLoader::init):
840
841 2014-07-09  Simon Fraser  <simon.fraser@apple.com>
842
843         Make IndirectCompositingReason an enum class
844         https://bugs.webkit.org/show_bug.cgi?id=134789
845
846         Reviewed by Tim Horton.
847
848         Make RenderLayer::IndirectCompositingReason an enum class, and change some code
849         in RenderLayerCompositor::reasonsForCompositing() to use a switch.
850
851         * rendering/RenderLayer.cpp:
852         (WebCore::RenderLayer::RenderLayer):
853         * rendering/RenderLayer.h:
854         * rendering/RenderLayerCompositor.cpp:
855         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
856         (WebCore::RenderLayerCompositor::requiresOwnBackingStore):
857         (WebCore::RenderLayerCompositor::reasonsForCompositing):
858         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason):
859
860 2014-07-09  Pratik Solanki  <psolanki@apple.com>
861
862         Make SharedBuffer::append(SharedBuffer*) be smarter about CFData and data arrays
863         https://bugs.webkit.org/show_bug.cgi?id=134731
864
865         Reviewed by Antti Koivisto.
866
867         If the target SharedBuffer has a CFDataRef or a data array then we can simply retain that
868         CFDataRef or data array elements in the SharedBuffer being appended to. This avoids
869         unnecessary copying.
870
871         No new tests because no functional changes.
872
873         * platform/SharedBuffer.cpp:
874         (WebCore::SharedBuffer::append):
875         (WebCore::SharedBuffer::maybeAppendPlatformData):
876         * platform/SharedBuffer.h:
877         * platform/cf/SharedBufferCF.cpp:
878         (WebCore::SharedBuffer::maybeAppendPlatformData):
879         (WebCore::SharedBuffer::maybeAppendDataArray):
880         * platform/soup/SharedBufferSoup.cpp:
881         (WebCore::SharedBuffer::maybeAppendPlatformData):
882
883 2014-07-09  Brent Fulgham  <bfulgham@apple.com>
884
885         [Win] Remove uses of 'bash' in build system
886         https://bugs.webkit.org/show_bug.cgi?id=134782
887         <rdar://problem/17615533>
888
889         Reviewed by Dean Jackson.
890
891         Remove uses of 'bash' by replacing Windows-specific bash scripts
892         with Perl equivalents.
893
894         * WebCore.vcxproj/WebCoreGenerated.make:
895         * WebCore.vcxproj/WebCoreGenerated.vcxproj:
896         * WebCore.vcxproj/WebCoreGenerated.vcxproj.filters:
897         * WebCore.vcxproj/WebCorePreBuild.cmd:
898         * WebCore.vcxproj/build-generated-files.pl: Copied from Source/WebCore/WebCore.vcxproj/build-generated-files.sh.
899         * WebCore.vcxproj/build-generated-files.sh: Removed.
900         * WebCore.vcxproj/migrate-scripts.pl: Copied from Source/WebCore/WebCore.vcxproj/migrate-scripts.sh.
901         * WebCore.vcxproj/migrate-scripts.sh: Removed.
902
903 2014-07-09  Anders Carlsson  <andersca@apple.com>
904
905         Support transparent WKWebViews
906         https://bugs.webkit.org/show_bug.cgi?id=134779
907         <rdar://problem/17351058>
908
909         Reviewed by Tim Horton.
910
911         Schedule rebuilding the compositing layers if a FrameView's transparency changes.
912
913         * page/FrameView.cpp:
914         (WebCore::FrameView::setTransparent):
915
916 2014-07-09  Javier Fernandez  <jfernandez@igalia.com>
917         CSS canvas color parsing accepts invalid color identifiers
918         https://bugs.webkit.org/show_bug.cgi?id=134661
919
920         Reviewed by Benjamin Poulain.
921
922         Current implementation of the CSSParser::parseSystemColor assumes
923         that if a valid cssValueKeywordID is got then it has to be a valid
924         color. Such assumption is wrong and lead to many bugs and layout
925         test failures.
926
927         The parseSystemFunction determines now whether the parsed color is
928         valid or not.
929
930         Addtionally, a new method has been added to share the logic of
931         determining whether a CSSValueID is a valid primitive values for
932         colors or not. Generally, we should avoid passing invalid color
933         identifiers to the theming API.
934
935         No new tests, but added additional cases to the
936         canvas-color-serialization.html, test-setting-canvas-color and
937         rgb-color-parse test.
938
939         * css/CSSParser.cpp:
940         (WebCore::validPrimitiveValueColor): Added.
941         (WebCore::parseColorValue):
942         (WebCore::CSSParser::parseSystemColor):
943
944 2014-06-28  Jer Noble  <jer.noble@apple.com>
945
946         [MSE] http/tests/media/media-source/mediasource-remove.html is failing
947         https://bugs.webkit.org/show_bug.cgi?id=134768
948
949         Reviewed by Eric Carlson.
950
951         Fix multiple bugs causing mediasource-remove.html to fail:
952
953         Separate out setDuration() into setDurationInternal() so that steps which require
954         us to run the "duration change algorithm" don't bail out if the SoureBuffer is
955         inside updating().
956
957         * Modules/mediasource/MediaSource.cpp:
958         (WebCore::MediaSource::setDuration):
959         (WebCore::MediaSource::setDurationInternal):
960         * Modules/mediasource/MediaSource.h:
961         * Modules/mediasource/SourceBuffer.cpp:
962         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
963         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
964
965         When removing coded frames, do so starting from the first sample in the range in
966         decode order, so that frames dependant on removed frames are themselves removed. Add
967         a convenience method in SampleMap findSampleWithPresentationTime(), and rename
968         findSampleAfterPresentationTime() to findSampleOnOrAfterPresentationTime() to correctly
969         reflect what the method does, and simplify its implementation by searching the map's keys
970         directly.
971
972         * Modules/mediasource/SampleMap.cpp:
973         (WebCore::PresentationOrderSampleMap::findSampleWithPresentationTime):
974         (WebCore::PresentationOrderSampleMap::findSampleOnOrAfterPresentationTime):
975         (WebCore::DecodeOrderSampleMap::findSyncSampleAfterPresentationTime):
976         (WebCore::PresentationOrderSampleMap::findSampleAfterPresentationTime): Deleted.
977         * Modules/mediasource/SampleMap.h:
978         * Modules/mediasource/SourceBuffer.cpp:
979         (WebCore::decodeTimeComparator):
980         (WebCore::SourceBuffer::removeCodedFrames):
981
982         Throw the correct exception (INVALID_STATE_ERR) from SourceBuffer::remove().
983
984         * Modules/mediasource/SourceBuffer.cpp:
985         (WebCore::SourceBuffer::remove):
986
987 2014-07-09  Pratik Solanki  <psolanki@apple.com>
988
989         Add SharedBuffer::wrapCFDataArray() and use it
990         https://bugs.webkit.org/show_bug.cgi?id=134733
991
992         Reviewed by Antti Koivisto.
993
994         No new tests. Should be covered by existing tests.
995
996         * platform/SharedBuffer.h:
997         * platform/cf/SharedBufferCF.cpp:
998         (WebCore::SharedBuffer::wrapCFDataArray):
999         (WebCore::SharedBuffer::SharedBuffer):
1000         * platform/network/ResourceHandle.h:
1001         * platform/network/cf/ResourceHandleCFNet.cpp:
1002         (WebCore::ResourceHandle::handleDataArray): Deleted.
1003         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
1004         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray):
1005         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
1006         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveDataArray):
1007         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
1008         (-[WebCoreResourceHandleAsDelegate connection:didReceiveDataArray:]):
1009         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
1010         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveDataArray:]):
1011
1012 2014-07-09  Pratik Solanki  <psolanki@apple.com>
1013
1014         Move resource buffering from SynchronousNetworkLoaderClient to NetworkResourceLoader
1015         https://bugs.webkit.org/show_bug.cgi?id=134732
1016
1017         Reviewed by Darin Adler.
1018
1019         No new tests because no functional changes.
1020
1021         * WebCore.exp.in:
1022
1023 2014-07-09  Tim Horton  <timothy_horton@apple.com>
1024
1025         Fix the !USE(IOSURFACE) build.
1026
1027         * WebCore.exp.in:
1028
1029 2014-07-09  Tim Horton  <timothy_horton@apple.com>
1030
1031         Use IOSurface ViewSnapshots everywhere on Mac, remove JPEG encoding path
1032         https://bugs.webkit.org/show_bug.cgi?id=134773
1033
1034         Reviewed by Anders Carlsson.
1035
1036         * WebCore.exp.in:
1037         * platform/graphics/cocoa/IOSurface.h:
1038         * platform/graphics/cocoa/IOSurface.mm:
1039         (IOSurface::createFromImage):
1040         Move make-an-IOSurface-from-a-CGImageRef into WebCore::IOSurface.
1041
1042 2014-07-09  Enrica Casucci  <enrica@apple.com>
1043
1044         Implement Editor::fontAttributesForSelectionStart() or iOS.
1045         https://bugs.webkit.org/show_bug.cgi?id=134771
1046         <rdar://problem/16167838>
1047
1048         Reviewed by Ryosuke Niwa.
1049
1050         Implement for iOS the equivalent function we have for OS X.
1051
1052         * editing/ios/EditorIOS.mm:
1053         (WebCore::Editor::fontAttributesForSelectionStart):
1054
1055 2014-07-09  Brent Fulgham  <bfulgham@apple.com>
1056
1057         [Win] Remove use of 'grep' in build steps
1058         https://bugs.webkit.org/show_bug.cgi?id=134770
1059         <rdar://problem/17608783>
1060
1061         Reviewed by Tim Horton.
1062
1063         Replace uses of the grep command in Windows builds with the equivalent
1064         Perl program.
1065
1066         * WebCore.vcxproj/WebCoreGenerated.make:
1067         * WebCore.vcxproj/WebCorePreBuild.cmd:
1068         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
1069         (WebCore::WebCoreAVCFResourceLoader::notifyFinished):
1070
1071 2014-07-09  Alex Christensen  <achristensen@webkit.org>
1072
1073         Added css jit profiler, disabled by default.
1074         https://bugs.webkit.org/show_bug.cgi?id=134695
1075
1076         Reviewed by Benjamin Poulain.
1077
1078         * css/ElementRuleCollector.cpp:
1079         (WebCore::ElementRuleCollector::ruleMatches):
1080         Tell the RuleData when its compiled selector is used.
1081         * css/RuleSet.cpp:
1082         (WebCore::RuleData::RuleData):
1083         Initialize the compiled selector use count to 0.
1084         * css/RuleSet.h:
1085         (WebCore::RuleData::~RuleData):
1086         (WebCore::RuleData::compiledSelectorUsed):
1087         Count and log the number of times a compiled selector is used.
1088         * cssjit/SelectorCompiler.h:
1089         Added option for CSS_SELECTOR_JIT_PROFILING set to 0 by default.
1090         * dom/SelectorQuery.cpp:
1091         (WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
1092         (WebCore::SelectorDataList::execute):
1093         Tell the SelectorData when its compiled selector is used.
1094         * dom/SelectorQuery.h:
1095         (WebCore::SelectorDataList::SelectorData::SelectorData):
1096         (WebCore::SelectorDataList::SelectorData::~SelectorData):
1097         (WebCore::SelectorDataList::SelectorData::compiledSelectorUsed):
1098         Count and log the number of times a compiled selector is used.
1099
1100 2014-07-09  Eric Carlson  <eric.carlson@apple.com>
1101
1102         [iOS] caption size is sometimes incorrect in fullscreen
1103         https://bugs.webkit.org/show_bug.cgi?id=134740
1104
1105         Reviewed by Jer Noble.
1106
1107         Captions on iOS are displayed in fullscreen with a TextTrackRepresentation object. Because
1108         the fullscreen video presentation is controlled by code in the UI process running on the
1109         UI thread, WebCore is notified of changes to fullscreen state asynchronously. This resulted
1110         in the TextTrackRepresentation object being created and/or destroyed too late some of the 
1111         time, which caused us to sometimes display captions incorrectly. Fix this by setting up and
1112         tearing down the TextTrackRepresentation object when WebCore's 'webkitfullscreenchange'
1113         event fires.
1114
1115         * Modules/mediacontrols/MediaControlsHost.cpp:
1116         (WebCore::MediaControlsHost::enteredFullscreen): Notify text track container.
1117         (WebCore::MediaControlsHost::exitedFullscreen): Ditto.
1118         * Modules/mediacontrols/MediaControlsHost.h:
1119         * Modules/mediacontrols/MediaControlsHost.idl:
1120
1121         * Modules/mediacontrols/mediaControlsApple.js:
1122         (Controller.prototype.handleFullscreenChange): Notify host of fullscreen change.
1123
1124         * html/HTMLMediaElement.cpp:
1125         (WebCore::HTMLMediaElement::requiresTextTrackRepresentation): Only return true when in
1126             fullscreen.
1127         (WebCore::HTMLMediaElement::setVideoFullscreenLayer): Call updateTextTrackDisplay.
1128
1129         * html/shadow/MediaControlElements.cpp:
1130         (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement): Initialize
1131             m_updateTextTrackRepresentationStyle to false.
1132         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Move logic for creating
1133             TextTrackRepresentation to updateTextTrackRepresentation.
1134         (WebCore::MediaControlTextTrackContainerElement::updateActiveCuesFontSize): New, split out of updateTimerFired.
1135         (WebCore::MediaControlTextTrackContainerElement::updateTimerFired): Move code to force immediate
1136             font size change to updateActiveCuesFontSize.
1137         (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentation): New, update
1138             text track representation, creating first if necessary.
1139         (WebCore::MediaControlTextTrackContainerElement::clearTextTrackRepresentation): Add an early
1140             return if we don't have a text track representation.
1141         (WebCore::MediaControlTextTrackContainerElement::updateStyleForTextTrackRepresentation): Early
1142             return if there is nothing to be done.
1143         (WebCore::MediaControlTextTrackContainerElement::enteredFullscreen): Force a caption update
1144             if there are visible captions.
1145         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Set m_updateTextTrackRepresentationStyle
1146             to true.
1147         (WebCore::MediaControlTextTrackContainerElement::textTrackRepresentationBoundsChanged):  Force a 
1148             caption update if there are visible captions.
1149         * html/shadow/MediaControlElements.h:
1150
1151 2014-07-09  Jer Noble  <jer.noble@apple.com>
1152
1153         [MSE] http/tests/media/media-source/mediasource-endofstream-invaliderror.html is failing.
1154         https://bugs.webkit.org/show_bug.cgi?id=134413
1155
1156         Reviewed by Eric Carlson.
1157
1158         Update MediaSource.endOfStream() to take an optional enum instead of an optional String.
1159
1160         * Modules/mediasource/MediaSource.cpp:
1161         (WebCore::MediaSource::endOfStream):
1162         * Modules/mediasource/MediaSource.h:
1163         * Modules/mediasource/MediaSource.idl:
1164
1165 2014-07-08  Brady Eidson  <beidson@apple.com>
1166
1167         DOMWindows should register themselves with the GamepadManager when they have event listeners
1168         https://bugs.webkit.org/show_bug.cgi?id=134669
1169
1170         Reviewed by Dean Jackson.
1171
1172         No new tests (No effect in a currently tested config)
1173
1174         By having DOMWindows register with the GamepadManager when they have/don’t have gamepad event
1175         listeners, we accomplish two things:
1176         1 - It’s simple for GamepadManager to dispatch gamepad events directly to the DOMWindows interested.
1177         2 - We know when to start monitoring for gamepad connections.
1178
1179         * Modules/gamepad/GamepadManager.cpp:
1180         (WebCore::GamepadManager::GamepadManager):
1181         (WebCore::GamepadManager::registerNavigator):
1182         (WebCore::GamepadManager::unregisterNavigator):
1183         (WebCore::GamepadManager::registerDOMWindow):
1184         (WebCore::GamepadManager::unregisterDOMWindow):
1185         (WebCore::GamepadManager::maybeStartMonitoringGamepads): Start monitoring gamepads if there are any
1186           registered DOMWindows or NavigatorGamepads, and we aren’t already monitoring them.
1187         (WebCore::GamepadManager::maybeStopMonitoringGamepads): Stop monitoring gamepads if there aren’t any
1188           registered DOMWindows or NavigatorGameads, and we have been monitoring them before now.
1189         * Modules/gamepad/GamepadManager.h:
1190
1191         * dom/EventNames.h:
1192         (WebCore::EventNames::isGamepadEventType):
1193
1194         * page/DOMWindow.cpp:
1195         (WebCore::DOMWindow::DOMWindow):
1196         (WebCore::DOMWindow::~DOMWindow): If registered for gamepad events, unregister now.
1197         (WebCore::DOMWindow::incrementGamepadEventListenerCount): If this is the first gamepad event
1198           listener, register with the GamepadManager now.
1199         (WebCore::DOMWindow::decrementGamepadEventListenerCount): If this was the last gamepad event
1200           listener, unregister from the GamepadManager now.
1201         (WebCore::DOMWindow::addEventListener):
1202         (WebCore::DOMWindow::removeEventListener):
1203         * page/DOMWindow.h:
1204
1205 2014-07-08  Sun-woo Nam  <sunny.nam@samsung.com>
1206
1207         [EFL] Fix the build break when ENABLE_ENCRYPTED_MEDIA_V2 is turned on.
1208         https://bugs.webkit.org/show_bug.cgi?id=134750
1209
1210         Reviewed by Gyuyoung Kim.
1211
1212         When turning ENABLE_ENCRYPTED_MEDIA_V2 on, build break occurs.
1213         Some source files need to be included in CMakeLists.txt file for build.
1214         And wrap the included header file which is built only on mac and wince.
1215
1216         * CMakeLists.txt:
1217         * Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp:
1218
1219 2014-07-08  Eric Carlson  <eric.carlson@apple.com>
1220
1221         [iOS] user caption preferences not applied
1222         https://bugs.webkit.org/show_bug.cgi?id=134599
1223
1224         Reviewed by Sam Weinig.
1225
1226         * page/CaptionUserPreferences.cpp:
1227         (WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride): All Pages in a PageGroup
1228         do not necessarily use the same PageUserContentController, so apply and remove caption user
1229         the style sheet directly to each page rather than to the page group.
1230
1231 2014-07-08  Commit Queue  <commit-queue@webkit.org>
1232
1233         Unreviewed, rolling out r170894.
1234         https://bugs.webkit.org/show_bug.cgi?id=134749
1235
1236         "It broke the build on mountainlion release 32bit" (Requested
1237         by mmirman on #webkit).
1238
1239         Reverted changeset:
1240
1241         "Added css jit profiler, disabled by default."
1242         https://bugs.webkit.org/show_bug.cgi?id=134695
1243         http://trac.webkit.org/changeset/170894
1244
1245 2014-07-08  Jeremy Jones  <jeremyj@apple.com>
1246
1247         WebVideoFullscreenInterfaceAVKit should lazily create m_playerController.
1248         https://bugs.webkit.org/show_bug.cgi?id=134706
1249
1250         Reviewed by Simon Fraser.
1251
1252         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1253         (WebVideoFullscreenInterfaceAVKit::setWebVideoFullscreenModel):
1254         Don't set the delegate if m_playerController isn't created.
1255
1256 2014-07-08  Bem Jones-Bey  <bjonesbe@adobe.com>
1257
1258         Ensure we compute the height of replaced elements to 'auto' when appropriate.
1259         https://bugs.webkit.org/show_bug.cgi?id=134700
1260
1261         Reviewed by David Hyatt.
1262
1263         This fixes two issues:
1264
1265         1) If a replaced element has a percentage height specified then its
1266         height should compute to 'auto' when its containing block does not
1267         have a height 'specified explicitly'. We were taking this to mean when
1268         its containing block's specified height value is 'auto' - in fact it
1269         means when the containing block's computed height is auto.
1270
1271         2) Top and bottom on the containing block should only affect the
1272         height of the block if that block has absolute or fixed position.
1273
1274         This brings us into line with IE, Firefox, and Chrome.
1275
1276         This is a port of Blink patches by Rob Hogan and David Vest.
1277
1278         Tests: css2.1/20110323/height-percentage-005.htm
1279                fast/css/replaced-element-ignore-top-bottom.html
1280
1281         * rendering/RenderBoxModelObject.cpp:
1282         (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight):
1283
1284 2014-07-08  Alex Christensen  <achristensen@webkit.org>
1285
1286         Added css jit profiler, disabled by default.
1287         https://bugs.webkit.org/show_bug.cgi?id=134695
1288
1289         Reviewed by Benjamin Poulain.
1290
1291         * css/ElementRuleCollector.cpp:
1292         (WebCore::ElementRuleCollector::ruleMatches):
1293         Tell the RuleData when its compiled selector is used.
1294         * css/RuleSet.cpp:
1295         (WebCore::RuleData::RuleData):
1296         Initialize the compiled selector use count to 0.
1297         * css/RuleSet.h:
1298         (WebCore::RuleData::~RuleData):
1299         (WebCore::RuleData::compiledSelectorUsed):
1300         Count and log the number of times a compiled selector is used.
1301         * cssjit/SelectorCompiler.h:
1302         Added option for CSS_SELECTOR_JIT_PROFILING set to 0 by default.
1303         * dom/SelectorQuery.cpp:
1304         (WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
1305         (WebCore::SelectorDataList::execute):
1306         Tell the SelectorData when its compiled selector is used.
1307         * dom/SelectorQuery.h:
1308         (WebCore::SelectorDataList::SelectorData::SelectorData):
1309         (WebCore::SelectorDataList::SelectorData::~SelectorData):
1310         (WebCore::SelectorDataList::SelectorData::compiledSelectorUsed):
1311         Count and log the number of times a compiled selector is used.
1312
1313 2014-07-08  Carlos Garcia Campos  <cgarcia@igalia.com>
1314
1315         Unreviewed. Fix GObject DOM bindings API breaks test after r170700.
1316
1317         Add missing WebKitDOMXPathNSResolver.symbols that I forgot to add
1318         in r170700.
1319
1320         * bindings/gobject/WebKitDOMXPathNSResolver.symbols: Added.
1321
1322 2014-07-07  Pratik Solanki  <psolanki@apple.com>
1323
1324         Unreviewed. iOS build fix after r170871.
1325
1326         * rendering/RenderThemeIOS.mm:
1327         (WebCore::adjustInputElementButtonStyle):
1328
1329 2014-07-07  Zalan Bujtas  <zalan@apple.com>
1330
1331         Subpixel rendering: icloud.com password arrow has clipped circle at some window sizes.
1332         https://bugs.webkit.org/show_bug.cgi?id=134710
1333         <rdar://problem/17545291>
1334
1335         Reviewed by Simon Fraser.
1336
1337         Transparent layer clipping needs device pixel snapping.
1338
1339         Test: fast/layers/wrong-clipping-semi-transparent-layer-on-subpixel-position.html
1340
1341         * rendering/RenderLayer.cpp:
1342         (WebCore::RenderLayer::beginTransparencyLayers):
1343
1344 2014-07-07  Benjamin Poulain  <benjamin@webkit.org>
1345
1346         LinkBuffer should not keep a reference to the MacroAssembler
1347         https://bugs.webkit.org/show_bug.cgi?id=134668
1348
1349         Reviewed by Geoffrey Garen.
1350
1351         * cssjit/SelectorCompiler.cpp:
1352         (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
1353
1354 2014-07-07  Zalan Bujtas  <zalan@apple.com>
1355
1356         Subpixel rendering: Inline box decoration rounds to integral.
1357         https://bugs.webkit.org/show_bug.cgi?id=134523
1358         <rdar://problem/17530298>
1359
1360         Reviewed by Darin Adler.
1361
1362         This patch removes 2 integral roundings from InlineFlowBox:
1363         1. Border and padding sizes are implicitly integral truncated by the 'int' return type
1364            of borderLogicalLeft/Right()/paddingLogicalLeft/Right(). It results in losing
1365            fractional border/padding values.
1366         2. Painting rectangle is explicitly rounded which pushes border and
1367            other decoration elements to odd device pixel positions on retina displays.
1368         These values get pixel snapped right before calling in to GraphicsContext::*.
1369
1370         Test: fast/inline/hidpi-inline-text-decoration-with-subpixel-value.html
1371
1372         * rendering/InlineBox.h:
1373         (WebCore::InlineBox::frameRect):
1374         * rendering/InlineFlowBox.cpp:
1375         (WebCore::InlineFlowBox::nodeAtPoint):
1376         (WebCore::InlineFlowBox::paintBoxDecorations):
1377         (WebCore::InlineFlowBox::paintMask):
1378         (WebCore::InlineFlowBox::roundedFrameRect): Deleted.
1379         * rendering/InlineFlowBox.h:
1380         (WebCore::InlineFlowBox::borderLogicalLeft):
1381         (WebCore::InlineFlowBox::borderLogicalRight):
1382         (WebCore::InlineFlowBox::paddingLogicalLeft):
1383         (WebCore::InlineFlowBox::paddingLogicalRight):
1384
1385 2014-07-07  Zalan Bujtas  <zalan@apple.com>
1386
1387         Pass RenderLayer reference instead of pointer to RenderLayer::paintingExtent().
1388         https://bugs.webkit.org/show_bug.cgi?id=134714
1389
1390         Reviewed by Simon Fraser.
1391
1392         No change in functionality. 
1393
1394         * rendering/RenderLayer.cpp: * -> &
1395         (WebCore::expandClipRectForRegionAndReflection):
1396         (WebCore::expandClipRectForDescendantsAndReflection):
1397         (WebCore::transparencyClipBox):
1398         (WebCore::paintingExtent):
1399         (WebCore::RenderLayer::beginTransparencyLayers):
1400         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
1401         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
1402         (WebCore::RenderLayer::paintingExtent): Deleted.
1403         * rendering/RenderLayer.h:
1404
1405 2014-07-07  Myles C. Maxfield  <mmaxfield@apple.com>
1406
1407         Remove misleadingly-named Font::isSVGFont()
1408         https://bugs.webkit.org/show_bug.cgi?id=134697
1409
1410         Reviewed by Dean Jackson.
1411
1412         Being a SVG font is a property of the FontData object, not
1413         the Font object. Providing an isSVGFont() function on the
1414         Font class will likely lead to incorrect code and non-obvious
1415         bugs.
1416
1417         No new tests because there is no behavior change.
1418
1419         * platform/graphics/Font.h:
1420         (WebCore::Font::isSVGFont): Deleted.
1421         * platform/graphics/mac/FontMac.mm:
1422         (WebCore::Font::primaryFontDataIsSystemFont):
1423         * rendering/InlineTextBox.cpp:
1424         (WebCore::InlineTextBox::constructTextRun):
1425         * rendering/RenderBlock.cpp:
1426         (WebCore::constructTextRunInternal):
1427         * rendering/SimpleLineLayout.cpp:
1428         (WebCore::SimpleLineLayout::canUseFor):
1429         * rendering/svg/SVGInlineTextBox.cpp:
1430         (WebCore::SVGInlineTextBox::constructTextRun):
1431         * rendering/svg/SVGTextMetrics.cpp:
1432         (WebCore::SVGTextMetrics::constructTextRun):
1433         (WebCore::SVGTextMetrics::SVGTextMetrics):
1434
1435 2014-07-07  Brady Eidson  <beidson@apple.com>
1436
1437         Move Gamepad index down into PlatformGamepad.
1438         https://bugs.webkit.org/show_bug.cgi?id=134670
1439
1440         Reviewed by Darin Adler.
1441
1442         PlatformGamepads always have an inherent index anyways.
1443         This will make things easier in all upcoming work.
1444
1445         * Modules/gamepad/Gamepad.cpp:
1446         (WebCore::Gamepad::Gamepad):
1447         * Modules/gamepad/Gamepad.h:
1448
1449         * Modules/gamepad/GamepadManager.cpp:
1450         (WebCore::GamepadManager::platformGamepadConnected):
1451         (WebCore::GamepadManager::platformGamepadDisconnected):
1452         (WebCore::GamepadManager::makeGamepadsVisibileToBlindNavigators):
1453         * Modules/gamepad/GamepadManager.h:
1454
1455         * Modules/gamepad/NavigatorGamepad.cpp:
1456         (WebCore::NavigatorGamepad::gamepadsBecameVisible):
1457         (WebCore::NavigatorGamepad::gamepadConnected):
1458         (WebCore::NavigatorGamepad::gamepadDisconnected):
1459         * Modules/gamepad/NavigatorGamepad.h:
1460
1461         * platform/GamepadProviderClient.h:
1462
1463         * platform/PlatformGamepad.h:
1464         (WebCore::PlatformGamepad::index):
1465         (WebCore::PlatformGamepad::PlatformGamepad):
1466
1467         * platform/mac/HIDGamepad.cpp:
1468         (WebCore::HIDGamepad::HIDGamepad):
1469         * platform/mac/HIDGamepad.h:
1470
1471         * platform/mac/HIDGamepadProvider.cpp:
1472         (WebCore::HIDGamepadProvider::deviceAdded):
1473         (WebCore::HIDGamepadProvider::deviceRemoved):
1474         (WebCore::HIDGamepadProvider::removeGamepadForDevice):
1475         * platform/mac/HIDGamepadProvider.h:
1476
1477 2014-07-07  Simon Fraser  <simon.fraser@apple.com>
1478
1479         [UI-side compositing] Support reflections on custom layers like video
1480         https://bugs.webkit.org/show_bug.cgi?id=134701
1481
1482         Reviewed by Tim Horton.
1483
1484         Add a LayerTypeWebGLLayer layer type, and support casting to PlatformCALayerRemoteCustom.
1485
1486         * WebCore.exp.in: Export PlatformCALayerMac::layerTypeForPlatformLayer(CALayer*), and sort.
1487         * platform/graphics/ca/PlatformCALayer.h:
1488         (WebCore::PlatformCALayer::isPlatformCALayerRemoteCustom):
1489         * platform/graphics/ca/mac/PlatformCALayerMac.h:
1490         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1491         (PlatformCALayerMac::layerTypeForPlatformLayer):
1492         (PlatformCALayerMac::PlatformCALayerMac):
1493         (PlatformCALayerMac::commonInit):
1494
1495 2014-07-07  Simon Fraser  <simon.fraser@apple.com>
1496
1497         [UI-side compositing] Crash when starting a filter transition on a reflected layer
1498         https://bugs.webkit.org/show_bug.cgi?id=134694
1499
1500         Reviewed by Tim Horton.
1501
1502         Don't call the owner if we failed to find the animation key (which actually
1503         isn't used by PlatformCALayerMac anyway).
1504
1505         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1506         (-[WebAnimationDelegate animationDidStart:]):
1507
1508 2014-07-07  Alex Christensen  <achristensen@webkit.org>
1509
1510         [iOS WebGL] Fix crash with too many nested glsl functions.
1511         https://bugs.webkit.org/show_bug.cgi?id=134683
1512         <rdar://problem/17541529>
1513
1514         Reviewed by Geoffrey Garen.
1515
1516         This fixes the Khronos WebGL 1.0.3 test nested-functions-should-not-crash.html.
1517
1518         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
1519         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
1520         Add SH_LIMIT_CALL_STACK_DEPTH to extraCompileOptions.
1521
1522 2014-07-07  Ion Rosca  <rosca@adobe.com>
1523
1524         [CSS Blending]The background images set on the root element will blend on an initial white backdrop.
1525         https://bugs.webkit.org/show_bug.cgi?id=134342
1526
1527         Reviewed by Dean Jackson.
1528
1529         Tests: css3/blending/background-blend-mode-body-image.html
1530                css3/blending/background-blend-mode-body-transparent-color-and-image.html
1531                css3/blending/background-blend-mode-body-transparent-image.html
1532
1533         * rendering/RenderBox.cpp:
1534         (WebCore::RenderBox::paintFillLayers):
1535         If the background layers have blend modes, we paint the base background color first,
1536         before starting a new transparency layer. After creating the transparency layer,
1537         the base background will be skipped, and the background layers will blend on top of
1538         a transparent backdrop.
1539         (WebCore::RenderBox::paintFillLayer):
1540         * rendering/RenderBox.h:
1541         * rendering/RenderBoxModelObject.cpp:
1542         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1543         This method is able to paint only the base background color (BaseBackgroundColorOnly), 
1544         skipping the background-color and background-images. This option is available only
1545         on bottom layer of the root renderer and only if the background color is not opaque,
1546         otherwise the method will return early.
1547         Another option is to paint the root background without using the base background color
1548         (BaseBackgroundColorSkip).
1549         * rendering/RenderBoxModelObject.h:
1550         Adding the BaseBackgroundColorUsage enum.
1551
1552 2014-07-06  Yoav Weiss  <yoav@yoav.ws>
1553
1554         Turn on img@sizes compile flag
1555         https://bugs.webkit.org/show_bug.cgi?id=134634
1556
1557         Reviewed by Benjamin Poulain.
1558
1559         * Configurations/FeatureDefines.xcconfig: Moved compile flag to alphabetical order.
1560
1561 2014-07-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1562
1563         Generate isMathMLFoo() toMathMLFoo() by using NODE_TYPE_CASTS macro and generateTypeHelpers
1564         https://bugs.webkit.org/show_bug.cgi?id=134647
1565
1566         Reviewed by Andreas Kling.
1567
1568         Use type cast macro and generation tag for isFoo() and toFoo() in some MathML classes.
1569
1570         No new tests, no behavior change.
1571
1572         * mathml/MathMLElement.h: Place MathMLElementTypeHelpers.h to the bottom of the
1573         file so that functions from that file can use the Element|Node classes and other things defined in this file.
1574         * mathml/MathMLMencloseElement.h:
1575         (WebCore::toMathMLMencloseElement): Deleted.
1576         * mathml/mathtags.in:
1577
1578 2014-07-06  Yusuke Suzuki  <utatane.tea@gmail.com>
1579
1580         CSS JIT: Ensure resolvingMode size is 1 byte
1581         https://bugs.webkit.org/show_bug.cgi?id=134662
1582
1583         Reviewed by Benjamin Poulain.
1584
1585         Since selector compiler uses MacroAssembler::branch8 for SelectorChecker::Mode,
1586         we should ensure sizeof(SelectorChecker::Mode) == 1.
1587         Old implementation works only in little endianness environments.
1588
1589         * css/ElementRuleCollector.cpp:
1590         (WebCore::ElementRuleCollector::matchedResult):
1591         (WebCore::ElementRuleCollector::matchedRuleList):
1592         (WebCore::ElementRuleCollector::collectMatchingRules):
1593         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
1594         (WebCore::ElementRuleCollector::hasAnyMatchingRules):
1595         * css/ElementRuleCollector.h:
1596         (WebCore::ElementRuleCollector::ElementRuleCollector):
1597         * css/SelectorChecker.cpp:
1598         (WebCore::SelectorChecker::match):
1599         (WebCore::SelectorChecker::matchRecursively):
1600         (WebCore::SelectorChecker::checkOne):
1601         * css/SelectorChecker.h:
1602         * css/StyleInvalidationAnalysis.cpp:
1603         (WebCore::invalidateStyleRecursively):
1604         * css/StyleResolver.cpp:
1605         (WebCore::StyleResolver::pseudoStyleRulesForElement):
1606         * css/StyleResolver.h:
1607         (WebCore::checkRegionSelector):
1608         * cssjit/SelectorCompiler.cpp:
1609         (WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNotResolvingStyle):
1610         (WebCore::SelectorCompiler::elementIsActiveForStyleResolution):
1611         (WebCore::SelectorCompiler::elementIsHoveredForStyleResolution):
1612         * dom/SelectorQuery.cpp:
1613         (WebCore::SelectorDataList::selectorMatches):
1614
1615 2014-07-06  Antti Koivisto  <antti@apple.com>
1616
1617         Don't throttle layer flushes when the main resource is a GIF
1618         https://bugs.webkit.org/show_bug.cgi?id=134650
1619         <rdar://problem/17490712>
1620
1621         Reviewed by Simon Fraser.
1622         
1623         Avoid throttling big image animations.
1624
1625         * page/FrameView.cpp:
1626         (WebCore::determineLayerFlushThrottleState):
1627         
1628             Disable for image documents.
1629
1630         (WebCore::FrameView::disableLayerFlushThrottlingTemporarilyForInteraction):
1631         (WebCore::FrameView::updateLayerFlushThrottling):
1632         
1633             Refactor a bit.
1634
1635         * page/LayerFlushThrottleState.h:
1636         
1637             Rename the flag.
1638
1639 2014-07-06  Andreas Kling  <akling@apple.com>
1640
1641         Inline NodeListsNodeData helpers more aggressively.
1642         <https://webkit.org/b/134654>
1643
1644         Get rid of call overhead costs when retrieving NodeLists and
1645         HTMLCollections from Document. These functions have very few clients,
1646         so there's no real reason to keep them out of line.
1647
1648         Reviewed by Antti Koivisto.
1649
1650         * dom/NodeRareData.h:
1651         (WebCore::NodeListsNodeData::addCacheWithAtomicName):
1652         (WebCore::NodeListsNodeData::addCacheWithName):
1653
1654 2014-07-06  Andreas Kling  <akling@apple.com>
1655
1656         Inline Node's rare data getters.
1657         <https://webkit.org/b/134652>
1658
1659         There was a fair bit of overhead when calling Node::ensureRareData()
1660         from Document's collection getters. This patch inlines the case where
1661         we've already materialized the rare data.
1662
1663         Reviewed by Antti Koivisto.
1664
1665         * dom/Node.cpp:
1666         (WebCore::Node::materializeRareData):
1667         (WebCore::Node::rareData): Deleted.
1668         (WebCore::Node::ensureRareData): Deleted.
1669         * dom/Node.h:
1670         * dom/NodeRareData.h:
1671         (WebCore::Node::rareData):
1672         (WebCore::Node::ensureRareData):
1673
1674 2014-07-05  Dean Jackson  <dino@apple.com>
1675
1676         [iOS] MediaDocument should set a viewport
1677         https://bugs.webkit.org/show_bug.cgi?id=134658
1678         <rdar://problem/17552339>
1679
1680         Reviewed by Zalan Bujtas.
1681
1682         A MediaDocument should fill the viewport, so set its
1683         initial-scale to 1 and make it non-zoomable.
1684
1685         * html/MediaDocument.cpp:
1686         (WebCore::MediaDocumentParser::createDocumentStructure): Create
1687         a <head> element and a <meta> element with a 1:1 viewport.
1688
1689 2014-07-05  Commit Queue  <commit-queue@webkit.org>
1690
1691         Unreviewed, rolling out r170825.
1692         https://bugs.webkit.org/show_bug.cgi?id=134653
1693
1694         broke debug builds (Requested by kling on #webkit).
1695
1696         Reverted changeset:
1697
1698         "Generate isMathMLFoo() toMathMLFoo() by using NODE_TYPE_CASTS
1699         macro and generateTypeHelpers"
1700         https://bugs.webkit.org/show_bug.cgi?id=134647
1701         http://trac.webkit.org/changeset/170825
1702
1703 2014-07-05  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1704
1705         Generate isMathMLFoo() toMathMLFoo() by using NODE_TYPE_CASTS macro and generateTypeHelpers
1706         https://bugs.webkit.org/show_bug.cgi?id=134647
1707
1708         Reviewed by Andreas Kling.
1709
1710         Use type cast macro and generation tag for isFoo() and toFoo() in some MathML classes.
1711
1712         No new tests, no behavior change.
1713
1714         * mathml/MathMLElement.h: Place MathMLElementTypeHelpers.h to the bottom of the
1715         file so that functions from that file can use the Element|Node classes and other things defined in this file.
1716         (WebCore::isMathMLElement): Deleted.
1717         * mathml/MathMLMencloseElement.h:
1718         (WebCore::toMathMLMencloseElement): Deleted.
1719         * mathml/mathtags.in:
1720
1721 2014-07-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1722
1723         [EFL] Support Geolocation
1724         https://bugs.webkit.org/show_bug.cgi?id=134439
1725
1726         Reviewed by Antonio Gomes.
1727
1728         Add geoclue files in order to enable geolocation for EFL port.
1729
1730         * PlatformEfl.cmake:
1731
1732 2014-07-04  Benjamin Poulain  <benjamin@webkit.org>
1733
1734         CSS JIT: compile :in-range and :out-of-range
1735         https://bugs.webkit.org/show_bug.cgi?id=134639
1736
1737         Reviewed by Andreas Kling.
1738
1739         The pseudo class :in-range and :out-of-range are trivial non-inlined selectors.
1740
1741         * css/SelectorChecker.cpp:
1742         (WebCore::SelectorChecker::checkOne):
1743         * css/SelectorCheckerTestFunctions.h:
1744         (WebCore::isInRange):
1745         (WebCore::isOutOfRange):
1746         * cssjit/SelectorCompiler.cpp:
1747         (WebCore::SelectorCompiler::addPseudoClassType):
1748
1749 2014-07-04  Andreas Kling  <akling@apple.com>
1750
1751         Fast path for jsStringWithCache() when asked for the same string repeatedly.
1752         <https://webkit.org/b/134635>
1753
1754         Reviewed by Darin Adler.
1755
1756         * WebCore.exp.in:
1757         * bindings/js/JSDOMBinding.cpp:
1758         (WebCore::jsStringWithCache): Deleted.
1759         * bindings/js/JSDOMBinding.h:
1760         (WebCore::JSValueTraits<String>::arrayJSValue):
1761         (WebCore::jsStringWithCache): Deleted.
1762         * bridge/c/c_utility.cpp:
1763         (JSC::Bindings::convertNPVariantToValue):
1764         * loader/cache/CachedResourceHandle.h:
1765
1766 2014-07-04  Zalan Bujtas  <zalan@apple.com>
1767
1768         Subpixel rendering: ebay.com rotating billboard on the main page has cut off buttons.
1769         https://bugs.webkit.org/show_bug.cgi?id=134636
1770         <rdar://problem/17529112>
1771
1772         Reviewed by Darin Adler.
1773
1774         Missing pixel snapping when clipping the transparency layer for BackgroundBleedUseTransparencyLayer.
1775         Clipping needs to take the same snapping strategy as the rest of the painting code.
1776
1777         Test: fast/borders/border-radius-on-subpixel-position-non-hidpi.html
1778
1779         * rendering/RenderBox.cpp:
1780         (WebCore::RenderBox::paintBoxDecorations):
1781
1782 2014-05-10  Andreas Kling  <akling@apple.com>
1783
1784         QualifiedName should use RefPtr<QualifiedNameImpl> internally.
1785         <https://webkit.org/b/132796>
1786
1787         We were not inlining ~QualifiedName() and it was showing up in some
1788         profiles (over 1% on dom-attr.html.)
1789
1790         This patch modernizes QualifiedName a bit by using RefPtr to store
1791         the QualifiedNameImpl instead of doing manual ref() and deref()
1792         in out-of-line functions.
1793
1794         Reviewed by Darin Adler.
1795
1796         * WebCore.exp.in:
1797         * dom/QualifiedName.cpp:
1798         (WebCore::QNameComponentsTranslator::translate):
1799         (WebCore::QualifiedName::QualifiedName):
1800         (WebCore::QualifiedName::~QualifiedName): Deleted.
1801         (WebCore::QualifiedName::deref): Deleted.
1802         * dom/QualifiedName.h:
1803         (WebCore::QualifiedName::QualifiedNameImpl::create):
1804         (WebCore::QualifiedName::QualifiedName):
1805         (WebCore::QualifiedName::isHashTableDeletedValue):
1806         (WebCore::QualifiedName::~QualifiedName):
1807         (WebCore::QualifiedName::operator=):
1808         (WebCore::QualifiedName::impl):
1809         (WebCore::QualifiedName::ref): Deleted.
1810
1811 2014-07-04  Dean Jackson  <dino@apple.com>
1812
1813         [iOS] [Media] Prevent page zoom if it started in the video element
1814         https://bugs.webkit.org/show_bug.cgi?id=134640
1815         <rdar://problem/16630794>
1816
1817         Reviewed by Sam Weinig.
1818
1819         In r170572 I attempted to prevent the page zoom from happening
1820         when the user was attempting to fullscreen the video. That fix was
1821         not complete, because it relied on the touchstart event being
1822         sent before a gesture event. It turns out this doesn't always happen,
1823         so we need to apply the same check in the gesture event - if the
1824         gesture began with two fingers on the media, don't do a page zoom.
1825         The exception is zooming out, if you've managed to make the video
1826         cover the entire screen (also, the pinch-out-of-fullscreen gesture
1827         does not get handled by WebKit).
1828
1829         * Modules/mediacontrols/mediaControlsiOS.js:
1830         (ControllerIOS.prototype.handleBaseGestureChange): Add a check to
1831         make sure our pinch didn't start in the video element.
1832
1833 2014-07-04  Hunseop Jeong  <hs85.jeong@samsung.com>
1834
1835         [CoordinatedGraphics] Use the C++11 syntax to clean-up for loops 
1836         https://bugs.webkit.org/show_bug.cgi?id=134594
1837
1838         Reviewed by Darin Adler.
1839
1840         Convert a couple of loops to range-based for 
1841
1842         No change in functionality, no new tests.
1843
1844         * platform/graphics/TiledBackingStore.cpp:
1845         (WebCore::TiledBackingStore::updateTileBuffers):
1846         (WebCore::TiledBackingStore::resizeEdgeTiles):
1847         (WebCore::TiledBackingStore::setKeepRect):
1848         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
1849         (WebCore::CompositingCoordinator::~CompositingCoordinator):
1850         (WebCore::CompositingCoordinator::flushPendingImageBackingChanges):
1851         (WebCore::CompositingCoordinator::setVisibleContentsRect):
1852         (WebCore::CompositingCoordinator::purgeBackingStores):
1853         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
1854         (WebCore::CoordinatedBackingStore::removeAllTiles):
1855         (WebCore::CoordinatedBackingStore::paintToTextureMapper):
1856         (WebCore::CoordinatedBackingStore::drawBorder):
1857         (WebCore::CoordinatedBackingStore::drawRepaintCounter):
1858         (WebCore::CoordinatedBackingStore::commitTileOperations):
1859         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1860         (WebCore::CoordinatedGraphicsScene::adjustPositionForFixedLayers):
1861         (WebCore::CoordinatedGraphicsScene::commitPendingBackingStoreOperations):
1862
1863 2014-07-04  Andreas Kling  <akling@apple.com>
1864
1865         CTTE: ScriptElement always has a HTTPScriptElement or SVGScriptElement.
1866         <https://webkit.org/b/134637>
1867
1868         Have ScriptElement store the pointer to the more specific subclass
1869         element as a reference. Also made the constructor protected since
1870         nobody should instantiate ScriptElement directly.
1871
1872         Reviewed by Antti Koivisto.
1873
1874         * dom/ScriptElement.cpp:
1875         (WebCore::ScriptElement::ScriptElement):
1876         (WebCore::ScriptElement::childrenChanged):
1877         (WebCore::ScriptElement::dispatchErrorEvent):
1878         (WebCore::ScriptElement::prepareScript):
1879         (WebCore::ScriptElement::requestScript):
1880         (WebCore::ScriptElement::executeScript):
1881         (WebCore::ScriptElement::notifyFinished):
1882         (WebCore::ScriptElement::ignoresLoadRequest):
1883         (WebCore::ScriptElement::scriptContent):
1884         * dom/ScriptElement.h:
1885         (WebCore::ScriptElement::element):
1886         * dom/ScriptRunner.cpp:
1887         (WebCore::ScriptRunner::queueScriptForExecution):
1888         * html/HTMLScriptElement.cpp:
1889         (WebCore::HTMLScriptElement::HTMLScriptElement):
1890         * svg/SVGScriptElement.cpp:
1891         (WebCore::SVGScriptElement::SVGScriptElement):
1892
1893 2014-07-04  Julien Quint  <pom@graougraou.com>
1894
1895         input type=range element should only fire change events after committing a  value
1896         https://bugs.webkit.org/show_bug.cgi?id=134545
1897
1898         Reviewed by Dean Jackson.
1899
1900         A "change" event was fired every time the slider thumb element was dragged
1901         by the user. The "change" event is now fired only after the thumb
1902         element has stopped moving; previously, both "input" and "change" events
1903         where dispatched while changes were being made. This new behavior is
1904         consistent with the specification (cf.
1905         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#event-input-change),
1906         as well as other implementations such as Firefox and Chrome.
1907
1908         * Modules/mediacontrols/mediaControlsApple.js:
1909         (Controller.prototype.createControls): Listen to the "input" event
1910         rather than the "change" event for the timeline control in order to
1911         keep track of value changes when the user is dragging the thumb.
1912         * accessibility/AccessibilitySlider.cpp:
1913         (WebCore::AccessibilitySlider::setValue): Dispatch "change" event while
1914         setting the new value rather than dispatching later, since setting the
1915         value now clears the change flag.
1916         * html/RangeInputType.cpp:
1917         (WebCore::RangeInputType::setValue): Update the text value of the
1918         control in the case when no event is to be dispatched, so that this
1919         value can be checked the next time a "change" event dispatch is
1920         requested.
1921         * html/shadow/SliderThumbElement.cpp:
1922         (WebCore::SliderThumbElement::setPositionFromPoint): Removed the
1923         dispatch of the "change" event, and no longer track the text value of
1924         the element as a result of dispatching a "change" event.
1925         (WebCore::SliderThumbElement::stopDragging): Dispatch the "change" event
1926         on completing the drag.
1927
1928 2014-07-04  Andreas Kling  <akling@apple.com>
1929
1930         CTTE: ApplicationCacheHost always has a DocumentLoader.
1931         <https://webkit.org/b/b/128435>
1932
1933         Have ApplicationCacheHost store the backpointer to its owning
1934         DocumentLoader as a reference.
1935
1936         Reviewed by Sam Weinig.
1937
1938         * loader/DocumentLoader.cpp:
1939         (WebCore::DocumentLoader::DocumentLoader):
1940         (WebCore::DocumentLoader::startLoadingMainResource):
1941         * loader/appcache/ApplicationCacheHost.cpp:
1942         (WebCore::ApplicationCacheHost::ApplicationCacheHost):
1943         (WebCore::ApplicationCacheHost::~ApplicationCacheHost):
1944         (WebCore::ApplicationCacheHost::selectCacheWithoutManifest):
1945         (WebCore::ApplicationCacheHost::selectCacheWithManifest):
1946         (WebCore::ApplicationCacheHost::maybeLoadMainResource):
1947         (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainResponse):
1948         (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainError):
1949         (WebCore::ApplicationCacheHost::failedLoadingMainResource):
1950         (WebCore::ApplicationCacheHost::finishedLoadingMainResource):
1951         (WebCore::ApplicationCacheHost::maybeLoadResource):
1952         (WebCore::ApplicationCacheHost::maybeLoadFallbackForError):
1953         (WebCore::ApplicationCacheHost::maybeLoadSynchronously):
1954         (WebCore::ApplicationCacheHost::notifyDOMApplicationCache):
1955         (WebCore::ApplicationCacheHost::stopDeferringEvents):
1956         (WebCore::ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache):
1957         (WebCore::ApplicationCacheHost::update):
1958         (WebCore::ApplicationCacheHost::swapCache):
1959         (WebCore::ApplicationCacheHost::abort):
1960         (WebCore::ApplicationCacheHost::isApplicationCacheEnabled):
1961         * loader/appcache/ApplicationCacheHost.h:
1962         (WebCore::ApplicationCacheHost::documentLoader): Deleted.
1963
1964 2014-07-04  Antti Koivisto  <antti@apple.com>
1965
1966         REGRESSION(r159345): Lines are clipped between pages when printing web content from Safari
1967         https://bugs.webkit.org/show_bug.cgi?id=134633
1968         <rdar://problem/17088936>
1969
1970         Reviewed by Zalan Bujtas.
1971
1972         Test: printing/simple-lines-break.html
1973
1974         * rendering/SimpleLineLayout.cpp:
1975         (WebCore::SimpleLineLayout::canUseFor):
1976         
1977             Disable simple lines if global pagination is enabled.
1978             Printing does not currently use flow threads which we already test for.
1979
1980 2014-07-04  Zan Dobersek  <zdobersek@igalia.com>
1981
1982         Unreviewed. Fixing the build after r170795.
1983
1984         Mac didn't like that change as it seems to properly typedef long long to int64_t.
1985         That's not the case on 64-bit Linux (for some reason), so I'm changing the type of
1986         the two long long variables in FormDataElement to int64_t to avoid any further trouble.
1987
1988         * platform/network/FormData.h:
1989
1990 2014-07-03  Brady Eidson  <beidson@apple.com>
1991
1992         When showing the selection menu, include menu options for all selected phone numbers.
1993         <rdar://problem/16983434>, <rdar://problem/16874568>, and https://bugs.webkit.org/show_bug.cgi?id=134613
1994
1995         Reviewed by Tim Horton.
1996
1997         * English.lproj/Localizable.strings:
1998
1999         * dom/Range.cpp:
2000         (WebCore::rangesOverlap): Fix reversed arguments that caused some types of overlaps to not be detected.
2001
2002 2014-07-03  Daniel Bates  <dabates@apple.com>
2003
2004         Add WTF::move()
2005         https://bugs.webkit.org/show_bug.cgi?id=134500
2006
2007         Rubber-stamped by Anders Carlsson.
2008
2009         Substitute WTF::move() for std::move().
2010
2011         * Modules/battery/NavigatorBattery.cpp:
2012         * Modules/encryptedmedia/MediaKeys.cpp:
2013         * Modules/gamepad/NavigatorGamepad.cpp:
2014         * Modules/gamepad/deprecated/NavigatorGamepad.cpp:
2015         * Modules/geolocation/NavigatorGeolocation.cpp:
2016         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
2017         * Modules/indexeddb/IDBDatabaseBackend.cpp:
2018         * Modules/indexeddb/IDBDatabaseBackend.h:
2019         [...]
2020
2021 2014-07-03  Benjamin Poulain  <bpoulain@apple.com>
2022
2023         [iOS][WK2] Fix small bugs of dynamicViewportSizeUpdate that were causing inaccuracies in the computed target
2024         https://bugs.webkit.org/show_bug.cgi?id=134582
2025
2026         Reviewed by Tim Horton.
2027
2028         * WebCore.exp.in:
2029         * platform/ScrollView.h:
2030         (WebCore::ScrollView::unobscuredContentSize):
2031         * platform/ios/ScrollViewIOS.mm:
2032         (WebCore::ScrollView::unobscuredContentRect):
2033         (WebCore::ScrollView::setUnobscuredContentSize):
2034
2035 2014-07-02  Brent Fulgham  <bfulgham@apple.com>
2036
2037         [Mac] WebKit1 WebView iframe not responding to scroll gestures
2038         https://bugs.webkit.org/show_bug.cgi?id=134569
2039         <rdar://problem/17309008>
2040
2041         Reviewed by Simon Fraser.
2042
2043         New test: platform/mac/fast/scrolling/scroll-iframe-fragment.html
2044
2045         WK1 scrollable areas are implemented on top of PlatformWidget (i.e., NSView) objects. They only
2046         perform a scroll operation if the EventHandler::handleWheelEvent method returns 'false', indicating
2047         that the Cocoa layer should do scrolling work. This is in contrast to WK2, where the scrolling is
2048         handled separately and we return 'true' from EventHandler::handleWheelEvent to indicate that the
2049         scroll event has been handled and that no other work is needed. This mismatch in the meaning of
2050         EventHandler::handleWheelEvent means that WK1 views do not properly handle scroll wheel events.
2051
2052         To correct this, we need to see if we are acting on an Element backed by a PlatformWidget. When we
2053         are (the WK1 case) we want to return 'false' to instruct the Cocoa object to do the scroll operation.
2054         To implement proper latching behavior in WK1, we must return 'true' in the case where we are latched
2055         to a PlatformWidget, and that PlatformWidget did not start the scroll gesture at the edge of
2056         the region in the dominant scroll direction.
2057
2058         Finally, additional logic was needed to determine whether the PlatformWidget is scrolled to the
2059         edge in the dominant scroll direction.
2060
2061         * page/EventHandler.cpp:
2062         (WebCore::EventHandler::platformCompleteWheelEvent): Added stub.
2063         (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Added stub.
2064         (WebCore::EventHandler::handleWheelEvent): Call new platformCompletePlatformWidgetWheelEvent if the
2065         event was handled for a PlatformWidget.
2066         * page/EventHandler.h:
2067         * page/mac/EventHandlerMac.mm:
2068         (WebCore::widgetForEventTarget): Added helper function.
2069         (WebCore::scrollViewForEventTarget): Added helper function.
2070         (WebCore::eventTargetIsPlatformWidget): Added helper function.
2071         (WebCore::EventHandler::platformPrepareForWheelEvents): Check whether we are at a scrolled edge
2072         for the NSView (PlatformWidget) case.
2073         (WebCore::EventHandler::platformCompleteWheelEvent): Return 'false' when handling WK1-style scrolls.
2074         (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Added. We generally want to
2075         return false so the PlatformWidget handles scrolling, except in the case where we are latched to
2076         a PlatformWidget, which has already performed its scroll, and we want to avoid propegating a
2077         scroll event to an enclosing region.
2078
2079 2014-07-03  Pratik Solanki  <psolanki@apple.com>
2080
2081         Preserve old behavior of creating an NSURLRequest of the exact same type as passed to us
2082         https://bugs.webkit.org/show_bug.cgi?id=134605
2083         <rdar://problem/17544641>
2084
2085         Reviewed by Andreas Kling.
2086
2087         We have client code that passes us a subclass of NSURLRequest to load resource. Later when
2088         we call willSendRequest, they test to make sure they get an object of the same type. My
2089         optimization in r170642 broke this path when I cleared out the NSURLRequest object. We
2090         already had code in updateNSURLRequest() that was taking this quirk into account but I broke
2091         that. Fix it by reverting to old behavior for such clients.
2092
2093         No new tests though we need one. I will add it later.
2094
2095         * platform/network/cf/ResourceRequest.h:
2096         * platform/network/cf/ResourceRequestCFNet.cpp:
2097         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2098         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
2099         (WebCore::ResourceRequest::setStorageSession):
2100         * platform/network/ios/ResourceRequestIOS.mm:
2101         (WebCore::ResourceRequest::updateNSURLRequest):
2102         (WebCore::ResourceRequest::clearOrUpdateNSURLRequest):
2103
2104 2014-07-02  Anders Carlsson  <andersca@apple.com>
2105
2106         Stop using EncoderAdapter/DecoderAdapter for FormData
2107         https://bugs.webkit.org/show_bug.cgi?id=134571
2108
2109         Reviewed by Andreas Kling.
2110
2111         * WebCore.exp.in:
2112         * platform/network/FormData.cpp:
2113         (WebCore::encodeElement): Deleted.
2114         (WebCore::decodeElement): Deleted.
2115         (WebCore::FormData::encode): Deleted.
2116         (WebCore::FormData::decode): Deleted.
2117         * platform/network/FormData.h:
2118         (WebCore::FormDataElement::encode):
2119         (WebCore::FormDataElement::decode):
2120         (WebCore::FormData::encode):
2121         (WebCore::FormData::decode):
2122
2123 2014-07-03  Brady Eidson  <beidson@apple.com>
2124
2125         Selection rects sent to ServicesOverlayController are wrong.
2126         <rdar://problem/16727796> and https://bugs.webkit.org/show_bug.cgi?id=134568
2127
2128         Reviewed by Darin Adler (and Tim Horton and Ryosuke Niwa).
2129
2130         * WebCore.exp.in:
2131
2132         Update the gatherer to keep GapRects separate from LayoutRects:
2133         * editing/SelectionRectGatherer.cpp:
2134         (WebCore::SelectionRectGatherer::addRects):
2135         (WebCore::SelectionRectGatherer::Notifier::~Notifier):
2136         (WebCore::SelectionRectGatherer::clearAndCreateNotifier):
2137         * editing/SelectionRectGatherer.h:
2138
2139         * page/EditorClient.h:
2140         (WebCore::EditorClient::selectionRectsDidChange): Updated to take LayoutRects and GapRects separately.
2141
2142         Change RenderSelectionInfo to also hang on to the individual rects that formed the final bounding rect:
2143         * rendering/RenderSelectionInfo.h:
2144         (WebCore::RenderSelectionInfo::RenderSelectionInfo): If the RenderObject is a RenderText, then call
2145           collectSelectionRectsForLineBoxes instead of selectionRectForRepaint.
2146         (WebCore::RenderSelectionInfo::rects):
2147
2148         * rendering/RenderText.cpp:
2149         (WebCore::RenderText::collectSelectionRectsForLineBoxes): Added
2150         (WebCore::RenderText::selectionRectForRepaint):
2151         * rendering/RenderText.h:
2152
2153         * rendering/RenderTextLineBoxes.cpp:
2154         (WebCore::RenderTextLineBoxes::collectSelectionRectsForRange): Added
2155         * rendering/RenderTextLineBoxes.h:
2156
2157         * rendering/RenderView.cpp:
2158         (WebCore::RenderView::setSubtreeSelection): Add the list of rects to the gatherer instead of just 
2159           the bounding rect.
2160
2161 2014-07-03  Brady Eidson  <beidson@apple.com>
2162
2163         Possible crash in IconDatabase in WebCore::IconDatabase::dispatchDidRemoveAllIconsOnMainThread
2164         <rdar://problem/17437687> and https://bugs.webkit.org/show_bug.cgi?id=134517
2165
2166         Reviewed by Eric Carlson.
2167
2168         Since WebCore::IconDatabase is not RefCounted there’s no obvious way to keep it alive until it is
2169         truly no longer needed.
2170
2171         This isn’t generally a problem because they are usually a singleton that lasts the lifetime of the process.
2172
2173         In the WebKit2 case, WebCore::IconDatabases can come and go as their owning WebIconDatabases come and go.
2174
2175         So we can rely on WebIconDatabase to handle the lifetime appropriately. 
2176
2177         * loader/icon/IconDatabase.cpp:
2178         (WebCore::IconDatabase::close): If the database is actually closed, notify the client.
2179         (WebCore::IconDatabase::IconDatabase):
2180         (WebCore::IconDatabase::isOpen): Take into account whether there’s any main thread callbacks, plus what
2181           is covered by isOpenBesidesMainThreadCallbacks.
2182         (WebCore::IconDatabase::isOpenBesidesMainThreadCallbacks): Take into account whether the sync thread
2183           is still running and whether or not the database file is still open.
2184         (WebCore::IconDatabase::checkClosedAfterMainThreadCallback): Checks to see if the database has just
2185           become 100% closed and - if so - notify the client.
2186         (WebCore::IconDatabase::dispatchDidImportIconURLForPageURLOnMainThread): Updated to increment the main thread
2187           callback count and to call checkClosedAfterMainThreadCallback when done.
2188         (WebCore::IconDatabase::dispatchDidImportIconDataForPageURLOnMainThread): Ditto.
2189         (WebCore::IconDatabase::dispatchDidRemoveAllIconsOnMainThread): Ditto.
2190         (WebCore::IconDatabase::dispatchDidFinishURLImportOnMainThread): Ditto.
2191         * loader/icon/IconDatabase.h:
2192
2193         * loader/icon/IconDatabaseClient.h:
2194         (WebCore::IconDatabaseClient::didClose): Added. For the IconDatabase to tell its client it is 100% closed.
2195
2196 2014-07-03  Chris Fleizach  <cfleizach@apple.com>
2197
2198         AX: VoiceOver does not read aria-expanded attribute on controls in Safari
2199         https://bugs.webkit.org/show_bug.cgi?id=134527
2200
2201         Reviewed by Mario Sanchez Prada.
2202
2203         Expose whether the ARIA expanded property is present or not.
2204
2205         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2206         (-[WebAccessibilityObjectWrapper accessibilitySupportsARIAExpanded]):
2207
2208 2014-07-02  Jon Honeycutt  <jhoneycutt@apple.com>
2209
2210         Removing an element with CSS -webkit-overflow-scrolling: touch breaks
2211         subsequent touch events
2212
2213         <https://bugs.webkit.org/show_bug.cgi?id=134584>
2214         <rdar://problem/17202021>
2215
2216         This issue is caused by the order of teardown for RenderLayers.
2217
2218         RenderLayer clears its m_backing in its destructor, calling the
2219         RenderLayerBacking destructor. The RenderLayerBacking destructor calls
2220         RenderLayerCompositor::willRemoveScrollingLayer(), which tries to
2221         access the RenderLayer's backing that has already been cleared. This
2222         causes us to skip the call to ChromeClient::removeScrollingLayer(),
2223         resulting in a stale view that can block touch events.
2224
2225         Reviewed by Simon Fraser.
2226
2227         * rendering/RenderLayerBacking.cpp:
2228         (WebCore::RenderLayerBacking::updateScrollingLayers):
2229         When calling willRemoveScrollingLayerWithBacking(), pass both the layer
2230         and the RenderLayerBacking.
2231
2232         * rendering/RenderLayerCompositor.cpp:
2233         (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
2234         Renamed. Use the passed RenderLayerBacking, as the RenderLayer's
2235         backing might have already been cleared.
2236         (WebCore::RenderLayerCompositor::willRemoveScrollingLayer): Deleted.
2237
2238         * rendering/RenderLayerCompositor.h:
2239         Renamed willRemoveScrollingLayer() to
2240         willRemoveScrollingLayerWithBacking() and added a parameter.
2241
2242 2014-07-01  Mark Rowe  <mrowe@apple.com>
2243
2244         Ensure that the WebKit bundle version in the user agent string continues to match the current format.
2245         <https://webkit.org/b/134524> / <rdar://problem/17447771>
2246
2247         Reviewed by Simon Fraser.
2248
2249         * page/cocoa/UserAgent.h:
2250         * page/cocoa/UserAgent.mm:
2251         (WebCore::userVisibleWebKitBundleVersionFromFullVersion): Updated to take an NSString now that it's internal
2252         to the file.
2253         (WebCore::userAgentBundleVersionFromFullVersionString): Limit the bundle version included in the user agent
2254         string to three components.
2255         * page/ios/UserAgentIOS.mm:
2256         (WebCore::standardUserAgentWithApplicationName): Update to call userAgentBundleVersionFromFullVersionString.
2257         * page/mac/UserAgentMac.mm:
2258         (WebCore::standardUserAgentWithApplicationName): Ditto.
2259
2260 2014-07-01  Mark Rowe  <mrowe@apple.com>
2261
2262         <https://webkit.org/b/134522> Remove duplication in code that prepares the user agent string on Mac and iOS
2263
2264         Reviewed by Simon Fraser.
2265
2266         * page/cocoa/UserAgent.h:
2267         * page/cocoa/UserAgent.mm:
2268         (WebCore::userVisibleWebKitBundleVersionFromFullVersion): Moved from WebKit2.
2269         * page/ios/UserAgentIOS.mm:
2270         (WebCore::standardUserAgentWithApplicationName): Pass the WebKit bundle version through userVisibleWebKitBundleVersionFromFullVersion
2271         before including it in the user agent string.
2272         * page/mac/UserAgentMac.mm:
2273         (WebCore::standardUserAgentWithApplicationName): Ditto.
2274
2275 2014-07-02  Mark Rowe  <mrowe@apple.com>
2276
2277         <https://webkit.org/b/134521> iOS should use shared code to determine the system marketing version
2278
2279         Reviewed by Simon Fraser.
2280
2281         * WebCore.xcodeproj/project.pbxproj: Add the new files, and sort the groups they're in.
2282         * page/cocoa/UserAgent.h: Copied from Source/WebCore/page/mac/UserAgent.h.
2283         * page/cocoa/UserAgent.mm: Renamed from Source/WebCore/page/mac/UserAgent.h.
2284         Move systemMarketingVersionForUserAgentString to a location where it can be shared between
2285         Mac and iOS.
2286         * page/ios/UserAgentIOS.mm:
2287         (WebCore::standardUserAgentWithApplicationName): Switch to systemMarketingVersionForUserAgentString.
2288         * page/mac/UserAgentMac.mm:
2289         * platform/cocoa/SystemVersion.h: Renamed from Source/WebCore/platform/mac/SystemVersionMac.h.
2290         * platform/cocoa/SystemVersion.mm: Renamed from Source/WebCore/platform/mac/SystemVersionMac.mm.
2291         Move to a location that makes it clear this is shared between Mac and iOS. Enable the modern Mac
2292         codepath for iOS as well.
2293
2294 2014-07-02  Anders Carlsson  <andersca@apple.com>
2295
2296         Remove keyed coding from FormData
2297         https://bugs.webkit.org/show_bug.cgi?id=134565
2298
2299         Reviewed by Tim Horton.
2300
2301         * platform/network/FormData.cpp:
2302         (WebCore::encodeElement): Deleted.
2303         (WebCore::decodeElement): Deleted.
2304         (WebCore::FormData::encode): Deleted.
2305         (WebCore::FormData::decode): Deleted.
2306         * platform/network/FormData.h:
2307
2308 2014-07-02  Anders Carlsson  <andersca@apple.com>
2309
2310         Get rid of the HistoryItem encoding/decoding in WebCore
2311         https://bugs.webkit.org/show_bug.cgi?id=134564
2312
2313         Reviewed by Beth Dakin.
2314
2315         * WebCore.exp.in:
2316         * history/HistoryItem.cpp:
2317         (WebCore::HistoryItem::encodeBackForwardTree): Deleted.
2318         (WebCore::encodeRect): Deleted.
2319         (WebCore::encodeSize): Deleted.
2320         (WebCore::HistoryItem::encodeBackForwardTreeNode): Deleted.
2321         (WebCore::DecodeRecursionStackElement::DecodeRecursionStackElement): Deleted.
2322         (WebCore::decodeRect): Deleted.
2323         (WebCore::decodeSize): Deleted.
2324         (WebCore::HistoryItem::decodeBackForwardTree): Deleted.
2325         * history/HistoryItem.h:
2326
2327 2014-07-02  Alex Christensen  <achristensen@webkit.org>
2328
2329         [WebGL] Fix crash when glsl expressions are too complex.
2330         https://bugs.webkit.org/show_bug.cgi?id=134554
2331         <rdar://problem/17540462>
2332
2333         Reviewed by Dean Jackson.
2334         
2335         This fixes the Khronos test conformance/glsl/bugs/long-expressions-should-not-crash.html.
2336
2337         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2338         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
2339         Add SH_LIMIT_EXPRESSION_COMPLEXITY to the ANGLE compile options.
2340
2341 2014-07-02  Benjamin Poulain  <benjamin@webkit.org>
2342
2343         WebCore JIT: rename registerCount to something less generic and add new types for lists of registers and lists of stack references
2344         https://bugs.webkit.org/show_bug.cgi?id=134552
2345
2346         Reviewed by Alex Christensen.
2347
2348         Little cleanup:
2349         -The name registerCount was a little too generic. Rename that to "maximumRegisterCount" to avoid confusion.
2350         -Add a new type RegisterVector for any vector holding registers. This is just to avoid repeating the inline
2351          size everywhere, no functional change.
2352         -Same idea for the stack: welcome StackReferenceVector!
2353
2354         * cssjit/FunctionCall.h:
2355         (WebCore::FunctionCall::saveAllocatedCallerSavedRegisters):
2356         Remove the appendVector here. It was unnecessarily cautious, StackAllocator already protect us
2357         from mistakes.
2358
2359         * cssjit/RegisterAllocator.h:
2360         (WebCore::RegisterAllocator::allocatedRegisters):
2361         * cssjit/SelectorCompiler.cpp:
2362         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2363         Changing from the count of "calleeSavedRegisterCount" to "maximumRegisterCount" will cause
2364         calleeSavedRegisterStackReferences to always overallocate.
2365         The code generator is never on the heap, so that should not change anything.
2366
2367         * cssjit/StackAllocator.h:
2368         (WebCore::StackAllocator::push):
2369         (WebCore::StackAllocator::pop):
2370
2371 2014-07-02  Dan Bernstein  <mitz@apple.com>
2372
2373         Remove some code only needed for versions of Safari that are no longer supported
2374         https://bugs.webkit.org/show_bug.cgi?id=134537
2375
2376         Reviewed by Anders Carlsson.
2377
2378         * bindings/objc/DOMHTML.mm:
2379         (-[DOMHTMLInputElement _rectOnScreen]): Deleted.
2380         (-[DOMHTMLInputElement _replaceCharactersInRange:withString:selectingFromIndex:]): Deleted.
2381         (-[DOMHTMLInputElement _selectedRange]): Deleted.
2382         * bindings/objc/DOMPrivate.h:
2383         * editing/EditorCommand.cpp:
2384         (WebCore::createCommandMap):
2385
2386 2014-07-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2387
2388         [GStreamer] MediaPlayerPrivateGStreamer.cpp fails to build when VIDEO_TRACK is enabled and using GSTREAMER_MPEGTS
2389         https://bugs.webkit.org/show_bug.cgi?id=134548
2390
2391         Reviewed by Philippe Normand.
2392
2393         Include AtomicStringHash.h when ENABLE(VIDEO_TRACK) && USE(GSTREAMER_MPEGTS)
2394         since it's used by HashMap<AtomicString, RefPtr<InbandMetadataTextTrackPrivateGStreamer>>
2395
2396         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2397
2398 2014-07-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2399
2400         [GTK] Unstable headers should include webkitdomdefines-unstable.h
2401         https://bugs.webkit.org/show_bug.cgi?id=134540
2402
2403         Reviewed by Martin Robinson.
2404
2405         Instead of the class header that can only be included from webkitdom.h.
2406
2407         * bindings/scripts/CodeGeneratorGObject.pm:
2408         (WriteData):
2409
2410 2014-07-02  Mario Sanchez Prada  <mario.prada@samsung.com>
2411
2412         REGRESSION(r170008): [GTK] Layout Tests fast/forms/option-constructor-selected.html and fast/forms/select-live-pseudo-selectors.html crash.
2413         https://bugs.webkit.org/show_bug.cgi?id=134399
2414
2415         Reviewed by Chris Fleizach.
2416
2417         Check that the value of optionIndex passed as a parameter is valid
2418         before calling didUpdateActiveOption() over the item of the menu
2419         list, to prevent crashes in platforms where renderers (and therefore
2420         accessibility objects) might not be created for items at the time
2421         of calling AccessibilityMenuList::didUpdateActiveOption().
2422
2423         * accessibility/AccessibilityMenuList.cpp:
2424         (WebCore::AccessibilityMenuList::didUpdateActiveOption): Added check.
2425
2426 2014-07-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2427
2428         [GTK] Do not add forward declaration of class struct for interfaces
2429         https://bugs.webkit.org/show_bug.cgi?id=134297
2430
2431         Reviewed by Martin Robinson.
2432
2433         * PlatformGTK.cmake: Make files generated by
2434         gobject-generate-headers.pl script depend on it.
2435         * bindings/gobject/WebKitDOMEventTarget.h: Remove forward declaration.
2436         * bindings/gobject/WebKitDOMNodeFilter.h: Ditto
2437         * bindings/gobject/WebKitDOMXPathNSResolver.h: Ditto.
2438         * bindings/scripts/gobject-generate-headers.pl: Use Iface instead
2439         of Class suffix for interfaces.
2440
2441 2014-07-01  Carlos Garcia Campos  <cgarcia@igalia.com>
2442
2443         [GTK] XPathNSResolver should be exposed as an interface instead of as a class
2444         https://bugs.webkit.org/show_bug.cgi?id=134028
2445
2446         Reviewed by Gustavo Noronha Silva.
2447
2448         Add custom implementation of WebKitDOMXPathNSResolver to expose it
2449         as an interface instead of a class. It also includes an internal
2450         default implementation of the interface to support methods that
2451         create a XPathNSResolver using the native implementation.
2452
2453         * PlatformGTK.cmake: Add new files to compilation.
2454         * bindings/gobject/GObjectXPathNSResolver.cpp: Added.
2455         (WebCore::GObjectXPathNSResolver::~GObjectXPathNSResolver):
2456         (WebCore::GObjectXPathNSResolver::lookupNamespaceURI): Call
2457         webkit_dom_xpath_ns_resolver_lookup_namespace_uri().
2458         * bindings/gobject/GObjectXPathNSResolver.h: Added.
2459         (WebCore::GObjectXPathNSResolver::create):
2460         (WebCore::GObjectXPathNSResolver::GObjectXPathNSResolver): Create
2461         a new GObjectXPathNSResolver for the given WebKitDOMXPathNSResolver.
2462         * bindings/gobject/WebKitDOMXPathNSResolver.cpp: Added.
2463         (webkit_dom_xpath_ns_resolver_default_init):
2464         (webkit_dom_xpath_ns_resolver_lookup_namespace_uri):
2465         (webkitDOMNativeXPathNSResolverFinalize):
2466         (webkitDOMNativeXPathNSResolverConstructor):
2467         (webkit_dom_native_xpath_ns_resolver_init):
2468         (webkit_dom_native_xpath_ns_resolver_class_init):
2469         (webkitDOMNativeXPathNSResolverLookupNamespaceURI):
2470         (webkitDOMXPathNSResolverIfaceInit):
2471         (WebKit::core): Return the native XPathNSResolver when using the
2472         internal implementation or create a custom XPathNSResolver when
2473         using a user provided WebKitDOMXPathNSResolver.
2474         (WebKit::kit):
2475         * bindings/gobject/WebKitDOMXPathNSResolver.h: Added.
2476         * bindings/gobject/WebKitDOMXPathNSResolverPrivate.h: Added.
2477         * bindings/scripts/CodeGeneratorGObject.pm:
2478         (GenerateFunction): Add exceptions for XPathNSResolver since
2479         the core method returns a PassRefPtr.
2480
2481 2014-07-01  Frédéric Wang  <fred.wang@free.fr>
2482
2483         The OpenType MATH table is not read on Mac
2484         https://bugs.webkit.org/show_bug.cgi?id=133569
2485
2486         Reviewed by Chris Fleizach.
2487
2488         An incorrect tag format is used to load the OpenType MATH table on Mac.
2489         This commit makes the format consistent with what is used for other tables on Mac.
2490         This will allow to load the MATH table and to use it for the MathML rendering.
2491
2492         No new tests. platform/graphics/opentype already contains tests for the OpenType MATH support.
2493
2494         * platform/graphics/opentype/OpenTypeMathData.cpp:
2495
2496 2014-07-01  Alex Christensen  <achristensen@webkit.org>
2497
2498         [Win64] Unreviewed build fix.
2499
2500         * WebCore.vcxproj/WebCore.vcxproj:
2501         Exclude CA files from 32 and 64 bit WinCairo builds.
2502         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
2503         Don't use a precompiled header in 32 or 63 bit builds of MockCDM.cpp.
2504
2505 2014-07-01  Alex Christensen  <achristensen@webkit.org>
2506
2507         Reduce dynamic memory allocation in css jit.
2508         https://bugs.webkit.org/show_bug.cgi?id=134416
2509
2510         Reviewed by Benjamin Poulain.
2511
2512         * cssjit/FunctionCall.h:
2513         (WebCore::FunctionCall::saveAllocatedRegisters):
2514         * cssjit/RegisterAllocator.h:
2515         * cssjit/SelectorCompiler.cpp:
2516         (WebCore::SelectorCompiler::addPseudoClassType):
2517         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2518         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
2519         * cssjit/StackAllocator.h:
2520         (WebCore::StackAllocator::push):
2521         (WebCore::StackAllocator::pop):
2522         Use inlineCapacity template parameter to reduce malloc calls.
2523         I use 32 as the inline capacity for non-register related vectors because that
2524         is probably big enough for the selector compiler, and if it is not then a malloc
2525         call will not be significant because the selector is very complex.
2526
2527 2014-07-01  Eric Carlson  <eric.carlson@apple.com>
2528
2529         WebVTT percentage value can be a float
2530         https://bugs.webkit.org/show_bug.cgi?id=134511
2531
2532         Reviewed by Brent Fulgham.
2533
2534         No new tests, existing tests modified.
2535
2536         * html/track/TextTrackCueGeneric.cpp:
2537         (WebCore::TextTrackCueGeneric::setLine): int -> double.
2538         (WebCore::TextTrackCueGeneric::setPosition): Ditto.
2539         * html/track/TextTrackCueGeneric.h:
2540
2541         * html/track/VTTCue.cpp:
2542         (WebCore::VTTCue::setLine): Ditto.
2543         (WebCore::VTTCue::setPosition):  Ditto.
2544         (WebCore::VTTCue::setCueSettings): Support floating point values for line, position, and size.
2545         (WebCore::scanPercentage): Deleted.
2546         * html/track/VTTCue.h:
2547
2548         * html/track/VTTScanner.cpp:
2549         (WebCore::VTTScanner::scanFloat): Support negative values.
2550         * html/track/VTTScanner.h:
2551
2552         * html/track/WebVTTParser.cpp: Include parseFloatPercentageValue in non-WEBVTT_REGIONS builds.
2553         * html/track/WebVTTParser.h:
2554
2555         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2556         (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Drive by change to take a cue
2557             reference rather than a pointer.
2558         (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Ditto.
2559         (WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): Loop over all cues, don't LOG that
2560             we are asking the client to delete the cue because the client will have already deleted
2561             it when status when to GenericCueData::Complete.
2562         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
2563
2564 2014-07-01  Simon Fraser  <simon.fraser@apple.com>
2565
2566         Improve behavior of position:sticky on zoomed pages
2567         https://bugs.webkit.org/show_bug.cgi?id=134535
2568         <rdar://problem/12898829>
2569
2570         Reviewed by Dean Jackson.
2571
2572         Despite r138036, position:sticky still had incorrect behavior in zoomed pages.
2573         
2574         Fix by removing the scaling of the rect from viewportConstrainedVisibleContentRect(),
2575         since all the other math happens in unscaled coordinates.
2576
2577         * rendering/RenderBoxModelObject.cpp:
2578         (WebCore::RenderBoxModelObject::constrainingRectForStickyPosition):
2579
2580 2014-07-01  Alex Christensen  <achristensen@webkit.org>
2581
2582         [WebGL] Fix PVRTC extension.
2583         https://bugs.webkit.org/show_bug.cgi?id=134525
2584
2585         Reviewed by Dean Jackson.
2586
2587         * html/canvas/WebGLRenderingContext.cpp:
2588         (WebCore::WebGLRenderingContext::validateCompressedTexDimensions):
2589         Remove the return false which I mistakenly committed in r170128
2590         and make the gl error match the S3TC error and the khronos test.
2591
2592 2014-07-01  Chris Fleizach  <cfleizach@apple.com>
2593
2594         AX: iOS does not expose ARIA toggle buttons at all (not even as a regular button)
2595         https://bugs.webkit.org/show_bug.cgi?id=133875
2596
2597         Reviewed by Enrica Casucci.
2598
2599         Support the toggle button type in iOS.
2600
2601         Test: platform/ios-sim/accessibility/toggle-button.html
2602
2603         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2604         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
2605         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
2606         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
2607
2608 2014-07-01  Dean Jackson  <dino@apple.com>
2609
2610         [iOS] Subsampled JPEG images do not draw correctly via the canvas APIs
2611         https://bugs.webkit.org/show_bug.cgi?id=134513
2612         <rdar://problem/12078860>
2613         <rdar://problem/16745393>
2614
2615         Reviewed by Tim Horton.
2616
2617         Subsampled images (e.g. JPEG) were not consistently using
2618         their original dimensions and subsampled dimensions. This caused
2619         things like texImage2D to pack the pixels incorrectly, or drawImage
2620         to squish the rendering.
2621
2622         Renamed m_scale to m_subsamplingScale on FrameData.
2623
2624         Tests: fast/canvas/image-potential-subsample.html
2625                fast/canvas/webgl/tex-image-and-sub-image-2d-with-potentially-subsampled-image.html
2626
2627         * platform/graphics/BitmapImage.cpp:
2628         (WebCore::BitmapImage::cacheFrame): Rename to m_subsamplingScale.
2629         (WebCore::BitmapImage::frameAtIndex): Ditto.
2630         * platform/graphics/BitmapImage.h:
2631         (WebCore::FrameData::FrameData): Ditto.
2632         * platform/graphics/cg/BitmapImageCG.cpp:
2633         (WebCore::FrameData::clear): Ditto.
2634         (WebCore::BitmapImage::BitmapImage): Ditto.
2635         (WebCore::BitmapImage::draw): Use a scaledSrcRect that reflects the subsampled size,
2636         rather than assuming the srcRect accurately reflects how many pixels we have
2637         in the Bitmap.
2638         (WebCore::BitmapImage::copyUnscaledFrameAtIndex):
2639         * platform/graphics/cg/GraphicsContext3DCG.cpp:
2640         (WebCore::GraphicsContext3D::ImageExtractor::extractImage): Similar fix, although this
2641         time we just ask the image decoder to take into account the subsampled size
2642         when it is "generating" a frame, causing it to use the bitmap data it has already
2643         decoded.
2644
2645 2014-07-01  Joseph Pecoraro  <pecoraro@apple.com>
2646
2647         Web Inspector: Selected DOM element highlights invisible near bottom of the viewport (topContentInset?)
2648         https://bugs.webkit.org/show_bug.cgi?id=133818
2649
2650         Reviewed by Beth Dakin.
2651
2652         * inspector/InspectorOverlay.cpp:
2653         (WebCore::InspectorOverlay::update):
2654         Take the topContentInset into account when sizing the InspectorOverlay's FrameView.
2655
2656 2014-07-01  Chris Fleizach  <cfleizach@apple.com>
2657
2658         AX: HTML indeterminate IDL attribute not mapped to checkbox value=2
2659         https://bugs.webkit.org/show_bug.cgi?id=134492
2660
2661         Reviewed by Andreas Kling.
2662
2663         Support the indeterminate attribute in AX code.
2664
2665         Test: Update existing test: accessibility/aria-checked-mixed-value
2666
2667         * accessibility/AccessibilityObject.cpp:
2668         (WebCore::AccessibilityObject::checkboxOrRadioValue):
2669
2670 2014-07-01  Myles C. Maxfield  <mmaxfield@apple.com>
2671
2672         Typing an automatic text replacement phrase after a br in contenteditable is not rendered as expected
2673         https://bugs.webkit.org/show_bug.cgi?id=133883
2674
2675         Reviewed by Enrica Casucci.
2676
2677         enclosingDeletableElement() makes sure that the element's container is editable, but not
2678         that it is capable of having content inside it (like how a <br> can't).
2679
2680         No new tests. I don't think this is testable because it requires setting some state in System Preferences.
2681
2682         * editing/DeleteButtonController.cpp:
2683         (WebCore::enclosingDeletableElement):
2684
2685 2014-07-01  Alex Christensen  <achristensen@webkit.org>
2686
2687         [iOS] Unreviewed build fix after r170640.
2688
2689         * page/EditorClient.h:
2690         (WebCore::EditorClient::selectedTelephoneNumberRangesChanged):
2691         Add ifdefs to make everything compile and link.
2692
2693 2014-07-01  Daniel Bates  <dabates@apple.com>
2694
2695         Remove unnecessary calls to std::move()
2696         https://bugs.webkit.org/show_bug.cgi?id=134493
2697
2698         Reviewed by Anders Carlsson.
2699
2700         * Modules/encryptedmedia/CDM.cpp:
2701         (WebCore::CDM::CDM):
2702         * css/CSSGrammar.y.in:
2703         * css/CSSPrimitiveValue.cpp:
2704         (WebCore::CSSPrimitiveValue::formatNumberValue):
2705         * css/MediaQuery.cpp:
2706         (WebCore::MediaQuery::MediaQuery):
2707         * platform/graphics/mac/FontMac.mm:
2708         (WebCore::Font::dashesForIntersectionsWithRect):
2709
2710 2014-07-01  Zalan Bujtas  <zalan@apple.com>
2711
2712         Subpixel rendering: Pixel crack in breadcrumbs at devforums.apple.com.
2713         https://bugs.webkit.org/show_bug.cgi?id=134491
2714
2715         Reviewed by Simon Fraser.
2716
2717         Do not early round geometry values, while computing background image position. It changes the final
2718         subpixel values and that could lead to wrong snap positions.
2719         pixelSnapBackgroundImageGeometryForPainting() takes care of geometry snapping.
2720
2721         Test: fast/backgrounds/background-image-size-double-rounding.html
2722
2723         * rendering/RenderBoxModelObject.cpp:
2724         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2725
2726 2014-07-01  Pratik Solanki  <psolanki@apple.com>
2727
2728         Create NSURLRequest lazily when USE(CFNETWORK) is enabled
2729         https://bugs.webkit.org/show_bug.cgi?id=134441
2730
2731         Reviewed by Andreas Kling.
2732
2733         No new tests. Should be covered by existing tests.
2734
2735         * platform/network/cf/ResourceRequest.h:
2736         (WebCore::ResourceRequest::ResourceRequest):
2737         (WebCore::ResourceRequest::encodingRequiresPlatformData):
2738         * platform/network/cf/ResourceRequestCFNet.cpp:
2739         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2740         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
2741         (WebCore::ResourceRequest::setStorageSession):
2742         * platform/network/cocoa/ResourceRequestCocoa.mm:
2743         (WebCore::ResourceRequest::nsURLRequest):
2744
2745 2014-07-01  Brady Eidson  <beidson@apple.com>
2746
2747         Combine the Telephone and Selection overlay controllers, updating UI behavior.
2748         https://bugs.webkit.org/show_bug.cgi?id=134461
2749
2750         Reviewed by Tim Horton.
2751
2752         * WebCore.exp.in:
2753
2754         * dom/Range.cpp:
2755         (WebCore::Range::contains): Returns true if the Range completely contains the passed-in Range.
2756         * dom/Range.h:
2757
2758 2014-07-01  Antti Koivisto  <antti@apple.com>
2759
2760         REGRESSION(160908): vube.com video won't play after going into and out of fullscreen
2761         https://bugs.webkit.org/show_bug.cgi?id=134489
2762
2763         Reviewed by Zalan Bujtas.
2764
2765         Test: fullscreen/full-screen-plugin.html
2766
2767         It is difficult to restore the render tree correctly in all cases after removing a full screen
2768         renderer from the tree. r160908 avoided dealing with this by simply always reconstructing the subtree.
2769         Unfortunately plugin lifetime is currently tied to its renderer so this would cause the plugin to restart.
2770         
2771         With this patch we avoid reconstruction in normal cases and only force it if the render tree is complicated.
2772
2773         * dom/Document.cpp:
2774         (WebCore::unwrapFullScreenRenderer):
2775         
2776             Force reconstruction conditionally.
2777
2778         (WebCore::Document::webkitWillEnterFullScreenForElement):
2779         (WebCore::Document::webkitDidExitFullScreenForElement):
2780         * rendering/RenderFullScreen.cpp:
2781         (WebCore::RenderFullScreen::wrapRenderer):
2782         (WebCore::RenderFullScreen::unwrapRenderer):
2783         
2784             Deal with the simple case of single child, possibly in anonymous wrapper.
2785             In other cases request reconstruction.
2786             This is covered by the existing fullscreen tests.
2787
2788         * rendering/RenderFullScreen.h:
2789
2790 2014-07-01  Zan Dobersek  <zdobersek@igalia.com>
2791
2792         Remove remaining Vector<> copies in WebCore accessibility code
2793         https://bugs.webkit.org/show_bug.cgi?id=133263
2794
2795         Reviewed by Darin Adler.
2796
2797         * accessibility/AXObjectCache.cpp:
2798         (WebCore::AXObjectCache::notificationPostTimerFired): Don't copy the Vector member and
2799         then clear it -- move it into the local variable instead.
2800         * accessibility/AccessibilityNodeObject.cpp:
2801         (WebCore::AccessibilityNodeObject::ariaLabeledByText): Move the axElements Vector into
2802         the AccessibilityText constructor.
2803         (WebCore::AccessibilityNodeObject::stringValue): Create a const reference to the Vector of
2804         HTMLSelectElement's list items instead of copying it.
2805         * accessibility/AccessibilityObject.h:
2806         (WebCore::AccessibilityText::AccessibilityText): Take the Vector parameter by non-const
2807         value and move it into the member variable.
2808         * accessibility/AccessibilityRenderObject.cpp: 
2809         (WebCore::AccessibilityRenderObject::stringValue): Create a const reference to the Vector
2810         of HTMLSelectElement's list items instead of copying it.
2811         (WebCore::AccessibilityRenderObject::ariaSelectedRows): Wrap the AccessibilityChildrenVector
2812         iteration in a lambda. Use it to iterate over either the newly-constructed Vector (in case
2813         the object has the tree role) or the reference to the vector returned by
2814         AccessibilityTable::rows() (in case the object is an AccessibilityTable instance).
2815
2816 2014-06-30  Commit Queue  <commit-queue@webkit.org>
2817
2818         Unreviewed, rolling out r170605.
2819         https://bugs.webkit.org/show_bug.cgi?id=134484
2820
2821         The changes cause crashes on ARM64 (Requested by benjaminp on
2822         #webkit).
2823
2824         Reverted changeset:
2825
2826         "Reduce dynamic memory allocation in css jit."
2827         https://bugs.webkit.org/show_bug.cgi?id=134416
2828         http://trac.webkit.org/changeset/170605
2829
2830 2014-06-30  Anders Carlsson  <andersca@apple.com>
2831
2832         Change the AddBackForwardItem message to take a page state object
2833         https://bugs.webkit.org/show_bug.cgi?id=134475
2834
2835         Reviewed by Andreas Kling.
2836
2837         * WebCore.exp.in:
2838
2839 2014-06-30  Benjamin Poulain  <benjamin@webkit.org>
2840
2841         [iOS][WK2] Do not put tap highlight on images that are not in links, and on applet/embed/object
2842         https://bugs.webkit.org/show_bug.cgi?id=134471
2843         <rdar://problem/17513542>
2844
2845         Reviewed by Enrica Casucci.
2846
2847         UIKit has some special code to avoid tap highlight on certain type of object. This is not very flexible
2848         since the page has no way of overriding that behavior.
2849
2850         This patch implement the same feature by changing the default stylesheet. The tap highlight is disabled
2851         by default for those object, and enabled for images that are in a link.
2852
2853         * css/html.css:
2854         (applet, embed, object, img):
2855         (:-webkit-any-link img):
2856
2857 2014-06-30  Myles C. Maxfield  <mmaxfield@apple.com>
2858
2859         All Indic text is rendered as boxes on iOS
2860         https://bugs.webkit.org/show_bug.cgi?id=134464
2861
2862         Reviewed by Simon Fraser.
2863
2864         I made a typo in r170207.
2865
2866         Test: fast/text/indic.html
2867
2868         * platform/graphics/ios/FontCacheIOS.mm:
2869         (WebCore::languageSpecificFallbackFont):
2870
2871 2014-06-30  Myles C. Maxfield  <mmaxfield@apple.com>
2872
2873         [iOS] languageSpecificFallbackFont() is not consistent
2874         https://bugs.webkit.org/show_bug.cgi?id=134473
2875
2876         Reviewed by Darin Adler.
2877
2878         It can use "<" throughout the function as well as keeping the fallthrough behavior consistent.
2879
2880         No tests because there is no behavior change.
2881
2882         * platform/graphics/ios/FontCacheIOS.mm:
2883         (WebCore::languageSpecificFallbackFont):
2884
2885 2014-06-30  Brent Fulgham  <bfulgham@apple.com>
2886
2887         [Win] Unreviewed gardening.
2888
2889         * WebCore.vcxproj/WebCore.vcxproj: Do not compile JSFileException
2890         and JSFileReaderSync multiple times.
2891
2892 2014-06-30  Daniel Bates  <dabates@apple.com>
2893
2894         Avoid copying function object in lambda function in ScrollingThread::dispatchBarrier(); actually use move semantics
2895         https://bugs.webkit.org/show_bug.cgi?id=134470
2896
2897         Reviewed by Anders Carlsson.
2898
2899         Currently we always copy construct the captured std::function object when calling callOnMainThread()
2900         in the lambda function created in ScrollingThread::dispatchBarrier() because captured variables are
2901         const in a lambda expression's body by default. That is, the std::function object is captured as const.
2902         Instead, we should mark this lambda expression as mutable so the captured std::function object is
2903         non-const and hence we can use move semantics when passing it to callOnMainThread().
2904
2905         * page/scrolling/ScrollingThread.cpp:
2906         (WebCore::ScrollingThread::dispatchBarrier):
2907
2908 2014-06-30  Anders Carlsson  <andersca@apple.com>
2909
2910         Adopt the legacy session decoding inside WebPage::restoreSession for now
2911         https://bugs.webkit.org/show_bug.cgi?id=134465
2912
2913         Reviewed by Sam Weinig.
2914
2915         * WebCore.exp.in:
2916
2917 2014-06-30  Commit Queue  <commit-queue@webkit.org>
2918
2919         Unreviewed, rolling out r170578.
2920         https://bugs.webkit.org/show_bug.cgi?id=134462
2921
2922         causes assertions loading nytimes.com on iOS (Requested by
2923         smfr on #webkit).
2924
2925         Reverted changeset:
2926
2927         "Create NSURLRequest lazily when USE(CFNETWORK) is enabled"
2928         https://bugs.webkit.org/show_bug.cgi?id=134441
2929         http://trac.webkit.org/changeset/170578
2930
2931 2014-06-30  Alex Christensen  <achristensen@webkit.org>
2932
2933         Reduce dynamic memory allocation in css jit.
2934         https://bugs.webkit.org/show_bug.cgi?id=134416
2935
2936         Reviewed by Benjamin Poulain.
2937
2938         * cssjit/FunctionCall.h:
2939         (WebCore::FunctionCall::FunctionCall):
2940         (WebCore::FunctionCall::saveAllocatedCallerSavedRegisters):
2941         * cssjit/RegisterAllocator.h:
2942         * cssjit/SelectorCompiler.cpp:
2943         (WebCore::SelectorCompiler::addPseudoClassType):
2944         (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
2945         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2946         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
2947         Use inlineCapacity template parameter to reduce malloc calls.
2948         I use 16 and 32 as the inline capacity for non-register related vectors because that
2949         is probably big enough for the selector compiler, and if it is not then a malloc
2950         call will not be significant because the selector is very complex.
2951         * cssjit/StackAllocator.h:
2952         (WebCore::StackAllocator::push):
2953         Pass a vector of stack references to match calls to pop and to avoid a call to appendVector.
2954
2955 2014-06-30  Alex Christensen  <achristensen@webkit.org>
2956
2957         Use non-thumb registers in armv7 css jit.
2958         https://bugs.webkit.org/show_bug.cgi?id=134450
2959
2960         Reviewed by Geoff Garen.
2961
2962         * cssjit/RegisterAllocator.h:
2963         (WebCore::RegisterAllocator::isValidRegister):
2964         (WebCore::RegisterAllocator::isCallerSavedRegister):
2965         Use additional general purpose registers.
2966         * cssjit/SelectorCompiler.cpp:
2967         (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
2968         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2969         Always succeed when compiling css selectors.
2970
2971 2014-06-30  Myles C. Maxfield  <mmaxfield@apple.com>
2972
2973         Tiles on bottom of screen are not always allocated when necessary
2974         https://bugs.webkit.org/show_bug.cgi?id=134272
2975
2976         Reviewed by Simon Fraser.
2977
2978         The initial visibleRect is in the coordinate of the root layer, so its origin
2979         is at the top left of the view. The initial rect we were using doesn't
2980         include the contents inset, so it was too short, which was causing tiles near
2981         the bottom of the screen to not always be allocated if the tile threshold was
2982         close to the bottom of the view. Instead, we want to include the contents
2983         inset size so the visible rect includes the entire view.
2984         GraphicsLayerCA::recursiveCommitChanges() takes care of mapping and cropping
2985         the visible rect into the tiled layer's coordinate system, at which point it
2986         is used for visible tile logic.
2987
2988         Test: platform/mac-wk2/tiled-drawing/visible-rect-content-inset.html
2989
2990         * platform/graphics/ca/TileCoverageMap.cpp:
2991         (WebCore::TileCoverageMap::update):
2992         * rendering/RenderLayerCompositor.cpp:
2993         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
2994
2995 2014-06-30  Brent Fulgham  <bfulgham@apple.com>
2996
2997         [Win] Unreviewed project gardening.
2998
2999         * WebCore.vcxproj/WebCore.vcxproj: Clean up path information so
3000         files appear in appropriate places in project view.
3001         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3002
3003 2014-06-30  Zalan Bujtas  <zalan@apple.com>
3004
3005         Remove redundant repaintCompositedLayers() parameter and its dependencies.
3006         https://bugs.webkit.org/show_bug.cgi?id=134431
3007
3008         Reviewed by Darin Adler.
3009
3010         No change in functionality.
3011
3012         * rendering/RenderLayer.cpp:
3013         (WebCore::RenderLayer::convertToPixelSnappedLayerCoords): Deleted.
3014         (WebCore::RenderLayer::convertToLayerCoords): Deleted.
3015         * rendering/RenderLayer.h:
3016         * rendering/RenderLayerCompositor.cpp:
3017         (WebCore::RenderLayerCompositor::repaintCompositedLayers):
3018         (WebCore::RenderLayerCompositor::recursiveRepaintLayer):
3019         * rendering/RenderLayerCompositor.h:
3020
3021 2014-06-30  Alex Christensen  <achristensen@webkit.org>
3022
3023         Remove webkit prefix from pointer lock.
3024         https://bugs.webkit.org/show_bug.cgi?id=134312
3025
3026         Reviewed by Dean Jackson.
3027
3028         * dom/Document.cpp:
3029         (WebCore::Document::exitPointerLock):
3030         (WebCore::Document::pointerLockElement):
3031         (WebCore::Document::webkitExitPointerLock): Deleted.
3032         (WebCore::Document::webkitPointerLockElement): Deleted.
3033         * dom/Document.h:
3034         * dom/Document.idl:
3035         * dom/Element.cpp:
3036         (WebCore::Element::requestPointerLock):
3037         (WebCore::Element::webkitRequestPointerLock): Deleted.
3038         * dom/Element.h:
3039         * dom/Element.idl:
3040         * dom/EventNames.h:
3041         * dom/MouseEvent.idl:
3042         * dom/MouseRelatedEvent.h:
3043         (WebCore::MouseRelatedEvent::movementX):
3044         (WebCore::MouseRelatedEvent::movementY):
3045         (WebCore::MouseRelatedEvent::webkitMovementX): Deleted.
3046         (WebCore::MouseRelatedEvent::webkitMovementY): Deleted.
3047         * page/PointerLockController.cpp:
3048         (WebCore::PointerLockController::PointerLockController):
3049         Initialize all data members.
3050         (WebCore::PointerLockController::requestPointerLock):
3051         (WebCore::PointerLockController::didAcquirePointerLock):
3052         (WebCore::PointerLockController::didNotAcquirePointerLock):
3053         (WebCore::PointerLockController::didLosePointerLock):
3054
3055 2014-06-30  Myles C. Maxfield  <mmaxfield@apple.com>
3056
3057         U16_IS_SURROGATE should not be called with a UChar32
3058         https://bugs.webkit.org/show_bug.cgi?id=134440
3059
3060         Reviewed by Darin Adler.
3061
3062         No new tests because there is no behavior change.
3063
3064         * platform/graphics/mac/ComplexTextController.cpp:
3065         (WebCore::advanceByCombiningCharacterSequence):
3066
3067 2014-06-30  Ryuan Choi  <ryuan.choi@samsung.com>
3068
3069         [EFL] Remove m_evasObject from Widget
3070         https://bugs.webkit.org/show_bug.cgi?id=134442
3071
3072         Reviewed by Gyuyoung Kim.
3073
3074         Since WebKit1/EFL was dropped, we don't need to keep the m_evasObject
3075         in the Widget.cpp because it's not used for WebKit2/Efl.
3076
3077         * platform/Widget.h:
3078         (WebCore::Widget::evasObject): Deleted.
3079         * platform/efl/ScrollbarEfl.cpp:
3080         Removed WebKit1/Efl specific code which uses m_evasObject.
3081         It will be a dummy until WebKit2/Efl support proper scrollbar implementation.
3082         (WebCore::ScrollbarEfl::ScrollbarEfl):
3083         (WebCore::ScrollbarEfl::~ScrollbarEfl):
3084         (WebCore::ScrollbarEfl::setParent):
3085         (WebCore::ScrollbarEfl::frameRectsChanged):
3086         (WebCore::ScrollbarEfl::invalidate):
3087         (ScrollbarEfl::ScrollbarEfl): Deleted.
3088         (ScrollbarEfl::~ScrollbarEfl): Deleted.
3089         (scrollbarEflEdjeMessage): Deleted.
3090         (ScrollbarEfl::setParent): Deleted.
3091         (ScrollbarEfl::updateThumbPosition): Deleted.
3092         (ScrollbarEfl::updateThumbProportion): Deleted.
3093         (ScrollbarEfl::updateThumbPositionAndProportion): Deleted.
3094         (ScrollbarEfl::frameRectsChanged): Deleted.
3095         (ScrollbarEfl::invalidate): Deleted.
3096         * platform/efl/ScrollbarEfl.h:
3097         Removed unnecessary methods. In addition, applied final, override keyword.
3098         (WebCore::ScrollbarEfl::handleMouseMoveEvent): Deleted.
3099         (WebCore::ScrollbarEfl::handleMouseOutEvent): Deleted.
3100         (WebCore::ScrollbarEfl::handleMousePressEvent): Deleted.
3101         (WebCore::ScrollbarEfl::handleMouseReleaseEvent): Deleted.
3102         * platform/efl/WidgetEfl.cpp:
3103         (WebCore::Widget::Widget):
3104         (WebCore::Widget::setEvasObject): Deleted.
3105
3106 2014-06-30  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
3107
3108         Fix deprecated warning with bison 3
3109         https://bugs.webkit.org/show_bug.cgi?id=133791
3110
3111         Reviewed by Csaba Osztrogonác.
3112
3113         No new tests because no functional changes.
3114
3115         * css/CSSGrammar.y.in:
3116         * xml/XPathGrammar.y:
3117
3118 2014-06-30  Jaehun Lim  <ljaehun.lim@samsung.com>
3119
3120         Remove HarfBuzzShaper::setDrawRange()
3121         https://bugs.webkit.org/show_bug.cgi?id=134243
3122
3123         Reviewed by Gyuyoung Kim.
3124
3125         setDrawRange() is not used anywhere. Remove it.
3126         And m_fromIndex and m_toIndex are changed by only setDrawRange().
3127         So remove them too and use the default values instead of them.
3128
3129         No new tests, no behavior changes.
3130
3131         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
3132         (WebCore::HarfBuzzShaper::HarfBuzzShaper):
3133         (WebCore::HarfBuzzShaper::fillGlyphBufferFromHarfBuzzRun):
3134             currentCharacterIndex is unsigned, always greater than 0. Clean up if statements.
3135         (WebCore::HarfBuzzShaper::setDrawRange): Deleted.
3136         * platform/graphics/harfbuzz/HarfBuzzShaper.h:
3137
3138 2014-06-29  Pratik Solanki  <psolanki@apple.com>
3139
3140         Create NSURLRequest lazily when USE(CFNETWORK) is enabled
3141         https://bugs.webkit.org/show_bug.cgi?id=134441
3142
3143         Reviewed by Sam Weinig.
3144
3145         No new tests. Should be covered by exsting tests.
3146
3147         * platform/network/cf/ResourceRequest.h:
3148         (WebCore::ResourceRequest::ResourceRequest):
3149         * platform/network/cf/ResourceRequestCFNet.cpp:
3150         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3151         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
3152         (WebCore::ResourceRequest::setStorageSession):
3153         * platform/network/cocoa/ResourceRequestCocoa.mm:
3154         (WebCore::ResourceRequest::nsURLRequest):
3155
3156 2014-06-29  Ryuan Choi  <ryuan.choi@samsung.com>
3157
3158         [EFL] Remove netscape plugin implementation from WebCore
3159         https://bugs.webkit.org/show_bug.cgi?id=134438
3160
3161         Reviewed by Gyuyoung Kim.
3162
3163         Because WebKit1/Efl was dropped, PluginPackageEfl.cpp and PluginViewEfl.cpp are not necessary.
3164
3165         * PlatformEfl.cmake:
3166         * plugins/efl/PluginPackageEfl.cpp: Removed.
3167         * plugins/efl/PluginViewEfl.cpp: Removed.
3168         * plugins/x11/PluginViewX11.cpp: Removed.
3169         This file is to share common code between WebKit1/Efl and WebKit1/GTk.
3170         Now, both ports are dropped WebKit1 support and the GTK port already removed the related files at r167016.
3171
3172 2014-06-29  Yoav Weiss  <yoav@yoav.ws>
3173
3174         Add support for HTMLImageElement's sizes attribute
3175         https://bugs.webkit.org/show_bug.cgi?id=133620
3176
3177         Reviewed by Dean Jackson.
3178
3179         Tests: fast/dom/HTMLImageElement/sizes/image-sizes-1x.html
3180                fast/dom/HTMLImageElement/sizes/image-sizes-2x.html
3181                fast/dom/HTMLImageElement/sizes/image-sizes-js-change.html
3182                fast/dom/HTMLImageElement/sizes/image-sizes-js-innerhtml.html
3183                http/tests/loading/sizes/preload-image-sizes-2x.html
3184                http/tests/loading/sizes/preload-image-sizes.html
3185
3186         This patch adds support for HTMLImageElement's sizes attribute and the
3187         related srcset extended syntax as defined in
3188         http://picture.responsiveimages.org/.
3189         This sizes attribute syntax is added to the CSSGrammar and parsed by
3190         the CSSParser.
3191         The SourceSizeList class is generated by the parser, and used to get
3192         the final source size.
3193         HTMLImageElement and HTMLPreloadScanner send this value to
3194         HTMLSrcsetParser.
3195         HTMLSrcsetParser uses this value in order to pick the right resource.
3196
3197         * CMakeLists.txt: Added css/SourceSizeList.cpp.
3198         * Configurations/FeatureDefines.xcconfig: Added the PICTURE_SIZES flag.
3199         * WebCore.vcxproj/WebCore.vcxproj: Added css/SourceSizeList.*.
3200         * WebCore.vcxproj/WebCore.vcxproj.filters: Added css/SourceSizeList.*.
3201         * WebCore.xcodeproj/project.pbxproj: Added css/SourceSizeList.*.
3202         * css/CSSGrammar.y.in: Added 4 grammar rules that define a Media condition,
3203         Source size list, Source size length and source size.
3204         * css/CSSParser.cpp:
3205         (WebCore::CSSParser::parseSizesAttribute): Parse the sizes attribute.
3206         (WebCore::CSSParser::detectAtToken): Set the token to SIZESATTR.
3207         * css/CSSParser.h:
3208         * css/SourceSizeList.cpp: Added. Defined the SourceSize and SourceSizeList classes.
3209         (WebCore::SourceSize::match):
3210         (WebCore::computeLength):
3211         (WebCore::defaultValue):
3212         (WebCore::SourceSize::length):
3213         (WebCore::SourceSizeList::parseSizesAttribute):
3214         (WebCore::SourceSizeList::getEffectiveSize):
3215         * css/SourceSizeList.h: Added.
3216         (WebCore::SourceSize::SourceSize):
3217         (WebCore::SourceSizeList::append):
3218         * html/HTMLImageElement.cpp: Integrated sizes attribute parsing and added currentSrc.
3219         (WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
3220         (WebCore::HTMLImageElement::parseAttribute):
3221         (WebCore::HTMLImageElement::currentSrc):
3222         * html/HTMLImageElement.h:
3223         * html/HTMLImageElement.idl:
3224         * html/parser/HTMLDocumentParser.cpp: Added information required for sizes parsing to
3225         HTMLPreloadScanner calls.
3226         (WebCore::HTMLDocumentParser::pumpTokenizer):
3227         (WebCore::HTMLDocumentParser::insert):
3228         (WebCore::HTMLDocumentParser::append):
3229         (WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan):
3230         * html/parser/HTMLPreloadScanner.cpp: Integrated sizes attribute parsing.
3231         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
3232         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
3233         (WebCore::TokenPreloadScanner::scan):
3234         (WebCore::HTMLPreloadScanner::scan):
3235         * html/parser/HTMLPreloadScanner.h:
3236         * html/parser/HTMLSrcsetParser.cpp: Added 'w' descriptor parsing sizes based normalization.
3237         (WebCore::parseDescriptors):
3238         (WebCore::pickBestImageCandidate):
3239         (WebCore::bestFitSourceForImageAttributes):
3240         * html/parser/HTMLSrcsetParser.h:
3241
3242 2014-06-29  Andreas Kling  <akling@apple.com>
3243
3244         No need to lazily initialize ResourceResponse internals when accessing timing data.
3245         <https://webkit.org/b/134437>
3246         <rdar://problem/17499876>
3247
3248         When building with ENABLE(WEB_TIMING), the last thing that would happen when
3249         serializing a ResourceResponse in the network process is that we'd retrieve
3250         the ResourceLoadTiming to encode it as part of the response. Doing so would
3251         trigger the lazy instantiation of ResourceResponse's internal data structures.
3252
3253         Since timing data is not actually lazily instantiated, we can just not do that.
3254
3255         This shaves off ~550ms of network process main thread time on PLT, reducing
3256         response latency by not doing unnecessary stuff before letting the web process
3257         look at the downloaded data.
3258
3259         Reviewed by Gavin Barraclough.
3260
3261         * WebCore.exp.in:
3262         * platform/network/ResourceResponseBase.cpp:
3263         (WebCore::ResourceResponseBase::adopt):
3264         (WebCore::ResourceResponseBase::resourceLoadTiming): Deleted.
3265         (WebCore::ResourceResponseBase::setResourceLoadTiming): Deleted.
3266         * platform/network/ResourceResponseBase.h:
3267         (WebCore::ResourceResponseBase::resourceLoadTiming):
3268
3269 2014-06-29  Pratik Solanki  <pratik.solanki@gmail.com>
3270
3271         Refactor ResourceRequest into Cocoa and iOS specific files
3272         https://bugs.webkit.org/show_bug.cgi?id=134430
3273
3274         Reviewed by Andreas Kling.
3275
3276         No new tests because no functional changes.
3277
3278         * WebCore.xcodeproj/project.pbxproj:
3279         * platform/network/cf/ResourceRequestCFNet.cpp:
3280         (WebCore::ResourceRequest::applyWebArchiveHackForMail): Deleted.
3281         * platform/network/cocoa/ResourceRequestCocoa.mm: Copied from Source/WebCore/platform/network/mac/ResourceRequestMac.mm.
3282         (WebCore::ResourceRequest::nsURLRequest):
3283         (WebCore::ResourceRequest::cfURLRequest):
3284         (WebCore::ResourceRequest::doUpdateResourceRequest):
3285         (WebCore::ResourceRequest::doUpdateResourceHTTPBody):
3286         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3287         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
3288         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
3289         (WebCore::ResourceRequest::applyWebArchiveHackForMail):
3290         (WebCore::ResourceRequest::setStorageSession):
3291         * platform/network/ios/ResourceRequestIOS.mm: Added.
3292         (WebCore::ResourceRequest::useQuickLookResourceCachingQuirks):
3293         (WebCore::ResourceRequest::ResourceRequest):
3294         (WebCore::ResourceRequest::updateNSURLRequest):
3295         * platform/network/mac/ResourceRequestMac.mm:
3296         (WebCore::initQuickLookResourceCachingQuirks):
3297         (WebCore::ResourceRequest::useQuickLookResourceCachingQuirks):
3298         (WebCore::ResourceRequest::ResourceRequest):
3299         (WebCore::ResourceRequest::updateNSURLRequest):
3300         (WebCore::ResourceRequest::applyWebArchiveHackForMail):
3301         (WebCore::ResourceRequest::nsURLRequest): Deleted.
3302         (WebCore::ResourceRequest::cfURLRequest): Deleted.
3303         (WebCore::ResourceRequest::doUpdateResourceRequest): Deleted.
3304         (WebCore::ResourceRequest::doUpdateResourceHTTPBody): Deleted.
3305         (WebCore::ResourceRequest::doUpdatePlatformRequest): Deleted.
3306         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody): Deleted.
3307         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Deleted.
3308         (WebCore::ResourceRequest::setStorageSession): Deleted.
3309
3310 2014-06-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3311
3312         TextCodecICU::encode turns the whole string as yen signs if there is any backslash in it
3313         https://bugs.webkit.org/show_bug.cgi?id=133678
3314
3315         Reviewed by Alexey Proskuryakov.
3316
3317         Test: fast/encoding/backslash-encoding-jp.html
3318
3319         * platform/text/TextCodecICU.cpp:
3320         (WebCore::TextCodecICU::encode): fixed the copy of characters other than backslash.
3321
3322 2014-06-28  Dean Jackson  <dino@apple.com>
3323
3324         [iOS] Pinching into a video (fullscreen gesture) leaves page zoomed in
3325         https://bugs.webkit.org/show_bug.cgi?id=134433
3326         <rdar://problem/16630794>
3327
3328         Reviewed by Eric Carlson.
3329
3330         Detect the number of target touches (those directly on the
3331         video element) and disable the page zoom if it looks
3332         like the user is trying to trigger fullscreen.
3333
3334         * Modules/mediacontrols/mediaControlsiOS.js:
3335         (ControllerIOS.prototype.handleBaseGestureStart): If we are seeing
3336         two touches in this video element, don't trigger fullscreen. The
3337         exception is if we haven't yet started playback.
3338         (ControllerIOS.prototype.handleBaseGestureChange): Don't allow fullscreen
3339         if we haven't started playback (iOS 7 behaviour).
3340         (ControllerIOS.prototype.handleWrapperTouchStart): Keep track of the
3341         number of targetted touches.
3342
3343 2014-06-27  Simon Fraser  <simon.fraser@apple.com>
3344
3345         [iOS WK2] position:fixed inside accelerated overflow:scroll is jumpy
3346         https://bugs.webkit.org/show_bug.cgi?id=134426
3347         <rdar://problem/17474523>
3348
3349         Reviewed by Tim Horton.
3350
3351         After committing a new layer tree (with possibly stale position:fixed layer
3352         positions), we need the scrolling tree to update those positions based on
3353         the current scroll offset.
3354         
3355         Give ScrollingTreeScrollingNode an implementation of updateLayersAfterAncestorChange()
3356         which is required to update fixed/sticky child nodes.
3357
3358         * WebCore.exp.in:
3359         * page/scrolling/ScrollingTreeScrollingNode.cpp:
3360         (WebCore::ScrollingTreeScrollingNode::updateLayersAfterAncestorChange):
3361         * page/scrolling/ScrollingTreeScrollingNode.h:
3362
3363 2014-06-28  Juan A. Suarez Romero  <jasuarez@igalia.com>  and  Carlos Garcia Campos  <cgarcia@igalia.com>
3364
3365         [GTK] Use public getter/setter in GObject DOM bindings properties implementation.
3366         https://bugs.webkit.org/show_bug.cgi?id=134390.
3367
3368         Reviewed by Carlos Garcia Campos.
3369
3370         The current GObject DOM bindings generator is duplicating code when
3371         implementing the get/set_property methods and the public
3372         getters/setters, instead of making one invoking the other.
3373         
3374         This commit changes this behaviour so the code is not duplicated,
3375         making it easier to maintain.
3376
3377         No new tests needed.
3378
3379         * bindings/scripts/CodeGeneratorGObject.pm:
3380         (GenerateProperty):
3381         (GenerateProperties):
3382         (WriteData):
3383         (GetCoreObject): Deleted.
3384         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
3385         (webkit_dom_test_active_dom_object_get_property):
3386         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
3387         (webkit_dom_test_event_constructor_get_property):
3388         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
3389         (webkit_dom_test_exception_get_property):
3390         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
3391         (webkit_dom_test_interface_set_property):
3392         (webkit_dom_test_interface_get_property):
3393         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.cpp:
3394         (webkit_dom_test_nondeterministic_set_property):
3395         (webkit_dom_test_nondeterministic_get_property):
3396         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
3397         (webkit_dom_test_obj_set_property):
3398         (webkit_dom_test_obj_get_property):
3399         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
3400         (webkit_dom_test_serialized_script_value_interface_get_property):
3401         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
3402         (webkit_dom_test_typedefs_set_property):
3403         (webkit_dom_test_typedefs_get_property):
3404         * bindings/scripts/test/GObject/WebKitDOMattribute.cpp:
3405         (webkit_dom_test_exception_get_property):
3406         (webkit_dom_attribute_get_property):
3407
3408 2014-06-28  Radu Stavila  <stavila@adobe.com>
3409
3410         [New Multicolumn] Elements with rounded corners and overflow:hidden do not properly clip their content
3411         https://bugs.webkit.org/show_bug.cgi?id=133941
3412
3413         Reviewed by Darin Adler.
3414
3415         When having a multicol element inside an element with overflow:hidden and border-radius,
3416         the fragments representing the columns need to have the border radius set also, to ensure
3417         proper clipping.
3418
3419         Test: fast/multicol/newmulticol/multicol-clip-rounded-corners.html
3420
3421         * rendering/RenderLayer.cpp:
3422         (WebCore::RenderLayer::collectFragments):
3423
3424 2014-06-27  Zalan Bujtas  <zalan@apple.com>
3425
3426         Subpixel rendering: Background clipping with subpixel behaves differently when composited.
3427         https://bugs.webkit.org/show_bug.cgi?id=134422
3428
3429         Reviewed by Simon Fraser.
3430
3431         Adjust cliprect with the subpixel offset from the graphics layer the same way we do it for painting.
3432         It ensures that cliprect starts from the right position when graphics layer is not on the same
3433         coordinates as the associated render layer.
3434
3435         Test: compositing/hidpi-compositing-layer-with-subpixel-offset-accumulation-clipping.html
3436
3437         * rendering/RenderLayer.cpp:
3438         (WebCore::RenderLayer::clipToRect):
3439         (WebCore::RenderLayer::paintLayer):
3440         (WebCore::RenderLayer::applyFilters):
3441         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
3442         (WebCore::RenderLayer::paintBackgroundForFragments):
3443         (WebCore::RenderLayer::paintForegroundForFragments):
3444         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
3445         (WebCore::RenderLayer::paintOutlineForFragments):
3446         (WebCore::RenderLayer::paintMaskForFragments):
3447         (WebCore::RenderLayer::paintOverflowControlsForFragments):
3448         (WebCore::RenderLayer::calculateClipRects):
3449         * rendering/RenderLayer.h:
3450
3451 2014-06-27  Brent Fulgham  <bfulgham@apple.com>
3452
3453         [Win] Implement parts of the AVFOUNDATION_LOADER_DELEGATE logic for Windows
3454         https://bugs.webkit.org/show_bug.cgi?id=134418
3455
3456         Reviewed by Eric Carlson.
3457
3458         Land an initial implementation of AVFOUNDATION_LOADER_DELEGATE for
3459         Windows.
3460