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