Tighten XMLHttpRequest setRequestHeader value check
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-10-20  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2
3         Tighten XMLHttpRequest setRequestHeader value check
4         https://bugs.webkit.org/show_bug.cgi?id=128593
5
6         Reviewed by Darin Adler.
7
8         Test: http/tests/xmlhttprequest/set-bad-headervalue.html
9
10         * platform/network/HTTPParsers.cpp:
11         (WebCore::isValidHTTPHeaderValue): Updated header values check according RFC 7230.
12         (WebCore::isValidHTTPToken): Renamed variable name and updated RFC related comment.
13
14 2014-10-20  Michael Saboff  <msaboff@apple.com>
15
16         Make post checkin suggested changes to r174847
17         https://bugs.webkit.org/show_bug.cgi?id=137885
18
19         Reviewed by Mark Lam.
20
21         Eliminated the creation of a temporary Identifier when comparing propertyName to "open".
22         Made the suggested post checkin change to put the declaration of "entry" into the if.
23
24         * bindings/js/JSHTMLDocumentCustom.cpp:
25         (WebCore::JSHTMLDocument::getOwnPropertySlot):
26
27 2014-10-20  Chris Dumez  <cdumez@apple.com>
28
29         Use is<>() / downcast<>() for SpinButtonElement
30         https://bugs.webkit.org/show_bug.cgi?id=137896
31
32         Reviewed by Gyuyoung Kim.
33
34         Use is<>() / downcast<>() for SpinButtonElement instead of
35         isSpinButtonElement() / static_cast for consistency with the rest of
36         the code and for safety.
37
38         No new tests, no behavior change.
39
40         * accessibility/AccessibilityRenderObject.cpp:
41         (WebCore::AccessibilityRenderObject::addTextFieldChildren):
42         * html/shadow/SpinButtonElement.h:
43         (isType):
44         * rendering/RenderTheme.cpp:
45         (WebCore::RenderTheme::isSpinUpButtonPartPressed):
46         (WebCore::RenderTheme::isHovered):
47         (WebCore::RenderTheme::isSpinUpButtonPartHovered):
48
49 2014-10-20  Roger Fong  <roger_fong@apple.com>
50
51         Use glFlush instead of glFinish when drawing WebGL output to screen.
52         https://bugs.webkit.org/show_bug.cgi?id=137897.
53         <rdar://problem/15846550>
54
55         Reviewed by Brent Fulgham.
56
57         Passes all conformance tests.
58         Performance tested by http://threejs.org/examples/#webgl_performance and Unity WebGL performance tests.
59
60         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
61         (WebCore::GraphicsContext3D::prepareTexture):
62         Use glFlush instead of glFinish. glFinish is a blocking operation pushed out queued up WebGL operations and then waits until 
63         every operation has completed before returning and every pixel has been updated. This causes severe performance problems,
64         about a 10 fps difference on http://threejs.org/examples/#webgl_performance. glFlush, like glFinish,
65         forces all queued WebGL operations to take place, but returns immediately. Switching to glFlush does not seem
66         make our rendering quality any worse for the handful of sites I've tested and makes our performance on WebGL much better.
67         However, we should continue to be on the watch for any potential rendering issues after this lands.
68
69 2014-10-20  Benjamin Poulain  <bpoulain@apple.com>
70
71         Generalize the compilation of :not() to support arbitrary selector lists
72         https://bugs.webkit.org/show_bug.cgi?id=137843
73
74         Reviewed by Andreas Kling.
75
76         This builds :not() on top of the code created for :nth-child(An+B of selectorList)
77         to support any selector list.
78
79         The tests for the JIT were added previously:
80         -not-boundaries.html
81         -not-backtracking.html
82
83         * cssjit/SelectorCompiler.cpp:
84         (WebCore::SelectorCompiler::addPseudoClassType):
85         Any :not() of a selector is handled through a simple selector list. Cases like
86         :not(foo, bar) simply generate not([fragmentFoo, bragmentBar]).
87
88         Old cases like :not(foo):not(bar) simply add those cases to the selector list,
89         generating not([fragmentFoo, bragmentBar]).
90
91         (WebCore::SelectorCompiler::minimumRegisterRequirements):
92         Register pressure is now tracked through computeBacktrackingMemoryRequirements.
93
94         (WebCore::SelectorCompiler::hasAnyCombinators):
95         (WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
96         (WebCore::SelectorCompiler::computeBacktrackingInformation):
97         Abstract the code creating Selector Lists from :nth-child(of). Use that for :not()
98         and  :nth-child(of).
99
100         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesNotPseudoClass):
101
102 2014-10-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
103
104         Use std::unique_ptr<>|make_unique<> in PluginView::scheduleRequest()
105         https://bugs.webkit.org/show_bug.cgi?id=137874
106
107         Reviewed by Andreas Kling.
108
109         No new tests, no behavior change.
110
111         * plugins/PluginView.cpp:
112         (WebCore::PluginView::requestTimerFired):
113         (WebCore::PluginView::scheduleRequest): Replace PassOwnPtr with std::unique_ptr.
114         (WebCore::PluginView::load): Create PluginRequest using std::make_unique.
115         * plugins/PluginView.h:
116
117 2014-10-20  Beth Dakin  <bdakin@apple.com>
118
119         Speculative build fix.
120
121         * platform/spi/mac/NSViewSPI.h:
122
123 2014-10-20  Beth Dakin  <bdakin@apple.com>
124
125         Add support for action menus
126         https://bugs.webkit.org/show_bug.cgi?id=137891
127         rdar://problem/18451638
128         rdar://problem/18694470
129
130         Reviewed by Anders Carlsson.
131
132         New SPI that is needed for this.
133         * WebCore.exp.in:
134         * WebCore.xcodeproj/project.pbxproj:
135         * platform/spi/mac: Added.
136         * platform/spi/mac/NSViewSPI.h: Added.
137
138 2014-10-20  Dean Jackson  <dino@apple.com>
139
140         [Mac] Support "inverted-colors" and "monochrome" media feature.
141         https://bugs.webkit.org/show_bug.cgi?id=137535
142         <rdar://problem/18586398>
143
144         Rolling out the Windows part of this to fix the build.
145
146         * platform/win/PlatformScreenWin.cpp:
147         (WebCore::screenHasInvertedColors): Revert to a stub function.
148
149 2014-10-20  Chris Dumez  <cdumez@apple.com>
150
151         Unreviewed EFL / GTK build fix after r174898.
152
153         Add missing header include.
154
155         * accessibility/AccessibilityARIAGrid.cpp:
156
157 2014-10-20  Dean Jackson  <dino@apple.com>
158
159         [Mac] Support "inverted-colors" and "monochrome" media feature.
160         https://bugs.webkit.org/show_bug.cgi?id=137535
161         <rdar://problem/18586398>
162
163         Reviewed by Brent Fulgham.
164
165         Add a new media query from CSS Level 4, "inverted-colors", and
166         implement the Apple backends for the "monochrome" media query.
167
168         The platform code went into PlatformScreenMac, which already
169         had a screenIsMonochrome method. This now calls into Core
170         Graphics via SPI. I added a screenHasInvertedColors
171         method which tests for inversion. On iOS, there is public API
172         for both queries. On Windows, we try to use CoreGraphics.
173
174         At the moment neither of these media queries re-evaluate
175         automatically if the user changes their mode. The page will
176         need to be reloaded. It is possible to detect a change on iOS,
177         but not OS X.
178         https://bugs.webkit.org/show_bug.cgi?id=137868
179
180         I decided to not add an ENABLE flag for this, mostly because it
181         is such an isolated feature and seems very unlikely to be
182         controversial. I don't expect the syntax to change. (I'm sure
183         this comment will come back to haunt me.)
184
185         Testing this automatically is slightly tricky. We'd need
186         to expose SPI to invert the user's screen, but then we get
187         inverted images from our testing which could interfere with concurrent
188         operations. Instead I've included some tests that exercise
189         the "false" parts of the media query, with explanations as
190         to why they would fail if the display is inverted.
191
192         Tests: fast/media/mq-inverted-colors.html
193                fast/media/mq-monochrome.html
194
195         * css/CSSValueKeywords.in: Add the "inverted" keyword for "inverted-colors".
196         * css/MediaFeatureNames.h: Add the "inverted-colors" feature name.
197         * css/MediaQueryEvaluator.cpp:
198         (WebCore::inverted_colorsMediaFeatureEval): Implementation of the new media query.
199         * css/MediaQueryExp.cpp:
200         (WebCore::featureWithCSSValueID): The new query takes an id...
201         (WebCore::featureWithoutValue): ... or no value.
202         * platform/PlatformScreen.h: Add "screenHasInvertedColors".
203         * platform/efl/PlatformScreenEfl.cpp:
204         (WebCore::screenHasInvertedColors): Stub implementation.
205         * platform/gtk/PlatformScreenGtk.cpp:
206         (WebCore::screenHasInvertedColors): Ditto.
207         * platform/ios/PlatformScreenIOS.mm:
208         (WebCore::screenHasInvertedColors): Call into the platform accessibility API.
209         (WebCore::screenIsMonochrome): Ditto.
210         * platform/mac/PlatformScreenMac.mm:
211         (WebCore::screenIsMonochrome): Call into the CoreGraphics SPI.
212         (WebCore::screenHasInvertedColors): Call into the CoreGraphics SPI.
213         * platform/win/PlatformScreenWin.cpp:
214         (WebCore::screenHasInvertedColors): Call into CoreGraphics if we're using it.
215
216 2014-10-20  Chris Dumez  <cdumez@apple.com>
217
218         Use is<>() / downcast<>() for Accessibility objects
219         https://bugs.webkit.org/show_bug.cgi?id=137286
220
221         Reviewed by Darin Adler.
222
223         Use is<>() / downcast<>() for Accessibility objects and clean up the
224         surrounding code.
225
226         No new tests, no behavior change.
227
228         * accessibility/AXObjectCache.cpp:
229         (WebCore::AXObjectCache::focusedImageMapUIElement):
230         (WebCore::AXObjectCache::notificationPostTimerFired):
231         * accessibility/AccessibilityARIAGrid.cpp:
232         (WebCore::AccessibilityARIAGrid::addTableCellChild):
233         (WebCore::AccessibilityARIAGrid::addChildren):
234         * accessibility/AccessibilityARIAGridCell.cpp:
235         (WebCore::AccessibilityARIAGridCell::parentTable):
236         (WebCore::AccessibilityARIAGridCell::rowIndexRange):
237         * accessibility/AccessibilityARIAGridRow.cpp:
238         (WebCore::AccessibilityARIAGridRow::disclosedRows):
239         (WebCore::AccessibilityARIAGridRow::disclosedByRow):
240         (WebCore::AccessibilityARIAGridRow::parentTable):
241         * accessibility/AccessibilityARIAGridRow.h:
242         * accessibility/AccessibilityImageMapLink.cpp:
243         (WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
244         * accessibility/AccessibilityImageMapLink.h:
245         * accessibility/AccessibilityList.h:
246         * accessibility/AccessibilityListBox.cpp:
247         (WebCore::AccessibilityListBox::setSelectedChildren):
248         (WebCore::AccessibilityListBox::selectedChildren):
249         (WebCore::AccessibilityListBox::listBoxOptionAccessibilityObject):
250         * accessibility/AccessibilityListBox.h:
251         * accessibility/AccessibilityListBoxOption.h:
252         * accessibility/AccessibilityMenuList.cpp:
253         (WebCore::AccessibilityMenuList::addChildren):
254         (WebCore::AccessibilityMenuList::didUpdateActiveOption):
255         * accessibility/AccessibilityMenuList.h:
256         * accessibility/AccessibilityMenuListOption.h:
257         * accessibility/AccessibilityMenuListPopup.cpp:
258         (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
259         * accessibility/AccessibilityMenuListPopup.h:
260         * accessibility/AccessibilityMockObject.h:
261         * accessibility/AccessibilityNodeObject.cpp:
262         (WebCore::AccessibilityNodeObject::textUnderElement):
263         * accessibility/AccessibilityNodeObject.h:
264         * accessibility/AccessibilityObject.cpp:
265         (WebCore::appendChildrenToArray):
266         (WebCore::AccessibilityObject::scrollViewAncestor):
267         * accessibility/AccessibilityObject.h:
268         * accessibility/AccessibilityRenderObject.cpp:
269         (WebCore::AccessibilityRenderObject::getDocumentLinks):
270         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
271         (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
272         (WebCore::AccessibilityRenderObject::addImageMapChildren):
273         (WebCore::AccessibilityRenderObject::addTextFieldChildren):
274         (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
275         (WebCore::AccessibilityRenderObject::ariaSelectedRows):
276         * accessibility/AccessibilityRenderObject.h:
277         * accessibility/AccessibilitySVGRoot.h:
278         * accessibility/AccessibilityScrollView.cpp:
279         (WebCore::AccessibilityScrollView::addChildScrollbar):
280         * accessibility/AccessibilityScrollView.h:
281         * accessibility/AccessibilityScrollbar.h:
282         * accessibility/AccessibilitySlider.cpp:
283         (WebCore::AccessibilitySlider::addChildren):
284         * accessibility/AccessibilitySlider.h:
285         * accessibility/AccessibilitySpinButton.cpp:
286         (WebCore::AccessibilitySpinButton::addChildren):
287         (WebCore::AccessibilitySpinButtonPart::press):
288         * accessibility/AccessibilitySpinButton.h:
289         * accessibility/AccessibilityTable.cpp:
290         (WebCore::AccessibilityTable::addChildren):
291         (WebCore::AccessibilityTable::addChildrenFromSection):
292         (WebCore::AccessibilityTable::headerContainer):
293         (WebCore::AccessibilityTable::columnHeaders):
294         (WebCore::AccessibilityTable::rowHeaders):
295         (WebCore::AccessibilityTable::cellForColumnAndRow):
296         * accessibility/AccessibilityTable.h:
297         Make isAccessibilityTable() public and mark as final so that callers
298         can benefit from tighter typing, as isAccessibilityTable() is
299         stricter than isTable(). isTable() indicates that the object is an
300         AccessibilityTable and is equivalent to is<AccessibilityTable>(object).
301         isAccessibilityTable() is equivalent to "isTable() && renderer()".
302
303         * accessibility/AccessibilityTableCell.cpp:
304         (WebCore::AccessibilityTableCell::parentTable):
305         * accessibility/AccessibilityTableCell.h:
306         * accessibility/AccessibilityTableColumn.cpp:
307         (WebCore::AccessibilityTableColumn::headerObject):
308         (WebCore::AccessibilityTableColumn::addChildren):
309         * accessibility/AccessibilityTableColumn.h:
310         * accessibility/AccessibilityTableHeaderContainer.cpp:
311         (WebCore::AccessibilityTableHeaderContainer::addChildren):
312         * accessibility/AccessibilityTableRow.cpp:
313         (WebCore::AccessibilityTableRow::parentTable):
314         (WebCore::AccessibilityTableRow::headerObject):
315         * accessibility/AccessibilityTableRow.h:
316         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
317         (webkitAccessibleSelectionClearSelection):
318         (webkitAccessibleSelectionSelectAllSelection):
319         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
320         (core):
321         (cell):
322         (cellAtIndex):
323         (webkitAccessibleTableGetIndexAt):
324         (webkitAccessibleTableGetNColumns):
325         (webkitAccessibleTableGetNRows):
326         (webkitAccessibleTableGetColumnHeader):
327         (webkitAccessibleTableGetRowHeader):
328         * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
329         (webkitAccessibleTableCellGetColumnHeaderCells):
330         (webkitAccessibleTableCellGetRowHeaderCells):
331         (webkitAccessibleTableCellGetColumnSpan):
332         (webkitAccessibleTableCellGetRowSpan):
333         (webkitAccessibleTableCellGetPosition):
334         * accessibility/ios/AccessibilityObjectIOS.mm:
335         (WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
336         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
337         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
338         (-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]):
339         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
340         (AXAttributeStringSetElement):
341         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
342         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
343         (-[WebAccessibilityObjectWrapper subrole]):
344         (-[WebAccessibilityObjectWrapper roleDescription]):
345         (-[WebAccessibilityObjectWrapper scrollViewParent]):
346         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
347         (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
348         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
349         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
350         * inspector/InspectorDOMAgent.cpp:
351         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
352         * rendering/RenderMenuList.cpp:
353         (RenderMenuList::didUpdateActiveOption):
354
355 2014-10-20  Joseph Pecoraro  <pecoraro@apple.com>
356
357         Web Inspector: Generate all Inspector domains together in JavaScriptCore
358         https://bugs.webkit.org/show_bug.cgi?id=137748
359
360         Reviewed by Brian Burg.
361
362         After moving the json files into JavaScriptCore update the includes,
363         and names of functions that were previously prefixed.
364
365         * CMakeLists.txt:
366         * DerivedSources.make:
367         * ForwardingHeaders/inspector/InspectorBackendDispatchers.h: Added.
368         * ForwardingHeaders/inspector/InspectorFrontendDispatchers.h: Added.
369         * ForwardingHeaders/inspector/InspectorJSBackendDispatchers.h: Removed.
370         * ForwardingHeaders/inspector/InspectorJSFrontendDispatchers.h: Removed.
371         * ForwardingHeaders/inspector/InspectorJSProtocolTypes.h: Removed.
372         * ForwardingHeaders/inspector/InspectorProtocolTypesBase.h: Added.
373         * WebCore.vcxproj/WebCore.vcxproj:
374         * WebCore.vcxproj/WebCore.vcxproj.filters:
375         * WebCore.vcxproj/copyForwardingHeaders.cmd:
376         * WebCore.xcodeproj/project.pbxproj:
377         * inspector/CommandLineAPIHost.cpp:
378         * inspector/InspectorApplicationCacheAgent.cpp:
379         * inspector/InspectorApplicationCacheAgent.h:
380         * inspector/InspectorCSSAgent.cpp:
381         * inspector/InspectorCSSAgent.h:
382         * inspector/InspectorController.cpp:
383         * inspector/InspectorDOMAgent.cpp:
384         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
385         * inspector/InspectorDOMAgent.h:
386         * inspector/InspectorDOMDebuggerAgent.cpp:
387         * inspector/InspectorDOMDebuggerAgent.h:
388         * inspector/InspectorDOMStorageAgent.cpp:
389         * inspector/InspectorDOMStorageAgent.h:
390         * inspector/InspectorDatabaseAgent.cpp:
391         * inspector/InspectorDatabaseAgent.h:
392         * inspector/InspectorDatabaseResource.cpp:
393         * inspector/InspectorDatabaseResource.h:
394         * inspector/InspectorFrontendClientLocal.cpp:
395         * inspector/InspectorIndexedDBAgent.cpp:
396         * inspector/InspectorIndexedDBAgent.h:
397         * inspector/InspectorLayerTreeAgent.cpp:
398         * inspector/InspectorLayerTreeAgent.h:
399         * inspector/InspectorPageAgent.cpp:
400         * inspector/InspectorPageAgent.h:
401         * inspector/InspectorReplayAgent.cpp:
402         * inspector/InspectorReplayAgent.h:
403         * inspector/InspectorResourceAgent.cpp:
404         * inspector/InspectorResourceAgent.h:
405         * inspector/InspectorStyleSheet.cpp:
406         * inspector/InspectorStyleSheet.h:
407         * inspector/InspectorTimelineAgent.cpp:
408         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
409         * inspector/InspectorTimelineAgent.h:
410         * inspector/InspectorWorkerAgent.cpp:
411         * inspector/InspectorWorkerAgent.h:
412         * inspector/PageRuntimeAgent.h:
413         * inspector/TimelineRecordFactory.cpp:
414         * inspector/WorkerInspectorController.cpp:
415
416 2014-10-20  Andy Estes  <aestes@apple.com>
417
418         Fix the GTK build.
419
420         * dom/RenderedDocumentMarker.h:
421
422 2014-10-19  Antti Koivisto  <antti@apple.com>
423
424         Avoid unnecessary NSURLResponse construction for QuickLook on iOS
425         https://bugs.webkit.org/show_bug.cgi?id=137876
426
427         Reviewed by Andy Estes.
428
429         QuickLook specific code path creates NSURLResponse in the web process for every response.
430         It is rarely needed so this is unnecessary work.
431
432         * WebCore.exp.in:
433         * platform/network/ios/QuickLook.h:
434         * platform/network/ios/QuickLook.mm:
435         (WebCore::isMainResourceLoader):
436         (WebCore::QuickLookHandle::shouldCreateForMIMEType):
437
438             Separate function for testing if QuickLookHandle is needed.
439
440         (WebCore::QuickLookHandle::create):
441
442             Switch the interface to take ResourceResponse.
443
444 2014-10-20  Andy Estes  <aestes@apple.com>
445
446         Fix the iOS build.
447
448         * WebCore.xcodeproj/project.pbxproj:
449         * dom/RenderedDocumentMarker.h:
450         * page/ios/FrameIOS.mm:
451         (WebCore::Frame::interpretationsForCurrentRoot):
452
453 2014-10-20  Benjamin Poulain  <benjamin@webkit.org>
454
455         Update the <link>'s link status
456         https://bugs.webkit.org/show_bug.cgi?id=137861
457
458         Reviewed by Chris Dumez.
459
460         In the latest HTML spec, <link> has the link status
461         if it has a 'href' attribute, exactly like <a> and <area>:
462             https://html.spec.whatwg.org/multipage/scripting.html#selector-link
463
464         This patch updates WebKit accordingly.
465
466         Tests: fast/css/link-basics.html
467                fast/selectors/link-basics-xhtml.xhtml
468                fast/selectors/link-basics.html
469                fast/selectors/webkit-any-link-basics.html
470
471         * html/HTMLLinkElement.cpp:
472         (WebCore::HTMLLinkElement::parseAttribute):
473
474 2014-10-20  Chris Dumez  <cdumez@apple.com>
475
476         [Mac] Optimize cookiesForDOM() by filtering and serializing cookies in a single pass
477         https://bugs.webkit.org/show_bug.cgi?id=137869
478
479         Reviewed by Darin Adler.
480
481         Optimize cookiesForDOM() by filtering and serializing in 1 pass instead of 2.
482
483         Previously, when accessing document.cookie, we ended up doing the following:
484         1. Call wkHTTPCookiesForURL() to get an NSArray of NSHTTPCookies.
485         2. Call filterCookies() to filter out cookies that are httpOnly or with an
486            empty name, thus allocating a new NSMutableArray.
487         3. Call NSHTTPCookie's requestHeaderFieldsWithCookies() to serialize the
488            cookies
489         4. Construct a WTF::String from the NSString*
490
491         There were several inefficiencies here:
492         1. We needed to pre-filter the cookies and allocate a new NSMutableArray
493            before calling requestHeaderFieldsWithCookies()
494         2. requestHeaderFieldsWithCookies() does more things that we actually need.
495            It constructs a Dictionary of header fields, of which we query the
496            "Cookie" field, even though we merely want a ';'-separated string
497            representation of the cookies in "key=value" form.
498
499         With this patch, we now take care of the string serialization ourselves,
500         using a StringBuilder as it is trivial to do. This also allows us to filter
501         out the httpOnly/invalid cookies as we do the serialization instead of
502         having a first pass to do so.
503
504         When scrolling the http://www.apple.com/iphone/ entire page down, then up,
505         se were spending ~13.1% of the NetworkProcess time in cookiesForDOM()
506         (~96ms) on my machine. With the patch, we spend ~23% less time in
507         cookiesForDOM() (~74ms).
508
509         No new tests, no behavior change.
510
511         * platform/network/mac/CookieJarMac.mm:
512         (WebCore::cookiesForSession):
513         (WebCore::cookiesForDOM):
514         (WebCore::cookieRequestHeaderFieldValue):
515
516 2014-10-19  Chris Dumez  <cdumez@apple.com>
517
518         Kill toRenderedDocumentMarker() by using tighter typing
519         https://bugs.webkit.org/show_bug.cgi?id=137858
520
521         Reviewed by Darin Adler.
522
523         Kill toRenderedDocumentMarker() by using tighter typing. This method
524         was doing no type validation, just a static_cast<>().
525
526         No new tests, no behavior change.
527
528         * dom/DocumentMarkerController.cpp:
529         (WebCore::DocumentMarkerController::addTextMatchMarker):
530         (WebCore::DocumentMarkerController::markersFor):
531         (WebCore::DocumentMarkerController::markersInRange):
532         (DocumentMarkerController::hasMarkers):
533         * dom/DocumentMarkerController.h:
534         * dom/RenderedDocumentMarker.h:
535         (WebCore::toRenderedDocumentMarker): Deleted.
536         * editing/AlternativeTextController.cpp:
537         (WebCore::markersHaveIdenticalDescription):
538         (WebCore::AlternativeTextController::respondToChangedSelection):
539         (WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection):
540         (WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
541         (WebCore::AlternativeTextController::applyDictationAlternative):
542         * editing/CompositeEditCommand.cpp:
543         (WebCore::copyMarkers):
544         (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
545         * editing/DeleteSelectionCommand.cpp:
546         (WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
547         * editing/Editor.cpp:
548         (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
549         (WebCore::Editor::selectionStartHasMarkerFor):
550         * rendering/InlineTextBox.cpp:
551         (WebCore::InlineTextBox::paintDocumentMarker):
552         (WebCore::InlineTextBox::paintTextMatchMarker):
553         (WebCore::InlineTextBox::computeRectForReplacementMarker):
554         (WebCore::InlineTextBox::paintDocumentMarkers):
555         * rendering/InlineTextBox.h:
556         * rendering/svg/SVGInlineFlowBox.cpp:
557         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
558         * testing/Internals.cpp:
559         (WebCore::Internals::markerAt):
560         (WebCore::Internals::markerRangeForNode):
561         (WebCore::Internals::markerDescriptionForNode):
562         * testing/Internals.h:
563
564 2014-10-19  Chris Dumez  <cdumez@apple.com>
565
566         Use is<>() / downcast<>() for all remaining RenderObject subclasses
567         https://bugs.webkit.org/show_bug.cgi?id=137845
568
569         Reviewed by Darin Adler.
570
571         Use is<>() / downcast<>() for all remaining RenderObject subclasses and
572         clean up the surrounding code.
573
574         No new tests, no behavior change.
575
576         * accessibility/AccessibilityProgressIndicator.cpp:
577         (WebCore::AccessibilityProgressIndicator::progressElement):
578         (WebCore::AccessibilityProgressIndicator::meterElement):
579         * accessibility/AccessibilityRenderObject.cpp:
580         (WebCore::AccessibilityRenderObject::layoutCount):
581         (WebCore::AccessibilityRenderObject::widgetForAttachmentView):
582         (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
583         * dom/Document.cpp:
584         (WebCore::widgetForElement):
585         * dom/Position.cpp:
586         (WebCore::Position::getInlineBoxAndOffset):
587         * dom/WebKitNamedFlow.cpp:
588         (WebCore::WebKitNamedFlow::overset):
589         (WebCore::WebKitNamedFlow::firstEmptyRegionIndex):
590         (WebCore::WebKitNamedFlow::getRegionsByContent):
591         (WebCore::WebKitNamedFlow::getRegions):
592         * editing/FrameSelection.cpp:
593         (WebCore::isFrameElement):
594         * html/HTMLEmbedElement.cpp:
595         (WebCore::findWidgetRenderer):
596         * html/HTMLFrameOwnerElement.cpp:
597         (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
598         (WebCore::HTMLFrameOwnerElement::renderWidget):
599         * html/HTMLMediaElement.cpp:
600         (WebCore::HTMLMediaElement::parseAttribute):
601         * html/HTMLMeterElement.cpp:
602         (WebCore::HTMLMeterElement::renderMeter):
603         * html/HTMLPlugInElement.cpp:
604         (WebCore::HTMLPlugInElement::supportsFocus):
605         * html/HTMLPlugInImageElement.cpp:
606         (WebCore::HTMLPlugInImageElement::renderEmbeddedObject):
607         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
608         * html/HTMLProgressElement.cpp:
609         (WebCore::HTMLProgressElement::renderProgress):
610         * html/PluginDocument.cpp:
611         (WebCore::PluginDocument::pluginWidget):
612         * html/shadow/MediaControlElements.cpp:
613         (WebCore::MediaControlTimelineElement::defaultEventHandler):
614         (WebCore::MediaControlTextTrackContainerElement::updateSizes):
615         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
616         * inspector/InspectorLayerTreeAgent.cpp:
617         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
618         * inspector/InspectorOverlay.cpp:
619         (WebCore::buildObjectForElementInfo):
620         * loader/SubframeLoader.cpp:
621         (WebCore::SubframeLoader::loadSubframe):
622         * page/Frame.cpp:
623         (WebCore::Frame::ownerRenderer):
624         * page/FrameView.cpp:
625         (WebCore::FrameView::layout):
626         * page/gtk/EventHandlerGtk.cpp:
627         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
628         * page/ios/EventHandlerIOS.mm:
629         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
630         (WebCore::EventHandler::passSubframeEventToSubframe):
631         * page/mac/EventHandlerMac.mm:
632         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
633         (WebCore::EventHandler::passSubframeEventToSubframe):
634         (WebCore::widgetForEventTarget):
635         * platform/efl/RenderThemeEfl.cpp:
636         (WebCore::RenderThemeEfl::applyEdjeRTLState):
637         * rendering/InlineTextBox.cpp:
638         (WebCore::fontToUse):
639         (WebCore::InlineTextBox::emphasisMarkExistsAndIsAbove):
640         (WebCore::InlineTextBox::paint):
641         * rendering/LayoutState.cpp:
642         (WebCore::LayoutState::LayoutState):
643         * rendering/RenderBlock.cpp:
644         (WebCore::RenderBlock::collapseAnonymousBoxChild):
645         (WebCore::RenderBlock::simplifiedLayout):
646         (WebCore::RenderBlock::paintObject):
647         (WebCore::RenderBlock::selectionGaps):
648         (WebCore::RenderBlock::nodeAtPoint):
649         * rendering/RenderBlockFlow.cpp:
650         (WebCore::RenderBlockFlow::layoutBlock):
651         (WebCore::RenderBlockFlow::hitTestFloats):
652         (WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
653         * rendering/RenderBlockLineLayout.cpp:
654         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
655         * rendering/RenderBox.cpp:
656         (WebCore::RenderBox::scroll):
657         (WebCore::RenderBox::nodeAtPoint):
658         (WebCore::RenderBox::repaintLayerRectsForImage):
659         (WebCore::RenderBox::mapLocalToContainer):
660         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
661         * rendering/RenderCombineText.h:
662         * rendering/RenderElement.cpp:
663         (WebCore::RenderElement::adjustStyleDifference):
664         (WebCore::addLayers):
665         (WebCore::RenderElement::removeLayers):
666         (WebCore::RenderElement::moveLayers):
667         (WebCore::RenderElement::setNeedsPositionedMovementLayout):
668         (WebCore::RenderElement::renderNamedFlowThreadWrapper):
669         * rendering/RenderEmbeddedObject.h:
670         * rendering/RenderFlowThread.cpp:
671         (WebCore::RenderFlowThread::validateRegions):
672         (WebCore::RenderFlowThread::hasCompositingRegionDescendant):
673         (WebCore::RenderFlowThread::regionForCompositedLayer):
674         (WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
675         (WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight):
676         (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
677         (WebCore::RenderFlowThread::addForcedRegionBreak):
678         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
679         * rendering/RenderFlowThread.h:
680         * rendering/RenderLayer.cpp:
681         (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
682         (WebCore::transparencyClipBox):
683         (WebCore::accumulateOffsetTowardsAncestor):
684         (WebCore::RenderLayer::collectFragments):
685         (WebCore::RenderLayer::hitTest):
686         (WebCore::RenderLayer::isFlowThreadCollectingGraphicsLayersUnderRegions):
687         (WebCore::RenderLayer::calculateClipRects):
688         * rendering/RenderLayerBacking.cpp:
689         (WebCore::RenderLayerBacking::updateAfterWidgetResize):
690         (WebCore::RenderLayerBacking::updateConfiguration):
691         (WebCore::isRestartedPlugin):
692         (WebCore::isCompositedPlugin):
693         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
694         (WebCore::RenderLayerBacking::containsPaintedContent):
695         * rendering/RenderLayerCompositor.cpp:
696         (WebCore::RenderLayerCompositor::updateBacking):
697         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
698         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
699         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
700         (WebCore::RenderLayerCompositor::reasonsForCompositing):
701         (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
702         (WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
703         (WebCore::RenderLayerCompositor::requiresCompositingForFrame):
704         * rendering/RenderLayerModelObject.h:
705         * rendering/RenderLineBreak.h:
706         * rendering/RenderMeter.h:
707         * rendering/RenderMultiColumnFlowThread.cpp:
708         (WebCore::RenderMultiColumnFlowThread::firstMultiColumnSet):
709         (WebCore::RenderMultiColumnFlowThread::lastMultiColumnSet):
710         (WebCore::RenderMultiColumnFlowThread::layout):
711         (WebCore::RenderMultiColumnFlowThread::addRegionToThread):
712         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
713         (WebCore::RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved):
714         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantBoxLaidOut):
715         (WebCore::RenderMultiColumnFlowThread::setPageBreak):
716         (WebCore::RenderMultiColumnFlowThread::updateMinimumPageHeight):
717         (WebCore::RenderMultiColumnFlowThread::setRegionRangeForBox):
718         (WebCore::RenderMultiColumnFlowThread::addForcedRegionBreak):
719         (WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegion):
720         * rendering/RenderMultiColumnFlowThread.h:
721         * rendering/RenderMultiColumnSet.cpp:
722         (WebCore::RenderMultiColumnSet::nextSiblingMultiColumnSet):
723         (WebCore::RenderMultiColumnSet::previousSiblingMultiColumnSet):
724         * rendering/RenderMultiColumnSet.h:
725         * rendering/RenderMultiColumnSpannerPlaceholder.h:
726         * rendering/RenderNamedFlowFragment.cpp:
727         (WebCore::RenderNamedFlowFragment::checkRegionStyle):
728         (WebCore::RenderNamedFlowFragment::namedFlowThread):
729         * rendering/RenderNamedFlowFragment.h:
730         * rendering/RenderNamedFlowThread.cpp:
731         (WebCore::RenderNamedFlowThread::updateWritingMode):
732         (WebCore::addFragmentToList):
733         (WebCore::RenderNamedFlowThread::addRegionToThread):
734         (WebCore::RenderNamedFlowThread::removeRegionFromThread):
735         (WebCore::RenderNamedFlowThread::fragmentFromRenderBoxAsRenderBlock):
736         (WebCore::RenderNamedFlowThread::fragmentFromAbsolutePointAndBox):
737         (WebCore::RenderNamedFlowThread::checkInvalidRegions):
738         (WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
739         (WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
740         * rendering/RenderNamedFlowThread.h:
741         * rendering/RenderObject.cpp:
742         (WebCore::scheduleRelayoutForSubtree):
743         (WebCore::RenderObject::setLayerNeedsFullRepaint):
744         (WebCore::RenderObject::setLayerNeedsFullRepaintForPositionedMovementLayout):
745         (WebCore::RenderObject::repaintUsingContainer):
746         (WebCore::RenderObject::selectionRoot):
747         (WebCore::RenderObject::shouldUseTransformFromContainer):
748         (WebCore::RenderObject::getTransformFromContainer):
749         (WebCore::RenderObject::isRooted):
750         (WebCore::RenderObject::willBeDestroyed):
751         (WebCore::RenderObject::isComposited):
752         (WebCore::RenderObject::currentRenderNamedFlowFragment):
753         * rendering/RenderObject.h:
754         * rendering/RenderProgress.h:
755         * rendering/RenderRuby.cpp:
756         (WebCore::lastRubyRun):
757         * rendering/RenderRubyBase.cpp:
758         (WebCore::RenderRubyBase::rubyRun):
759         * rendering/RenderRubyRun.cpp:
760         (WebCore::RenderRubyRun::removeChild):
761         * rendering/RenderRubyRun.h:
762         * rendering/RenderSlider.h:
763         * rendering/RenderText.cpp:
764         (WebCore::RenderText::widthFromCache):
765         * rendering/RenderThemeGtk.cpp:
766         (WebCore::RenderThemeGtk::calculateProgressRect):
767         * rendering/RenderThemeIOS.mm:
768         (WebCore::RenderThemeIOS::paintProgressBar):
769         * rendering/RenderThemeMac.mm:
770         (WebCore::RenderThemeMac::paintMeter):
771         (WebCore::RenderThemeMac::paintProgressBar):
772         * rendering/RenderThemeSafari.cpp:
773         (WebCore::RenderThemeSafari::paintMeter):
774         * rendering/RenderThemeWin.cpp:
775         (WebCore::RenderThemeWin::paintMeter):
776         * rendering/RenderTreeAsText.cpp:
777         (WebCore::writeRenderRegionList):
778         (WebCore::writeLayers):
779         * rendering/RenderVideo.h:
780         * rendering/RenderView.cpp:
781         (WebCore::SelectionIterator::checkForSpanner):
782         (WebCore::isComposited):
783         * rendering/RenderView.h:
784         * rendering/RenderWidget.h:
785         * rendering/line/BreakingContextInlineHeaders.h:
786         (WebCore::BreakingContext::handleText):
787         * rendering/line/LineBreaker.cpp:
788         (WebCore::LineBreaker::skipLeadingWhitespace):
789         * testing/Internals.cpp:
790         (WebCore::Internals::isPluginUnavailabilityIndicatorObscured):
791
792 2014-10-19  Chris Dumez  <cdumez@apple.com>
793
794         Use SPECIALIZE_TYPE_TRAITS_*() macro for RenderScrollbar
795         https://bugs.webkit.org/show_bug.cgi?id=137854
796
797         Reviewed by Darin Adler.
798
799         Use SPECIALIZE_TYPE_TRAITS_*() macro for RenderScrollbar instead of a
800         custom toRenderScrollbar() function, for consistency.
801
802         No new tests, no behavior change.
803
804         * rendering/RenderScrollbar.h:
805         (isType):
806         (WebCore::toRenderScrollbar): Deleted.
807         * rendering/RenderScrollbarTheme.cpp:
808         (WebCore::RenderScrollbarTheme::minimumThumbLength):
809         (WebCore::RenderScrollbarTheme::backButtonRect):
810         (WebCore::RenderScrollbarTheme::forwardButtonRect):
811         (WebCore::RenderScrollbarTheme::trackRect):
812         (WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):
813         (WebCore::RenderScrollbarTheme::willPaintScrollbar):
814         (WebCore::RenderScrollbarTheme::didPaintScrollbar):
815         (WebCore::RenderScrollbarTheme::paintScrollbarBackground):
816         (WebCore::RenderScrollbarTheme::paintTrackBackground):
817         (WebCore::RenderScrollbarTheme::paintTrackPiece):
818         (WebCore::RenderScrollbarTheme::paintButton):
819         (WebCore::RenderScrollbarTheme::paintThumb):
820
821 2014-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
822
823         [GTK] Move GtkDragAndDropHelper from Platform to WebKit2
824         https://bugs.webkit.org/show_bug.cgi?id=137422
825
826         Reviewed by Martin Robinson.
827
828         Remove ClipboardUtilitiesGtk and GtkDragAndDropHelper.
829
830         * PlatformGTK.cmake:
831         * platform/gtk/ClipboardUtilitiesGtk.cpp: Removed.
832         * platform/gtk/ClipboardUtilitiesGtk.h: Removed.
833         * platform/gtk/GtkDragAndDropHelper.cpp: Removed.
834         * platform/gtk/GtkDragAndDropHelper.h: Removed.
835
836 2014-10-19  Roger Fong  <roger_fong@apple.com>
837
838         Unreviewed. Style fix following r174855.
839
840         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
841         (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
842
843 2014-10-18  Antti Koivisto  <antti@apple.com>
844
845         REGRESSION (r173356): Safari can't install a profile, gets 'Download Failed error
846         https://bugs.webkit.org/show_bug.cgi?id=137855
847
848         Reviewed by Dan Bernstein.
849
850         We lose the sniffed MIME type for the response when synthesizing an NSURLResponse. Sniffing requires
851         backchannel data that the synthesized response doesn't have.
852
853         Test: http/tests/mime/mime-type-sniff.html
854
855         * platform/network/mac/ResourceResponseMac.mm:
856         (WebCore::ResourceResponse::initNSURLResponse):
857
858             When synthesizing NSURLResponse explicitly set the Content-type header to the sniffed type.
859
860 2014-10-18  Chris Dumez  <cdumez@apple.com>
861
862         [Mac] Use Fast enumeration consistently in WebFontCache.mm
863         https://bugs.webkit.org/show_bug.cgi?id=137791
864
865         Reviewed by Darin Adler.
866
867         Use fast enumeration consistently in WebFontCache.mm as this results in
868         more efficient, concise and safer code.
869
870         No new tests, no behavior change.
871
872         * platform/mac/WebFontCache.mm:
873         (+[WebFontCache getTraits:inFamily:]):
874         Reserve Vector capacity before the loop as we know how many traits we
875         are going to append. Also use uncheckedAppend() for performance.
876
877         (+[WebFontCache internalFontWithFamily:traits:weight:size:]):
878
879 2014-10-18  Chris Fleizach  <cfleizach@apple.com>
880
881         AX: Tables with <colgroups> are not reporting table column headers
882         https://bugs.webkit.org/show_bug.cgi?id=137846
883
884         Reviewed by Mario Sanchez Prada.
885
886         The code to search for header objects was getting stuck on anonymous RenderTableSections.
887         We also need to check more rows for headers, in case the first row or more is not visible or is empty.
888
889         Test: accessibility/table-column-headers-with-captions.html
890
891         * accessibility/AccessibilityTableColumn.cpp:
892         (WebCore::AccessibilityTableColumn::headerObject):
893         (WebCore::AccessibilityTableColumn::headerObjectForSection):
894
895 2014-10-18  KwangHyuk Kim  <hyuki.kim@samsung.com>
896
897         [EFL] build break occurs on webkit efl build.
898         https://bugs.webkit.org/show_bug.cgi?id=137844
899
900         Reviewed by Gyuyoung Kim.
901
902         As local variable elementAddressRegisterIndex is assigned but not used, there is build break for the webkit efl.
903
904         No new tests because it's just to fix build break.
905
906         * cssjit/SelectorCompiler.cpp:
907         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
908
909 2014-10-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
910
911         Apply std::unique_ptr to FooFont classes
912         https://bugs.webkit.org/show_bug.cgi?id=137769
913
914         Reviewed by Andreas Kling.
915
916         As a step to use std::unique_ptr, this patch applies std::unique_ptr to Font classes.
917
918         No new tests, no behavior changes.
919
920         * platform/graphics/Font.cpp:
921         (WebCore::retrieveOrAddCachedFontGlyphs):
922         (WebCore::Font::createLayout):
923         * platform/graphics/SimpleFontData.cpp:
924         (WebCore::SimpleFontData::DerivedFontData::create):
925         * platform/graphics/SimpleFontData.h:
926         Remove create() factory function because public ctor and std::make_unique<> can replace it.
927         * platform/graphics/mac/ComplexTextController.cpp:
928         (WebCore::Font::createLayout):
929
930 2014-10-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
931
932         Use std::unique_ptr in WebCore/bindings
933         https://bugs.webkit.org/show_bug.cgi?id=137808
934
935         Reviewed by Andreas Kling.
936
937         Clean up PassOwnPtr|OwnPtr in WebCore/bindings by using std::unique_ptr, std::make_unique
938         and WTF::move.
939
940         No new tests, no behavior changes.
941
942         * bindings/generic/ActiveDOMCallback.h:
943         * bindings/js/JSMessageEventCustom.cpp:
944         (WebCore::handleInitMessageEvent):
945         * bindings/js/SerializedScriptValue.cpp:
946         (WebCore::SerializedScriptValue::SerializedScriptValue):
947         (WebCore::SerializedScriptValue::transferArrayBuffers):
948         (WebCore::SerializedScriptValue::create):
949         * bindings/js/SerializedScriptValue.h:
950         * bindings/js/WorkerScriptDebugServer.cpp:
951         (WebCore::WorkerScriptDebugServer::interruptAndRunTask):
952         * bindings/js/WorkerScriptDebugServer.h:
953         * inspector/WorkerDebuggerAgent.cpp:
954         (WebCore::WorkerDebuggerAgent::interruptAndDispatchInspectorCommands):
955
956 2014-10-16  Roger Fong  <roger_fong@apple.com>
957
958         Calling glReadPixels with BGRA format on an NVIDIA machine with an opaque context returns the wrong alpha values.
959         https://bugs.webkit.org/show_bug.cgi?id=137793.
960         <rdar://problem/15408133>
961
962         Reviewed by Dean Jackson.
963
964         This fixes conformance test context/context-attribute-preserve-drawing-buffer.html.
965
966         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
967         (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
968         On an NVIDIA machine, when the context has alpha turned off, call glReadPixels with RGBA format and then convert to RGBA.
969
970 2014-10-17  Chris Dumez  <cdumez@apple.com>
971
972         Use is<>() / downcast<>() for all SVG RenderObjects
973         https://bugs.webkit.org/show_bug.cgi?id=137840
974
975         Reviewed by Benjamin Poulain.
976
977         Use is<>() / downcast<>() for all SVG RenderObjects and clean up the
978         surrounding code.
979
980         No new tests, no behaviro change.
981
982         * accessibility/AccessibilityRenderObject.cpp:
983         (WebCore::AccessibilityRenderObject::supportsPath):
984         (WebCore::AccessibilityRenderObject::elementPath):
985         * page/FrameView.cpp:
986         (WebCore::FrameView::applyOverflowToViewport):
987         (WebCore::FrameView::forceLayoutParentViewIfNeeded):
988         * rendering/RenderLayerFilterInfo.cpp:
989         (WebCore::RenderLayer::FilterInfo::removeReferenceFilterClients):
990         * rendering/svg/RenderSVGGradientStop.cpp:
991         (WebCore::RenderSVGGradientStop::styleDidChange):
992         * rendering/svg/RenderSVGImage.h:
993         * rendering/svg/RenderSVGInlineText.h:
994         * rendering/svg/RenderSVGResourceContainer.cpp:
995         (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
996         * rendering/svg/RenderSVGResourceContainer.h:
997         * rendering/svg/RenderSVGRoot.cpp:
998         (WebCore::RenderSVGRoot::addResourceForClientInvalidation):
999         * rendering/svg/RenderSVGRoot.h:
1000         * rendering/svg/RenderSVGShape.h:
1001         * rendering/svg/RenderSVGText.cpp:
1002         (WebCore::collectLayoutAttributes):
1003         (WebCore::RenderSVGText::subtreeChildWillBeRemoved):
1004         (WebCore::RenderSVGText::subtreeTextDidChange):
1005         (WebCore::updateFontInAllDescendants):
1006         * rendering/svg/RenderSVGText.h:
1007         * rendering/svg/SVGInlineTextBox.h:
1008         * rendering/svg/SVGRenderSupport.cpp:
1009         (WebCore::SVGRenderSupport::mapLocalToContainer):
1010         (WebCore::SVGRenderSupport::pushMappingToContainer):
1011         (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
1012         * rendering/svg/SVGRenderTreeAsText.cpp:
1013         (WebCore::writeStyle):
1014         * rendering/svg/SVGRenderingContext.cpp:
1015         (WebCore::SVGRenderingContext::bufferForeground):
1016         * rendering/svg/SVGResourcesCycleSolver.cpp:
1017         (WebCore::SVGResourcesCycleSolver::resolveCycles):
1018         * rendering/svg/SVGRootInlineBox.cpp:
1019         (WebCore::SVGRootInlineBox::renderSVGText):
1020         (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
1021         * svg/SVGCircleElement.cpp:
1022         (WebCore::SVGCircleElement::svgAttributeChanged):
1023         * svg/SVGElement.cpp:
1024         (WebCore::SVGElement::svgAttributeChanged):
1025         * svg/SVGEllipseElement.cpp:
1026         (WebCore::SVGEllipseElement::svgAttributeChanged):
1027         * svg/SVGImageElement.cpp:
1028         (WebCore::SVGImageElement::svgAttributeChanged):
1029         (WebCore::SVGImageElement::didAttachRenderers):
1030         * svg/SVGLineElement.cpp:
1031         (WebCore::SVGLineElement::svgAttributeChanged):
1032         * svg/SVGPolyElement.cpp:
1033         (WebCore::SVGPolyElement::svgAttributeChanged):
1034         * svg/SVGRectElement.cpp:
1035         (WebCore::SVGRectElement::svgAttributeChanged):
1036         * svg/SVGSVGElement.cpp:
1037         (WebCore::SVGSVGElement::localCoordinateSpaceTransform):
1038         (WebCore::SVGSVGElement::currentViewBoxRect):
1039         * svg/graphics/SVGImage.cpp:
1040         (WebCore::SVGImage::setContainerSize):
1041         (WebCore::SVGImage::containerSize):
1042
1043 2014-10-17  Chris Dumez  <cdumez@apple.com>
1044
1045         Avoid unnecessary isSVGFont() check in SimpleFontData::applyTransforms()
1046         https://bugs.webkit.org/show_bug.cgi?id=137836
1047
1048         Reviewed by Andreas Kling.
1049
1050         Avoid unnecessary isSVGFont() check in SimpleFontData::applyTransforms().
1051         This function is only called from WidthIterator::applyFontTransforms(),
1052         which already makes sure to call applyTransforms() if isSVGFont()
1053         returns false. This patch replaces the check with a simple assertion.
1054
1055         No new tests, no behavior change.
1056
1057         * platform/graphics/SimpleFontData.h:
1058         * svg/SVGFontData.h:
1059
1060 2014-10-17  Michael Saboff  <msaboff@apple.com>
1061
1062         Don't create cached functions that access lexicalGlobalObject()
1063         https://bugs.webkit.org/show_bug.cgi?id=137839
1064
1065         Reviewed by Geoffrey Garen.
1066
1067         Made it so that all the JSDOMWindow special functions blur(), close(), focus() and postMessage()
1068         are always created as needed for every prototype.  Made it so that JSHTMLDocument does
1069         the same for open().  Updated test to account for these methods not being cached
1070
1071         Updated tests accordingly.
1072
1073         * bindings/js/JSDOMWindowCustom.cpp: 
1074         (WebCore::JSDOMWindow::getOwnPropertySlot): Updated to always create cached versions of the
1075         special functions.
1076         * bindings/js/JSHTMLDocumentCustom.cpp:
1077         (WebCore::JSHTMLDocument::getOwnPropertySlot): Added to create an uncached open() method when
1078         it is first accessed.
1079         * html/HTMLDocument.idl: Added CustomGetOwnPropertySlot and implemented it in JSHTMLDocumentCustom.cpp.
1080
1081 2014-10-17  Simon Fraser  <simon.fraser@apple.com>
1082
1083         [iOS] Speculative fix for a crash under RenderLayerCompositor::updateScrollCoordinatedLayer()
1084         https://bugs.webkit.org/show_bug.cgi?id=137837
1085         rdar://problem/18545452
1086
1087         Reviewed by Tim Horton.
1088
1089         Crash logs suggest that an iframe's RenderView's RenderLayer's backing can be null
1090         in a call to updateScrollCoordinatedLayer(), so add an assertion (to help find a reproducible case)
1091         and a null check.
1092
1093         * rendering/RenderLayerCompositor.cpp:
1094         (WebCore::RenderLayerCompositor::attachScrollingNode):
1095
1096 2014-10-17  Andreas Kling  <akling@apple.com>
1097
1098         Re-arrange parentheses for compilation purposes.
1099
1100         * cssjit/SelectorCompiler.cpp:
1101         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
1102
1103 2014-10-17  Andreas Kling  <akling@apple.com>
1104
1105         Unreviewed build fix after r174838.
1106
1107         Use StackAllocator::addressOf() instead of the old way of grabbing at a stack reference.
1108
1109         * cssjit/SelectorCompiler.cpp:
1110         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
1111
1112 2014-10-17  Chris Dumez  <cdumez@apple.com>
1113
1114         Use is<>() / downcast<>() for RenderBox
1115         https://bugs.webkit.org/show_bug.cgi?id=137804
1116
1117         Reviewed by Andreas Kling.
1118
1119         Use is<>() / downcast<>() for RenderBox and clean up the surrounding
1120         code.
1121
1122         No new tests, no behavior change.
1123
1124         * accessibility/AccessibilityRenderObject.cpp:
1125         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
1126         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
1127         (WebCore::AccessibilityRenderObject::getScrollableAreaIfScrollable):
1128         (WebCore::AccessibilityRenderObject::scrollTo):
1129         * bindings/objc/DOMHTML.mm:
1130         (-[DOMHTMLElement scrollYOffset]):
1131         (-[DOMHTMLElement setScrollXOffset:scrollYOffset:adjustForIOSCaret:]):
1132         * bindings/objc/DOMUIKitExtensions.mm:
1133         (-[DOMNode borderRadii]):
1134         * css/CSSComputedStyleDeclaration.cpp:
1135         (WebCore::sizingBox):
1136         (WebCore::computedTransform):
1137         (WebCore::zoomAdjustedPaddingOrMarginPixelValue):
1138         (WebCore::ComputedStyleExtractor::propertyValue):
1139         * dom/ContainerNode.cpp:
1140         (WebCore::ContainerNode::getLowerRightCorner):
1141         * dom/Document.cpp:
1142         (WebCore::Document::webkitWillEnterFullScreenForElement):
1143         * dom/Element.cpp:
1144         (WebCore::Element::scrollByUnits):
1145         * dom/Node.cpp:
1146         (WebCore::Node::defaultEventHandler):
1147         * dom/Position.cpp:
1148         (WebCore::endsOfNodeAreVisuallyDistinctPositions):
1149         * editing/DeleteButtonController.cpp:
1150         (WebCore::isDeletableElement):
1151         * editing/EditorCommand.cpp:
1152         (WebCore::verticalScrollDistance):
1153         * editing/FrameSelection.cpp:
1154         (WebCore::CaretBase::paintCaret):
1155         * editing/TextIterator.cpp:
1156         (WebCore::fullyClipsContents):
1157         (WebCore::shouldEmitExtraNewlineForNode):
1158         * editing/htmlediting.cpp:
1159         (WebCore::absoluteBoundsForLocalCaretRect):
1160         * html/HTMLFormControlElement.cpp:
1161         (WebCore::HTMLFormControlElement::isFocusable):
1162         * html/HTMLPlugInImageElement.cpp:
1163         (WebCore::HTMLPlugInImageElement::checkSizeChangeForSnapshotting):
1164         * html/HTMLSelectElement.cpp:
1165         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
1166         * html/shadow/SliderThumbElement.cpp:
1167         (WebCore::SliderThumbElement::setPositionFromPoint):
1168         * inspector/InspectorOverlay.cpp:
1169         (WebCore::buildObjectForElementInfo):
1170         * page/AutoscrollController.cpp:
1171         (WebCore::AutoscrollController::updateAutoscrollRenderer):
1172         * page/EventHandler.cpp:
1173         (WebCore::EventHandler::startPanScrolling):
1174         * page/FrameView.cpp:
1175         (WebCore::FrameView::embeddedContentBox):
1176         * page/GestureTapHighlighter.cpp:
1177         * page/SpatialNavigation.cpp:
1178         (WebCore::isScrollableNode):
1179         * page/animation/CSSPropertyAnimation.cpp:
1180         (WebCore::blendFunc):
1181         * platform/efl/RenderThemeEfl.cpp:
1182         (WebCore::RenderThemeEfl::baselinePosition):
1183         * plugins/PluginView.cpp:
1184         (WebCore::PluginView::invalidateWindowlessPluginRect):
1185         * rendering/InlineBox.cpp:
1186         (WebCore::InlineBox::logicalHeight):
1187         (WebCore::InlineBox::adjustPosition):
1188         * rendering/InlineElementBox.cpp:
1189         (WebCore::InlineElementBox::deleteLine):
1190         (WebCore::InlineElementBox::extractLine):
1191         (WebCore::InlineElementBox::attachLine):
1192         (WebCore::InlineElementBox::paint):
1193         (WebCore::InlineElementBox::nodeAtPoint):
1194         * rendering/InlineFlowBox.cpp:
1195         (WebCore::InlineFlowBox::addToLine):
1196         (WebCore::InlineFlowBox::addReplacedChildOverflow):
1197         * rendering/LayoutState.cpp:
1198         (WebCore::LayoutState::LayoutState):
1199         * rendering/RenderBlock.cpp:
1200         (WebCore::RenderBlock::simplifiedNormalFlowLayout):
1201         (WebCore::RenderBlock::markFixedPositionObjectForLayoutIfNeeded):
1202         (WebCore::RenderBlock::clearPercentHeightDescendantsFrom):
1203         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
1204         (WebCore::RenderBlock::addFocusRingRects):
1205         * rendering/RenderBlockFlow.cpp:
1206         (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
1207         (WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
1208         * rendering/RenderBlockLineLayout.cpp:
1209         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
1210         (WebCore::RenderBlockFlow::layoutLineBoxes):
1211         * rendering/RenderBox.cpp:
1212         (WebCore::RenderBox::findAutoscrollable):
1213         (WebCore::computeBlockStaticDistance):
1214         (WebCore::RenderBox::positionForPoint):
1215         (WebCore::RenderBox::layoutOverflowRectForPropagation):
1216         * rendering/RenderBox.h:
1217         (WebCore::RenderBox::previousSiblingBox):
1218         (WebCore::RenderBox::nextSiblingBox):
1219         (WebCore::RenderBox::parentBox):
1220         (WebCore::RenderBox::firstChildBox):
1221         (WebCore::RenderBox::lastChildBox):
1222         * rendering/RenderBoxModelObject.cpp:
1223         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
1224         (WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
1225         (WebCore::RenderBoxModelObject::constrainingRectForStickyPosition):
1226         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1227         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1228         * rendering/RenderElement.cpp:
1229         (WebCore::RenderElement::removeChildInternal):
1230         (WebCore::RenderElement::styleWillChange):
1231         (WebCore::RenderElement::repaintAfterLayoutIfNeeded):
1232         * rendering/RenderEmbeddedObject.cpp:
1233         (WebCore::RenderEmbeddedObject::layout):
1234         * rendering/RenderFieldset.cpp:
1235         (WebCore::RenderFieldset::findLegend):
1236         * rendering/RenderFlowThread.cpp:
1237         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
1238         (WebCore::RenderFlowThread::currentActiveRenderBox):
1239         * rendering/RenderFlowThread.h:
1240         * rendering/RenderFullScreen.cpp:
1241         (WebCore::RenderFullScreen::unwrapRenderer):
1242         * rendering/RenderImage.cpp:
1243         (WebCore::RenderImage::layoutShadowControls):
1244         (WebCore::RenderImage::computeIntrinsicRatioInformation):
1245         * rendering/RenderInline.cpp:
1246         (WebCore::RenderInline::absoluteRects):
1247         (WebCore::RenderInline::addFocusRingRects):
1248         * rendering/RenderLayer.cpp:
1249         (WebCore::RenderLayer::updateLayerPosition):
1250         (WebCore::RenderLayer::perspectiveTransform):
1251         (WebCore::RenderLayer::perspectiveOrigin):
1252         (WebCore::parentLayerCrossFrame):
1253         (WebCore::RenderLayer::enclosingScrollableLayer):
1254         (WebCore::RenderLayer::resize):
1255         (WebCore::RenderLayer::scrollsOverflow):
1256         (WebCore::computeReferenceBox):
1257         (WebCore::RenderLayer::calculateClipRects):
1258         * rendering/RenderLayer.h:
1259         * rendering/RenderLayerBacking.cpp:
1260         (WebCore::RenderLayerBacking::updateTransform):
1261         (WebCore::RenderLayerBacking::updateGeometry):
1262         (WebCore::RenderLayerBacking::resetContentsRect):
1263         (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
1264         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
1265         (WebCore::RenderLayerBacking::contentsBox):
1266         (WebCore::RenderLayerBacking::backgroundBoxForPainting):
1267         (WebCore::RenderLayerBacking::startAnimation):
1268         (WebCore::RenderLayerBacking::startTransition):
1269         * rendering/RenderLineBoxList.cpp:
1270         (WebCore::RenderLineBoxList::rangeIntersectsRect):
1271         * rendering/RenderMediaControlElements.cpp:
1272         (WebCore::RenderMediaVolumeSliderContainer::layout):
1273         * rendering/RenderMultiColumnFlowThread.cpp:
1274         (WebCore::RenderMultiColumnFlowThread::firstColumnSetOrSpanner):
1275         (WebCore::RenderMultiColumnFlowThread::nextColumnSetOrSpannerSiblingOf):
1276         (WebCore::RenderMultiColumnFlowThread::previousColumnSetOrSpannerSiblingOf):
1277         (WebCore::RenderMultiColumnFlowThread::resolveMovedChild):
1278         (WebCore::isValidColumnSpanner):
1279         (WebCore::RenderMultiColumnFlowThread::handleSpannerRemoval):
1280         * rendering/RenderNamedFlowThread.cpp:
1281         (WebCore::RenderNamedFlowThread::getRanges):
1282         * rendering/RenderObject.cpp:
1283         (WebCore::RenderObject::computeRectForRepaint):
1284         (WebCore::RenderObject::showRegionsInformation):
1285         (WebCore::RenderObject::showRenderObject):
1286         (WebCore::RenderObject::mapLocalToContainer):
1287         (WebCore::RenderObject::pushMappingToContainer):
1288         (WebCore::RenderObject::mapAbsoluteToLocalPoint):
1289         (WebCore::RenderObject::addAnnotatedRegions):
1290         * rendering/RenderTable.cpp:
1291         (WebCore::RenderTable::nodeAtPoint):
1292         * rendering/RenderTextControlMultiLine.cpp:
1293         (WebCore::RenderTextControlMultiLine::layoutSpecialExcludedChild):
1294         * rendering/RenderTheme.cpp:
1295         (WebCore::RenderTheme::baselinePosition):
1296         * rendering/RenderThemeGtk.cpp:
1297         (WebCore::RenderThemeGtk::baselinePosition):
1298         (WebCore::centerRectVerticallyInParentInputElement):
1299         * rendering/RenderThemeIOS.mm:
1300         (WebCore::RenderThemeIOS::baselinePosition):
1301         * rendering/RenderThemeSafari.cpp:
1302         (WebCore::RenderThemeSafari::baselinePosition):
1303         * rendering/RenderThemeWin.cpp:
1304         (WebCore::RenderThemeWin::paintSearchFieldCancelButton):
1305         (WebCore::RenderThemeWin::paintSearchFieldResultsDecorationPart):
1306         (WebCore::RenderThemeWin::paintSearchFieldResultsButton):
1307         * rendering/RenderTreeAsText.cpp:
1308         (WebCore::RenderTreeAsText::writeRenderObject):
1309         (WebCore::externalRepresentation):
1310         * rendering/RenderView.cpp:
1311         (WebCore::RenderView::paintBoxDecorations):
1312         * rendering/RootInlineBox.cpp:
1313         (WebCore::RootInlineBox::setLineBreakInfo):
1314         * rendering/line/BreakingContextInlineHeaders.h:
1315         (WebCore::BreakingContext::handleOutOfFlowPositioned):
1316         (WebCore::BreakingContext::handleFloat):
1317         (WebCore::BreakingContext::handleReplaced):
1318         * rendering/line/LineBreaker.cpp:
1319         (WebCore::LineBreaker::skipTrailingWhitespace):
1320         (WebCore::LineBreaker::skipLeadingWhitespace):
1321         * rendering/mathml/RenderMathMLUnderOver.cpp:
1322         (WebCore::RenderMathMLUnderOver::layout):
1323         * svg/graphics/SVGImage.cpp:
1324         (WebCore::SVGImage::embeddedContentBox):
1325
1326 2014-10-17  Andreas Kling  <akling@apple.com>
1327
1328         Get rid of wrapperContext() in DOM bindings.
1329         <https://webkit.org/b/137834>
1330
1331         Reviewed by Chris Dumez.
1332
1333         The "wrapper context" is always the DOMWrapperWorld, and since we're passing that around
1334         already, we don't need a separate mechanism to get at the context.
1335
1336         The context is extra data stored in the DOM object's JSC::Weak (the wrapper GC object.)
1337
1338         * bindings/js/JSDOMBinding.h:
1339         (WebCore::setInlineCachedWrapper):
1340         (WebCore::cacheWrapper):
1341         (WebCore::wrapperContext): Deleted.
1342         * bindings/scripts/CodeGeneratorJS.pm:
1343         (GenerateHeader):
1344
1345 2014-10-17  Benjamin Poulain  <benjamin@webkit.org>
1346
1347         Make a better use of the available registers when compiling nested selector lists
1348         https://bugs.webkit.org/show_bug.cgi?id=137802
1349
1350         Reviewed by Andreas Kling.
1351
1352         Previously, when compiling a nested selector list, the compiler would start by pushing all
1353         the allocated registers to the stack to free them for the compiled selector list.
1354         While neat to ensure register allocation is correct, this is very inefficient.
1355
1356         This patch brings the first step for reducing the overhead. Instead of pushing everything
1357         to the stack, we just push as many registers as we need for compiling the selector list.
1358
1359         In most cases, we have so many registers that we don't even need to push anything to the stack.
1360
1361         Test: fast/selectors/nth-child-of-register-requirement.html
1362
1363         * cssjit/SelectorCompiler.cpp:
1364         Add an explicit type for SelectorList to keep information aggregated from all
1365         SelectorFragmentList inside it.
1366
1367         SelectorFragmentList is also extended to include its register and stack requirements.
1368         This information is then used to create a SelectorList and to compile the SelectorFragmentList.
1369
1370         (WebCore::SelectorCompiler::hasAnyCombinators):
1371         We only change the elementAddressRegister when moving over combinators. This is used to detect
1372         if a selector list clobber the elementAddressRegister or leave it untouched.
1373
1374         (WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
1375         (WebCore::SelectorCompiler::computeBacktrackingInformation):
1376         Instead of returning a BacktrackingMemoryRequirements, update the SelectorFragmentList and SelectorList directly.
1377
1378         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
1379         This is where the fun happen.
1380         First step is keep the input untouched. For now it is simply pushed on the stack. This can be improved later.
1381
1382         Then we find how many allocated registers we need to save to compile the input selector list. We push those registers
1383         to the stack and give them back to the register allocator.
1384
1385         With enough registers we can now compile the nested selector list. The code has changed a bit for efficiency. Instead
1386         of creating a shortcut for success case, the code now exit on error and proceed on success. This is the general pattern
1387         of SelectorCompiler and it is quite a bit more efficient in the common cases.
1388
1389         Finally, we reallocate the registers and get their values back from the stack. The "tail" is duplicated but that's fine
1390         because in the vast majority of cases it is 1 or 2 pop.
1391
1392         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
1393         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
1394         * cssjit/StackAllocator.h:
1395         (WebCore::StackAllocator::push):
1396
1397 2014-10-17  Chris Dumez  <cdumez@apple.com>
1398
1399         Use is<>() / downcast<>() for StyleImage
1400         https://bugs.webkit.org/show_bug.cgi?id=137824
1401
1402         Reviewed by Andreas Kling.
1403
1404         Use is<>() / downcast<>() for StyleImage and clean up the surrouding
1405         code.
1406
1407         No new tests, no behavior change.
1408
1409         * css/CSSCursorImageValue.cpp:
1410         (WebCore::CSSCursorImageValue::detachPendingImage):
1411         (WebCore::CSSCursorImageValue::cachedImage):
1412         (WebCore::CSSCursorImageValue::cachedImageURL):
1413         * css/CSSImageSetValue.cpp:
1414         (WebCore::CSSImageSetValue::detachPendingImage):
1415         (WebCore::CSSImageSetValue::~CSSImageSetValue):
1416         (WebCore::CSSImageSetValue::cachedImageSet):
1417         (WebCore::CSSImageSetValue::hasFailedOrCanceledSubresources):
1418         * css/CSSImageValue.cpp:
1419         (WebCore::CSSImageValue::detachPendingImage):
1420         (WebCore::CSSImageValue::cachedImage):
1421         (WebCore::CSSImageValue::hasFailedOrCanceledSubresources):
1422         * css/StyleResolver.cpp:
1423         (WebCore::StyleResolver::loadPendingShapeImage):
1424         (WebCore::StyleResolver::loadPendingImages):
1425         * page/PageSerializer.cpp:
1426         (WebCore::PageSerializer::retrieveResourcesForProperties):
1427         * page/animation/CSSPropertyAnimation.cpp:
1428         (WebCore::blendFunc):
1429         * rendering/style/StyleCachedImage.h:
1430         * rendering/style/StyleCachedImageSet.h:
1431         * rendering/style/StyleGeneratedImage.h:
1432         * rendering/style/StyleImage.h:
1433         * rendering/style/StylePendingImage.h:
1434
1435 2014-10-17  Dean Jackson  <dino@apple.com>
1436
1437         [Media] Always update controls for <audio> since they are always visible
1438         https://bugs.webkit.org/show_bug.cgi?id=137829
1439         <rdar://problem/18693987>
1440
1441         Reviewed by Brent Fulgham.
1442
1443         Revision 174756 made a change to only update the display of the controls
1444         while they are visible. However, <audio> elements didn't detect visibility
1445         the same way, since their controls do not auto-hide.
1446
1447         Change controlsAreHidden to check if we're an audio element.
1448
1449         * Modules/mediacontrols/mediaControlsApple.js:
1450         (Controller.prototype.controlsAreHidden): Audio elements do not auto-hide their controls.
1451
1452 2014-10-17  peavo@outlook.com  <peavo@outlook.com>
1453
1454         [WinCairo] Accelerated compositing is not implemented.
1455         https://bugs.webkit.org/show_bug.cgi?id=137345
1456
1457         Reviewed by Brent Fulgham.
1458
1459         This patch is based on GTK, and the texture mapper graphics layer type.
1460
1461         * WebCore.vcxproj/copyForwardingHeaders.cmd: Copy texmap headers.
1462         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: Added method and flag indicating whether animation has started.
1463         (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
1464         (WebCore::GraphicsLayerTextureMapper::addAnimation):
1465         * platform/graphics/texmap/GraphicsLayerTextureMapper.h: Ditto.
1466         (WebCore::GraphicsLayerTextureMapper::startedAnimation):
1467         * platform/graphics/texmap/TextureMapperShaderProgram.cpp: Use same precision for uniform in vertex shader as in fragment shader.
1468         Otherwise glLinkProgram() will fail, and nothing will be rendered.
1469
1470 2014-10-17  Alexey Proskuryakov  <ap@apple.com>
1471
1472         [iOS] Crash when load is canceled while waiting for the user to type HTTP authentication credentials
1473         https://bugs.webkit.org/show_bug.cgi?id=137826
1474         rdar://problem/17329599
1475
1476         Reviewed by Brady Eidson.
1477
1478         No new tests, as we don't have a way to simulate details of user interaction with
1479         an auth dialog.
1480
1481         * platform/network/cf/ResourceHandleCFNet.cpp:
1482         (WebCore::ResourceHandle::receivedCredential):
1483         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
1484         (WebCore::ResourceHandle::receivedRequestToPerformDefaultHandling):
1485         (WebCore::ResourceHandle::receivedChallengeRejection):
1486         Added null checks before passing m_connection for CFNetwork functions, making this
1487         match what Mac code does when sending a message to a nil receiver.
1488
1489 2014-10-17  Simon Fraser  <simon.fraser@apple.com>
1490
1491         Fix the iOS build.
1492
1493         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
1494         (WebCore::AVTrackPrivateAVFObjCImpl::languageForAVMediaSelectionOption):
1495
1496 2014-10-16  Jer Noble  <jer.noble@apple.com>
1497
1498         [Mac] Represent AVMediaSelectionOptions as AudioTracks
1499         https://bugs.webkit.org/show_bug.cgi?id=137474
1500
1501         Reviewed by Brent Fulgham.
1502
1503         Test: http/tests/media/hls/hls-audio-tracks.html
1504
1505         Support selecting audio "tracks" in HLS streams by exposing AVMediaSelectionOptions
1506         as entries in the video's AudioTrackList.
1507
1508         AVMediaSessionGroups and AVPlayerItems don't have KVO or notifications to track when options
1509         are selected and deselected, so wrap AVMediaSessionGroup and AVMediaSessionOption in C++
1510         wrappers. Each AVMediaSelectionGroup can have only one AVMediaSelectionOption selected at a
1511         time, so the wrapper will take care of answering which AVMediaSelectionOption is currently
1512         selected, as without KVO notifications, asking the AVMediaSelectionGroup directly is
1513         inconsistent. Because setting the selected option multiple times in the same run-loop can
1514         cause flakiness, coalesce calls to setSelectedOption() by setting a one-shot timer to do
1515         the actual selection in the next run-loop.
1516
1517         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h: Added.
1518         (WebCore::MediaSelectionOptionAVFObjC::avMediaSelectionOption):
1519         (WebCore::MediaSelectionOptionAVFObjC::clearGroup): Clear backpointer to group from option.
1520         (WebCore::MediaSelectionGroupAVFObjC::selectedOption): Simple accessor.
1521         (WebCore::MediaSelectionGroupAVFObjC::options):  Simple accessor.
1522         (WebCore::MediaSelectionGroupAVFObjC::avMediaSelectionGroup): Simple accessor.
1523         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm: Added.
1524         (WebCore::MediaSelectionOptionAVFObjC::create): Simple factory method.
1525         (WebCore::MediaSelectionOptionAVFObjC::MediaSelectionOptionAVFObjC): Simple constructor.
1526         (WebCore::MediaSelectionOptionAVFObjC::setSelected): Pass through to MediaSelectionGroupAVFObjC.
1527         (WebCore::MediaSelectionOptionAVFObjC::selected): Ditto.
1528         (WebCore::MediaSelectionOptionAVFObjC::index): Return index of this object in the group's object.
1529         (WebCore::MediaSelectionGroupAVFObjC::create):
1530         (WebCore::MediaSelectionGroupAVFObjC::MediaSelectionGroupAVFObjC):
1531         (WebCore::MediaSelectionGroupAVFObjC::~MediaSelectionGroupAVFObjC):
1532         (WebCore::MediaSelectionGroupAVFObjC::updateOptions): Discover added or removed options.
1533         (WebCore::MediaSelectionGroupAVFObjC::setSelectedOption): Set a one shot timer to coalesce multiple calls.
1534         (WebCore::MediaSelectionGroupAVFObjC::selectionTimerFired): Set the selected AVSelectionOption.
1535
1536         Modify AVTrackPrivateAVFObjCImpl to support both AVPlayerItemTracks and these new
1537         MediaSelectionOptionAVFObjC objects.
1538
1539         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h:
1540         (WebCore::AVTrackPrivateAVFObjCImpl::mediaSelectionOption): Simple accessor.
1541         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
1542         (WebCore::AVTrackPrivateAVFObjCImpl::AVTrackPrivateAVFObjCImpl):  Simple constructor.
1543         (WebCore::AVTrackPrivateAVFObjCImpl::~AVTrackPrivateAVFObjCImpl): Simple destructor.
1544         (WebCore::AVTrackPrivateAVFObjCImpl::enabled): Use MediaSelectionOptionAVFObjC, if present.
1545         (WebCore::AVTrackPrivateAVFObjCImpl::setEnabled): Ditto.
1546         (WebCore::AVTrackPrivateAVFObjCImpl::audioKind): Ditto.
1547         (WebCore::AVTrackPrivateAVFObjCImpl::videoKind): Ditto.
1548         (WebCore::AVTrackPrivateAVFObjCImpl::index): Ditto.
1549         (WebCore::AVTrackPrivateAVFObjCImpl::id): Ditto.
1550         (WebCore::AVTrackPrivateAVFObjCImpl::label): Ditto.
1551         (WebCore::AVTrackPrivateAVFObjCImpl::language): Ditto.
1552         (WebCore::AVTrackPrivateAVFObjCImpl::languageForAVMediaSelectionOption): Ditto.
1553         (WebCore::AVTrackPrivateAVFObjCImpl::trackID): Ditto.
1554
1555         Allow AudioTrackPrivateAVFObjC and VideoTrackPrivateAVFObjC to be created with
1556         a MediaSelectionOptionAVFObjC.
1557
1558         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h:
1559         (WebCore::AudioTrackPrivateAVFObjC::create): Takes a MediaSelectionOptionAVFObjC.
1560         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
1561         (WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC): Simple constructor.
1562         (WebCore::AudioTrackPrivateAVFObjC::setMediaSelectionOption): Create a new AVTrackPrivateAVFObjCImpl.
1563         (WebCore::AudioTrackPrivateAVFObjC::mediaSelectionOption): Simple accessor.
1564         * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:
1565         (WebCore::VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC): Simple constructor.
1566         (WebCore::VideoTrackPrivateAVFObjC::setMediaSelectonOption): Create a new AVTrackPrivateAVFObjCImpl.
1567         (WebCore::VideoTrackPrivateAVFObjC::mediaSelectionOption): Simple accessor.
1568         * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h:
1569
1570         Because IDs are not necessarily unique across AVPlayerItemTracks and AVMediaSelectionOptions,
1571         use the index of the track or option instead of it's self-declared ID for ordering for the
1572         trackIndex.
1573
1574         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
1575         (WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack):
1576         * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm:
1577         (WebCore::VideoTrackPrivateMediaSourceAVFObjC::resetPropertiesFromTrack):
1578
1579         Rather than making allowing the AVPlayerItem to automatically select the "best"
1580         AVMediaSelectionOption, select the automatic options when creating the AVPlayerItem
1581         and thereafter allow the users manual selections "stick".
1582
1583         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1584         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1585         (WebCore::MediaPlayerPrivateAVFoundationObjC::ensureAVPlayer):
1586         (WebCore::MediaPlayerPrivateAVFoundationObjC::ensureAVPlayerItem):
1587
1588         Determine whether any MediaSelectionOptionsAVFObjC have been added or removed and send trackChange events accordingly.
1589
1590         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1591         (WebCore::determineChangedTracksFromNewTracksAndOldItems): Added.
1592         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks): Search for updated selection options.
1593         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks): Ditto.
1594         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForAudibleMedia): Return selection group, if available.
1595         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForVisualMedia): Ditto.
1596         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange): Filter out AVPlayerItemTracks without
1597             AVAssetTracks, as these will be represented by MediaSelectionGroupObjCs instead.
1598         
1599         Add new files to project.
1600         * WebCore.xcodeproj/project.pbxproj:
1601
1602 2014-10-17  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1603
1604         [EFL] window.screen.width returns wrong value if more displays are available
1605         https://bugs.webkit.org/show_bug.cgi?id=137778
1606
1607         Reviewed by Gyuyoung Kim.
1608
1609         ecore_x_screen_size_get() retrieves the size of Ecore_X_Screen, for example,
1610         having two displays of 1680x1050, it will return 3360x1050.
1611
1612         Unlike EFL's MiniBrowser, Firefox and Chrome return screen of the current display.
1613
1614         No new tests. Hardware specific bug including multiple displays.
1615
1616         * platform/efl/PlatformScreenEfl.cpp:
1617         (WebCore::screenRect):
1618         Use ecore's xrandr to determine the screen on which browser window is displayed.
1619
1620 2014-10-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1621
1622         [GLIB] Add API to GMainLoopSource to schedule sources after a delay in microseconds
1623         https://bugs.webkit.org/show_bug.cgi?id=137782
1624
1625         Reviewed by Sergio Villar Senin.
1626
1627         * platform/gtk/SharedTimerGtk.cpp:
1628         (WebCore::setSharedTimerFireInterval): Use microseconds instead of
1629         milliseconds.
1630
1631 2014-10-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1632
1633         [GTK] Move touch events handling from Platform to WebKit2
1634         https://bugs.webkit.org/show_bug.cgi?id=137735
1635
1636         Reviewed by Sergio Villar Senin.
1637
1638         Remove GtkTouchContextHelper.
1639
1640         * PlatformGTK.cmake:
1641         * platform/gtk/GtkTouchContextHelper.cpp: Removed.
1642         * platform/gtk/GtkTouchContextHelper.h: Removed.
1643
1644 2014-10-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1645
1646         Remove unused function in WorkerThreadableLoader.h 
1647         https://bugs.webkit.org/show_bug.cgi?id=137811
1648
1649         Reviewed by Csaba Osztrogon√°c.
1650
1651         mainThreadCreateLoader() isn't used anywhere. Even there is no implementation.
1652
1653         * loader/WorkerThreadableLoader.h:
1654
1655 2014-10-15  Yusuke Suzuki  <utatane.tea@gmail.com>
1656
1657         CSS Selectors Level 4: Implement :matches in SelectorChecker
1658         https://bugs.webkit.org/show_bug.cgi?id=137393
1659
1660         Reviewed by Benjamin Poulain.
1661
1662         In this patch, we introduce initial :matches implementation.
1663         In this current implementation, we don't consider pseudo elements.
1664
1665         Test: fast/selectors/querySelector-matches.html
1666
1667         * css/SelectorChecker.cpp:
1668         (WebCore::SelectorChecker::checkOne):
1669
1670 2014-10-16  Yusuke Suzuki  <utatane.tea@gmail.com>
1671
1672         CSS JIT: Introduce StackAllocator::addressOf
1673         https://bugs.webkit.org/show_bug.cgi?id=137771
1674
1675         Reviewed by Benjamin Poulain.
1676
1677         Introduce StackAllocator::addressOf and drop offsetToStackReference, it's too primitive.
1678
1679         * cssjit/SelectorCompiler.cpp:
1680         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
1681         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateParentElementTreeWalker):
1682         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
1683         (WebCore::SelectorCompiler::SelectorCodeGenerator::loadCheckingContext):
1684         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAdjacentBacktrackingTail):
1685         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDescendantBacktrackingTail):
1686         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstLink):
1687         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateStoreLastVisitedElement):
1688         * cssjit/StackAllocator.h:
1689         (WebCore::StackAllocator::addressOf):
1690         (WebCore::StackAllocator::offsetToStackReference):
1691
1692 2014-10-16  Alexey Proskuryakov  <ap@apple.com>
1693
1694         REGRESSION (r169024): Undetermined text is not displayed in the search field of Adobe Help Website
1695         https://bugs.webkit.org/show_bug.cgi?id=137679
1696         rdar://problem/18450335
1697
1698         Reviewed by Enrica Casucci.
1699
1700         Test: platform/mac/editing/input/selected-composed-text-painting.html
1701
1702         * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): We do not paint
1703         selection beckground for unconfirmed text with underlines, so we should use a regular
1704         style for text painting, as well.
1705
1706 2014-10-16  Chris Dumez  <cdumez@apple.com>
1707
1708         Use is<>() / downcast<>() for BasicShape subclasses
1709         https://bugs.webkit.org/show_bug.cgi?id=137766
1710
1711         Reviewed by Andreas Kling.
1712
1713         Use is<>() / downcast<>() for BasicShape subclasses and clean up the
1714         surrounding code.
1715
1716         No new tests, no behavior change.
1717
1718         * css/BasicShapeFunctions.cpp:
1719         (WebCore::valueForBasicShape):
1720         (WebCore::basicShapeForValue):
1721         * css/BasicShapeFunctions.h:
1722         * css/CSSComputedStyleDeclaration.cpp:
1723         (WebCore::shapePropertyValue):
1724         * page/animation/CSSPropertyAnimation.cpp:
1725         (WebCore::blendFunc):
1726         * rendering/ClipPathOperation.h:
1727         (WebCore::ShapeClipPathOperation::create):
1728         Take a PassRef<BasicShape> in argument to make it obvious it is never
1729         null.
1730
1731         (WebCore::ShapeClipPathOperation::basicShape):
1732         Return a reference instead of a pointer as it can never return null.
1733
1734         (WebCore::ShapeClipPathOperation::windRule):
1735         (WebCore::ShapeClipPathOperation::pathForReferenceRect):
1736         Make it non-const due to the const-correctness of Ref::get().
1737
1738         (WebCore::ShapeClipPathOperation::ShapeClipPathOperation):
1739         * rendering/RenderBlock.cpp:
1740         (WebCore::RenderBlock::nodeAtPoint):
1741         * rendering/RenderLayer.cpp:
1742         (WebCore::RenderLayer::setupClipPath):
1743         * rendering/shapes/Shape.cpp:
1744         (WebCore::Shape::createShape):
1745         * rendering/shapes/Shape.h:
1746         * rendering/shapes/ShapeOutsideInfo.cpp:
1747         (WebCore::ShapeOutsideInfo::computedShape):
1748         * rendering/style/BasicShapes.cpp:
1749         (WebCore::BasicShape::canBlend):
1750         (WebCore::BasicShapeCircle::blend):
1751         (WebCore::BasicShapeEllipse::blend):
1752         (WebCore::BasicShapePolygon::blend):
1753         (WebCore::BasicShapeInset::blend):
1754         * rendering/style/BasicShapes.h:
1755         * rendering/svg/SVGRenderingContext.cpp:
1756         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
1757
1758 2014-10-16  Chris Dumez  <cdumez@apple.com>
1759
1760         Leverage the new RenderElement::m_isCSSAnimating flag in more places
1761         https://bugs.webkit.org/show_bug.cgi?id=137786
1762
1763         Reviewed by Simon Fraser.
1764
1765         Leverage the new RenderElement::m_isCSSAnimating flag that was introduced
1766         in r174703 in more places, for performance. This avoids doing extra work
1767         for renderers on which we are not running animations on. This patch also
1768         updates the API a bit to use more references instead of pointers, making
1769         it clear the RenderElement cannot be null and thus avoiding unnecessary
1770         null checks.
1771
1772         No new tests, no behavior change.
1773
1774         * css/CSSComputedStyleDeclaration.cpp:
1775         (WebCore::computeRenderStyleForProperty):
1776         * page/animation/AnimationController.cpp:
1777         (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
1778         (WebCore::AnimationControllerPrivate::clear):
1779         (WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer):
1780         (WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
1781         (WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
1782         (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
1783         (WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
1784         (WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
1785         (WebCore::AnimationController::cancelAnimations):
1786         (WebCore::AnimationController::updateAnimations):
1787         (WebCore::AnimationController::getAnimatedStyleForRenderer):
1788         (WebCore::AnimationController::notifyAnimationStarted):
1789         (WebCore::AnimationController::isRunningAnimationOnRenderer):
1790         (WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
1791         * page/animation/AnimationController.h:
1792         * page/animation/AnimationControllerPrivate.h:
1793         * rendering/RenderElement.cpp:
1794         (WebCore::RenderElement::willBeDestroyed):
1795         * rendering/RenderLayer.cpp:
1796         (WebCore::RenderLayer::currentTransform):
1797         * rendering/RenderLayerBacking.cpp:
1798         (WebCore::RenderLayerBacking::updateGeometry):
1799         (WebCore::RenderLayerBacking::notifyAnimationStarted):
1800         * rendering/RenderLayerCompositor.cpp:
1801         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
1802         (WebCore::RenderLayerCompositor::isRunningAcceleratedTransformAnimation):
1803
1804 2014-10-16  Adrien Destugues  <pulkomandy@gmail.com>
1805
1806         Missing RefPtr.release() calls in TextureMapper
1807         https://bugs.webkit.org/show_bug.cgi?id=137777
1808
1809         Reviewed by Chris Dumez.
1810
1811         No new tests: no functional change, cleanup/optimization.
1812
1813         Avoids useless ref/deref cycle when returning from functions.
1814
1815         * platform/graphics/texmap/TextureMapper.cpp:
1816         (WebCore::TextureMapper::acquireTextureFromPool):
1817         * platform/graphics/texmap/TextureMapperLayer.cpp:
1818         (WebCore::TextureMapperLayer::paintIntoSurface):
1819
1820 2014-10-16  Chris Dumez  <cdumez@apple.com>
1821
1822         Use is<>() / downcast<>() for ContentData subclasses
1823         https://bugs.webkit.org/show_bug.cgi?id=137768
1824
1825         Reviewed by Andreas Kling.
1826
1827         Use is<>() / downcast<>() for ContentData subclasses.
1828
1829         No new tests, no behavior change.
1830
1831         * css/CSSComputedStyleDeclaration.cpp:
1832         (WebCore::contentToCSSValue):
1833         * css/StyleResolver.cpp:
1834         (WebCore::StyleResolver::loadPendingImages):
1835         * rendering/RenderElement.cpp:
1836         (WebCore::RenderElement::createFor):
1837         * rendering/style/ContentData.h:
1838         (WebCore::operator==):
1839         * rendering/style/RenderStyle.cpp:
1840         (WebCore::RenderStyle::setContent):
1841
1842 2014-10-16  Commit Queue  <commit-queue@webkit.org>
1843
1844         Unreviewed, rolling out r174744.
1845         https://bugs.webkit.org/show_bug.cgi?id=137790
1846
1847         Caused another WebGL conformance test to fail (Requested by
1848         rfong on #webkit).
1849
1850         Reverted changeset:
1851
1852         "glReadPixels on NVIDIA cards returns the wrong values for the
1853         alpha channel when alpha is off."
1854         https://bugs.webkit.org/show_bug.cgi?id=137752
1855         http://trac.webkit.org/changeset/174744
1856
1857 2014-10-16  Tim Horton  <timothy_horton@apple.com>
1858
1859         Implement selection services menu for Legacy WebKit
1860         https://bugs.webkit.org/show_bug.cgi?id=137582
1861         <rdar://problem/18604241>
1862
1863         Reviewed by Brady Eidson.
1864
1865         * WebCore.exp.in:
1866         * editing/Editor.h:
1867         * editing/ios/EditorIOS.mm:
1868         (WebCore::Editor::replaceSelectionWithAttributedString):
1869         * editing/mac/EditorMac.mm:
1870         (WebCore::Editor::replaceSelectionWithAttributedString):
1871         Add replaceSelectionWithAttributedString, which replaces the selection
1872         with the given attributed string (converting to plain text if the destination
1873         is not richly editable).
1874
1875 2014-10-16  Alexey Proskuryakov  <ap@apple.com>
1876
1877         Crashes in ResourceHandleCFURLConnectionDelegateWithOperationQueue due to unimplemented retain/release
1878         https://bugs.webkit.org/show_bug.cgi?id=137779
1879         rdar://problem/18679320
1880
1881         Reviewed by Brady Eidson.
1882
1883         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
1884         (WebCore::ResourceHandleCFURLConnectionDelegate::retain):
1885         (WebCore::ResourceHandleCFURLConnectionDelegate::release):
1886         (WebCore::ResourceHandleCFURLConnectionDelegate::makeConnectionClient):
1887         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
1888         Implemented retain/release. They are necessary, as ResourceHandle goes away when
1889         it's canceled, and there is noone else to keep the client object alive but
1890         CFURLConnection itself.
1891
1892         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
1893         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
1894         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
1895         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData):
1896         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading):
1897         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail):
1898         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse):
1899         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveChallenge):
1900         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData):
1901         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
1902         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray):
1903         Added a FIXME about potential improvements that I spotted while invsestigating this.
1904
1905 2014-10-15  Andrei Bucur  <abucur@adobe.com>
1906
1907         ASSERTION  FAILED in WebCore::RenderFlowThread::getRegionRangeForBox
1908         https://bugs.webkit.org/show_bug.cgi?id=135563
1909
1910         Reviewed by David Hyatt.
1911
1912         The new multi-column code doesn't work correctly when the document contains nested fragmentation
1913         contexts. The problem is the current flow thread concept that can store only one RenderFlowThread
1914         at a time and use it during layout.
1915
1916         The stored flow thread is always correct for regions because named flow threads are absolutley positioned
1917         so every child renderer is contained inside them (with the expcetion of fixed positioned elements which are
1918         treated separately).
1919
1920         For multi-column elements this is no longer the case. An absolutely positioned element inside a static
1921         multi-column element will be contained by a block outside the fragmentation context. It can even be
1922         contained by a different multi-column element in the case of nested flow threads.
1923
1924         The patch below explores a solution that's not based on a current flow thread stored globally. The proposed
1925         patch makes every block to store a pointer to its fragmentation context and a flag that states if this pointer
1926         needs to be updated or not. If the renderer is not a block it will get its flow thread from the containing
1927         block. Once the containing flow thread is requested for the block, the pointer is computed and cached until
1928         invalidated:
1929         - when a subtree is removed from a flow thread
1930         - when the position property of an element inside a flow thread changes
1931
1932         The process is recursive and it doesn't affect elements that are not nested inside a flow thread. If a block
1933         changes position from relative to static, any element that was contained by it can only be contained by an
1934         ancestor of the block. This ancestor will still be outside of any flow thread. This ensures that non-fragmentation
1935         code is not affected from a performance perspective.
1936
1937         The patch affects the results of the performance tests:
1938         - the regions layout tests have a decreased performance raging from 2% to 5-6%
1939         - the regions selection tests have an increased performance raging from 1-2% to 10%
1940         - the multicolumn layout tests (now pending review in b137687) have an increased performance
1941         raging from 1.8% to 5%
1942
1943         Tests: fast/multicol/multicol-all-positioned-crash.html
1944                fast/multicol/multicol-transform-containing-block.html
1945
1946         * rendering/FlowThreadController.cpp:
1947         (WebCore::FlowThreadController::FlowThreadController):
1948         * rendering/FlowThreadController.h:
1949         (WebCore::FlowThreadController::currentRenderFlowThread): Deleted.
1950         (WebCore::FlowThreadController::setCurrentRenderFlowThread): Deleted.
1951         * rendering/LayoutState.h:
1952         (WebCore::LayoutState::currentRenderFlowThread):
1953         (WebCore::LayoutState::setCurrentRenderFlowThread):
1954         * rendering/RenderBlock.cpp:
1955         (WebCore::RenderBlockRareData::RenderBlockRareData):
1956         (WebCore::RenderBlock::styleWillChange):
1957         (WebCore::RenderBlock::styleDidChange):
1958         (WebCore::RenderBlock::collapseAnonymousBoxChild):
1959         (WebCore::RenderBlock::cachedFlowThreadContainingBlock):
1960         (WebCore::RenderBlock::cachedFlowThreadContainingBlockNeedsUpdate):
1961         (WebCore::RenderBlock::setCachedFlowThreadContainingBlockNeedsUpdate):
1962         (WebCore::RenderBlock::updateCachedFlowThreadContainingBlock):
1963         (WebCore::RenderBlock::locateFlowThreadContainingBlock):
1964         * rendering/RenderBlock.h:
1965         * rendering/RenderBlockFlow.cpp:
1966         (WebCore::RenderBlockFlow::styleWillChange):
1967         * rendering/RenderBox.cpp:
1968         (WebCore::RenderBox::borderBoxRectInRegion):
1969         * rendering/RenderFlowThread.cpp:
1970         (WebCore::RenderFlowThread::layout):
1971         (WebCore::RenderFlowThread::updateAllLayerToRegionMappings):
1972         (WebCore::RenderFlowThread::repaintRectangleInRegions):
1973         (WebCore::CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer): Deleted.
1974         (WebCore::CurrentRenderFlowThreadMaintainer::~CurrentRenderFlowThreadMaintainer): Deleted.
1975         (WebCore::CurrentRenderFlowThreadDisabler::CurrentRenderFlowThreadDisabler): Deleted.
1976         (WebCore::CurrentRenderFlowThreadDisabler::~CurrentRenderFlowThreadDisabler): Deleted.
1977         * rendering/RenderFlowThread.h:
1978         * rendering/RenderLayer.cpp:
1979         (WebCore::RenderLayer::paintLayer):
1980         (WebCore::RenderLayer::hitTestLayer):
1981         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
1982         (WebCore::RenderLayer::calculateClipRects):
1983         * rendering/RenderObject.cpp:
1984         (WebCore::RenderObject::showRegionsInformation):
1985         (WebCore::RenderObject::insertedIntoTree):
1986         (WebCore::RenderObject::removeFromRenderFlowThread):
1987         (WebCore::RenderObject::removeFromRenderFlowThreadIncludingDescendants):
1988         (WebCore::RenderObject::invalidateFlowThreadContainingBlockIncludingDescendants):
1989         (WebCore::RenderObject::currentRenderNamedFlowFragment):
1990         (WebCore::RenderObject::locateFlowThreadContainingBlock):
1991         (WebCore::RenderObject::locateFlowThreadContainingBlockNoCache): Deleted.
1992         (WebCore::RenderObject::removeFromRenderFlowThreadRecursive): Deleted.
1993         * rendering/RenderObject.h:
1994         (WebCore::RenderObject::flowThreadContainingBlock):
1995         * rendering/RenderRegion.cpp:
1996         (WebCore::RenderRegion::computeOverflowFromFlowThread):
1997         * rendering/RenderView.cpp:
1998         (WebCore::RenderView::pushLayoutStateForCurrentFlowThread):
1999         (WebCore::RenderView::popLayoutStateForCurrentFlowThread):
2000         * rendering/RenderView.h:
2001
2002 2014-10-15  Chris Dumez  <cdumez@apple.com>
2003
2004         Use is<>() / downcast<>() for list-related render objects
2005         https://bugs.webkit.org/show_bug.cgi?id=137764
2006
2007         Reviewed by Benjamin Poulain.
2008
2009         Use is<>() / downcast<>() for list-related render objects and clean up
2010         the surrounding code.
2011
2012         No new tests, no behavior change.
2013
2014         * accessibility/AccessibilityListBox.cpp:
2015         (WebCore::AccessibilityListBox::visibleChildren):
2016         (WebCore::AccessibilityListBox::elementAccessibilityHitTest):
2017         * accessibility/AccessibilityListBoxOption.cpp:
2018         (WebCore::AccessibilityListBoxOption::elementRect):
2019         * accessibility/AccessibilityObject.cpp:
2020         (WebCore::renderListItemContainerForNode):
2021         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
2022         (getRangeLengthForObject):
2023         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2024         (accessibilityObjectLength):
2025         (offsetAdjustmentForListItem):
2026         (webkitAccessibleTextGetText):
2027         * editing/BreakBlockquoteCommand.cpp:
2028         (WebCore::BreakBlockquoteCommand::doApply):
2029         * html/HTMLLIElement.cpp:
2030         (WebCore::HTMLLIElement::didAttachRenderers):
2031         (WebCore::HTMLLIElement::parseValue):
2032         * html/HTMLSelectElement.cpp:
2033         (WebCore::HTMLSelectElement::nextSelectableListIndexPageAway):
2034         (WebCore::HTMLSelectElement::scrollToSelection):
2035         (WebCore::HTMLSelectElement::setOptionsChangedOnRenderer):
2036         (WebCore::HTMLSelectElement::selectOption):
2037         (WebCore::HTMLSelectElement::platformHandleKeydownEvent):
2038         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
2039         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
2040         * html/HTMLSelectElementWin.cpp:
2041         (WebCore::HTMLSelectElement::platformHandleKeydownEvent):
2042         * page/mac/EventHandlerMac.mm:
2043         (WebCore::EventHandler::platformPrepareForWheelEvents):
2044         * rendering/InlineFlowBox.cpp:
2045         (WebCore::InlineFlowBox::addToLine):
2046         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
2047         * rendering/RenderCounter.cpp:
2048         (WebCore::planCounter):
2049         * rendering/RenderListBox.h:
2050         * rendering/RenderListItem.cpp:
2051         (WebCore::nextListItem):
2052         (WebCore::previousListItem):
2053         * rendering/RenderListItem.h:
2054         * rendering/RenderListMarker.h:
2055         * rendering/RenderMenuList.h:
2056         * rendering/RenderTreeAsText.cpp:
2057         (WebCore::markerTextForListItem):
2058         * rendering/TextAutoSizing.cpp:
2059         (WebCore::TextAutoSizingValue::adjustNodeSizes):
2060         * rendering/line/BreakingContextInlineHeaders.h:
2061         (WebCore::BreakingContext::handleReplaced):
2062         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
2063         * testing/Internals.cpp:
2064         (WebCore::Internals::isSelectPopupVisible):
2065
2066 2014-10-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2067
2068         Use std::unique_ptr for CachedResource
2069         https://bugs.webkit.org/show_bug.cgi?id=137736
2070
2071         Reviewed by Darin Adler.
2072
2073         No new tests, no behavior change.
2074
2075         * loader/cache/CachedResource.cpp: Use std::unique_ptr instead of PassOwnPtr|OwnPtr.
2076         (WebCore::CachedResource::removeClient):
2077         * loader/cache/CachedResource.h: Set ctor from private to public.
2078         (WebCore::CachedResource::CachedResourceCallback::schedule):
2079
2080 2014-10-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2081
2082         Move TextCodec classes to std::unique_ptr
2083         https://bugs.webkit.org/show_bug.cgi?id=137738
2084
2085         Reviewed by Darin Adler.
2086
2087         Replace uses of PassOwnPtr in code under TextCodecFoo class with std::unique_ptr.
2088         To do this, ctor of TextCodecFoo classes is changed from private to public. Besides
2089         related classes follow this change as well.
2090
2091         No new tests, no behavior change.
2092
2093         * html/parser/HTMLMetaCharsetParser.h:
2094         * loader/TextResourceDecoder.cpp:
2095         (WebCore::TextResourceDecoder::setEncoding):
2096         (WebCore::TextResourceDecoder::flush):
2097         * loader/TextResourceDecoder.h:
2098         * platform/text/TextCodec.h:
2099         * platform/text/TextCodecICU.cpp:
2100         (WebCore::TextCodecICU::create):
2101         * platform/text/TextCodecICU.h:
2102         * platform/text/TextCodecLatin1.cpp:
2103         (WebCore::newStreamingTextDecoderWindowsLatin1):
2104         * platform/text/TextCodecUTF16.cpp:
2105         (WebCore::newStreamingTextDecoderUTF16LE):
2106         (WebCore::newStreamingTextDecoderUTF16BE):
2107         * platform/text/TextCodecUTF8.cpp:
2108         (WebCore::TextCodecUTF8::create):
2109         * platform/text/TextCodecUTF8.h:
2110         * platform/text/TextCodecUserDefined.cpp:
2111         (WebCore::newStreamingTextDecoderUserDefined):
2112         * platform/text/TextEncodingRegistry.cpp:
2113         (WebCore::newTextCodec):
2114         * platform/text/TextEncodingRegistry.h:
2115         * platform/text/mac/TextCodecMac.cpp:
2116         (WebCore::newTextCodecMac):
2117
2118 2014-10-15  Dean Jackson  <dino@apple.com>
2119
2120         [Media] Reduce style updates (painting) in controls
2121         https://bugs.webkit.org/show_bug.cgi?id=137763
2122         <rdar://problem/17833045>
2123
2124         Reviewed by Simon Fraser.
2125
2126         Media controls were causing a lot of repaints they were
2127         constantly updating the style of the widgets, the value
2128         of the forms, or the text in the display.
2129
2130         This is necessary when the controls are visible, but not
2131         necessary when they are hidden. Return immediately in that case.
2132
2133         * Modules/mediacontrols/mediaControlsApple.js:
2134         (Controller.prototype.createControls): Initialise the slider to a zero value.
2135         (Controller.prototype.handleDurationChange): Force an update even though we might be hidden.
2136         (Controller.prototype.updateProgress): Don't update if we're hidden.
2137         (Controller.prototype.updateTime): Ditto.
2138         * Modules/mediacontrols/mediaControlsiOS.js:
2139         (ControllerIOS.prototype.updateProgress): Ditto.
2140
2141 2014-10-15  Chris Dumez  <cdumez@apple.com>
2142
2143         [Mac] Fix inefficiencies in ResourceResponse::platformLazyInit(InitLevel) - Part 2
2144         https://bugs.webkit.org/show_bug.cgi?id=137721
2145
2146         Reviewed by Darin Adler.
2147
2148         Follow-up patch to r174717 addressing review comments made after the patch landed:
2149         - Use modern C++ loop
2150         - Remove explicit calls to String(NSString*) constructor
2151
2152         No new tests, no new tests.
2153
2154         * platform/network/mac/ResourceResponseMac.mm:
2155         (WebCore::ResourceResponse::platformLazyInit):
2156
2157 2014-10-15  Chris Dumez  <cdumez@apple.com>
2158
2159         Use is<>() / downcast<>() for InlineBox subclasses
2160         https://bugs.webkit.org/show_bug.cgi?id=137749
2161
2162         Reviewed by Darin Adler.
2163
2164         Use is<>() / downcast<>() for InlineBox subclasses and clean up the
2165         surrounding code.
2166
2167         No new tests, no behavior change.
2168
2169         * dom/Position.cpp:
2170         (WebCore::Position::upstream):
2171         (WebCore::Position::downstream):
2172         * editing/VisibleUnits.cpp:
2173         (WebCore::wordBreakIteratorForMinOffsetBoundary):
2174         (WebCore::wordBreakIteratorForMaxOffsetBoundary):
2175         (WebCore::visualWordPosition):
2176         (WebCore::startPositionForLine):
2177         (WebCore::endPositionForLine):
2178         * rendering/InlineBox.cpp:
2179         (WebCore::InlineBox::root):
2180         (WebCore::InlineBox::nextLeafChild):
2181         (WebCore::InlineBox::prevLeafChild):
2182         (WebCore::InlineBox::nextLeafChildIgnoringLineBreak):
2183         * rendering/InlineBox.h:
2184         * rendering/InlineElementBox.h:
2185         * rendering/InlineFlowBox.cpp:
2186         (WebCore::InlineFlowBox::getFlowSpacingLogicalWidth):
2187         (WebCore::InlineFlowBox::addToLine):
2188         (WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
2189         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
2190         (WebCore::InlineFlowBox::requiresIdeographicBaseline):
2191         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
2192         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
2193         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
2194         (WebCore::InlineFlowBox::computeMaxLogicalTop):
2195         (WebCore::InlineFlowBox::flipLinesInBlockDirection):
2196         (WebCore::InlineFlowBox::computeOverflow):
2197         (WebCore::InlineFlowBox::firstLeafChild):
2198         (WebCore::InlineFlowBox::lastLeafChild):
2199         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
2200         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
2201         * rendering/InlineFlowBox.h:
2202         * rendering/InlineTextBox.h:
2203         * rendering/RenderBlockFlow.cpp:
2204         (WebCore::RenderBlockFlow::positionForBox):
2205         * rendering/RenderBlockFlow.h:
2206         (WebCore::RenderBlockFlow::firstRootBox):
2207         (WebCore::RenderBlockFlow::lastRootBox):
2208         * rendering/RenderBlockLineLayout.cpp:
2209         (WebCore::RenderBlockFlow::createLineBoxes):
2210         (WebCore::RenderBlockFlow::constructLine):
2211         (WebCore::setLogicalWidthForTextRun):
2212         (WebCore::computeExpansionForJustifiedText):
2213         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
2214         (WebCore::RenderBlockFlow::computeBlockDirectionPositionsForLine):
2215         (WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns):
2216         * rendering/RenderText.cpp:
2217         (WebCore::RenderText::localCaretRect):
2218         * rendering/RootInlineBox.cpp:
2219         (WebCore::RootInlineBox::isHyphenated):
2220         (WebCore::RootInlineBox::ascentAndDescentForBox):
2221         * rendering/RootInlineBox.h:
2222         (WebCore::RootInlineBox::nextRootBox):
2223         (WebCore::RootInlineBox::prevRootBox):
2224         * rendering/svg/RenderSVGInlineText.cpp:
2225         (WebCore::RenderSVGInlineText::localCaretRect):
2226         (WebCore::RenderSVGInlineText::positionForPoint):
2227         * rendering/svg/RenderSVGText.cpp:
2228         (WebCore::RenderSVGText::positionForPoint):
2229         * rendering/svg/SVGInlineFlowBox.cpp:
2230         (WebCore::SVGInlineFlowBox::paintSelectionBackground):
2231         (WebCore::SVGInlineFlowBox::paint):
2232         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
2233         * rendering/svg/SVGInlineFlowBox.h:
2234         * rendering/svg/SVGInlineTextBox.h:
2235         * rendering/svg/SVGRenderTreeAsText.cpp:
2236         (WebCore::writeRenderSVGTextBox):
2237         (WebCore::writeSVGInlineTextBoxes):
2238         * rendering/svg/SVGRootInlineBox.cpp:
2239         (WebCore::SVGRootInlineBox::paint):
2240         (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
2241         (WebCore::SVGRootInlineBox::layoutChildBoxes):
2242         (WebCore::reverseInlineBoxRangeAndValueListsIfNeeded):
2243         * rendering/svg/SVGRootInlineBox.h:
2244         * rendering/svg/SVGTextQuery.cpp:
2245         (WebCore::SVGTextQuery::collectTextBoxesInFlowBox):
2246
2247 2014-10-15  Roger Fong  <roger_fong@apple.com>
2248
2249         glReadPixels on NVIDIA cards returns the wrong values for the alpha channel when alpha is off.
2250         https://bugs.webkit.org/show_bug.cgi?id=137752.
2251         <rdar://problem/15408133>
2252
2253         Reviewed by Brent Fulgham.
2254
2255         This change fixed the 1.0.2 conformance test: context/context-attribute-preserve-drawing-buffer.html
2256
2257         * platform/graphics/GraphicsContext3D.h:
2258         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2259         Manually set the alpha channel to 255 when alpha is off on the rendering context.
2260
2261 2014-10-13  Chris Fleizach  <cfleizach@apple.com>
2262
2263         AX: Going back is broken for VoiceOver
2264         https://bugs.webkit.org/show_bug.cgi?id=137382
2265
2266         Reviewed by Darin Adler.
2267
2268         There were two issues preventing VoiceOver from navigating when using page history to go back/forward.
2269           1) Existing AXLoadComplete does not get fired when you just move through page history. 
2270                There were existing frameLoad notifications used by GTK. I think we should use those which seem more reliable.
2271           2) The AccessibilityScrollView cached its children, but on some history page loads, that cache was never cleared out.
2272                Rather than trying to find those places to clear out the cache, it's easier to just add the elements to the children
2273                array everytime it's asked for. Since there's only ever 3 elements (web area + 2 scroll bars) this should not be a performance hit.
2274
2275         Tests are not possible since they require monitoring notifications across multiple page loads.
2276
2277         * accessibility/AXObjectCache.h:
2278         * accessibility/AccessibilityScrollView.cpp:
2279         (WebCore::AccessibilityScrollView::updateChildrenIfNecessary):
2280         * accessibility/ios/AXObjectCacheIOS.mm:
2281         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
2282         * accessibility/mac/AXObjectCacheMac.mm:
2283         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
2284         * dom/Document.cpp:
2285         (WebCore::Document::implicitClose):
2286
2287 2014-10-15  Simon Fraser  <simon.fraser@apple.com>
2288
2289         Sometimes can't scroll overflow:scroll areas in subframes
2290         https://bugs.webkit.org/show_bug.cgi?id=137746
2291         rdar://problem/18603560
2292
2293         Reviewed by Tim Horton.
2294         
2295         r169733 introduced a regression which caused us to no longer update the non-fast
2296         scrollable region on every layout in subframes, by adding a bogus isMainFrame() check.
2297         Revert to the previous code.
2298
2299         Test: platform/mac-wk2/tiled-drawing/scrolling/frames/scroll-region-after-frame-layout.html
2300
2301         * page/scrolling/AsyncScrollingCoordinator.cpp:
2302         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
2303
2304 2014-10-15  Chris Dumez  <cdumez@apple.com>
2305
2306         Use is<>() / downcast<>() for TransformOperation subclasses
2307         https://bugs.webkit.org/show_bug.cgi?id=137731
2308
2309         Reviewed by Darin Adler.
2310
2311         Use is<>() / downcast<>() for TransformOperation subclasses and clean
2312         up the surrounding code.
2313
2314         No new tests, no behavior change.
2315
2316         * platform/graphics/GraphicsLayer.cpp:
2317         (WebCore::GraphicsLayer::validateTransformOperations):
2318         * platform/graphics/ca/GraphicsLayerCA.cpp:
2319         (WebCore::getTransformFunctionValue):
2320         * platform/graphics/transforms/IdentityTransformOperation.h:
2321         * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
2322         (WebCore::Matrix3DTransformOperation::operator==):
2323         * platform/graphics/transforms/Matrix3DTransformOperation.h:
2324         * platform/graphics/transforms/MatrixTransformOperation.cpp:
2325         (WebCore::MatrixTransformOperation::operator==):
2326         (WebCore::MatrixTransformOperation::blend):
2327         * platform/graphics/transforms/MatrixTransformOperation.h:
2328         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
2329         (WebCore::PerspectiveTransformOperation::operator==):
2330         (WebCore::PerspectiveTransformOperation::blend):
2331         * platform/graphics/transforms/PerspectiveTransformOperation.h:
2332         * platform/graphics/transforms/RotateTransformOperation.cpp:
2333         (WebCore::RotateTransformOperation::operator==):
2334         (WebCore::RotateTransformOperation::blend):
2335         * platform/graphics/transforms/RotateTransformOperation.h:
2336         * platform/graphics/transforms/ScaleTransformOperation.cpp:
2337         (WebCore::ScaleTransformOperation::operator==):
2338         (WebCore::ScaleTransformOperation::blend):
2339         * platform/graphics/transforms/ScaleTransformOperation.h:
2340         * platform/graphics/transforms/SkewTransformOperation.cpp:
2341         (WebCore::SkewTransformOperation::operator==):
2342         (WebCore::SkewTransformOperation::blend):
2343         * platform/graphics/transforms/SkewTransformOperation.h:
2344         * platform/graphics/transforms/TransformOperation.h:
2345         * platform/graphics/transforms/TranslateTransformOperation.cpp:
2346         (WebCore::TranslateTransformOperation::operator==):
2347         (WebCore::TranslateTransformOperation::blend):
2348         * platform/graphics/transforms/TranslateTransformOperation.h:
2349
2350 2014-10-15  Chris Dumez  <cdumez@apple.com>
2351
2352         Use is<>() / downcast<>() for RenderTextControl / RenderTextControlSingleLine
2353         https://bugs.webkit.org/show_bug.cgi?id=137727
2354
2355         Reviewed by Darin Adler.
2356
2357         Use is<>() / downcast<>() for RenderTextControl / RenderTextControlSingleLine.
2358
2359         No new tests, no behavior change.
2360
2361         * accessibility/AccessibilityRenderObject.cpp:
2362         (WebCore::AccessibilityRenderObject::selectedText):
2363         (WebCore::AccessibilityRenderObject::selectedTextRange):
2364         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
2365         (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
2366         (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
2367         * editing/TextIterator.cpp:
2368         (WebCore::TextIterator::handleReplacedElement):
2369         * html/TextFieldInputType.cpp:
2370         (WebCore::TextFieldInputType::forwardEvent):
2371         * html/shadow/TextControlInnerElements.cpp:
2372         (WebCore::TextControlInnerElement::customStyleForRenderer):
2373         * page/EventHandler.cpp:
2374         (WebCore::EventHandler::capsLockStateMayHaveChanged):
2375         * page/ios/FrameIOS.mm:
2376         (WebCore::ancestorRespondingToScrollWheelEvents):
2377         * rendering/RenderTextControl.h:
2378         * rendering/RenderTextControlSingleLine.h:
2379         * rendering/SimpleLineLayout.cpp:
2380         (WebCore::SimpleLineLayout::canUseFor):
2381
2382 2014-10-15  Chris Dumez  <cdumez@apple.com>
2383
2384         Use is<>() / downcast<>() for ClipPathOperation subclasses
2385         https://bugs.webkit.org/show_bug.cgi?id=137733
2386
2387         Reviewed by Mihnea Ovidenie.
2388
2389         Use is<>() / downcast<>() for ClipPathOperation subclasses.
2390
2391         No new tests, no behavior change.
2392
2393         * css/CSSComputedStyleDeclaration.cpp:
2394         (WebCore::ComputedStyleExtractor::propertyValue):
2395         * css/DeprecatedStyleBuilder.cpp:
2396         (WebCore::ApplyPropertyClipPath::applyValue):
2397         * rendering/ClipPathOperation.h:
2398         * rendering/RenderBlock.cpp:
2399         (WebCore::RenderBlock::nodeAtPoint):
2400         * rendering/RenderLayer.cpp:
2401         (WebCore::RenderLayer::setupClipPath):
2402         * rendering/svg/SVGRenderingContext.cpp:
2403         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
2404
2405 2014-10-15  Chris Dumez  <cdumez@apple.com>
2406
2407         [Mac] Use CFDictionaryContainsKey() in ImageSource::isSizeAvailable()
2408         https://bugs.webkit.org/show_bug.cgi?id=137723
2409
2410         Reviewed by Simon Fraser.
2411
2412         Use CFDictionaryContainsKey() in ImageSource::isSizeAvailable() instead
2413         of CFDictionaryGetValue() as we are not actually interested in the
2414         value.
2415
2416         No new tests, no behavior change.
2417
2418         * platform/graphics/cg/ImageSourceCG.cpp:
2419         (WebCore::ImageSource::isSizeAvailable):
2420
2421 2014-10-15  Mihnea Ovidenie  <mihnea@adobe.com>
2422
2423         Use modern loops in subtrees selection code
2424         https://bugs.webkit.org/show_bug.cgi?id=137688
2425
2426         Reviewed by Andreas Kling.
2427
2428         No new tests as no change in functionality.
2429
2430         * rendering/RenderView.cpp:
2431         (WebCore::RenderView::splitSelectionBetweenSubtrees):
2432         (WebCore::RenderView::updateSelectionForSubtrees):
2433         (WebCore::RenderView::clearSubtreeSelection):
2434         (WebCore::RenderView::applySubtreeSelection):
2435         * rendering/RenderView.h:
2436
2437 2014-10-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2438
2439         Clean up unnecessary PassOwnPtr.h inclusion
2440         https://bugs.webkit.org/show_bug.cgi?id=137726
2441
2442         Reviewed by Chris Dumez.
2443
2444         No new tests, no behavior changes.
2445
2446         * dom/Document.h: Remove PassOwnPtr.h inclusion.
2447         * loader/ResourceBuffer.h: ditto.
2448         * loader/cocoa/DiskCacheMonitorCocoa.mm: ditto.
2449         * page/scrolling/AxisScrollSnapOffsets.h: ditto.
2450         * page/scrolling/ScrollingStateScrollingNode.h: ditto.
2451         * platform/ColorChooserClient.h: ditto.
2452         * platform/ScrollableArea.cpp: ditto.
2453         * platform/ScrollbarThemeClient.h: ditto.
2454         * platform/SharedBuffer.cpp: ditto.
2455         * platform/Supplementable.h: ditto.
2456         * platform/graphics/surfaces/GraphicsSurface.h: ditto.
2457         * platform/graphics/surfaces/GraphicsSurfaceToken.h: ditto.
2458         * platform/graphics/win/WKCAImageQueue.cpp: ditto.
2459         * platform/win/CursorWin.cpp: ditto.
2460
2461 2014-10-14  Chris Dumez  <cdumez@apple.com>
2462
2463         Have offsetFromContainer() / offsetFromAncestorContainer() take a RenderElement&
2464         https://bugs.webkit.org/show_bug.cgi?id=137728
2465
2466         Reviewed by Benjamin Poulain.
2467
2468         Have offsetFromContainer() / offsetFromAncestorContainer() take a RenderElement&
2469         instead of a RenderObject*. The argument passed is never null and the type
2470         should be a RenderElement as the argument is a container.
2471
2472         No new tests, no behavior change.
2473
2474         * editing/htmlediting.cpp:
2475         (WebCore::localCaretRectInRendererForCaretPainting):
2476         * page/GestureTapHighlighter.cpp:
2477         * rendering/RenderBox.cpp:
2478         (WebCore::RenderBox::mapLocalToContainer):
2479         (WebCore::RenderBox::pushMappingToContainer):
2480         (WebCore::RenderBox::offsetFromContainer):
2481         (WebCore::RenderBox::computeRectForRepaint):
2482         * rendering/RenderBox.h:
2483         * rendering/RenderBoxModelObject.cpp:
2484         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
2485         * rendering/RenderInline.cpp:
2486         (WebCore::RenderInline::computeRectForRepaint):
2487         (WebCore::RenderInline::offsetFromContainer):
2488         (WebCore::RenderInline::mapLocalToContainer):
2489         (WebCore::RenderInline::pushMappingToContainer):
2490         * rendering/RenderInline.h:
2491         * rendering/RenderMultiColumnFlowThread.cpp:
2492         (WebCore::RenderMultiColumnFlowThread::offsetFromContainer):
2493         * rendering/RenderMultiColumnFlowThread.h:
2494         * rendering/RenderNamedFlowFragment.cpp:
2495         (WebCore::RenderNamedFlowFragment::offsetFromContainer):
2496         * rendering/RenderNamedFlowFragment.h:
2497         * rendering/RenderObject.cpp:
2498         (WebCore::RenderObject::offsetFromContainer):
2499         (WebCore::RenderObject::offsetFromAncestorContainer):
2500         * rendering/RenderObject.h:
2501         * rendering/RenderTableCell.cpp:
2502         (WebCore::RenderTableCell::offsetFromContainer):
2503         * rendering/RenderTableCell.h:
2504         * rendering/RenderThemeMac.mm:
2505         (WebCore::RenderThemeMac::convertToPaintingRect):
2506
2507 2014-10-14  Jer Noble  <jer.noble@apple.com>
2508
2509         REGRESSION (r159208): Crash when clicking scrubber after navigating away/back to video
2510         https://bugs.webkit.org/show_bug.cgi?id=137715
2511
2512         Reviewed by Darin Adler.
2513
2514         Simple null-check of m_player in refreshCachedTime.
2515
2516         * html/HTMLMediaElement.cpp:
2517         (WebCore::HTMLMediaElement::refreshCachedTime):
2518
2519 2014-10-14  Chris Dumez  <cdumez@apple.com>
2520
2521         [Mac] Fix inefficiencies in ResourceResponse::platformLazyInit(InitLevel)
2522         https://bugs.webkit.org/show_bug.cgi?id=137721
2523
2524         Reviewed by Geoffrey Garen.
2525
2526         There were several inefficiencies with the Mac implementation of
2527         ResourceResponse::platformLazyInit(InitLevel):
2528         1. We end up initializing uncommon fields even if called with
2529            'CommonFieldsOnly' initLevel.
2530         2. If called with 'AllFields' initLevel (and if currently
2531            uninitialized), we end up populating m_httpHeaderFields twice, once
2532            with only the common headers, then a second time with ALL the
2533            headers. We can skip the common-header case in this case to avoid
2534            wasting CPU time.
2535
2536         This patch addresses both inefficiencies and cleans up the code a
2537         little bit to reduce variable scope and to use fast enumeration of
2538         header names.
2539
2540         As a result, we spend almost twice as little time in platformLazyInit()
2541         when loading msn.com (~30ms -> ~18ms).
2542
2543         No new tests, no behavior change.
2544
2545         * platform/network/mac/ResourceResponseMac.mm:
2546         (WebCore::ResourceResponse::platformLazyInit):
2547
2548 2014-10-14  Zalan Bujtas  <zalan@apple.com>
2549
2550         REGRESSION (Safari 7.1/8.0): Border-radius and overflow hidden renders incorrectly.
2551         https://bugs.webkit.org/show_bug.cgi?id=137205
2552
2553         Reviewed by Simon Fraser.
2554
2555         Child layer should not reset radius clipping behaviour.
2556
2557         Test: fast/layers/parent-clipping-overflow-is-overwritten-by-child-clipping.html
2558
2559         * rendering/RenderLayer.cpp:
2560         (WebCore::RenderLayer::calculateClipRects):
2561
2562 2014-10-14  Chris Dumez  <cdumez@apple.com>
2563
2564         Use is<>() / downcast<>() for PlatformCAAnimation subclasses
2565         https://bugs.webkit.org/show_bug.cgi?id=137722
2566
2567         Reviewed by Simon Fraser.
2568
2569         Use is<>() / downcast<>() for PlatformCAAnimation subclasses and clean
2570         up the surrounding code.
2571
2572         No new tests, no behavior change.
2573
2574         * page/mac/ServicesOverlayController.mm:
2575         (WebCore::ServicesOverlayController::Highlight::fadeIn):
2576         (WebCore::ServicesOverlayController::Highlight::fadeOut):
2577         * platform/graphics/ca/GraphicsLayerCA.cpp:
2578         (WebCore::GraphicsLayerCA::moveOrCopyLayerAnimation):
2579         (WebCore::GraphicsLayerCA::updateAnimations):
2580         (WebCore::GraphicsLayerCA::setAnimationOnLayer):
2581         (WebCore::GraphicsLayerCA::pauseCAAnimationOnLayer):
2582         * platform/graphics/ca/GraphicsLayerCA.h:
2583         * platform/graphics/ca/PlatformCAAnimation.h:
2584         * platform/graphics/ca/PlatformCALayer.h:
2585         * platform/graphics/ca/mac/PlatformCAAnimationMac.h:
2586         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
2587         (PlatformCAAnimationMac::copy):
2588         (PlatformCAAnimationMac::copyTimingFunctionFrom):
2589         (PlatformCAAnimationMac::copyFromValueFrom):
2590         (PlatformCAAnimationMac::copyToValueFrom):
2591         (PlatformCAAnimationMac::copyValuesFrom):
2592         (PlatformCAAnimationMac::copyKeyTimesFrom):
2593         (PlatformCAAnimationMac::copyTimingFunctionsFrom):
2594         * platform/graphics/ca/mac/PlatformCALayerMac.h:
2595         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2596         (PlatformCALayerMac::addAnimationForKey):
2597         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
2598         (PlatformCAAnimationWin::copy):
2599         (PlatformCAAnimationWin::copyTimingFunctionFrom):
2600         (PlatformCAAnimationWin::copyFromValueFrom):
2601         (PlatformCAAnimationWin::copyToValueFrom):
2602         (PlatformCAAnimationWin::copyValuesFrom):
2603         (PlatformCAAnimationWin::copyKeyTimesFrom):
2604         (PlatformCAAnimationWin::copyTimingFunctionsFrom):
2605         * platform/graphics/ca/win/PlatformCAAnimationWin.h:
2606         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2607         (PlatformCALayerWin::addAnimationForKey):
2608         * platform/graphics/ca/win/PlatformCALayerWin.h:
2609
2610 2014-10-14  Chris Dumez  <cdumez@apple.com>
2611
2612         Use is<>() / downcast<>() for RenderInline
2613         https://bugs.webkit.org/show_bug.cgi?id=137704
2614
2615         Reviewed by Darin Adler.
2616
2617         Use is<>() / downcast<>() for RenderInline and clean up the surrounding
2618         code.
2619
2620         No new tests, no behavior change.
2621
2622         * accessibility/AccessibilityRenderObject.cpp:
2623         (WebCore::firstChildInContinuation):
2624         * editing/SimplifyMarkupCommand.cpp:
2625         (WebCore::SimplifyMarkupCommand::doApply):
2626         * inspector/InspectorOverlay.cpp:
2627         (WebCore::buildRendererHighlight):
2628         * page/FrameView.cpp:
2629         (WebCore::FrameView::paintContents):
2630         * rendering/InlineFlowBox.cpp:
2631         (WebCore::InlineFlowBox::removeLineBoxFromRenderObject):
2632         (WebCore::InlineFlowBox::extractLineBoxFromRenderObject):
2633         (WebCore::InlineFlowBox::attachLineBoxToRenderObject):
2634         (WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
2635         (WebCore::InlineFlowBox::nodeAtPoint):
2636         (WebCore::InlineFlowBox::paint):
2637         * rendering/InlineIterator.h:
2638         (WebCore::bidiFirstSkippingEmptyInlines):
2639         * rendering/LayoutState.cpp:
2640         (WebCore::LayoutState::LayoutState):
2641         * rendering/RenderBlock.cpp:
2642         (WebCore::RenderBlock::willBeDestroyed):
2643         (WebCore::RenderBlock::paintObject):
2644         (WebCore::RenderBlock::inlineElementContinuation):
2645         (WebCore::RenderBlock::addFocusRingRects):
2646         * rendering/RenderBlockFlow.cpp:
2647         (WebCore::RenderBlockFlow::willBeDestroyed):
2648         (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
2649         * rendering/RenderBlockFlow.h:
2650         * rendering/RenderBlockLineLayout.cpp:
2651         (WebCore::constructBidiRunsForSegment):
2652         (WebCore::RenderBlockFlow::layoutLineBoxes):
2653         * rendering/RenderBox.cpp:
2654         (WebCore::RenderBox::offsetFromContainer):
2655         (WebCore::RenderBox::computeRectForRepaint):
2656         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
2657         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
2658         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
2659         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
2660         (WebCore::RenderBox::layoutOverflowRectForPropagation):
2661         * rendering/RenderBoxModelObject.cpp:
2662         (WebCore::accumulateInFlowPositionOffsets):
2663         * rendering/RenderElement.cpp:
2664         (WebCore::RenderElement::willBeRemovedFromTree):
2665         * rendering/RenderElement.h:
2666         (WebCore::RenderElement::dirtyLinesFromChangedChild):
2667         * rendering/RenderFlowThread.cpp:
2668         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
2669         * rendering/RenderInline.cpp:
2670         (WebCore::RenderInline::willBeDestroyed):
2671         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
2672         (WebCore::RenderInline::clippedOverflowRectForRepaint):
2673         * rendering/RenderInline.h:
2674         * rendering/RenderLayer.cpp:
2675         (WebCore::RenderLayer::updateLayerPosition):
2676         (WebCore::RenderLayer::calculateClipRects):
2677         * rendering/RenderLineBoxList.cpp:
2678         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
2679         * rendering/RenderLineBoxList.h:
2680         * rendering/RenderNamedFlowThread.cpp:
2681         (WebCore::RenderNamedFlowThread::decorationsClipRectForBoxInNamedFlowFragment):
2682         * rendering/RenderObject.cpp:
2683         (WebCore::RenderObject::insertedIntoTree):
2684         * rendering/RenderRegion.cpp:
2685         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
2686         (WebCore::RenderRegion::visualOverflowRectForBox):
2687         (WebCore::RenderRegion::visualOverflowRectForBoxForPropagation):
2688         * rendering/RenderRegion.h:
2689         * rendering/RenderReplaced.cpp:
2690         (WebCore::RenderReplaced::willBeDestroyed):
2691         * rendering/RenderTextLineBoxes.cpp:
2692         (WebCore::RenderTextLineBoxes::removeAllFromParent):
2693         (WebCore::RenderTextLineBoxes::dirtyRange):
2694         * rendering/line/BreakingContextInlineHeaders.h:
2695         (WebCore::inlineLogicalWidth):
2696         (WebCore::BreakingContext::handleEmptyInline):
2697         * rendering/line/LineInlineHeaders.h:
2698         (WebCore::requiresLineBox):
2699         (WebCore::setStaticPositions):
2700         * rendering/svg/SVGInlineTextBox.cpp:
2701         (WebCore::SVGInlineTextBox::paint):
2702
2703 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
2704
2705         [Win] Unreviewed build fix after r174710.
2706
2707         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2708         (WebCore::MediaPlayerPrivateAVFoundationCF::createSession):
2709
2710 2014-10-14  Dan Bernstein  <mitz@apple.com>
2711
2712         URLs that start with http:/// and https:/// lose two slashes when parsed, causing assertion failure and inconsistent behavior
2713         https://bugs.webkit.org/show_bug.cgi?id=137718
2714
2715         Reviewed by Alexey Proskuryakov.
2716
2717         Added cases to fast/loader/url-parse-1.html.
2718
2719         * platform/URL.cpp:
2720         (WebCore::URL::parse): In hierarchical schemes other than file:, ignore any additional
2721         slashes after the ://, as prescribed by the authority-ignore-slashes state in the current
2722         URL spec.
2723
2724 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
2725
2726         [Win] Unreviewed build fix after r174698 and r174709.
2727
2728         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
2729         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
2730         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2731         (WebCore::MediaPlayerPrivateAVFoundationCF::supportsKeySystem):
2732         (WebCore::AVFWrapper::shouldWaitForLoadingOfResource):
2733         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
2734
2735 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
2736
2737         [Win] Unreviewed build fix after r174698
2738
2739         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
2740         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
2741         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2742         (WebCore::MediaPlayerPrivateAVFoundationCF::createSession):
2743
2744 2014-10-14  Myles C. Maxfield  <mmaxfield@apple.com>
2745
2746         Improve debug description of WAKViews
2747         https://bugs.webkit.org/show_bug.cgi?id=137716
2748
2749         Reviewed by Simon Fraser.
2750
2751         No new tests because there is no behavior change.
2752
2753         * platform/ios/wak/WAKView.mm:
2754         (-[WAKView description]):
2755         * platform/ios/wak/WKView.h:
2756         * platform/ios/wak/WKView.mm:
2757         (WKViewGetOrigin):
2758
2759 2014-10-14  Chris Dumez  <cdumez@apple.com>
2760
2761         Introduce an isCSSAnimated flag on RenderElement for performance
2762         https://bugs.webkit.org/show_bug.cgi?id=137583
2763
2764         Reviewed by Simon Fraser.
2765
2766         I noticed when profiling the ebay.com page load that isRunningAnimationOnRenderer()
2767         and isRunningAcceleratedAnimationOnRenderer() were called frequently, causing
2768         ~4.7 millions m_compositeAnimations HashMap lookups.
2769
2770         This patch introduces an isCSSAnimated flag on RenderElement to return early if
2771         there is no animation on the renderer, thus avoiding HashMap lookups. This reduces
2772         the number of HashMap lookups from ~4.7 millions to ~68k. On my machine, I see
2773         the following performance improvements:
2774         - isRunning*AnimationOnRenderer() / computeCompositingRequirements()
2775           - before: ~45ms  / ~90ms
2776           - after:  ~4ms / ~30ms
2777
2778         No new tests, no behavior change.
2779
2780         * page/animation/AnimationController.cpp:
2781         (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
2782         (WebCore::AnimationControllerPrivate::clear):
2783         (WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
2784         (WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
2785         (WebCore::AnimationController::isRunningAnimationOnRenderer):
2786         (WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
2787         * rendering/RenderElement.cpp:
2788         (WebCore::RenderElement::RenderElement):
2789         * rendering/RenderElement.h:
2790         (WebCore::RenderElement::isCSSAnimating):
2791         (WebCore::RenderElement::setIsCSSAnimating):
2792
2793 2014-10-14  Dean Jackson  <dino@apple.com>
2794
2795         Crash in WebCore::UserGestureIndicator::processingUserGesture with WebWorkers
2796         https://bugs.webkit.org/show_bug.cgi?id=137676
2797         <rdar://problem/15735049>
2798
2799         Reviewed by Alexey Proskuryakov.
2800
2801         Remove the code I added that tracks the timestamp of the most recent
2802         user gesture from the event handling dispatch, as it was both
2803         a silly place to do it and it originally crashed when events were fired from
2804         Worker threads (although this was fixed in r152238).
2805
2806         It's now recorded by going through UserGestureIndicator, which is good because
2807         it knows when a user has triggered an event. Its constructor now takes
2808         a pointer to Document, and updates the timestamp there if necessary.
2809
2810         Not all UserGestureIndicator instances needed to reset the timestamp; Those did
2811         not have to pass along the Document.
2812
2813         This is untestable due to the fix mentioned above.
2814
2815         * WebCore.exp.in: Change constructor signature.
2816
2817         * accessibility/AccessibilityNodeObject.cpp: Pass a pointer to the Document into the UserGestureIndicator.
2818         (WebCore::AccessibilityNodeObject::increment):
2819         (WebCore::AccessibilityNodeObject::decrement):
2820         * accessibility/AccessibilityObject.cpp: Ditto.
2821         (WebCore::AccessibilityObject::press):
2822
2823         * dom/Document.cpp:
2824         (WebCore::Document::updateLastHandledUserGestureTimestamp): Renamed.
2825         * dom/Document.h:
2826
2827         * dom/EventTarget.cpp: Remove the code to update the timestamp.
2828         (WebCore::EventTarget::fireEventListeners):
2829
2830         * dom/UserGestureIndicator.cpp:
2831         (WebCore::UserGestureIndicator::UserGestureIndicator): If there is a Document and
2832         this is a user gesture, then reset the timestamp.
2833         * dom/UserGestureIndicator.h:
2834
2835         * page/EventHandler.cpp: Pass a pointer to the Document.
2836         (WebCore::EventHandler::handleMousePressEvent):
2837         (WebCore::EventHandler::handleMouseDoubleClickEvent):
2838         (WebCore::EventHandler::handleMouseReleaseEvent):
2839         (WebCore::EventHandler::keyEvent):
2840         (WebCore::EventHandler::handleTouchEvent):
2841
2842         * rendering/HitTestResult.cpp: Ditto.
2843         (WebCore::HitTestResult::toggleMediaFullscreenState):
2844         (WebCore::HitTestResult::enterFullscreenForVideo):
2845
2846 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
2847
2848         [Win] Unreviewed gardening. Ignore Visual Studio *.sdf files.
2849
2850         * WebCore.vcxproj: Modified property svn:ignore.
2851
2852 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
2853
2854         [Win] Enable Encrypted Media Support
2855         https://bugs.webkit.org/show_bug.cgi?id=137710
2856         <rdar://problem/18652699>
2857
2858         Reviewed by Jer Noble.
2859
2860         This feature is covered by existing media tests.
2861
2862         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2863         (WebCore::destroyAVFWrapper): Remove redundant ASSERT.
2864         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
2865         (displayOnMainThreadContext::displayOnMainThreadContext): Added.
2866         (redispatchOnMainQueue): Added.
2867         (PlatformCALayerWinInternal::displayCallback): Check if a display
2868         call is happening on a background queue, and re-dispatch on the
2869         main thread if necessary.
2870
2871 2014-10-14  Chris Dumez  <cdumez@apple.com>
2872
2873         [Mac] Avoid unnecessary dictionary lookup in ImageSource::isSizeAvailable()
2874         https://bugs.webkit.org/show_bug.cgi?id=137701
2875
2876         Reviewed by Simon Fraser.
2877
2878         The CG implementation of ImageSource::isSizeAvailable() was looking up
2879         both the width and the height keys in the dictionary before determining
2880         if the size is available. We can abort early and return false if the
2881         first key (the width) is missing, thus avoiding an extra dictionary
2882         lookup in this case.
2883
2884         This is a small win but ImageSource::isSizeAvailable() is called quite
2885         frequently during page loads
2886
2887         No new tests, no behavior change.
2888
2889         * platform/graphics/cg/ImageSourceCG.cpp:
2890         (WebCore::ImageSource::isSizeAvailable):
2891
2892 2014-10-14  Myles C. Maxfield  <mmaxfield@apple.com>
2893
2894         Remove unnecessary logging from SimpleFontData
2895         https://bugs.webkit.org/show_bug.cgi?id=137699
2896
2897         Reviewed by Andreas Kling.
2898
2899         Because of web fonts, fonts that don't have a glyph page 0 are common and expected. Printing out a
2900         message is not helpful, especially if you're not dealing with a font-related piece of WebKit.
2901
2902         No new tests because there is no behavior change.
2903
2904         * platform/graphics/SimpleFontData.cpp:
2905         (WebCore::SimpleFontData::platformGlyphInit):
2906
2907 2014-10-14  Martin Hock  <mhock@apple.com>
2908
2909         Update ViewportConfiguration whenever its size attributes change
2910         https://bugs.webkit.org/show_bug.cgi?id=137682
2911         rdar://problem/18643655
2912
2913         Reviewed by Benjamin Poulain.
2914
2915         * page/ViewportConfiguration.cpp:
2916         (WebCore::ViewportConfiguration::setMinimumLayoutSize):
2917         (WebCore::ViewportConfiguration::setMinimumLayoutSizeForMinimalUI):
2918
2919 2014-10-14  Joseph Pecoraro  <pecoraro@apple.com>
2920
2921         Web Inspector: Processing Instruction Nodes appear poorly in DOM Tree
2922         https://bugs.webkit.org/show_bug.cgi?id=137681
2923
2924         Reviewed by Timothy Hatcher.
2925
2926         * inspector/InspectorDOMAgent.cpp:
2927         (WebCore::InspectorDOMAgent::buildObjectForNode):
2928         Include the nodeName, localName, and nodeValue (string data)
2929         properties for processing instruction nodes.
2930
2931 2014-10-14  Chris Dumez  <cdumez@apple.com>
2932
2933         Use is<>() / downcast<>() for RenderFrame / RenderFrameSet
2934         https://bugs.webkit.org/show_bug.cgi?id=137696
2935
2936         Reviewed by Darin Adler.
2937
2938         Use is<>() / downcast<>() for RenderFrame / RenderFrameSet.
2939
2940         No new tests, no behavior change.
2941
2942         * html/HTMLFrameSetElement.cpp:
2943         (WebCore::HTMLFrameSetElement::defaultEventHandler):
2944         * rendering/RenderFrame.cpp:
2945         (WebCore::RenderFrame::updateFromElement):
2946         * rendering/RenderFrame.h:
2947         * rendering/RenderFrameSet.cpp:
2948         (WebCore::RenderFrameSet::computeEdgeInfo):
2949         (WebCore::RenderFrameSet::positionFramesWithFlattening):
2950         * rendering/RenderFrameSet.h:
2951
2952 2014-10-14  Youenn Fablet  <youennf@gmail.com>
2953
2954         [XHR] Abort method execution when m_loader->cancel() in internalAbort() caused reentry
2955         https://bugs.webkit.org/show_bug.cgi?id=126975
2956
2957         Reviewed by Alexey Proskuryakov.
2958
2959         Merging https://chromium.googlesource.com/chromium/blink/+/0d75daf2053631518606ae15daaece701a25b2c4
2960         Ensuring new test from https://codereview.chromium.org/76133002/ is passing.
2961
2962         Test: http/tests/xmlhttprequest/reentrant-cancel-abort.html
2963
2964         * xml/XMLHttpRequest.cpp:
2965         (WebCore::XMLHttpRequest::open): exit early if internalAbort asks so
2966         (WebCore::XMLHttpRequest::abort): exit early if internalAbort asks so
2967         (WebCore::XMLHttpRequest::internalAbort): ask calling function to exit early if a new loader is created during the cancellation of the loader (potential reentrant case through window.onload callback)   
2968         (WebCore::XMLHttpRequest::didTimeout): exit early if internalAbort asks so
2969         * xml/XMLHttpRequest.h:
2970
2971 2014-10-14  Alejandro G. Castro  <alex@igalia.com>
2972
2973         Multiple refactors in RenderMathMLOperator
2974         https://bugs.webkit.org/show_bug.cgi?id=137611
2975
2976         Reviewed by Darin Adler.
2977
2978         The changes include:
2979         - Rename m_operator to m_textContent.
2980         - Make most of the functions private, we needed to create some
2981         public member functions to be able to make the some funtions private
2982         and move trailingSpaceError to RenderMathMLOperator.
2983         - Fix incorrect capitalization of setOperatorProperties function.
2984         - Make all data members private and move them to the end of the
2985         class defition.
2986
2987         No new tests as no change in functionality.
2988
2989         * rendering/mathml/RenderMathMLOperator.cpp:
2990         (WebCore::RenderMathMLOperator::RenderMathMLOperator):
2991         (WebCore::RenderMathMLOperator::setOperatorProperties): Renamed,
2992         incorrect capitalization
2993         (WebCore::RenderMathMLOperator::stretchTo):
2994         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
2995         (WebCore::RenderMathMLOperator::rebuildTokenContent):
2996         (WebCore::RenderMathMLOperator::updateFromElement):
2997         (WebCore::RenderMathMLOperator::updateOperatorProperties):
2998         (WebCore::RenderMathMLOperator::shouldAllowStretching):
2999         (WebCore::RenderMathMLOperator::updateStyle):
3000         (WebCore::RenderMathMLOperator::trailingSpaceError):
3001         (WebCore::RenderMathMLOperator::SetOperatorProperties): Deleted.
3002         (WebCore::RenderMathMLOperator::advanceForGlyph): Deleted.
3003         (WebCore::RenderMathMLOperator::updateTokenContent): Deleted.
3004         (WebCore::RenderMathMLOperator::getGlyphAssemblyFallBack): Deleted.
3005         * rendering/mathml/RenderMathMLOperator.h:
3006         (WebCore::RenderMathMLOperator::setLeadingSpace): Added.
3007         (WebCore::RenderMathMLOperator::setTrailingSpace):  Added.
3008         (WebCore::RenderMathMLOperator::textContent): Added.
3009         (WebCore::RenderMathMLOperator::isInvisibleOperator):
3010         * rendering/mathml/RenderMathMLRadicalOperator.cpp:
3011         (WebCore::RenderMathMLRadicalOperator::setOperatorProperties):
3012         Renamed, incorrect capitalization
3013         (WebCore::RenderMathMLRadicalOperator::SetOperatorProperties): Deleted.
3014         (WebCore::RenderMathMLRadicalOperator::trailingSpaceError): Deleted.
3015         * rendering/mathml/RenderMathMLRadicalOperator.h:
3016
3017 2014-10-14  Alejandro G. Castro  <alex@igalia.com>
3018
3019         Changes in the stretchy attribute do not update rendering
3020         https://bugs.webkit.org/show_bug.cgi?id=136883
3021
3022         Reviewed by Darin Adler.
3023
3024         Test: mathml/presentation/mo-stretch-update.html
3025
3026         We need to relayout when a change in the stretchy attribute
3027         happens.
3028
3029         * mathml/MathMLTextElement.cpp:
3030         (WebCore::MathMLTextElement::parseAttribute): Parse the
3031         modifications of the stretchy attribute.
3032         * mathml/MathMLTextElement.h:
3033         * rendering/mathml/RenderMathMLOperator.cpp:
3034         (WebCore::RenderMathMLOperator::setOperatorFlagAndScheduleLayoutIfNeeded):
3035         Add function that receives the value instead of looking for it and
3036         checks if the change should schedule a layout.
3037         (WebCore::RenderMathMLOperator::setOperatorFlagFromAttribute):
3038         (WebCore::RenderMathMLOperator::setOperatorFlagFromAttributeValue):
3039         Add function that receives the value instead of looking for it.
3040         * rendering/mathml/RenderMathMLOperator.h:
3041
3042 2014-10-14  Chris Dumez  <cdumez@apple.com>
3043
3044         Use is<>() / downcast<>() for RenderImage
3045         https://bugs.webkit.org/show_bug.cgi?id=137683
3046
3047         Reviewed by Mihnea Ovidenie.
3048
3049         Use is<>() / downcast<>() for RenderImage.
3050
3051         No new tests, no behavior change.
3052
3053         * accessibility/AccessibilityNodeObject.cpp:
3054         (WebCore::AccessibilityNodeObject::alternativeText):
3055         * accessibility/AccessibilityRenderObject.cpp:
3056         (WebCore::AccessibilityRenderObject::addImageMapChildren):
3057         (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
3058         * bindings/objc/DOM.mm:
3059         (-[DOMElement image]):
3060         (-[DOMElement _imageTIFFRepresentation]):
3061         * editing/TextIterator.cpp:
3062         (WebCore::TextIterator::handleReplacedElement):
3063         * editing/cocoa/HTMLConverter.mm:
3064         (fileWrapperForElement):
3065         * editing/gtk/EditorGtk.cpp:
3066         (WebCore::getImageForElement):
3067         * editing/ios/EditorIOS.mm:
3068         (WebCore::getImage):
3069         * editing/mac/EditorMac.mm:
3070         (WebCore::getImage):
3071         * html/HTMLAnchorElement.cpp:
3072         (WebCore::appendServerMapMousePosition):
3073         * html/HTMLAreaElement.cpp:
3074         (WebCore::HTMLAreaElement::setFocus):
3075         * html/HTMLImageElement.cpp:
3076         (WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
3077         (WebCore::HTMLImageElement::parseAttribute):
3078         (WebCore::HTMLImageElement::didAttachRenderers):
3079         (WebCore::HTMLImageElement::createImageControls):
3080         (WebCore::HTMLImageElement::destroyImageControls):
3081         * html/HTMLVideoElement.cpp:
3082         (WebCore::HTMLVideoElement::didAttachRenderers):
3083         (WebCore::HTMLVideoElement::parseAttribute):
3084         * html/ImageInputType.cpp:
3085         (WebCore::ImageInputType::altAttributeChanged):
3086         (WebCore::ImageInputType::attach):
3087         * html/canvas/CanvasRenderingContext2D.cpp:
3088         (WebCore::size):
3089         * html/shadow/mac/ImageControlsRootElementMac.cpp:
3090         (WebCore::RenderImageControls::updateLogicalWidth):
3091         (WebCore::RenderImageControls::computeLogicalHeight):
3092         * loader/ImageLoader.cpp:
3093         (WebCore::ImageLoader::renderImageResource):
3094         * page/ContextMenuController.cpp:
3095         (WebCore::imageFromImageElementNode):
3096         * page/DragController.cpp:
3097         (WebCore::getCachedImage):
3098         (WebCore::getImage):
3099         * platform/win/PasteboardWin.cpp:
3100         (WebCore::Pasteboard::writeImage):
3101         (WebCore::getCachedImage):
3102         * rendering/HitTestResult.cpp:
3103         (WebCore::HitTestResult::image):
3104         * rendering/RenderImage.h:
3105         * rendering/RenderImageResource.cpp:
3106         (WebCore::RenderImageResource::getImageSize):
3107         * rendering/RenderLayerBacking.cpp:
3108         (WebCore::RenderLayerBacking::isDirectlyCompositedImage):
3109         (WebCore::RenderLayerBacking::updateImageContents):
3110         * rendering/RenderReplaced.cpp:
3111         (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox):
3112         * rendering/shapes/ShapeOutsideInfo.cpp:
3113         (WebCore::ShapeOutsideInfo::createShapeForImage):
3114
3115 2014-10-14  Andrzej Badowski  <a.badowski@samsung.com>
3116
3117         [AX] Improve AccessibilityTableCell columnHeaders and rowHeaders functions.
3118         https://bugs.webkit.org/show_bug.cgi?id=136818
3119
3120         Reviewed by Chris Fleizach.
3121
3122         Take into account that <th> elements can be both the column headers and row headers 
3123         improved the operation of two functions: columnHeaders and rowHeaders.
3124
3125         Test: accessibility/table-headers.html
3126
3127         * accessibility/AccessibilityTableCell.cpp:
3128         (WebCore::AccessibilityTableCell::isColumnHeaderCell):
3129         A new function that helps the main goal.
3130         (WebCore::AccessibilityTableCell::isRowHeaderCell):
3131         A new function that helps the main goal.
3132         (WebCore::AccessibilityTableCell::columnHeaders):
3133         Use isColumnHeaderCell instead of isTableHeaderCell.
3134         (WebCore::AccessibilityTableCell::rowHeaders):
3135         Use isRowHeaderCell also includes <th> row header element next to the scope attribute.
3136         * accessibility/AccessibilityTableCell.h:
3137         Adds new functions to the header file.
3138
3139 2014-10-14  Csaba Osztrogon√°c  <ossy@webkit.org>
3140
3141         Fix the !ENABLE(VIDEO) build after r174353
3142         https://bugs.webkit.org/show_bug.cgi?id=137655
3143
3144         Reviewed by Darin Adler.
3145
3146         * dom/Document.cpp:
3147         * dom/Document.h:
3148         * page/Page.cpp:
3149         * page/Page.h:
3150
3151 2014-10-14  peavo@outlook.com  <peavo@outlook.com>
3152
3153         [Curl] Compile error in CurlDownload.cpp.
3154         https://bugs.webkit.org/show_bug.cgi?id=137654
3155
3156         Reviewed by Philippe Normand.
3157
3158         A template specialization is not needed anymore.
3159
3160         * platform/network/curl/CurlDownload.cpp:
3161
3162 2014-10-13  Joseph Pecoraro  <pecoraro@apple.com>
3163
3164         Web Inspector: Remove unused stale Page protocol methods
3165         https://bugs.webkit.org/show_bug.cgi?id=137678
3166
3167         Reviewed by Andreas Kling.
3168
3169         * inspector/InspectorClient.h:
3170         (WebCore::InspectorClient::canShowDebugBorders): Deleted.
3171         (WebCore::InspectorClient::setShowDebugBorders): Deleted.
3172         (WebCore::InspectorClient::canShowFPSCounter): Deleted.
3173         (WebCore::InspectorClient::setShowFPSCounter): Deleted.
3174         (WebCore::InspectorClient::canContinuouslyPaint): Deleted.
3175         (WebCore::InspectorClient::setContinuousPaintingEnabled): Deleted.
3176         * inspector/InspectorPageAgent.cpp:
3177         (WebCore::InspectorPageAgent::disable):
3178         (WebCore::InspectorPageAgent::canShowDebugBorders): Deleted.
3179         (WebCore::InspectorPageAgent::setShowDebugBorders): Deleted.
3180         (WebCore::InspectorPageAgent::canShowFPSCounter): Deleted.
3181         (WebCore::InspectorPageAgent::setShowFPSCounter): Deleted.
3182         (WebCore::InspectorPageAgent::canContinuouslyPaint): Deleted.
3183         (WebCore::InspectorPageAgent::setContinuousPaintingEnabled): Deleted.
3184         * inspector/InspectorPageAgent.h:
3185         * inspector/protocol/Page.json:
3186
3187 2014-10-13  Eric Carlson  <eric.carlson@apple.com>
3188
3189         [iOS] Refactor AirPlay monitoring code
3190         https://bugs.webkit.org/show_bug.cgi?id=137645
3191         <rdar://problem/18444817>
3192
3193         Reviewed by Jer Noble.
3194
3195         Refactor AirPlay route change monitoring code:
3196         + Have MediaSessionManager register/unregister for route changes depending on the state of
3197             all sessions so it does the right thing when there is more than one media element.
3198         + Make HTMLMediaElement unregister with MediaSession as soon as the media player is cleared
3199             because there can be no wireless playback without a player.
3200
3201         * html/HTMLMediaElement.cpp:
3202         (WebCore::HTMLMediaElement::~HTMLMediaElement): Call mediaSession->setHasPlaybackTargetAvailabilityListeners
3203             when there are target availability changed listeners.
3204         (WebCore::HTMLMediaElement::clearMediaPlayer): Ditto.
3205         (WebCore::HTMLMediaElement::wirelessRoutesAvailableDidChange): New, media session client method.
3206         * html/HTMLMediaElement.h:
3207
3208         * html/HTMLMediaSession.cpp:
3209         (WebCore::HTMLMediaSession::HTMLMediaSession): Initialize m_hasPlaybackTargetAvailabilityListeners.
3210         (WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners): Remember whether or not
3211             the client has a target availability listener and tell the media session manager to reconfigure
3212             itself instead of telling it to start or stop listening for route changes so it does the 
3213             right thing when there is more than one media element.
3214         * html/HTMLMediaSession.h:
3215         (WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring): Return true when the client 
3216             has a target availability listener, false otherwise.
3217
3218         * platform/audio/MediaSession.cpp:
3219         (WebCore::MediaSession::wirelessRoutesAvailableDidChange): Inform the client that routes have changed.
3220         * platform/audio/MediaSession.h:
3221         (WebCore::MediaSession::requiresPlaybackTargetRouteMonitoring):
3222         (WebCore::MediaSessionClient::wirelessRoutesAvailableDidChange):
3223
3224         * platform/audio/MediaSessionManager.cpp:
3225         (WebCore::MediaSessionManager::wirelessRoutesAvailableChanged): Implement it.
3226         * platform/audio/MediaSessionManager.h:
3227         (WebCore::MediaSessionManager::configureWireLessTargetMonitoring):
3228         (WebCore::MediaSessionManager::hasWirelessTargetsAvailable):
3229         (WebCore::MediaSessionManager::sessions):
3230         (WebCore::MediaSessionManager::startMonitoringAirPlayRoutes): Deleted.
3231         (WebCore::MediaSessionManager::stopMonitoringAirPlayRoutes): Deleted.
3232
3233         * platform/audio/ios/MediaSessionManagerIOS.h:
3234         * platform/audio/ios/MediaSessionManagerIOS.mm:
3235         (WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring): Start or stop monitoring
3236             for route changes depending on client state.
3237         (WebCore::MediaSessionManageriOS::startMonitoringAirPlayRoutes): Deleted.
3238         (WebCore::MediaSessionManageriOS::stopMonitoringAirPlayRoutes): Deleted.
3239
3240 2014-10-13  Chris Dumez  <cdumez@apple.com>
3241
3242         [Mac] Return value of createImageSourceOptions() is leaked in ImageSourceCG
3243         https://bugs.webkit.org/show_bug.cgi?id=137677
3244
3245         Reviewed by Simon Fraser.
3246
3247         The return value of createImageSourceOptions() was leaked in
3248         ImageSourceCG.cpp. It was returning a CFDictionaryRef created using
3249         CFDictionaryCreate(). Therefore, the return value should have been
3250         released but wasn't.
3251
3252         This patch makes createImageSourceOptions() return a
3253         RetainPtr<CFDictionaryRef> to make sure the CFDictionaryRef properly
3254         gets released after use.
3255
3256         No new tests, no behavior change.
3257
3258         * platform/graphics/cg/ImageSourceCG.cpp:
3259         (WebCore::createImageSourceOptions):
3260         (WebCore::imageSourceOptions):
3261         (WebCore::ImageSource::isSizeAvailable):
3262         (WebCore::ImageSource::allowSubsamplingOfFrameAtIndex):
3263         (WebCore::ImageSource::frameSizeAtIndex):
3264         (WebCore::ImageSource::orientationAtIndex):
3265         (WebCore::ImageSource::getHotSpot):
3266         (WebCore::ImageSource::repetitionCount):
3267         (WebCore::ImageSource::createFrameAtIndex):
3268         (WebCore::ImageSource::frameDurationAtIndex):
3269
3270 2014-10-13  Yusuke Suzuki  <utatane.tea@gmail.com>
3271
3272         CSS JIT: Implement :visited pseudo class
3273         https://bugs.webkit.org/show_bug.cgi?id=135293
3274
3275         Reviewed by Benjamin Poulain.
3276
3277         This patch implements CSS JIT for :visited. And it makes :not(:link) JIT-ed.
3278         Following the design discussed at the other bug[1], implemented :visited JIT
3279         without tracking VisitedMatchEnabled state.
3280
3281         In this patch, we change the semantics of :visited / :link
3282         inside functional pseudo classes for further CSS Selector Level 4 extensions.
3283
3284         Edge cases are tested by the existing tests.
3285         :not(:link)
3286             fast/history/link-inside-not.html
3287         :not(:visited)
3288             fast/history/visited-inside-not.html
3289         :-webkit-any(:link)
3290             fast/history/link-inside-any.html
3291         :-webkit-any(:visited)
3292             fast/history/visited-inside-any.html
3293
3294         [1]: https://bugs.webkit.org/show_bug.cgi?id=135639
3295
3296         Test: fast/history/link-inside-not-inside-any.html
3297             To cover the :-webkit-any(:not(:link)), added new tests.
3298
3299         * css/SelectorChecker.cpp:
3300         (WebCore::SelectorChecker::checkOne):
3301         * cssjit/SelectorCompiler.cpp:
3302         (WebCore::SelectorCompiler::addPseudoClassType):
3303         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
3304         (WebCore::SelectorCompiler::constructFragments):
3305         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
3306         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorCheckerExcludingPseudoElements):
3307         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateRightmostTreeWalker):
3308         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
3309         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching):
3310         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstLink):
3311         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateStoreLastVisitedElement):
3312
3313 2014-10-13  Chris Dumez  <cdumez@apple.com>
3314
3315         Use modern loops in RenderLayerCompositor
3316         https://bugs.webkit.org/show_bug.cgi?id=137670
3317
3318         Reviewed by Simon Fraser.
3319
3320         Use modern range for-loops in RenderLayerCompositor.
3321
3322         No new tests, no behavior change.
3323
3324         * rendering/RenderLayerCompositor.cpp:
3325         (WebCore::OverlapMapContainer::overlapsLayers):
3326         (WebCore::RenderLayerCompositor::OverlapMap::RectList::intersects):
3327         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayersAfterFlush):
3328         (WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush):
3329         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
3330         (WebCore::RenderLayerCompositor::computeCompositingRequirementsForNamedFlowFixed):
3331         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3332         (WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
3333         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTreeForNamedFlowFixed):
3334         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
3335         (WebCore::RenderLayerCompositor::rebuildRegionCompositingLayerTree):
3336         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
3337         (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
3338         (WebCore::RenderLayerCompositor::recursiveRepaintLayer):
3339         (WebCore::resetTrackedRepaintRectsRecursive):
3340         (WebCore::RenderLayerCompositor::layerHas3DContent):
3341         (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
3342         (WebCore::RenderLayerCompositor::registerAllScrollingLayers):
3343         (WebCore::RenderLayerCompositor::unregisterAllScrollingLayers):
3344
3345 2014-10-13  Chris Dumez  <cdumez@apple.com>
3346
3347         Drop unnecessary overlapMap null checks in computeCompositingRequirements()
3348         https://bugs.webkit.org/show_bug.cgi?id=137668
3349
3350         Reviewed by Andreas Kling.
3351
3352         Drop unnecessary overlapMap null checks in computeCompositingRequirements().
3353         The function is never called with a null overlapMap so we can make the
3354         argument a reference and drop all the null checks.
3355
3356         No new tests, no behavior change.
3357
3358         * rendering/RenderLayerCompositor.cpp:
3359         (WebCore::RenderLayerCompositor::updateCompositingLayers):
3360         (WebCore::RenderLayerCompositor::computeCompositingRequirementsForNamedFlowFixed):
3361         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3362         (WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
3363         * rendering/RenderLayerCompositor.h:
3364
3365 2014-10-13  Chris Dumez  <cdumez@apple.com>
3366
3367         Use is<>() / downcast<>() for PlatformCALayer subclasses
3368         https://bugs.webkit.org/show_bug.cgi?id=137661
3369
3370         Reviewed by Simon Fraser.
3371
3372         Use is<>() / downcast<>() for PlatformCALayer subclasses and clean up
3373         the surrounding code.
3374
3375         No new tests, no behavior change.
3376
3377         * platform/graphics/ca/GraphicsLayerCA.cpp:
3378         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
3379         (WebCore::GraphicsLayerCA::updateContentsRects):
3380         (WebCore::GraphicsLayerCA::updateReplicatedLayers):
3381         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
3382         (WebCore::GraphicsLayerCA::fetchCloneLayers): Deleted.
3383         * platform/graphics/ca/PlatformCALayer.h:
3384         * platform/graphics/ca/TileCoverageMap.cpp:
3385         (WebCore::TileCoverageMap::TileCoverageMap):
3386         * platform/graphics/ca/TileGrid.cpp:
3387         (WebCore::TileGrid::ensureTilesForRect):
3388         * platform/graphics/ca/mac/PlatformCALayerMac.h:
3389         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3390         (PlatformCALayerMac::clone):
3391         (PlatformCALayerMac::appendSublayer):
3392         (PlatformCALayerMac::insertSublayer):
3393         (PlatformCALayerMac::replaceSublayer):
3394         (PlatformCALayerMac::adoptSublayers):
3395         (PlatformCALayerMac::copyFiltersFrom):
3396         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
3397         (WebCore::CACFLayerTreeHost::setRootChildLayer):
3398         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3399         (PlatformCALayerWin::clone):
3400         (PlatformCALayerWin::rootLayer):
3401         (PlatformCALayerWin::appendSublayer):
3402         (PlatformCALayerWin::insertSublayer):
3403         (PlatformCALayerWin::replaceSublayer):
3404         (PlatformCALayerWin::adoptSublayers):
3405         (PlatformCALayerWin::copyFiltersFrom):
3406         * platform/graphics/ca/win/PlatformCALayerWin.h:
3407         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
3408         (PlatformCALayerWinInternal::insertSublayer):
3409         * platform/graphics/ca/win/PlatformCALayerWinInternal.h:
3410
3411 2014-10-13  Chris Dumez  <cdumez@apple.com>
3412
3413         Use is<>() / downcast<>() for Filter / FilterOperation subclasses
3414         https://bugs.webkit.org/show_bug.cgi?id=137644
3415
3416         Reviewed by Darin Adler.
3417
3418         Use is<>() / downcast<>() for Filter / FilterOperation subclasses.
3419
3420         No new tests, no behavior change.
3421
3422         * css/CSSComputedStyleDeclaration.cpp:
3423         (WebCore::ComputedStyleExtractor::valueForFilter):
3424         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
3425         (PlatformCAFilters::filterValueForOperation):
3426         (PlatformCAFilters::colorMatrixValueForFilter):
3427         * platform/graphics/filters/Filter.h:
3428         * platform/graphics/filters/FilterOperation.cpp:
3429         (WebCore::DefaultFilterOperation::operator==):
3430         (WebCore::ReferenceFilterOperation::operator==):
3431         (WebCore::BasicColorMatrixFilterOperation::blend):
3432         (WebCore::BasicColorMatrixFilterOperation::operator==):
3433         (WebCore::BasicComponentTransferFilterOperation::blend):
3434         (WebCore::BasicComponentTransferFilterOperation::operator==):
3435         (WebCore::BlurFilterOperation::operator==):
3436         (WebCore::BlurFilterOperation::blend):
3437         (WebCore::DropShadowFilterOperation::operator==):
3438         (WebCore::DropShadowFilterOperation::blend):
3439         * platform/graphics/filters/FilterOperation.h:
3440         * platform/graphics/filters/FilterOperations.cpp:
3441         (WebCore::FilterOperations::outsets):
3442         * rendering/FilterEffectRenderer.cpp:
3443         (WebCore::FilterEffectRenderer::build):
3444         * rendering/RenderLayerFilterInfo.cpp: