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