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