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