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