b7ea6b7756ee1c250aa5c8a3db40f10657a7a01a
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-08-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2
3         [GTK] ScrollbarThemeGtk should not depend on RenderThemeGtk
4         https://bugs.webkit.org/show_bug.cgi?id=136338
5
6         Reviewed by Philippe Normand.
7
8         Remove the dependency by creating the GtkStyleContext for the
9         scrollbars in ScrollbarThemeGtk.
10
11         * platform/gtk/RenderThemeGtk.cpp:
12         (WebCore::gtkStyleChangedCallback): Call ScrollbarThemeGtk::themeChanged().
13         (WebCore::getStyleContext): Remove the scrollbar style context support.
14         * platform/gtk/RenderThemeGtk.h: Remove gtkScrollbarStyle().
15         * platform/gtk/ScrollbarThemeGtk.cpp:
16         (WebCore::ScrollbarStyleContext::ScrollbarStyleContext): Helper
17         class to create the global GtkStyleContext for scrollbars.
18         (WebCore::ScrollbarStyleContext::~ScrollbarStyleContext):
19         (WebCore::ScrollbarStyleContext::context):
20         (WebCore::gtkScrollbarStyleContext):
21         (WebCore::ScrollbarThemeGtk::ScrollbarThemeGtk): Remove m_context initialization.
22         (WebCore::ScrollbarThemeGtk::themeChanged): Invalidate the
23         GtkStylecontext and call updateThemeProperties().
24         (WebCore::ScrollbarThemeGtk::updateThemeProperties): Use the
25         global style context.
26         (WebCore::ScrollbarThemeGtk::paintTrackBackground): Ditto.
27         (WebCore::ScrollbarThemeGtk::paintScrollbarBackground): Ditto.
28         (WebCore::ScrollbarThemeGtk::paintThumb): Ditto.
29         (WebCore::ScrollbarThemeGtk::paintButton): Ditto.
30         * platform/gtk/ScrollbarThemeGtk.h:
31
32 2014-08-28  Carlos Garcia Campos  <cgarcia@igalia.com>
33
34         [GTK] Merge RenderThemeGtk3.cpp into RenderThemeGtk.cpp and ScrollbarThemeGtk3.cpp intoScrollbarThemeGtk.cpp
35         https://bugs.webkit.org/show_bug.cgi?id=136336
36
37         Reviewed by Philippe Normand.
38
39         There's no reason to have two files now that there's no GTK+2
40         support. Also fix coding style issues and compile warnings.
41
42         * PlatformGTK.cmake:
43         * platform/gtk/RenderThemeGtk.cpp:
44         * platform/gtk/RenderThemeGtk.h:
45         * platform/gtk/RenderThemeGtk3.cpp: Removed.
46         * platform/gtk/ScrollbarThemeGtk.cpp:
47         * platform/gtk/ScrollbarThemeGtk3.cpp: Removed.
48
49 2014-08-28  Mark Lam  <mark.lam@apple.com>
50
51         DebuggerCallFrame::scope() should return a DebuggerScope.
52         <https://webkit.org/b/134420>
53
54         Reviewed by Geoffrey Garen.
55
56         No new tests.
57
58         Rolling back in r170680 with the fix for <https://webkit.org/b/135656>.
59
60         * bindings/js/ScriptController.cpp:
61         (WebCore::ScriptController::attachDebugger):
62         - We should acquire the JSLock before modifying a JS global object.
63
64 2014-08-28  Enrica Casucci  <enrica@apple.com>
65
66         Can't hit tab key more than 3 times continuously.
67         https://bugs.webkit.org/show_bug.cgi?id=136357
68         rdar://problem/17927266
69
70         Reviewed by Dean Jackson.
71
72         Test: fast/css/multiple-tabs.html
73
74         When computing the tabWidth disregard increments of less than half the size of the space character
75         for the given font.
76
77         * platform/graphics/Font.h:
78         (WebCore::Font::tabWidth):
79
80 2014-08-28  Daniel Bates  <dabates@apple.com>
81
82         [iOS] Clients that include WebCoreThread.h fail to build after <http://trac.webkit.org/changeset/172814/>
83         (https://bugs.webkit.org/show_bug.cgi?id=136108)
84
85         Define WEBCORE_EXPORT (if its not already defined) in WebCoreThread.h so as to fix the
86         build for clients that include this header.
87
88         * platform/ios/wak/WebCoreThread.h:
89
90 2014-08-28  Pratik Solanki  <psolanki@apple.com>
91
92         WebContent hangs under SharedBuffer::duplicateDataBufferIfNecessary() while browsing some websites
93         https://bugs.webkit.org/show_bug.cgi?id=136347
94         <rdar://problem/18073745>
95
96         Reviewed by Andreas Kling.
97
98         When passing data to ImageIO, we create a copy if we have to reallocate the buffer. We would
99         set the size of the new buffer to be the size of the SharedBuffer data. This causes memory
100         churn since we would create a new buffer for every data chunk we get. Fix this by at least
101         doubling the capacity of the buffer when we duplicate it.
102
103         * platform/SharedBuffer.cpp:
104         (WebCore::SharedBuffer::duplicateDataBufferIfNecessary):
105
106 2014-08-28  Dan Bernstein  <mitz@apple.com>
107
108         iOS build fix.
109
110         * WebCore.exp.in: Updated symbol.
111
112 2014-08-28  Benjamin Poulain  <bpoulain@apple.com>
113
114         Scrolling with spacebar on a page with fixed header breaks reading flow
115         https://bugs.webkit.org/show_bug.cgi?id=135506
116
117         Reviewed by Simon Fraser.
118
119         When scrolling by page, find the height of any bar that is obscuring the top or bottom of the page,
120         and substract that height from the step to scroll.
121
122         Tests: scrollbars/scrolling-backward-by-page-accounting-bottom-fixed-elements-on-keyboard-spacebar.html
123                scrollbars/scrolling-backward-by-page-on-keyboard-spacebar.html
124                scrollbars/scrolling-by-page-accounting-oversized-fixed-elements-on-keyboard-spacebar.html
125                scrollbars/scrolling-by-page-accounting-top-fixed-elements-on-keyboard-spacebar.html
126                scrollbars/scrolling-by-page-accounting-top-fixed-elements-with-negative-top-on-keyboard-spacebar.html
127                scrollbars/scrolling-by-page-ignoring-hidden-fixed-elements-on-keyboard-spacebar.html
128                scrollbars/scrolling-by-page-ignoring-transparent-fixed-elements-on-keyboard-spacebar.html
129                scrollbars/scrolling-by-page-on-keyboard-spacebar.html
130
131         * WebCore.exp.in:
132         * page/FrameView.cpp:
133         (WebCore::FrameView::adjustScrollStepForFixedContent):
134         * page/FrameView.h:
135         * platform/ScrollableArea.cpp:
136         (WebCore::ScrollableArea::adjustScrollStepForFixedContent):
137         (WebCore::ScrollableArea::scroll):
138         * platform/ScrollableArea.h:
139
140 2014-08-28  Zalan Bujtas  <zalan@apple.com>
141
142         Subpixel layout: Remove unused pixel snapping functions.
143         https://bugs.webkit.org/show_bug.cgi?id=136341
144
145         Reviewed by Simon Fraser.
146
147         Let's not encourage integral snapping by having these functions around.
148         
149         No change in functionality.
150
151         * accessibility/AccessibilityObject.h:
152         (WebCore::AccessibilityObject::pixelSnappedElementRect): Deleted.
153         (WebCore::AccessibilityObject::pixelSnappedSize): Deleted.
154         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
155         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
156         * html/HTMLImageElement.cpp:
157         (WebCore::HTMLImageElement::width):
158         (WebCore::HTMLImageElement::height):
159         * page/FrameView.cpp:
160         (WebCore::FrameView::qualifiesAsVisuallyNonEmpty):
161         * platform/graphics/LayoutPoint.h:
162         (WebCore::snappedIntSize):
163         (WebCore::snapSizeToDevicePixel):
164         * platform/graphics/LayoutRect.h:
165         (WebCore::LayoutRect::pixelSnappedLocation): Deleted.
166         (WebCore::LayoutRect::pixelSnappedX): Deleted.
167         (WebCore::LayoutRect::pixelSnappedY): Deleted.
168         (WebCore::LayoutRect::pixelSnappedWidth): Deleted.
169         (WebCore::LayoutRect::pixelSnappedHeight): Deleted.
170         (WebCore::LayoutRect::pixelSnappedMaxX): Deleted.
171         (WebCore::LayoutRect::pixelSnappedMaxY): Deleted.
172         (WebCore::snappedIntRectFromEdges): Deleted.
173         * rendering/RenderBlockFlow.h:
174         (WebCore::RenderBlockFlow::pixelSnappedLogicalTopForFloat): Deleted.
175         (WebCore::RenderBlockFlow::pixelSnappedLogicalBottomForFloat): Deleted.
176         (WebCore::RenderBlockFlow::pixelSnappedLogicalLeftForFloat): Deleted.
177         (WebCore::RenderBlockFlow::pixelSnappedLogicalRightForFloat): Deleted.
178         * rendering/RenderBox.h:
179         (WebCore::RenderBox::pixelSnappedLogicalHeight):
180         (WebCore::RenderBox::pixelSnappedLogicalWidth):
181         (WebCore::RenderBox::pixelSnappedBorderBoxRect):
182         (WebCore::RenderBox::pixelSnappedWidth): Deleted.
183         (WebCore::RenderBox::pixelSnappedHeight): Deleted.
184         (WebCore::RenderBox::pixelSnappedFrameRect): Deleted.
185         * rendering/RenderFileUploadControl.cpp:
186         (WebCore::nodeWidth):
187         (WebCore::nodeHeight):
188         (WebCore::RenderFileUploadControl::maxFilenameWidth):
189         * rendering/RenderLayer.cpp:
190         (WebCore::RenderLayer::updateLayerPosition):
191         (WebCore::RenderLayer::isPointInResizeControl):
192         * rendering/RenderLayerCompositor.cpp:
193         (WebCore::RenderLayerCompositor::ensureRootLayer):
194         * rendering/RenderMediaControls.cpp:
195         (WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton):
196         * rendering/RenderMultiColumnSet.cpp:
197         (WebCore::RenderMultiColumnSet::paintColumnRules):
198         * rendering/RenderScrollbar.cpp:
199         (WebCore::RenderScrollbar::buttonRect):
200         * rendering/RenderView.h:
201
202 2014-08-27  Enrica Casucci  <enrica@apple.com>
203
204         textStylingAtPosition returns incorrect values after executing toggleBold, toggleItalic and toggleUnderline.
205         https://bugs.webkit.org/show_bug.cgi?id=136323
206         rdar://problem/18141964
207
208         Reviewed by Antti Koivisto.
209
210         For underline style we need to check typingStyle first and use that information to populate
211         the dictionary. If there is no typing style we can use the render style.
212
213         * WebCore.exp.in:
214         * editing/ios/EditorIOS.mm:
215         (WebCore::Editor::fontAttributesForSelectionStart):
216
217 2014-08-28  Iago Toral  <itoral@igalia.com> and Zan Dobersek  <zdobersek@igalia.com>
218
219         [GTK] Add WaylandEventSource
220         https://bugs.webkit.org/show_bug.cgi?id=136213
221
222         Reviewed by Martin Robinson.
223
224         Add the WaylandEventSource class. Its static method, createEventSource(),
225         creates a new GSource object that is attached to the main context and
226         enables handling Wayland display events through the GLib's main loop.
227
228         The method will be called by the nested Wayland compositor during its
229         initialization, which will also take the control over the ownership and
230         will be tasked with properly removing the GSource from the main context.
231
232         GLibSource is a GSource-based struct that additionally holds a GPollFD object
233         and the pointer to the wl_display object whose event loop we'll be
234         dispatching during the GSource dispatch. This is the type that g_source_new
235         uses when allocating the new GSource object.
236
237         The GSource is assigned the default priorty, can recurse, and is attached
238         to the main context.
239
240         * PlatformGTK.cmake:
241         * platform/graphics/wayland/WaylandEventSource.cpp: Added.
242         (WebCore::GLibSource::initialize):
243         (WebCore::GLibSource::check):
244         (WebCore::GLibSource::dispatch):
245         (WebCore::prepareCallback):
246         (WebCore::checkCallback):
247         (WebCore::dispatchCallback):
248         (WebCore::WaylandEventSource::createDisplayEventSource):
249         * platform/graphics/wayland/WaylandEventSource.h: Added.
250
251 2014-08-28  Chris Fleizach  <cfleizach@apple.com>
252
253         AX: Safari at com.apple.WebCore: WebCore::AXObjectCache::clearTextMarkerNodesInUse
254         https://bugs.webkit.org/show_bug.cgi?id=136333
255
256         Reviewed by David Kilzer.
257
258         If a Node is asked for it's Document when it's not actually in a document, it can lead to an assert/crash.
259         We can avoid this by checking that the node is in a document before asking for its document.
260
261         I was not able to make a test case.      
262
263         * accessibility/AXObjectCache.cpp:
264         (WebCore::AXObjectCache::clearTextMarkerNodesInUse):
265
266 2014-08-28  Andreas Kling  <akling@apple.com>
267
268         ASSERTION FAILED: !m_renderView.document().inPageCache() in compositing/iframes/resources/page-cache-helper.html
269         <https://webkit.org/b/136329>
270
271         Cancel any pending compositing layer updates when moving a document
272         into the page cache.
273
274         Reviewed by Zalan Bujtas.
275
276         * dom/Document.cpp:
277         (WebCore::Document::documentWillSuspendForPageCache):
278         * rendering/RenderLayerCompositor.cpp:
279         (WebCore::RenderLayerCompositor::cancelCompositingLayerUpdate):
280         * rendering/RenderLayerCompositor.h:
281
282 2014-08-28  Mihnea Ovidenie  <mihnea@adobe.com>
283
284         [CSSRegions] Incorrect selection clearing on a document without regions
285         https://bugs.webkit.org/show_bug.cgi?id=134901
286
287         Reviewed by David Hyatt.
288
289         When we select all the content of document with named flows but without regions,
290         the start and end points of selection is cached in RenderView. However, since
291         the document has named flows, the selection is split between the subtrees. During the split,
292         it is possible that the cached end-points of the original selection are not included
293         in any of the resulting subtree selection and they are not marked accordingly.
294         In order to process the selection clearing correctly, we have to take the original
295         selection end-points into account.
296
297         Test: fast/regions/selection/select-all-without-regions.html
298
299         * rendering/RenderObject.cpp:
300         (WebCore::RenderObject::isSelectionBorder):
301
302 2014-08-28  Carlos Garcia Campos  <cgarcia@igalia.com>
303
304         [GTK] Add webkit_uri_response_get_http_headers to WebKit2 GTK+ API
305         https://bugs.webkit.org/show_bug.cgi?id=136248
306
307         Reviewed by Gustavo Noronha Silva.
308
309         Move the code to update the SoupMessageHeaders to a new public
310         method.
311
312         * platform/network/soup/ResourceResponse.h:
313         * platform/network/soup/ResourceResponseSoup.cpp:
314         (WebCore::ResourceResponse::updateSoupMessageHeaders):
315         (WebCore::ResourceResponse::toSoupMessage):
316
317 2014-08-28  Carlos Garcia Campos  <cgarcia@igalia.com>
318
319         [GTK] Remove support for GTK+2 theme rendering
320         https://bugs.webkit.org/show_bug.cgi?id=136285
321
322         Reviewed by Philippe Normand.
323
324         GTK+2 is only used by the plugin process that doesn't need to
325         render html controls themed. Since the theme files are still
326         built for WebCorePlatformGTK2, we need to provide dummy
327         implementations for the pure virtual methods when
328         GTK_API_VERSION_2 is defined.
329
330         * PlatformGTK.cmake: Remove deleted files from compilation.
331         * platform/gtk/RenderThemeGtk.cpp:
332         (WebCore::RenderThemeGtk::create):
333         (WebCore::RenderTheme::themeForPage):
334         (WebCore::getScreenDPI):
335         (WebCore::RenderThemeGtk::systemFont):
336         (WebCore::RenderThemeGtk::sliderTickSize):
337         (WebCore::RenderThemeGtk::sliderTickOffsetFromTrackCenter):
338         (WebCore::RenderThemeGtk::getScreenDPI): Deleted.
339         * platform/gtk/RenderThemeGtk.h:
340         * platform/gtk/RenderThemeGtk2.cpp: Removed.
341         * platform/gtk/RenderThemeGtk3.cpp:
342         * platform/gtk/ScrollbarThemeGtk.cpp:
343         (WebCore::ScrollbarThemeGtk::hasThumb):
344         (WebCore::ScrollbarThemeGtk::backButtonRect):
345         (WebCore::ScrollbarThemeGtk::forwardButtonRect):
346         (WebCore::ScrollbarThemeGtk::trackRect):
347         (WebCore::ScrollbarThemeGtk::registerScrollbar):
348         (WebCore::ScrollbarThemeGtk::unregisterScrollbar):
349         (WebCore::ScrollbarThemeGtk::updateScrollbarsFrameThickness):
350         * platform/gtk/ScrollbarThemeGtk.h:
351         * platform/gtk/ScrollbarThemeGtk2.cpp: Removed.
352         * platform/gtk/WidgetRenderingContext.cpp: Removed.
353         * platform/gtk/WidgetRenderingContext.h: Removed.
354
355 2014-08-28  Zan Dobersek  <zdobersek@igalia.com>
356
357         Unreviewed GTK build fix for the Wayland windowing target after r173052.
358
359         * platform/graphics/wayland/WaylandSurface.cpp: Include the IntSize header.
360         * platform/graphics/wayland/WaylandSurface.h: Forward-declare IntSize.
361
362 2014-08-27  Csaba Osztrogonác  <ossy@webkit.org>
363
364         One more URTBF after r173047.
365
366         * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
367         (webkitAccessibleComponentGetExtents):
368
369 2014-08-27  Iago Toral  <itoral@igalia.com> and Zan Dobersek  <zdobersek@igalia.com>
370
371         [GTK] Add WaylandSurface
372         https://bugs.webkit.org/show_bug.cgi?id=136220
373
374         Reviewed by Martin Robinson.
375
376         Add the WaylandSurface class. An objects of this type is meant to be used
377         by the LayerTreeHostGtk in the WebProcess and is constructed via the
378         WaylandDisplay::createSurface() method.
379
380         LayerTreeHostGtk uses such object to perform frame requests to the nested
381         Wayland compositor in the UIProcess, and to create the GLContextEGL object
382         that's used during the layer flushing and compositing.
383
384         The resize() method is called whenever LayerTreeHostGtk is being resized,
385         and basically only wraps the wl_egL_window_resize() call.
386
387         * PlatformGTK.cmake:
388         * platform/graphics/wayland/WaylandSurface.cpp: Added.
389         (WebCore::frameCallback):
390         (WebCore::WaylandSurface::WaylandSurface):
391         (WebCore::WaylandSurface::~WaylandSurface):
392         (WebCore::WaylandSurface::resize):
393         (WebCore::WaylandSurface::createGLContext):
394         (WebCore::WaylandSurface::requestFrame):
395         * platform/graphics/wayland/WaylandSurface.h: Added.
396         (WebCore::WaylandSurface::surface):
397         (WebCore::WaylandSurface::nativeWindowHandle):
398
399 2014-08-27  Csaba Osztrogonác  <ossy@webkit.org>
400
401         URTBF after r173047.
402
403         * accessibility/atk/WebKitAccessibleInterfaceImage.cpp:
404         (webkitAccessibleImageGetImagePosition):
405
406 2014-08-27  Zalan Bujtas  <zalan@apple.com>
407
408         Subpixel layout: Cleanup snapSizeToPixel/snapSizeToDevicePixel.
409         https://bugs.webkit.org/show_bug.cgi?id=136264
410
411         Reviewed by Simon Fraser.
412         
413         1. Align snapSizeToPixel()/snapSizeToDevicePixel() function names with the rest of snapping
414         functions. ->snappedIntSize()/snapSizeToDevicePixel().
415         2. Operate on LayoutSize/LayoutPoint instead of LayoutUnit/LayoutUnit to reflect functionality.
416
417         Covered by existing tests.
418
419         * platform/LayoutUnit.h:
420         (WebCore::snapSizeToPixel): Deleted.
421         (WebCore::snapSizeToDevicePixel): Deleted.
422         * platform/graphics/LayoutPoint.h:
423         (WebCore::snappedIntSize):
424         (WebCore::snapSizeToDevicePixel):
425         (WebCore::pixelSnappedIntSize): Deleted.
426         * platform/graphics/LayoutRect.h:
427         (WebCore::LayoutRect::pixelSnappedSize):
428         (WebCore::LayoutRect::pixelSnappedWidth):
429         (WebCore::LayoutRect::pixelSnappedHeight):
430         (WebCore::pixelSnappedIntRect):
431         (WebCore::pixelSnappedIntRectFromEdges):
432         (WebCore::pixelSnappedForPainting):
433         (WebCore::directionalPixelSnappedForPainting):
434         * rendering/RenderBox.cpp:
435         (WebCore::RenderBox::pixelSnappedClientWidth):
436         (WebCore::RenderBox::pixelSnappedClientHeight):
437         (WebCore::RenderBox::pixelSnappedOffsetWidth):
438         (WebCore::RenderBox::pixelSnappedOffsetHeight):
439         (WebCore::RenderBox::scrollWidth):
440         (WebCore::RenderBox::scrollHeight):
441         * rendering/RenderBoxModelObject.cpp:
442         (WebCore::RenderBoxModelObject::pixelSnappedOffsetWidth):
443         (WebCore::RenderBoxModelObject::pixelSnappedOffsetHeight):
444         * rendering/RenderLayer.cpp:
445         (WebCore::RenderLayer::updateLayerPosition):
446         (WebCore::RenderLayer::scrollWidth):
447         (WebCore::RenderLayer::scrollHeight):
448         * rendering/RenderTreeAsText.cpp:
449         (WebCore::writeLayers):
450
451 2014-08-27  Zalan Bujtas  <zalan@apple.com>
452
453         Subpixel layout: Rename LayoutRect's device pixel snapping functions.
454         https://bugs.webkit.org/show_bug.cgi?id=136319
455
456         Reviewed by Simon Fraser.
457
458         From pixelSnappedForPainting() to snapRectToDevicePixels() and 
459         pixelSnappedIntRect*() to snappedIntRect*().
460
461         No change in functionality.
462
463         * accessibility/AccessibilityObject.cpp:
464         (WebCore::AccessibilityObject::boundingBoxForQuads):
465         (WebCore::AccessibilityObject::isOnscreen):
466         (WebCore::AccessibilityObject::scrollToMakeVisible):
467         * accessibility/AccessibilityObject.h:
468         (WebCore::AccessibilityObject::pixelSnappedBoundingBoxRect):
469         (WebCore::AccessibilityObject::pixelSnappedElementRect):
470         * accessibility/AccessibilityRenderObject.cpp:
471         (WebCore::AccessibilityRenderObject::isOffScreen):
472         (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
473         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
474         (-[WebAccessibilityObjectWrapper accessibilityActivationPoint]):
475         (-[WebAccessibilityObjectWrapper accessibilityFrame]):
476         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
477         (-[WebAccessibilityObjectWrapper position]):
478         (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
479         * bindings/objc/DOMUIKitExtensions.mm:
480         (-[DOMHTMLAreaElement boundingBoxWithOwner:]):
481         (-[DOMHTMLAreaElement absoluteQuadWithOwner:]):
482         * css/CSSComputedStyleDeclaration.cpp:
483         (WebCore::computedTransform):
484         * dom/Node.h:
485         (WebCore::Node::pixelSnappedBoundingBox):
486         (WebCore::Node::pixelSnappedRenderRect):
487         * editing/RenderedPosition.cpp:
488         (WebCore::RenderedPosition::absoluteRect):
489         * editing/mac/FrameSelectionMac.mm:
490         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
491         * html/HTMLCanvasElement.cpp:
492         (WebCore::HTMLCanvasElement::paint):
493         * inspector/InspectorOverlay.cpp:
494         (WebCore::buildObjectForElementInfo):
495         * inspector/InspectorPageAgent.cpp:
496         (WebCore::InspectorPageAgent::didPaint):
497         * page/FrameSnapshotting.cpp:
498         (WebCore::snapshotNode):
499         * page/FrameView.cpp:
500         (WebCore::FrameView::scrollContentsFastPath):
501         (WebCore::FrameView::extendedBackgroundRectForPainting):
502         (WebCore::FrameView::windowClipRectForFrameOwner):
503         (WebCore::FrameView::convertFromRendererToContainingView):
504         * page/Page.cpp:
505         (WebCore::Page::addRelevantRepaintedObject):
506         (WebCore::Page::addRelevantUnpaintedObject):
507         * page/ios/FrameIOS.mm:
508         (WebCore::ancestorRespondingToClickEvents):
509         * platform/DragImage.cpp:
510         (WebCore::createDragImageForImage):
511         * platform/graphics/LayoutRect.cpp:
512         (WebCore::enclosingRectToDevicePixels):
513         (WebCore::enclosingRectForPainting): Deleted.
514         * platform/graphics/LayoutRect.h:
515         (WebCore::snappedIntRect):
516         (WebCore::snappedIntRectFromEdges):
517         (WebCore::snapRectToDevicePixels):
518         (WebCore::snapRectToDevicePixelsWithWritingDirection):
519         (WebCore::pixelSnappedIntRect): Deleted.
520         (WebCore::pixelSnappedIntRectFromEdges): Deleted.
521         (WebCore::pixelSnappedForPainting): Deleted.
522         (WebCore::directionalPixelSnappedForPainting): Deleted.
523         * platform/graphics/RoundedRect.cpp:
524         (WebCore::RoundedRect::pixelSnappedRoundedRectForPainting):
525         * platform/graphics/ca/GraphicsLayerCA.cpp:
526         (WebCore::GraphicsLayerCA::computePixelAlignment):
527         * platform/text/TextStream.cpp:
528         (WebCore::TextStream::operator<<):
529         * rendering/EllipsisBox.cpp:
530         (WebCore::EllipsisBox::paintSelection):
531         * rendering/FilterEffectRenderer.cpp:
532         (WebCore::FilterEffectRendererHelper::applyFilterEffect):
533         * rendering/InlineFlowBox.cpp:
534         (WebCore::InlineFlowBox::paint):
535         * rendering/InlineTextBox.cpp:
536         (WebCore::InlineTextBox::paintSelection):
537         (WebCore::InlineTextBox::paintCompositionBackground):
538         (WebCore::InlineTextBox::paintTextMatchMarker):
539         (WebCore::InlineTextBox::positionForOffset):
540         * rendering/RenderBlock.cpp:
541         (WebCore::RenderBlock::addVisualOverflowFromTheme):
542         (WebCore::RenderBlock::paint):
543         (WebCore::RenderBlock::blockSelectionGap):
544         (WebCore::RenderBlock::logicalLeftSelectionGap):
545         (WebCore::RenderBlock::logicalRightSelectionGap):
546         (WebCore::RenderBlock::absoluteRects):
547         (WebCore::RenderBlock::addFocusRingRects):
548         * rendering/RenderBlockFlow.cpp:
549         (WebCore::RenderBlockFlow::clipOutFloatingObjects):
550         (WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):
551         * rendering/RenderBox.cpp:
552         (WebCore::RenderBox::absoluteRects):
553         (WebCore::RenderBox::absoluteContentBox):
554         (WebCore::RenderBox::outlineBoundsForRepaint):
555         (WebCore::RenderBox::addFocusRingRects):
556         (WebCore::RenderBox::getBackgroundPaintedExtent):
557         (WebCore::RenderBox::pushContentsClip):
558         (WebCore::RenderBox::computeRectForRepaint):
559         * rendering/RenderBox.h:
560         (WebCore::RenderBox::pixelSnappedFrameRect):
561         * rendering/RenderBoxModelObject.cpp:
562         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
563         (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
564         (WebCore::RenderBoxModelObject::paintNinePieceImage):
565         (WebCore::RenderBoxModelObject::paintBorder):
566         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
567         (WebCore::RenderBoxModelObject::paintBoxShadow):
568         * rendering/RenderDetailsMarker.cpp:
569         (WebCore::RenderDetailsMarker::paint):
570         * rendering/RenderEmbeddedObject.cpp:
571         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
572         (WebCore::RenderEmbeddedObject::isReplacementObscured):
573         * rendering/RenderFieldset.cpp:
574         (WebCore::RenderFieldset::paintBoxDecorations):
575         * rendering/RenderFlowThread.cpp:
576         (WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme):
577         * rendering/RenderFrameSet.cpp:
578         (WebCore::RenderFrameSet::paint):
579         (WebCore::RenderFrameSet::layout):
580         (WebCore::RenderFrameSet::positionFramesWithFlattening):
581         * rendering/RenderHTMLCanvas.cpp:
582         (WebCore::RenderHTMLCanvas::paintReplaced):
583         * rendering/RenderImage.cpp:
584         (WebCore::RenderImage::paintReplaced):
585         * rendering/RenderInline.cpp:
586         (WebCore::RenderInline::paintOutlineForLine):
587         * rendering/RenderLayer.cpp:
588         (WebCore::RenderLayer::updateTransform):
589         (WebCore::RenderLayer::currentTransform):
590         (WebCore::RenderLayer::beginTransparencyLayers):
591         (WebCore::RenderLayer::scrollRectToVisible):
592         (WebCore::RenderLayer::scrollCornerRect):
593         (WebCore::RenderLayer::drawPlatformResizerImage):
594         (WebCore::RenderLayer::paintResizer):
595         (WebCore::RenderLayer::hitTestOverflowControls):
596         (WebCore::RenderLayer::clipToRect):
597         (WebCore::RenderLayer::paintLayerByApplyingTransform):
598         (WebCore::RenderLayer::paintOverflowControlsForFragments):
599         (WebCore::RenderLayer::hitTestResizerInFragments):
600         (WebCore::RenderLayer::calculateClipRects):
601         * rendering/RenderLayerBacking.cpp:
602         (WebCore::RenderLayerBacking::updateTransform):
603         (WebCore::RenderLayerBacking::updateGeometry):
604         (WebCore::RenderLayerBacking::resetContentsRect):
605         (WebCore::RenderLayerBacking::updateImageContents):
606         (WebCore::RenderLayerBacking::backgroundBoxForPainting):
607         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
608         (WebCore::RenderLayerBacking::paintContents):
609         * rendering/RenderLayerCompositor.cpp:
610         (WebCore::RenderLayerCompositor::addToOverlapMap):
611         (WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
612         (WebCore::RenderLayerCompositor::requiresCompositingForFrame):
613         (WebCore::RenderLayerCompositor::paintContents):
614         * rendering/RenderListBox.cpp:
615         (WebCore::RenderListBox::addFocusRingRects):
616         (WebCore::RenderListBox::paintScrollbar):
617         (WebCore::RenderListBox::paintItemBackground):
618         * rendering/RenderListMarker.cpp:
619         (WebCore::RenderListMarker::paint):
620         * rendering/RenderMeter.cpp:
621         (WebCore::RenderMeter::updateLogicalWidth):
622         (WebCore::RenderMeter::computeLogicalHeight):
623         * rendering/RenderMultiColumnSet.cpp:
624         (WebCore::RenderMultiColumnSet::paintColumnRules):
625         * rendering/RenderObject.cpp:
626         (WebCore::RenderObject::drawLineForBoxSide):
627         (WebCore::RenderObject::addPDFURLRect):
628         (WebCore::RenderObject::paintOutline):
629         (WebCore::RenderObject::absoluteBoundingBoxRect):
630         (WebCore::RenderObject::repaintUsingContainer):
631         (WebCore::RenderObject::repaintSlowRepaintObject):
632         (WebCore::RenderObject::pixelSnappedAbsoluteClippedOverflowRect):
633         * rendering/RenderProgress.cpp:
634         (WebCore::RenderProgress::computeLogicalHeight):
635         * rendering/RenderReplaced.cpp:
636         (WebCore::RenderReplaced::paint):
637         * rendering/RenderScrollbarPart.cpp:
638         (WebCore::RenderScrollbarPart::paintIntoRect):
639         * rendering/RenderSearchField.cpp:
640         (WebCore::RenderSearchField::showPopup):
641         * rendering/RenderSnapshottedPlugIn.cpp:
642         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
643         * rendering/RenderTableCell.cpp:
644         (WebCore::RenderTableCell::paintCollapsedBorders):
645         * rendering/RenderTextControl.cpp:
646         (WebCore::RenderTextControl::addFocusRingRects):
647         * rendering/RenderTextControlSingleLine.cpp:
648         (WebCore::RenderTextControlSingleLine::paint):
649         * rendering/RenderTheme.cpp:
650         (WebCore::RenderTheme::paint):
651         (WebCore::RenderTheme::paintBorderOnly):
652         (WebCore::RenderTheme::paintDecorations):
653         * rendering/RenderThemeMac.mm:
654         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
655         * rendering/RenderTreeAsText.cpp:
656         (WebCore::write):
657         * rendering/RenderVideo.cpp:
658         (WebCore::RenderVideo::videoBox):
659         (WebCore::RenderVideo::paintReplaced):
660         * rendering/RenderView.cpp:
661         (WebCore::RenderView::repaintViewRectangle):
662         (WebCore::RenderView::computeRectForRepaint):
663         (WebCore::RenderView::absoluteRects):
664         (WebCore::RenderView::selectionBounds):
665         (WebCore::RenderView::unscaledDocumentRect):
666         * rendering/RenderView.h:
667         * rendering/RenderWidget.cpp:
668         (WebCore::RenderWidget::paintContents):
669         (WebCore::RenderWidget::paint):
670         * rendering/SimpleLineLayoutFunctions.cpp:
671         (WebCore::SimpleLineLayout::paintDebugBorders):
672         * rendering/shapes/Shape.cpp:
673         (WebCore::Shape::createRasterShape):
674         * rendering/svg/RenderSVGModelObject.cpp:
675         (WebCore::RenderSVGModelObject::outlineBoundsForRepaint):
676         * rendering/svg/RenderSVGRoot.cpp:
677         (WebCore::RenderSVGRoot::paintReplaced):
678         * rendering/svg/SVGInlineTextBox.cpp:
679         (WebCore::SVGInlineTextBox::selectionRectForTextFragment):
680
681 2014-08-27  Daniel Bates  <dabates@apple.com>
682
683         Scrollbar corner can be drawn outside containing frame
684         https://bugs.webkit.org/show_bug.cgi?id=133131
685         <rdar://problem/16382769>
686
687         Reviewed by Simon Fraser.
688
689         Merged from Blink (patch by Levi Weintraub):
690         <https://src.chromium.org/viewvc/blink?revision=170625&view=revision>
691
692         Fixes an issue where the scroll corner may be painted outside the rectangle of
693         its associated frame by setting a clip rectangle before painting the scroll bar(s)
694         and scroll corner.
695
696         Test: scrollbars/custom-scrollbars-paint-outside-iframe.html
697
698         * platform/ScrollView.cpp:
699         (WebCore::ScrollView::paint):
700
701 2014-08-27  Zalan Bujtas  <zalan@apple.com>
702
703         Subpixel layout: Rename FloatPoint/FloatRect device pixel snapping functions.
704         https://bugs.webkit.org/show_bug.cgi?id=136314
705
706         Reviewed by Simon Fraser.
707
708         From *edToDevicePixels() to *PointToDevicePixels() (* = floor/round/ceil)
709
710         EnclosedIntRect -> enclosingIntRect() changes functionality for InspectorOverlay painting,
711         but currently untestable.
712
713         * WebCore.exp.in:
714         * inspector/InspectorOverlay.cpp:
715         (WebCore::InspectorOverlay::showPaintRect):
716         * platform/graphics/FloatPoint.h:
717         (WebCore::flooredIntSize):
718         (WebCore::floorPointToDevicePixels):
719         (WebCore::ceilPointToDevicePixels):
720         (WebCore::flooredToDevicePixels): Deleted.
721         (WebCore::ceiledToDevicePixels): Deleted.
722         * platform/graphics/FloatRect.cpp:
723         (WebCore::enclosingRectToDevicePixels):
724         (WebCore::enclosingRectExtendedToDevicePixels): Deleted. Renamed.
725         (WebCore::enclosedIntRect): Deleted. Not needed.
726         * platform/graphics/FloatRect.h:
727
728 2014-08-27  Zalan Bujtas  <zalan@apple.com>
729
730         Subpixel layout: Rename LayoutPoint's device pixel snapping functions.
731         https://bugs.webkit.org/show_bug.cgi?id=136306
732
733         Reviewed by Simon Fraser.
734
735         From *edForPainting() to *PointToDevicePixels() (* = floor/round/ceil)
736
737         No change in functionality.
738
739         * platform/graphics/LayoutPoint.h:
740         (WebCore::roundPointToDevicePixels):
741         (WebCore::floorPointToDevicePixels):
742         (WebCore::ceilPointToDevicePixels):
743         (WebCore::roundedForPainting): Deleted.
744         (WebCore::flooredForPainting): Deleted.
745         (WebCore::ceiledForPainting): Deleted.
746         * platform/graphics/LayoutRect.cpp:
747         (WebCore::enclosingRectForPainting):
748         * platform/graphics/LayoutRect.h:
749         (WebCore::directionalPixelSnappedForPainting):
750         * rendering/RenderBoxModelObject.cpp:
751         (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
752         * rendering/RenderLayer.cpp:
753         (WebCore::RenderLayer::paintLayerByApplyingTransform):
754         (WebCore::RenderLayer::calculateClipRects):
755         * rendering/RenderLayerBacking.cpp:
756         (WebCore::RenderLayerBacking::updateGeometry):
757
758 2014-08-27  Zalan Bujtas  <zalan@apple.com>
759
760         Subpixel layout: Rename LayoutSize's device pixel snapping functions.
761         https://bugs.webkit.org/show_bug.cgi?id=136310
762
763         Reviewed by Simon Fraser.
764
765         From *edForPainting() to *SizeToDevicePixels() (* = floor/round/ceil)
766
767         No change in functionality.
768
769          * platform/graphics/LayoutSize.h:
770         (WebCore::floorSizeToDevicePixels):
771         (WebCore::flooredForPainting): Deleted.
772         * rendering/style/StyleGeneratedImage.cpp:
773         (WebCore::StyleGeneratedImage::computeIntrinsicDimensions):
774
775 2014-08-27  Brian J. Burg  <burg@cs.washington.edu>
776
777         Enums in ScrollTypes and PlatformWheelEvent should not use uint64_t storage
778         https://bugs.webkit.org/show_bug.cgi?id=136318
779
780         Reviewed by Simon Fraser.
781
782         This regressed in a replay-related patch. Revert back to uint8_t storage size.
783
784         * platform/PlatformWheelEvent.h:
785         * platform/ScrollTypes.h:
786         * replay/WebInputs.json:
787
788 2014-08-27  Simon Fraser  <simon.fraser@apple.com>
789
790         Speling is hard.
791
792         Reviewed by Tim Horton.
793
794         * page/EventHandler.cpp:
795         (WebCore::EventHandler::handleMousePressEvent):
796         (WebCore::EventHandler::handleMouseDoubleClickEvent):
797         (WebCore::EventHandler::handleMouseMoveEvent):
798         (WebCore::EventHandler::handleMouseReleaseEvent):
799         (WebCore::EventHandler::handlePasteGlobalSelection):
800         (WebCore::EventHandler::updateMouseEventTargetNode):
801         (WebCore::EventHandler::dispatchMouseEvent):
802         (WebCore::EventHandler::sendContextMenuEventForKey):
803         (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
804
805 2014-08-27  Simon Fraser  <simon.fraser@apple.com>
806
807         Fix the iOS build.
808
809         * page/EventHandler.cpp:
810         (WebCore::EventHandler::handleMousePressEvent):
811
812 2014-08-27  Andreas Kling  <akling@apple.com>
813
814         Drawing text in an SVG font causes load events to be fired.
815         <https://webkit.org/b/136269>
816         <rdar://problem/15724915>
817
818         Don't flush pending load events in Document::implicitClose() for frameless documents.
819         This is a targeted fix for an issue where parsing SVG fonts during layout would cause
820         event dispatch to happen in the main document, leading to arbitrary JS execution.
821
822         Note that the testcase only works in DRT/WTR, since once the SVG font is in cached
823         by WebCore, we won't reparse it again. Caches are cleared between tests, so it will
824         correctly fail if this should regress.
825
826         Longer-term, we should clean this up and get rid of the global dispatch entirely.
827
828         Reviewed by Simon Fraser.
829
830         Test: fast/text/svg-font-trigger-load-event.html
831
832         * dom/Document.cpp:
833         (WebCore::Document::implicitClose):
834
835 2014-08-27  Simon Fraser  <simon.fraser@apple.com>
836
837         Some EventHandler naming cleanup
838         https://bugs.webkit.org/show_bug.cgi?id=136303
839
840         Reviewed by Beth Dakin.
841         
842         Rename "mev" variables to "mouseEvent".
843         
844         No behavior change.
845
846         * page/EventHandler.cpp:
847         (WebCore::EventHandler::handleMousePressEvent):
848         (WebCore::EventHandler::handleMouseDoubleClickEvent):
849         (WebCore::EventHandler::handleMouseMoveEvent):
850         (WebCore::EventHandler::handleMouseReleaseEvent):
851         (WebCore::EventHandler::updateDragAndDrop):
852         (WebCore::EventHandler::prepareMouseEvent):
853         (WebCore::EventHandler::sendContextMenuEvent):
854         (WebCore::EventHandler::passMousePressEventToScrollbar):
855         (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
856
857 2014-08-27  Simon Fraser  <simon.fraser@apple.com>
858
859         Some EventHandler naming cleanup
860         https://bugs.webkit.org/show_bug.cgi?id=136303
861
862         Reviewed by Beth Dakin.
863
864         Rename PlatformMouseEvent variables from "mouseEvent" to "platformMouseEvent"
865         so that a later patch can rename "mev" to "mouseEvent".
866         
867         0 => nullptr.
868         
869         No behavior change.
870
871         * page/EventHandler.cpp:
872         (WebCore::EventHandler::clear):
873         (WebCore::EventHandler::handleMousePressEvent):
874         (WebCore::EventHandler::handleMouseDoubleClickEvent):
875         (WebCore::EventHandler::handleMouseMoveEvent):
876         (WebCore::EventHandler::invalidateClick):
877         (WebCore::EventHandler::handleMouseReleaseEvent):
878         (WebCore::EventHandler::handlePasteGlobalSelection):
879         (WebCore::EventHandler::updateMouseEventTargetNode):
880         (WebCore::EventHandler::dispatchMouseEvent):
881         (WebCore::EventHandler::sendContextMenuEventForKey):
882         (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
883
884 2014-08-27  Beth Dakin  <bdakin@apple.com>
885
886         Make isScrollableOrRubberbandable() a virtual function on RenderLayerModelObject
887         https://bugs.webkit.org/show_bug.cgi?id=136307
888
889         Reviewed by Simon Fraser.
890
891         Remove extra parentheses. 
892         * page/FrameView.cpp:
893         (WebCore::FrameView::isScrollable):
894
895         Mark isScrollableOrRubberbandable() as override now that the root implementation 
896         is moving to RenderLayerModelObject. It can also be private now.
897         * rendering/RenderBox.h:
898
899         isBox() check and cast are no longer necessary.
900         * rendering/RenderLayer.cpp:
901         (WebCore::RenderLayer::hasScrollableOrRubberbandableAncestor):
902
903         Base implementation should return false.
904         * rendering/RenderLayerModelObject.h:
905         (WebCore::RenderLayerModelObject::isScrollableOrRubberbandable):
906
907         Mark as override.
908         * rendering/RenderView.h:
909
910 2014-08-27  Antti Koivisto  <antti@apple.com>
911
912         REGRESSION(r172946): Plugin tests asserting on Yosemite debug bot
913         https://bugs.webkit.org/show_bug.cgi?id=136301
914
915         Reviewed by Alexey Proskuryakov.
916
917         Don't pull the priority from the platform request if it is not defined.
918
919         * platform/network/cf/ResourceRequestCFNet.cpp:
920         (WebCore::ResourceRequest::doUpdateResourceRequest):
921         * platform/network/cocoa/ResourceRequestCocoa.mm:
922         (WebCore::ResourceRequest::doUpdateResourceRequest):
923
924 2014-08-27  Timothy Hatcher  <timothy@apple.com>
925
926         Web Inspector: Crash when you open Web Inspector in a private window (due to IndexedDB)
927         https://bugs.webkit.org/show_bug.cgi?id=136293
928
929         Reviewed by Joseph Pecoraro.
930
931         * inspector/InspectorIndexedDBAgent.cpp:
932         (WebCore::InspectorIndexedDBAgent::requestDatabaseNames): Null check idbRequest from
933         IDBFactory::getDatabaseNames, which can return null now after r172603 in private browsing.
934
935 2014-08-27  Beth Dakin  <bdakin@apple.com>
936
937         overflow:scroll elements should not latch to the body if the body is 
938         overflow:hidden
939         https://bugs.webkit.org/show_bug.cgi?id=136273
940
941         Reviewed by Darin Adler.
942
943         This patch adds an optional parameter to isScrollable(). The Scrollability 
944         parameter that allows the caller to define what they mean by 'scrollable.' Most 
945         callers are interested in the default value, Scrollability::Scrollable, which 
946         means that there is actually content to scroll to, and a scrollbar that will allow 
947         you to access it. In some cases, such as this latching case, callers want to know 
948         if the FrameView is allowed to rubber-band, which the main frame might be allowed 
949         to do even if there is no content to scroll to. In that case, callers use 
950         Scrollability::ScrollableOrRubberbandable.
951         * page/FrameView.cpp:
952         (WebCore::FrameView::isScrollable):
953         (WebCore::FrameView::hasScrollableOrRubberbandableAncestor):
954
955         New virtual function on ScrollableArea answers whether a ScrollableArea has any 
956         scrollable or rubber-bandable ancestor.
957         * page/FrameView.h:
958         * platform/ScrollableArea.h:
959
960         Events should only be allowed to prevent stretching if there is some ancestor 
961         ScrollableArea that will be able to make use of the event. 
962         * platform/mac/ScrollAnimatorMac.mm:
963         (WebCore::ScrollAnimatorMac::allowsVerticalStretching):
964         (WebCore::ScrollAnimatorMac::allowsHorizontalStretching):
965
966         New ScrollableArea virtual function.
967         * platform/win/PopupMenuWin.h:
968
969         New RenderBox isScrollableOrRubberbandable() returns just 
970         canBeScrolledAndHasScrollableArea() for most RenderBox, but will be overridden by 
971         RenderView.
972         * rendering/RenderBox.cpp:
973         (WebCore::RenderBox::isScrollableOrRubberbandable):
974         * rendering/RenderBox.h:
975
976         Recurse up the parent chain to find out if anything is scrollable or just rubber-
977         bandable.
978         * rendering/RenderLayer.cpp:
979         (WebCore::RenderLayer::hasScrollableOrRubberbandableAncestor):
980         * rendering/RenderLayer.h:
981
982         Call into RenderLayer.
983         * rendering/RenderListBox.cpp:
984         (WebCore::RenderListBox::hasScrollableOrRubberbandableAncestor):
985         * rendering/RenderListBox.h:
986
987         Override isScrollableOrRubberbandable() to handle the main frame case where the 
988         main frame is typically allowed to rubber-band even if there is no content to 
989         scroll to.
990         * rendering/RenderView.cpp:
991         (WebCore::RenderView::isScrollableOrRubberbandable):
992         * rendering/RenderView.h:
993
994 2014-08-27  Benjamin Poulain  <bpoulain@apple.com>
995
996         Updating attributes on HTML elements do not invalidate the style correctly unless the attribute name is lowercase in the stylesheet
997         https://bugs.webkit.org/show_bug.cgi?id=136270
998
999         Reviewed by Andreas Kling.
1000
1001         In HTML, WebKit treats every attribute name lowercase to implement case-insensitive matching.
1002         When invalidating style, the StyleResolver was ignoring HTML and always using the XML names.
1003
1004         This patch split the names on RuleFeatureSet in two sets: one for XML, one for HTML.
1005         In StyleResolver, the name used depends on the type of the element being updated.
1006
1007         This patch also adds nodeNeedsStyleRecalc() to Internals to test the optimization and various cases
1008         of style update.
1009
1010         Tests: fast/css/attribute-for-content-property-style-update-html.html
1011                fast/css/attribute-for-content-property-style-update-xhtml.xhtml
1012                fast/css/attribute-style-invalidation-optimization-html.html
1013                fast/css/attribute-style-invalidation-optimization-xhtml.xhtml
1014                fast/css/attribute-style-update-html.html
1015                fast/selectors/attribute-style-update-html.html
1016                fast/selectors/attribute-style-update-svg-in-html.html
1017                fast/selectors/attribute-style-update-xhtml.xhtml
1018
1019         * css/RuleFeature.cpp:
1020         (WebCore::RuleFeatureSet::collectFeaturesFromSelector):
1021         (WebCore::RuleFeatureSet::add):
1022         (WebCore::RuleFeatureSet::clear):
1023         * css/RuleFeature.h:
1024         * css/StyleResolver.cpp:
1025         (WebCore::StyleResolver::applyProperty):
1026         * css/StyleResolver.h:
1027         (WebCore::StyleResolver::hasSelectorForAttribute):
1028         * dom/Element.cpp:
1029         (WebCore::Element::willModifyAttribute):
1030         * testing/Internals.cpp:
1031         (WebCore::Internals::address):
1032         (WebCore::Internals::nodeNeedsStyleRecalc):
1033         * testing/Internals.h:
1034         * testing/Internals.idl:
1035
1036 2014-08-27  Benjamin Poulain  <bpoulain@apple.com>
1037
1038         Update the CSS Grammar selector names to get closer to the latest terminology
1039         https://bugs.webkit.org/show_bug.cgi?id=136277
1040
1041         Reviewed by Andreas Kling.
1042
1043         CSS Selector Level 4 gives useful definitions for various parts of a selector
1044         (see http://dev.w3.org/csswg/selectors4/#structure). This patch updates our names to be closer
1045         to that spec.
1046
1047         Stricto sensu, our definition of "simple selector list" is wrong. I did not attempt to fix this
1048         because updates of CSS Selector Level 4 and WebVTT will eventually make that whole concept useless.
1049
1050         * css/CSSGrammar.y.in:
1051
1052 2014-08-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1053
1054         [EFL] Unskip compositing test
1055         https://bugs.webkit.org/show_bug.cgi?id=136151
1056
1057         Reviewed by Csaba Osztrogonác.
1058
1059         * rendering/RenderLayerBacking.cpp: Set true to setContentsOpaque() to support compositing test.
1060         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
1061
1062 2014-08-26  Vivek Galatage  <vivek.vg@samsung.com>
1063
1064         Canvas direction should reflect change in dir attribute and also across save/restore operations
1065         https://bugs.webkit.org/show_bug.cgi?id=136098
1066
1067         Reviewed by Darin Adler.
1068
1069         Changed State.m_direction type from TextDirection to Direction enum to accomodate 'inherit'
1070         as a separate value. Modified the getter to compute the 'live' value for the direction attribute.
1071         Removed explicit passing of direction to CanvasRenderingContext2D::State constructor.
1072
1073         Updated existing canvas-direction.html with additional cases to reflect this change.
1074
1075         * html/canvas/CanvasRenderingContext2D.cpp:
1076         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
1077         (WebCore::CanvasRenderingContext2D::reset):
1078         (WebCore::CanvasRenderingContext2D::State::State):
1079         (WebCore::CanvasRenderingContext2D::toTextDirection):
1080         (WebCore::CanvasRenderingContext2D::direction):
1081         (WebCore::CanvasRenderingContext2D::setDirection):
1082         (WebCore::CanvasRenderingContext2D::drawTextInternal):
1083         (WebCore::inheritedDirection): Deleted.
1084         * html/canvas/CanvasRenderingContext2D.h:
1085
1086 2014-08-26  Benjamin Poulain  <bpoulain@apple.com>
1087
1088         Minor style tweak on StyleResolveTree
1089         https://bugs.webkit.org/show_bug.cgi?id=136233
1090
1091         Reviewed by Sam Weinig.
1092
1093         * style/StyleResolveTree.cpp:
1094         (WebCore::Style::resolveTree):
1095         Clang likely optimized it away, but I find that explicit style cleaner.
1096
1097 2014-08-26  Brian J. Burg  <burg@cs.washington.edu>
1098
1099         Web Inspector: put feature flags for Inspector domains in the protocol specification
1100         https://bugs.webkit.org/show_bug.cgi?id=136027
1101
1102         Reviewed by Timothy Hatcher.
1103
1104         Add 'featureGuard' settings to wrap domains with ENABLE macros.
1105
1106         No new tests. No behavior was changed.
1107
1108         * inspector/protocol/Database.json:
1109         * inspector/protocol/IndexedDB.json:
1110         * inspector/protocol/Replay.json:
1111
1112 2014-08-26  Andy Estes  <aestes@apple.com>
1113
1114         [Cocoa] Some projects are incorrectly installed to $BUILT_PRODUCTS_DIR
1115         https://bugs.webkit.org/show_bug.cgi?id=136267
1116
1117         Reviewed by Dan Bernstein.
1118
1119         INSTALL_PATH was set to $BUILT_PRODUCTS_DIR for engineering configurations in r20225 as part of a build fix.
1120         Not only is this no longer necessary to build, but it causes built products to be incorrectly installed in
1121         engineering configurations.
1122
1123         Remove the setting of INSTALL_PATH from the pbxproj file so that the value specified in the xcconfig files is
1124         used instead.
1125
1126         * WebCore.xcodeproj/project.pbxproj:
1127
1128 2014-08-26  Brent Fulgham  <bfulgham@apple.com>
1129
1130         [Win] WebKit IDL incorrectly passes HWND as OLE_HANDLE
1131         https://bugs.webkit.org/show_bug.cgi?id=136258
1132         <rdar://problem/18134138>
1133
1134         Reviewed by Tim Horton.
1135
1136         Avoid 32/64-bit truncation by preventing 64-bit HWND (and other)
1137         values from passing through the 32-bit OLE_HANDLE data type.
1138
1139         * platform/win/WindowMessageBroadcaster.cpp:
1140         (WebCore::WindowMessageBroadcaster::addListener):
1141         (WebCore::WindowMessageBroadcaster::removeListener):
1142         (WebCore::WindowMessageBroadcaster::destroy):
1143         (WebCore::WindowMessageBroadcaster::unsubclassWindow):
1144         (WebCore::WindowMessageBroadcaster::SubclassedWndProc):
1145
1146 2014-08-25  Maciej Stachowiak  <mjs@apple.com>
1147
1148         Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API
1149         https://bugs.webkit.org/show_bug.cgi?id=136082
1150
1151         Reviewed by Alexey Proskuryakov.
1152
1153         * platform/mac/Language.mm:
1154         (WebCore::httpStyleLanguageCode): Replace use of WKCopyCFLocalizationPreferredName
1155         with new WebCoreNSStringExtras helper.
1156         * platform/mac/WebCoreNSStringExtras.mm: Replacements for the aspects of
1157         WKCopyCFLocalizationPreferredName.
1158         (preferredBundleLocalizationName): New helper - most preferred localization available
1159         in the main bundle, canonicalized the way we like it.
1160         (canonicalLocalizationName): Convert a lcalization name to a string with language and
1161         country code, using default if necessary (e.g. "en" maps to "en_US").
1162         * WebCore.order: Remove mention of WKCopyCFLocalizationPreferredName.
1163         * WebCore.exp.in: ditto; also export preferredBundleLocalizationName for WebKit(2).
1164         * platform/ios/WebCoreSystemInterfaceIOS.mm: ditto
1165         * platform/mac/WebCoreSystemInterface.h: ditto
1166         * platform/mac/WebCoreSystemInterface.mm: ditto
1167         * platform/spi/cf: Added.
1168         * platform/spi/cf/CFLocaleSPI.h: Added. Declare
1169         CFLocaleGetLanguageRegionEncodingForLocaleIdentifier.
1170
1171 2014-08-26  Zoltan Horvath  <zoltan@webkit.org>
1172
1173         [CSS Shapes] Positioned polygon reftests failing
1174         https://bugs.webkit.org/show_bug.cgi?id=135925
1175
1176         Reviewed by David Hyatt.
1177
1178         We didn't respect the shape-margin before a positioned polygon, since we checked
1179         the shape-margin for only 1 vertex for a polygon edge. This patch fixes the behavior,
1180         removes the tests from the skipped list and updates 1 test, which was incorrect.
1181
1182         Updated existing test and removed tests from skipped list.
1183
1184         * rendering/shapes/PolygonShape.cpp:
1185         (WebCore::clippedCircleXRange):
1186         (WebCore::PolygonShape::getExcludedInterval):
1187
1188 2014-08-26  Zalan Bujtas  <zalan@apple.com>
1189
1190         Subpixel layout: Remove float to LayoutUnit ceil/round function wrappers.
1191         https://bugs.webkit.org/show_bug.cgi?id=136253
1192
1193         Reviewed by Simon Fraser.
1194
1195         These functions wrap LayoutUnit::fromFloatCeil/fromFloatRound() functions to ceil/round float to LayoutUnit.
1196         Their usage is limited and can easily be confused with the snapping functions (snap to css/device pixels).
1197
1198         No change in functionality.
1199
1200         * platform/LayoutUnit.h:
1201         (WebCore::roundedLayoutUnit): Deleted. : Callers use the more explicit LayoutUnit::fromFloatRound() function.
1202         (WebCore::ceiledLayoutUnit): Deleted. : Callers use the more explicit LayoutUnit::fromFloatCeil() function.
1203         * rendering/RenderBlock.cpp:
1204         (WebCore::updatePreferredWidth):
1205         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
1206         (WebCore::adjustFloatForSubPixelLayout): Deleted.
1207         * rendering/RenderBox.cpp:
1208         (WebCore::RenderBox::positionLineBox):
1209         * rendering/RenderFlexibleBox.cpp:
1210         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
1211         * rendering/RenderInline.cpp:
1212         (WebCore::RenderInline::offsetForInFlowPositionedInline):
1213         * rendering/RenderTextControlSingleLine.cpp:
1214         (WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
1215
1216 2014-08-26  Simon Fraser  <simon.fraser@apple.com>
1217
1218         Ensure that layout is up-to-date before hit testing
1219         https://bugs.webkit.org/show_bug.cgi?id=136242
1220         rdar://problem/17435564
1221
1222         Reviewed by Tim Horton.
1223         
1224         Various code paths can call into RenderView::hitTest() but fail to
1225         ensure that layout is up-to-date. This is a conservative change that
1226         fixes the issue for callers of EventHandler::hitTestResultAtPoint(),
1227         including WebPage::acceptsFirstMouse() and WebFrame::hitTest().
1228         
1229         This change is not general enough that we can ASSERT(!needsLayout())
1230         in RenderView::hitTest() yet.
1231         
1232         * page/EventHandler.cpp:
1233         (WebCore::EventHandler::hitTestResultAtPoint):
1234
1235 2014-08-26  Beth Dakin  <bdakin@apple.com>
1236
1237         Rubber-banding in overflow:scroll regions does not work correctly with 
1238         direction:rtl
1239         https://bugs.webkit.org/show_bug.cgi?id=136176
1240
1241         Reviewed by Tim Horton.
1242
1243         Small cleanup.
1244         * rendering/RenderLayer.cpp:
1245         (WebCore::RenderLayer::visibleContentRectInternal):
1246
1247 2014-08-26  Tim Horton  <timothy_horton@apple.com>
1248
1249         Fix the build after r172963
1250
1251         * page/DOMTimer.h:
1252
1253 2014-08-25  Gavin Barraclough  <barraclough@apple.com>
1254
1255         DOMTimer may be deleted during timer fire
1256         https://bugs.webkit.org/show_bug.cgi?id=136198
1257
1258         Reviewed by Geoff Garen.
1259
1260         Consequentially ScheduledActions may also be deleted mid execution.
1261         This is fairly surprising & fragile, let's make this simpler.
1262
1263         Currently DOMTimer instances are effectively owned by the ScriptExecutionContext.
1264         There is a 1-1 mapping between timers and contexts, all timers are help in a map
1265         on the context and if the context goes away all timers are deleted. Rather than
1266         being implemented in a straightforward fashion (a smart pointer type for the map
1267         value) this is currently implemented by having the timer objects listen for the
1268         context going away using contextDestroyed, and deleting themselves if so.
1269
1270         Switch to using a smart pointer for values of m_timeouts in ScriptExecutionContext.
1271         By using a RefCounted object we can also extend the lifetime of the DOMTimer instance
1272         from within the DOMTimer::fired method, so the object is not destroyed while the
1273         member function is still on the stack.
1274
1275         * WebCore.xcodeproj/project.pbxproj:
1276             - project -> private since DOMTimer could no longer be a forward declare in ScriptExecutionContext.h.
1277         * dom/ScriptExecutionContext.cpp:
1278         (WebCore::ScriptExecutionContext::adjustMinimumTimerInterval):
1279         (WebCore::ScriptExecutionContext::didChangeTimerAlignmentInterval):
1280             - auto* -> auto& since value type in map is no longer a raw pointer.
1281         * dom/ScriptExecutionContext.h:
1282         (WebCore::ScriptExecutionContext::addTimeout):
1283             - DOMTimer* -> PassRefPtr<DOMTimer>
1284         * page/DOMTimer.cpp:
1285         (WebCore::DOMTimer::DOMTimer):
1286             - adopt the initial ref, and pass to addTimeout.
1287         (WebCore::DOMTimer::install):
1288             - updated comment.
1289         (WebCore::DOMTimer::removeById):
1290             - instead of explicitly deleting the timer and assuming this will implicitly remove it from the context map,
1291               we explicitly remove it from the context map and assume this will implicitly deleting the timer!
1292         (WebCore::DOMTimer::fired):
1293             - Add a RefPtr to keep the DOMTimer object alive until the fired method completes; to cancel a one-shot timer
1294               just remove it from the context's map, rather than explicitly deleting it.
1295         (WebCore::DOMTimer::~DOMTimer): Deleted.
1296         (WebCore::DOMTimer::contextDestroyed): Deleted.
1297             - no need! object lifetime management now handled by smart pointers.
1298         * page/DOMTimer.h:
1299             - added parent class RefCounted<DOMTimer>.
1300
1301 2014-08-26  Carlos Garcia Campos  <cgarcia@igalia.com>
1302
1303         [GTK] Selection background is rendered white when unfocused with recent GTK+
1304         https://bugs.webkit.org/show_bug.cgi?id=136251
1305
1306         Reviewed by Martin Robinson.
1307
1308         This is due to a change in the GTK+ theme, but because we are not
1309         using the right flags to get the selections colors. We should use
1310         GTK_STATE_FLAG_SELECTED | GTK_STATE_FLAG_FOCUSED when focused and
1311         GTK_STATE_FLAG_SELECTED when unfocused, instead of
1312         GTK_STATE_FLAG_ACTIVE when unfocused.
1313
1314         * platform/gtk/RenderThemeGtk3.cpp:
1315         (WebCore::RenderThemeGtk::platformActiveSelectionBackgroundColor):
1316         (WebCore::RenderThemeGtk::platformInactiveSelectionBackgroundColor):
1317         (WebCore::RenderThemeGtk::platformActiveSelectionForegroundColor):
1318         (WebCore::RenderThemeGtk::platformInactiveSelectionForegroundColor):
1319         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor):
1320         (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor):
1321         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor):
1322         (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor):
1323
1324 2014-08-26  Krzysztof Czech  <k.czech@samsung.com>
1325
1326         [EFL] Utilize espeak as a synthesizer back-end for WebSpeech
1327         https://bugs.webkit.org/show_bug.cgi?id=136127
1328
1329         Reviewed by Gyuyoung Kim.
1330
1331         Utilize espeak API to have support for speak, cancel and initializeVoiceList.
1332
1333         * PlatformEfl.cmake:
1334         * platform/efl/PlatformSpeechSynthesisProviderEfl.cpp:
1335         (WebCore::PlatformSpeechSynthesisProviderEfl::PlatformSpeechSynthesisProviderEfl):
1336         (WebCore::PlatformSpeechSynthesisProviderEfl::convertRateToEspeakValue):
1337         (WebCore::PlatformSpeechSynthesisProviderEfl::convertVolumeToEspeakValue):
1338         (WebCore::PlatformSpeechSynthesisProviderEfl::convertPitchToEspeakValue):
1339         (WebCore::PlatformSpeechSynthesisProviderEfl::voiceName):
1340         (WebCore::PlatformSpeechSynthesisProviderEfl::engineInit):
1341         (WebCore::PlatformSpeechSynthesisProviderEfl::currentVoice):
1342         (WebCore::PlatformSpeechSynthesisProviderEfl::initializeVoiceList):
1343         (WebCore::PlatformSpeechSynthesisProviderEfl::speak):
1344         (WebCore::PlatformSpeechSynthesisProviderEfl::cancel):
1345         (WebCore::PlatformSpeechSynthesisProviderEfl::fireSpeechEvent):
1346         * platform/efl/PlatformSpeechSynthesisProviderEfl.h:
1347         * platform/efl/PlatformSpeechSynthesizerEfl.cpp:
1348         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
1349         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
1350         (WebCore::PlatformSpeechSynthesizer::pause):
1351         (WebCore::PlatformSpeechSynthesizer::resume):
1352         (WebCore::PlatformSpeechSynthesizer::speak):
1353         (WebCore::PlatformSpeechSynthesizer::cancel):
1354
1355 2014-08-26  Ryuan Choi  <ryuan.choi@samsung.com>
1356
1357         [EFL] Build break using clang
1358         https://bugs.webkit.org/show_bug.cgi?id=136245
1359
1360         Reviewed by Gyuyoung Kim.
1361
1362         * css/ViewportStyleResolver.cpp: Includes NodeRenderStyle.h
1363
1364 2014-08-26  Mark Rowe  <mrowe@apple.com>
1365
1366         Build fix after r172951.
1367
1368         * fileapi/Blob.h: Give the argument the name that the predicates expect.
1369
1370 2014-08-25  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1371
1372         Generate toFile() instead of manual functions.
1373         https://bugs.webkit.org/show_bug.cgi?id=136207
1374
1375         Reviewed by Darin Adler.
1376
1377         No new tests, no behavior changes.
1378
1379         * fileapi/Blob.h: Define BLOB_TYPE_CASTS.
1380         * fileapi/File.h: Use BLOB_TYPE_CASTS to generate toFile().
1381         (WebCore::toFile): Deleted.
1382
1383 2014-08-25  Zalan Bujtas  <zalan@apple.com>
1384
1385         Subpixel layout: remove roundedLayoutPoint/roundedLayoutSize functions.
1386         https://bugs.webkit.org/show_bug.cgi?id=136236
1387
1388         Reviewed by Simon Fraser.
1389
1390         These functions simply call LayoutPoint/LayoutSize c'tors. They don't round the input value at all.
1391
1392         Non change in functionality.
1393
1394         * dom/MouseRelatedEvent.cpp:
1395         (WebCore::MouseRelatedEvent::computePageLocation):
1396         (WebCore::MouseRelatedEvent::computeRelativePosition):
1397         * dom/Touch.cpp:
1398         (WebCore::Touch::Touch):
1399         * html/shadow/SliderThumbElement.cpp:
1400         (WebCore::SliderThumbElement::setPositionFromPoint):
1401         * page/DragController.cpp:
1402         (WebCore::elementUnderMouse):
1403         * page/EventHandler.cpp:
1404         (WebCore::selectionExtentRespectingEditingBoundary):
1405         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
1406         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateChildNodesAfterScroll):
1407         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1408         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
1409         * platform/graphics/LayoutPoint.h:
1410         (WebCore::roundedLayoutPoint): Deleted.
1411         * platform/graphics/LayoutSize.h:
1412         (WebCore::roundedLayoutSize): Deleted.
1413         * rendering/EllipsisBox.cpp:
1414         (WebCore::EllipsisBox::nodeAtPoint):
1415         * rendering/RenderBlock.cpp:
1416         (WebCore::RenderBlock::selectionGapRectsForRepaint):
1417         * rendering/RenderBox.cpp:
1418         (WebCore::RenderBox::mapLocalToContainer):
1419         (WebCore::RenderBox::positionLineBox):
1420         * rendering/RenderEmbeddedObject.cpp:
1421         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
1422         * rendering/RenderEmbeddedObject.h:
1423         * rendering/RenderInline.cpp:
1424         (WebCore::RenderInline::localCaretRect):
1425         (WebCore::RenderInline::mapLocalToContainer):
1426         * rendering/RenderLayer.cpp:
1427         (WebCore::RenderLayer::absoluteToContents):
1428         (WebCore::RenderLayer::calculateClipRects):
1429         * rendering/RenderMultiColumnFlowThread.cpp:
1430         (WebCore::RenderMultiColumnFlowThread::mapAbsoluteToLocalPoint):
1431         * rendering/RenderObject.cpp:
1432         (WebCore::RenderObject::mapLocalToContainer):
1433         * rendering/shapes/ShapeOutsideInfo.cpp:
1434         (WebCore::ShapeOutsideInfo::createShapeForImage):
1435         * rendering/svg/RenderSVGContainer.cpp:
1436         (WebCore::RenderSVGContainer::nodeAtFloatPoint):
1437         * rendering/svg/RenderSVGForeignObject.cpp:
1438         (WebCore::RenderSVGForeignObject::nodeAtFloatPoint):
1439         * rendering/svg/RenderSVGImage.cpp:
1440         (WebCore::RenderSVGImage::nodeAtFloatPoint):
1441         * rendering/svg/RenderSVGShape.cpp:
1442         (WebCore::RenderSVGShape::nodeAtFloatPoint):
1443         * testing/Internals.cpp:
1444         (WebCore::Internals::nodesFromRect):
1445
1446 2014-08-25  Zalan Bujtas  <zalan@apple.com>
1447
1448         Rename RenderObject::showTree() and showTreeForThis() to showNodeTree*().
1449         https://bugs.webkit.org/show_bug.cgi?id=136238
1450
1451         Reviewed by Simon Fraser.
1452
1453         showNodeTree()/showNodeTreeForThis() reflects the functionality better.
1454
1455         No change in functionality.
1456
1457         * rendering/InlineBox.cpp:
1458         (WebCore::InlineBox::showNodeTreeForThis):
1459         (showNodeTree):
1460         (WebCore::InlineBox::showTreeForThis): Deleted.
1461         (showTree): Deleted.
1462         * rendering/InlineBox.h:
1463         * rendering/RenderObject.cpp:
1464         (WebCore::RenderObject::showNodeTreeForThis):
1465         (showNodeTree):
1466         (WebCore::RenderObject::showTreeForThis): Deleted.
1467         (showTree): Deleted.
1468         * rendering/RenderObject.h:
1469
1470 2014-08-25  Antti Koivisto  <antti@apple.com>
1471
1472         Don't pass priority as parameter to ResourceLoadScheduler
1473         https://bugs.webkit.org/show_bug.cgi?id=136232
1474
1475         Reviewed by Sam Weinig.
1476
1477         It is part of the ResourceRequest which is also passed in.
1478
1479         * WebCore.exp.in:
1480         * loader/ResourceLoadScheduler.cpp:
1481         (WebCore::ResourceLoadScheduler::scheduleSubresourceLoad):
1482         (WebCore::ResourceLoadScheduler::schedulePluginStreamLoad):
1483         (WebCore::ResourceLoadScheduler::scheduleLoad):
1484         * loader/ResourceLoadScheduler.h:
1485         * loader/cache/CachedResource.cpp:
1486         (WebCore::CachedResource::load):
1487         * platform/network/cf/ResourceRequestCFNet.cpp:
1488         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
1489         * platform/network/cocoa/ResourceRequestCocoa.mm:
1490         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
1491
1492             Restore the original request priority when a delegate modifies the request.
1493
1494 2014-08-25  Beth Dakin  <bdakin@apple.com>
1495
1496         Rubber-banding in overflow:scroll regions does not work correctly with direction:rtl
1497         https://bugs.webkit.org/show_bug.cgi?id=136176
1498
1499         Reviewed by Sam Weinig.
1500
1501         Use scrollPosition() instead of scrollXOffset() and scrollYOffset() which both add 
1502         in the scrollOrigin(). Other implementations of visibleContentRectInternal() do 
1503         not add in the scrollOrigin(), so RenderLayer's shouldn't either in order to be
1504         consistent. This makes rubber-banding work for RTL because 
1505         ScrollAnimatorMac::pinnedInDirection() and 
1506         ScrollAnimatorMac::absoluteScrollPosition() both return the expect values now.
1507
1508         * rendering/RenderLayer.cpp:
1509         (WebCore::RenderLayer::visibleContentRectInternal):
1510
1511 2014-08-25  Benjamin Poulain  <benjamin@webkit.org>
1512
1513         Reduce style marking when using the pseudo class :placeholder-shown
1514         https://bugs.webkit.org/show_bug.cgi?id=136203
1515
1516         Reviewed by Darin Adler.
1517
1518         When the :placeholder-shown filter is hit, we were always marking the RenderStyle as unique.
1519         As a result, if :placeholder-shown was used without a more restrictive filter (e.g. "*:placeholder-shown"
1520         or simply ":placeholder-shown"), style sharing was disabled for the whole tree.
1521
1522         This patch rescope the tree marking to any element that can be affected by a placeholder:
1523         any the subclass of HTMLTextFormControlElement. For other elements, any change in internal state
1524         would be irrelevant for "isPlaceholderVisible".
1525
1526         Styling of :placeholder-shown is covered by the existing tests. Style sharing of :placeholder-shown
1527         is covered by LayoutTests/fast/css/placeholder-shown-basics.html.
1528
1529         * css/SelectorChecker.cpp:
1530         (WebCore::SelectorChecker::checkOne):
1531         * css/SelectorCheckerTestFunctions.h:
1532         (WebCore::isPlaceholderShown): Deleted.
1533         * cssjit/SelectorCompiler.cpp:
1534         (WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
1535         (WebCore::SelectorCompiler::makeElementStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
1536         (WebCore::SelectorCompiler::isPlaceholderShown):
1537         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPlaceholderShown):
1538         (WebCore::SelectorCompiler::makeUniqueIfNecessaryAndTestIsPlaceholderShown): Deleted.
1539
1540 2014-08-25  Antti Koivisto  <antti@apple.com>
1541
1542         Remove ResourceLoader::didChangePriority
1543         https://bugs.webkit.org/show_bug.cgi?id=136230
1544
1545         Reviewed by Andreas Kling.
1546
1547         It doesn't do anything on any platform.
1548
1549         * loader/ResourceLoader.cpp:
1550         (WebCore::ResourceLoader::didChangePriority): Deleted.
1551         * loader/ResourceLoader.h:
1552         * loader/cache/CachedResource.cpp:
1553         (WebCore::CachedResource::setLoadPriority):
1554         * platform/network/ResourceHandle.cpp:
1555         (WebCore::ResourceHandle::didChangePriority): Deleted.
1556         * platform/network/ResourceHandle.h:
1557
1558 2014-08-24  Brian J. Burg  <burg@cs.washington.edu>
1559
1560         Web Inspector: rename Inspector::TypeBuilder to Inspector::Protocol
1561         https://bugs.webkit.org/show_bug.cgi?id=136031
1562
1563         Reviewed by Timothy Hatcher.
1564
1565         Rename TypeBuilder namespace to Protocol. Disambiguate where
1566         necessary. Also rename InspectorTypeBuilder to ProtocolTypes.
1567
1568         * CMakeLists.txt:
1569         * DerivedSources.make:
1570         * ForwardingHeaders/inspector/InspectorJSTypeBuilders.h: Removed.
1571         * ForwardingHeaders/inspector/InspectorTypeBuilder.h: Removed.
1572         * WebCore.order:
1573         * WebCore.vcxproj/WebCore.vcxproj:
1574         * WebCore.vcxproj/WebCore.vcxproj.filters:
1575         * WebCore.xcodeproj/project.pbxproj:
1576         * inspector/CommandLineAPIHost.cpp:
1577         (WebCore::CommandLineAPIHost::inspectImpl):
1578         * inspector/InspectorApplicationCacheAgent.cpp:
1579         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
1580         (WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame):
1581         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCache):
1582         (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
1583         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource):
1584         * inspector/InspectorApplicationCacheAgent.h:
1585         * inspector/InspectorCSSAgent.cpp:
1586         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
1587         (WebCore::InspectorCSSAgent::getInlineStylesForNode):
1588         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
1589         (WebCore::InspectorCSSAgent::getAllStyleSheets):
1590         (WebCore::InspectorCSSAgent::getStyleSheet):
1591         (WebCore::InspectorCSSAgent::setStyleText):
1592         (WebCore::InspectorCSSAgent::setPropertyText):
1593         (WebCore::InspectorCSSAgent::toggleProperty):
1594         (WebCore::InspectorCSSAgent::setRuleSelector):
1595         (WebCore::InspectorCSSAgent::addRule):
1596         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
1597         (WebCore::InspectorCSSAgent::getNamedFlowCollection):
1598         (WebCore::InspectorCSSAgent::asInspectorStyleSheet):
1599         (WebCore::InspectorCSSAgent::collectStyleSheets):
1600         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
1601         (WebCore::InspectorCSSAgent::detectOrigin):
1602         (WebCore::InspectorCSSAgent::buildObjectForRule):
1603         (WebCore::InspectorCSSAgent::buildArrayForRuleList):
1604         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
1605         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
1606         (WebCore::InspectorCSSAgent::buildArrayForRegions):
1607         (WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
1608         * inspector/InspectorCSSAgent.h:
1609         * inspector/InspectorDOMAgent.cpp:
1610         (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
1611         (WebCore::InspectorDOMAgent::getDocument):
1612         (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
1613         (WebCore::InspectorDOMAgent::querySelectorAll):
1614         (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
1615         (WebCore::InspectorDOMAgent::getEventListenersForNode):
1616         (WebCore::InspectorDOMAgent::getAccessibilityPropertiesForNode):
1617         (WebCore::InspectorDOMAgent::getSearchResults):
1618         (WebCore::InspectorDOMAgent::resolveNode):
1619         (WebCore::InspectorDOMAgent::getAttributes):
1620         (WebCore::InspectorDOMAgent::buildObjectForNode):
1621         (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
1622         (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
1623         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
1624         (WebCore::InspectorDOMAgent::processAccessibilityChildren):
1625         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
1626         (WebCore::InspectorDOMAgent::didCommitLoad):
1627         (WebCore::InspectorDOMAgent::didInsertDOMNode):
1628         (WebCore::InspectorDOMAgent::styleAttributeInvalidated):
1629         * inspector/InspectorDOMAgent.h:
1630         * inspector/InspectorDOMDebuggerAgent.cpp:
1631         (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent):
1632         * inspector/InspectorDOMStorageAgent.cpp:
1633         (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
1634         (WebCore::InspectorDOMStorageAgent::storageId):
1635         (WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent):
1636         * inspector/InspectorDOMStorageAgent.h:
1637         * inspector/InspectorDatabaseAgent.cpp:
1638         (WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
1639         * inspector/InspectorDatabaseAgent.h:
1640         * inspector/InspectorDatabaseResource.cpp:
1641         (WebCore::InspectorDatabaseResource::bind):
1642         * inspector/InspectorIndexedDBAgent.cpp:
1643         * inspector/InspectorLayerTreeAgent.cpp:
1644         (WebCore::InspectorLayerTreeAgent::layersForNode):
1645         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
1646         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderLayerHierarchy):
1647         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
1648         (WebCore::InspectorLayerTreeAgent::buildObjectForIntRect):
1649         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
1650         * inspector/InspectorLayerTreeAgent.h:
1651         * inspector/InspectorPageAgent.cpp:
1652         (WebCore::InspectorPageAgent::resourceTypeJson):
1653         (WebCore::InspectorPageAgent::cachedResourceTypeJson):
1654         (WebCore::buildObjectForCookie):
1655         (WebCore::buildArrayForCookies):
1656         (WebCore::InspectorPageAgent::getCookies):
1657         (WebCore::InspectorPageAgent::getResourceTree):
1658         (WebCore::InspectorPageAgent::searchInResource):
1659         (WebCore::buildObjectForSearchResult):
1660         (WebCore::InspectorPageAgent::searchInResources):
1661         (WebCore::InspectorPageAgent::buildObjectForFrame):
1662         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
1663         * inspector/InspectorPageAgent.h:
1664         * inspector/InspectorReplayAgent.cpp:
1665         (WebCore::buildInspectorObjectForPosition):
1666         (WebCore::buildInspectorObjectForInput):
1667         (WebCore::buildInspectorObjectForSession):
1668         (WebCore::buildInspectorObjectForSessionState):
1669         (WebCore::buildInspectorObjectForSegmentState):
1670         (WebCore::SerializeInputToJSONFunctor::SerializeInputToJSONFunctor):
1671         (WebCore::SerializeInputToJSONFunctor::operator()):
1672         (WebCore::buildInspectorObjectForSegment):
1673         (WebCore::InspectorReplayAgent::switchSession):
1674         (WebCore::InspectorReplayAgent::insertSessionSegment):
1675         (WebCore::InspectorReplayAgent::removeSessionSegment):
1676         (WebCore::InspectorReplayAgent::currentReplayState):
1677         (WebCore::InspectorReplayAgent::getAvailableSessions):
1678         (WebCore::InspectorReplayAgent::getSessionData):
1679         (WebCore::InspectorReplayAgent::getSegmentData):
1680         * inspector/InspectorReplayAgent.h:
1681         * inspector/InspectorResourceAgent.cpp:
1682         (WebCore::buildObjectForTiming):
1683         (WebCore::buildObjectForResourceRequest):
1684         (WebCore::buildObjectForResourceResponse):
1685         (WebCore::buildObjectForCachedResource):
1686         (WebCore::InspectorResourceAgent::willSendRequest):
1687         (WebCore::InspectorResourceAgent::didReceiveResponse):
1688         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
1689         (WebCore::InspectorResourceAgent::buildInitiatorObject):
1690         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
1691         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
1692         (WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
1693         (WebCore::InspectorResourceAgent::didSendWebSocketFrame):
1694         * inspector/InspectorResourceAgent.h:
1695         * inspector/InspectorStyleSheet.cpp:
1696         (WebCore::buildSourceRangeObject):
1697         (WebCore::buildMediaObject):
1698         (WebCore::fillMediaListChain):
1699         (WebCore::InspectorStyle::buildObjectForStyle):
1700         (WebCore::InspectorStyle::buildArrayForComputedStyle):
1701         (WebCore::InspectorStyle::styleWithProperties):
1702         (WebCore::InspectorStyleSheet::create):
1703         (WebCore::InspectorStyleSheet::InspectorStyleSheet):
1704         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
1705         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
1706         (WebCore::selectorsFromSource):
1707         (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
1708         (WebCore::InspectorStyleSheet::buildObjectForRule):
1709         (WebCore::InspectorStyleSheet::buildObjectForStyle):
1710         (WebCore::InspectorStyleSheet::resourceStyleSheetText):
1711         (WebCore::InspectorStyleSheet::buildArrayForRuleList):
1712         (WebCore::InspectorStyleSheetForInlineStyle::create):
1713         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
1714         * inspector/InspectorStyleSheet.h:
1715         (WebCore::InspectorStyleSheet::canBind):
1716         * inspector/InspectorTimelineAgent.cpp:
1717         (WebCore::toProtocol):
1718         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
1719         (WebCore::InspectorTimelineAgent::sendEvent):
1720         * inspector/PageRuntimeAgent.cpp:
1721
1722 2014-08-25  Brendan Long  <b.long@cablelabs.com>
1723
1724         [GStreamer] ASSERT failure in WebKitWebSource in StreamingClient
1725         https://bugs.webkit.org/show_bug.cgi?id=136132
1726
1727         adoptGRef() has an ASSERT failure if it's used on a floating pointer. For some reason,
1728         WebKitWebSrc* src in StreamingClient's constructor is floating. Since we
1729         don't construct this ourselves, I assume this is happening in Playbin.
1730
1731         If we remove the ref and adopt, GRefPtr's constructor calls gst_object_ref_sink,
1732         which removes the floating reference and doesn't increment the reference count.
1733         This should work, but actually causes the page to either lock up or crash (different
1734         results for different testers).
1735
1736         In this case, it seems like the adoptGRef / gst_object_ref was the correct thing to do,
1737         but adoptGRef won't actually let us do. Removing the ASSERT is a bad idea, because
1738         usually we don't want to adopt floating pointers.
1739
1740         This is all a long way of saying that making m_src a raw pointer and manually
1741         calling gst_object_ref(), and calling gst_object_unref in the destructor is the
1742         best solution in this case, since it fixes the problem while leaving the ASSERT
1743         to protect us in the much more common case where adopting a floating reference is bad.
1744
1745         Reviewed by Philippe Normand.
1746
1747         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1748         (StreamingClient::StreamingClient): Make m_src a raw pointer instead of a GRefPtr.
1749         (StreamingClient::~StreamingClient): Unref m_src.
1750         (StreamingClient::createReadBuffer): Replace m_src.get() with m_src, since it's a raw pointer now.
1751         (StreamingClient::handleResponseReceived): Same.
1752         (StreamingClient::handleDataReceived): Same.
1753         (StreamingClient::handleNotifyFinished): Same.
1754         (CachedResourceStreamingClient::notifyFinished): Same.
1755         (ResourceHandleStreamingClient::didFail): Same.
1756         (ResourceHandleStreamingClient::wasBlocked): Same.
1757         (ResourceHandleStreamingClient::cannotShowURL): Same.
1758
1759 2014-08-25  Zan Dobersek  <zdobersek@igalia.com>
1760
1761         [GTK] Remove PopupMenuGtk, SearchPopupMenuGtk
1762         https://bugs.webkit.org/show_bug.cgi?id=136211
1763
1764         Reviewed by Carlos Garcia Campos.
1765
1766         Remove the two classes from the codebase. They're not used anymore
1767         after the WebKit1 layer of the GTK port was removed some time ago.
1768
1769         * PlatformGTK.cmake:
1770         * platform/gtk/PopupMenuGtk.cpp: Removed.
1771         * platform/gtk/PopupMenuGtk.h: Removed.
1772         * platform/gtk/SearchPopupMenuGtk.cpp: Removed.
1773         * platform/gtk/SearchPopupMenuGtk.h: Removed.
1774
1775 2014-08-25  Shivakumar JM  <shiva.jm@samsung.com>
1776
1777         Web Core: Fix unused parameter build warning.
1778         https://bugs.webkit.org/show_bug.cgi?id=136208
1779
1780         Reviewed by Darin Adler.
1781
1782         Fix unused build warning by removing parameter, which is not used.
1783
1784         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1785         (WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
1786
1787 2014-08-22  Sergio Villar Senin  <svillar@igalia.com>
1788
1789         ASSERTION FAILED: !trackSizes.isEmpty() in WebCore::createGridTrackList
1790         https://bugs.webkit.org/show_bug.cgi?id=136149
1791
1792         Reviewed by Darin Adler.
1793
1794         The second argument of the repeat() function is a <track-list>
1795         that must have at least one <track-size>. Should it not be found,
1796         the declaration must be invalidated.
1797
1798         * css/CSSParser.cpp:
1799         (WebCore::CSSParser::parseGridTrackRepeatFunction):
1800
1801 2014-08-24  Zan Dobersek  <zdobersek@igalia.com>
1802
1803         Move WebCore storage code to C++11 lambdas, std::function
1804         https://bugs.webkit.org/show_bug.cgi?id=126435
1805
1806         Reviewed by Darin Adler.
1807
1808         Use C++11 lambdas instead of WTF::bind and std::function<void ()>
1809         instead of WTF::Function<void ()> in StorageAreaSync, StorageSyncManager,
1810         StorageThread and StorageTracker classes.
1811
1812         * storage/StorageAreaSync.cpp:
1813         (WebCore::StorageAreaSync::StorageAreaSync):
1814         (WebCore::StorageAreaSync::scheduleFinalSync):
1815         (WebCore::StorageAreaSync::syncTimerFired):
1816         * storage/StorageSyncManager.cpp:
1817         (WebCore::StorageSyncManager::dispatch):
1818         * storage/StorageSyncManager.h:
1819         * storage/StorageThread.cpp:
1820         (WebCore::StorageThread::dispatch):
1821         (WebCore::StorageThread::terminate):
1822         (WebCore::StorageThread::releaseFastMallocFreeMemoryInAllThreads):
1823         * storage/StorageThread.h:
1824         * storage/StorageTracker.cpp:
1825         (WebCore::StorageTracker::importOriginIdentifiers):
1826         (WebCore::StorageTracker::syncImportOriginIdentifiers):
1827         (WebCore::StorageTracker::syncFileSystemAndTrackerDatabase):
1828         (WebCore::StorageTracker::setOriginDetails):
1829         (WebCore::StorageTracker::deleteAllOrigins):
1830         (WebCore::StorageTracker::deleteOrigin):
1831
1832 2014-08-24  Alexey Proskuryakov  <ap@apple.com>
1833
1834         ASSERT(extractable()) when storing a non-extractable key in IndexedDB
1835         https://bugs.webkit.org/show_bug.cgi?id=136202
1836         rdar://problem/17993967
1837
1838         Reviewed by Darin Adler.
1839
1840         Test: crypto/subtle/rsa-indexeddb-non-exportable.html
1841
1842         Removed the obsolete assertion.
1843
1844         * crypto/keys/CryptoKeyAES.cpp: (WebCore::CryptoKeyAES::exportData):
1845         * crypto/keys/CryptoKeyHMAC.cpp: (WebCore::CryptoKeyHMAC::exportData):
1846         * crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::exportData):
1847
1848 2014-08-24  Brian J. Burg  <burg@cs.washington.edu>
1849
1850         Web Inspector: Rename DOM.RGBA and remove workarounds in the bindings generator
1851         https://bugs.webkit.org/show_bug.cgi?id=136025
1852
1853         Reviewed by Joseph Pecoraro.
1854
1855         Rename DOM.RGBA to DOM.RGBAColor to avoid name clashes with headers on Windows CE.
1856         This workaround used to be special-cased in the bindings generator.
1857
1858         Type names are not used in protocol messages, so this does not introduce legacy issues.
1859
1860         * inspector/protocol/DOM.json:
1861
1862 2014-08-24  Michael Catanzaro  <mcatanzaro@igalia.com>
1863
1864         [GTK] Toggle buttons visually broken with GTK+ 3.13.7
1865         https://bugs.webkit.org/show_bug.cgi?id=136130
1866
1867         Reviewed by Martin Robinson.
1868
1869         No new tests. Hopefully covered by existing tests, and our tests only
1870         run with GTK+ 3.6 anyway.
1871
1872         * platform/gtk/RenderThemeGtk3.cpp:
1873         (WebCore::paintToggle): use GTK_STATE_FLAG_CHECKED when compiling for
1874         GTK+ 3.13.7 and above to ensure toggle buttons display as toggled.
1875
1876 2014-08-23  Brady Eidson  <beidson@apple.com>
1877
1878         Random Gamepad cleanup
1879         https://bugs.webkit.org/show_bug.cgi?id=136193
1880
1881         Reviewed by Sam Weinig.
1882
1883         No new tests (Not tested yet, and no change in behavior anyways)
1884
1885         - Use DOMWindow WeakPtrs when iterating
1886         - More references instead of pointers
1887
1888         * Modules/gamepad/GamepadEvent.cpp:
1889         (WebCore::GamepadEvent::GamepadEvent):
1890         * Modules/gamepad/GamepadEvent.h:
1891         (WebCore::GamepadEvent::create):
1892
1893         * Modules/gamepad/GamepadManager.cpp:
1894         (WebCore::GamepadManager::platformGamepadDisconnected):
1895         (WebCore::GamepadManager::makeGamepadVisible):
1896         * Modules/gamepad/NavigatorGamepad.cpp:
1897         (WebCore::NavigatorGamepad::gamepadFromPlatformGamepad):
1898         (WebCore::NavigatorGamepad::gamepadAtIndex): Deleted.
1899         * Modules/gamepad/NavigatorGamepad.h:
1900
1901         * page/DOMWindow.cpp:
1902         (WebCore::DOMWindow::DOMWindow):
1903         * page/DOMWindow.h:
1904
1905 2014-08-23  Byungseon Shin  <sun.shin@lge.com>
1906
1907         Unify GraphicsLayer::setContentsToMedia and setContentsToCanvas
1908         https://bugs.webkit.org/show_bug.cgi?id=109658
1909
1910         Reviewed by Martin Robinson.
1911  
1912         Based on patch originally written by Tim Horton.
1913         Merge setContentsToMedia and setContentsToCanvas into setContentsToPlatformLayer.
1914  
1915         * WebCore.exp.in:
1916         Adjust exports.
1917  
1918         * platform/graphics/GraphicsLayer.h:
1919         Move ContentsLayerPurpose enum up out of GraphicsLayer platform implmentations
1920         and into GraphicsLayer, so we can use it as a parameter.
1921         Add ContentsLayerForPlugin.
1922  
1923         (WebCore::GraphicsLayer::setContentsToPlatformLayer):
1924         Remove setContentsToMedia and setContentsToCanvas, and replace them
1925         with setContentsToPlatformLayer, which previously existed but was unused
1926         and simply called setContentsToMedia.
1927         setContentsToPlatformLayer takes a ContentsLayerPurpose, primarily
1928         so that GraphicsLayerCA can know whether it needs to setNeedsDisplay
1929         the layer when parenting it (canvas) or not (everything else).
1930  
1931         * platform/graphics/ca/GraphicsLayerCA.cpp:
1932         (WebCore::GraphicsLayerCA::setContentsToPlatformLayer):
1933         Rename function setContentsToMedia -> setContentsToPlatformLayer.
1934         Rename argument mediaLayer -> platformLayer.
1935         Store the passed-in ContentsLayerPurpose.
1936         Remove setContentsToCanvas.
1937  
1938         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
1939         (WebCore::GraphicsLayerCA::updateContentsPlatformLayer):
1940         Remove updateContentsMediaLayer and updateContentsCanvas layer,
1941         add updateContentsPlatformLayer.
1942  
1943         * platform/graphics/ca/GraphicsLayerCA.h:
1944         Do the same to the LayerChange enum.
1945  
1946         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1947         (WebCore::GraphicsLayerTextureMapper::setContentsToImage):
1948         (WebCore::GraphicsLayerTextureMapper::setContentsToPlatformLayer):
1949         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1950         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1951         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
1952         (WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay):
1953         (WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
1954         (WebCore::CoordinatedGraphicsLayer::syncPlatformLayer):
1955         (WebCore::CoordinatedGraphicsLayer::destroyPlatformLayerIfNeeded):
1956         (WebCore::CoordinatedGraphicsLayer::createPlatformLayerIfNeeded):
1957         (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
1958         Fold these together in the same way as elsewhere.
1959  
1960         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
1961         Do the same to the LayerChange enum.
1962  
1963         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1964         (WebCore::CoordinatedGraphicsScene::createPlatformLayerIfNeeded):
1965         (WebCore::CoordinatedGraphicsScene::syncPlatformLayerIfNeeded):
1966         (WebCore::CoordinatedGraphicsScene::destroyPlatformLayerIfNeeded):
1967         (WebCore::CoordinatedGraphicsScene::setLayerState):
1968         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1969         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
1970         (WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
1971         Rename canvasLayer -> platformLayer.
1972  
1973         * rendering/RenderLayerBacking.cpp:
1974         (WebCore::RenderLayerBacking::updateConfiguration):
1975         Use the new setContentsToPlatformLayer, passing in the relevant ContentsLayerPurpose.
1976
1977 2014-08-23  Joseph Pecoraro  <pecoraro@apple.com>
1978
1979         Web Inspector: Do not copy large module source strings
1980         https://bugs.webkit.org/show_bug.cgi?id=136191
1981
1982         Reviewed by Benjamin Poulain.
1983
1984         * inspector/CommandLineAPIModule.cpp:
1985         (WebCore::CommandLineAPIModule::source):
1986
1987 2014-08-23  Zan Dobersek  <zdobersek@igalia.com>
1988
1989         Remove uses of CrossThreadTask in ThreadableWebSocketChannelClientWrapper, WorkerThreadableWebSocketChannel
1990         https://bugs.webkit.org/show_bug.cgi?id=133954
1991
1992         Reviewed by Darin Adler.
1993
1994         Replace uses of CrossThreadTask with C++11 lambdas in the ThreadableWebSocketChannelClientWrapper
1995         and WorkerThreadableWebSocketChannel classes.
1996
1997         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
1998         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
1999         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
2000         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
2001         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
2002         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
2003         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
2004         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
2005         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
2006         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasksCallback): Deleted.
2007         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnectCallback): Deleted.
2008         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback): Deleted.
2009         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryDataCallback): Deleted.
2010         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmountCallback): Deleted.
2011         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback): Deleted.
2012         (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback): Deleted.
2013         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageErrorCallback): Deleted.
2014         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
2015         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
2016         (WebCore::WorkerThreadableWebSocketChannel::Peer::send):
2017         (WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount):
2018         (WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect):
2019         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage):
2020         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
2021         (WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
2022         (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
2023         (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
2024         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
2025         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
2026         (WebCore::WorkerThreadableWebSocketChannel::Bridge::connect):
2027         (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
2028         (WebCore::WorkerThreadableWebSocketChannel::Bridge::bufferedAmount):
2029         (WebCore::WorkerThreadableWebSocketChannel::Bridge::close):
2030         (WebCore::WorkerThreadableWebSocketChannel::Bridge::fail):
2031         (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
2032         (WebCore::WorkerThreadableWebSocketChannel::Bridge::suspend):
2033         (WebCore::WorkerThreadableWebSocketChannel::Bridge::resume):
2034         (WebCore::workerGlobalScopeDidSend): Deleted.
2035         (WebCore::workerGlobalScopeDidGetBufferedAmount): Deleted.
2036         (WebCore::workerGlobalScopeDidConnect): Deleted.
2037         (WebCore::workerGlobalScopeDidReceiveMessage): Deleted.
2038         (WebCore::workerGlobalScopeDidReceiveBinaryData): Deleted.
2039         (WebCore::workerGlobalScopeDidUpdateBufferedAmount): Deleted.
2040         (WebCore::workerGlobalScopeDidStartClosingHandshake): Deleted.
2041         (WebCore::workerGlobalScopeDidClose): Deleted.
2042         (WebCore::workerGlobalScopeDidReceiveMessageError): Deleted.
2043         (WebCore::WorkerThreadableWebSocketChannel::mainThreadConnect): Deleted.
2044         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSend): Deleted.
2045         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendArrayBuffer): Deleted.
2046         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendBlob): Deleted.
2047         (WebCore::WorkerThreadableWebSocketChannel::mainThreadBufferedAmount): Deleted.
2048         (WebCore::WorkerThreadableWebSocketChannel::mainThreadClose): Deleted.
2049         (WebCore::WorkerThreadableWebSocketChannel::mainThreadFail): Deleted.
2050         (WebCore::WorkerThreadableWebSocketChannel::mainThreadDestroy): Deleted.
2051         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSuspend): Deleted.
2052         (WebCore::WorkerThreadableWebSocketChannel::mainThreadResume): Deleted.
2053         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
2054
2055 2014-08-23  Yusuke Suzuki  <utatane.tea@gmail.com>
2056
2057         Clean up build warnings: control reaches end of non-void function
2058         https://bugs.webkit.org/show_bug.cgi?id=135889
2059
2060         Reviewed by Alexey Proskuryakov.
2061
2062         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
2063         (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
2064         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
2065         (WebCore::JSCryptoAlgorithmDictionary::createParametersForSign):
2066         (WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
2067         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest):
2068         (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey):
2069         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey):
2070         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits):
2071         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
2072         (WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey):
2073         * crypto/CryptoKey.cpp:
2074         (WebCore::CryptoKey::type):
2075
2076 2014-08-23  Zan Dobersek  <zdobersek@igalia.com>
2077
2078         [TexMap] Only notify of a required flush on the first layer property change
2079         https://bugs.webkit.org/show_bug.cgi?id=136104
2080
2081         Reviewed by Martin Robinson.
2082
2083         The GraphicsLayer's client should only be notified that a flush is required
2084         when the first change of one of the layer's properties is initiated, instead
2085         of requesting the flush on every such change.
2086
2087         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2088         (WebCore::GraphicsLayerTextureMapper::notifyChange):
2089
2090 2014-08-22  Dan Bernstein  <mitz@apple.com>
2091
2092         Try to fix the Mac build using the internal SDK.
2093
2094         * bindings/objc/PublicDOMInterfaces.h:
2095
2096 2014-08-22  Renato Nagy  <nagy.renato@stud.u-szeged.hu>
2097
2098         Remove LevelDB.
2099         https://bugs.webkit.org/show_bug.cgi?id=136170
2100
2101         Reviewed by Gyuyoung Kim.
2102
2103         * CMakeLists.txt:
2104         * Modules/indexeddb/IDBObjectStore.cpp:
2105         (WebCore::IDBObjectStore::createIndex):
2106         * Modules/indexeddb/IDBTransactionCoordinator.cpp:
2107         (WebCore::IDBTransactionCoordinator::canRunTransaction):
2108         (WebCore::doScopesOverlap): Deleted.
2109         * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.cpp: Removed.
2110         * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.h: Removed.
2111         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp: Removed.
2112         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h: Removed.
2113         * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.cpp: Removed.
2114         * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h: Removed.
2115         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp: Removed.
2116         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h: Removed.
2117         * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.cpp: Removed.
2118         * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.h: Removed.
2119         * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp: Removed.
2120         * Modules/indexeddb/leveldb/IDBLevelDBCoding.h: Removed.
2121         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp: Removed.
2122         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h: Removed.
2123         * WebCore.vcxproj/WebCore.vcxproj:
2124         * WebCore.vcxproj/WebCore.vcxproj.filters:
2125         * WebCore.xcodeproj/project.pbxproj:
2126         * platform/DatabaseStrategy.cpp:
2127         (WebCore::DatabaseStrategy::createIDBFactoryBackend):
2128         * platform/leveldb/LevelDBComparator.h: Removed.
2129         * platform/leveldb/LevelDBDatabase.cpp: Removed.
2130         * platform/leveldb/LevelDBDatabase.h: Removed.
2131         * platform/leveldb/LevelDBIterator.h: Removed.
2132         * platform/leveldb/LevelDBSlice.h: Removed.
2133         * platform/leveldb/LevelDBTransaction.cpp: Removed.
2134         * platform/leveldb/LevelDBTransaction.h: Removed.
2135         * platform/leveldb/LevelDBWriteBatch.cpp: Removed.
2136         * platform/leveldb/LevelDBWriteBatch.h: Removed.
2137
2138 2014-08-22  KwangHyuk Kim  <hyuki.kim@samsung.com>
2139
2140         [EFL] Fix build break caused by ENABLE_GAMEPAD_DEPRECATED.
2141         https://bugs.webkit.org/show_bug.cgi?id=136110
2142
2143         Reviewed by Gyuyoung Kim.
2144
2145         WebCore_INCLUDE_DIRECTORY for gamepad was removed from WK2 Efl in order to fix build break when ENABLE_GAMEPAD_DEPRECATED is on.
2146
2147         No new tests because no functional changes.
2148
2149         * PlatformEfl.cmake:
2150
2151 2014-08-22  Benjamin Poulain  <benjamin@webkit.org>
2152
2153         Style invalidation does not work for adjacent node updates
2154         https://bugs.webkit.org/show_bug.cgi?id=136145
2155
2156         Reviewed by Antti Koivisto.
2157
2158         There were a bunch of cases in which the style would be in an inconsistent
2159         state until the style resolver kicks in for the entire document.
2160
2161         For example, let's take the selector "foo.bar + target". When the class "bar"
2162         changes, the element foo is invalidated. The element target is untouched.
2163
2164         Now, if the style of "target" is accessed, nodeOrItsAncestorNeedsStyleRecalc()
2165         returns false and the old style is accessed.
2166
2167         At some point, when the style of the entire document is resolved, the node
2168         "foo" is styled, and "target" is invalidated.
2169
2170
2171         To fix the issue, this patch adds an extra flag keeping track of subtrees that
2172         have any node needing style recalc: DirectChildNeedsStyleRecalcFlag.
2173
2174         When invalidating the node "foo", its parent is marked with
2175         DirectChildNeedsStyleRecalcFlag to note that one of the child nodes has an invalid style.
2176
2177         When verifying the style state in nodeOrItsAncestorNeedsStyleRecalc(), we check that flag
2178         in addition to the siblings dependencies to find if the node is part of a subtree that may
2179         be invalid due to sibling selectors.
2180
2181         Similarly, in the style resolver, we use the flag to clear the style on all elements
2182         that could potentially be invalid.
2183
2184
2185         This patch removes the changes introduced by r172721
2186         (The style is not updated correctly when the pseudo class :empty is applied on anything but the rightmost element).
2187         That bug was just a special case of what is solved here.
2188
2189
2190         Tests: fast/selectors/attribute-direct-adjacent-style-update.html
2191                fast/selectors/attribute-sibling-style-update.html
2192                fast/selectors/class-direct-adjacent-style-update.html
2193                fast/selectors/class-sibling-style-update.html
2194                fast/selectors/first-child-direct-adjacent-style-update.html
2195                fast/selectors/first-child-sibling-style-update.html
2196
2197         * css/SelectorChecker.cpp:
2198         (WebCore::SelectorChecker::checkOne):
2199         * cssjit/SelectorCompiler.cpp:
2200         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsEmpty):
2201         (WebCore::SelectorCompiler::setStyleOfSiblingsAffectedByEmpty): Deleted.
2202         * dom/ContainerNode.h:
2203         (WebCore::ContainerNode::directChildNeedsStyleRecalc):
2204         (WebCore::ContainerNode::setDirectChildNeedsStyleRecalc):
2205         Remove the special case for :empty.
2206
2207         * dom/Document.cpp:
2208         (WebCore::nodeOrItsAncestorNeedsStyleRecalc):
2209         * dom/Element.cpp:
2210         (WebCore::checkForEmptyStyleChange):
2211         (WebCore::checkForSiblingStyleChanges):
2212         (WebCore::Element::setStyleOfSiblingsAffectedByEmpty): Deleted.
2213         (WebCore::Element::rareDataStyleOfSiblingsAffectedByEmpty): Deleted.
2214         * dom/Element.h:
2215         (WebCore::Element::styleOfSiblingsAffectedByEmpty): Deleted.
2216         * dom/ElementRareData.h:
2217         (WebCore::ElementRareData::ElementRareData):
2218         (WebCore::ElementRareData::styleOfSiblingsAffectedByEmpty): Deleted.
2219         (WebCore::ElementRareData::setStyleOfSiblingsAffectedByEmpty): Deleted.
2220         * dom/Node.cpp:
2221         (WebCore::markAncestorsWithChildNeedsStyleRecalc):
2222         (WebCore::Node::setNeedsStyleRecalc):
2223         (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc): Deleted.
2224         * dom/Node.h:
2225         (WebCore::Node::clearChildNeedsStyleRecalc):
2226         * style/StyleResolveTree.cpp:
2227         (WebCore::Style::resetStyleForNonRenderedDescendants):
2228
2229 2014-08-22  Joseph Pecoraro  <pecoraro@apple.com>
2230
2231         Remove unused legacy InspectorFrontendHost methods
2232         https://bugs.webkit.org/show_bug.cgi?id=136186
2233
2234         Reviewed by Andreas Kling.
2235
2236         * bindings/js/JSInspectorFrontendHostCustom.cpp:
2237         (WebCore::JSInspectorFrontendHost::recordActionTaken): Deleted.
2238         (WebCore::JSInspectorFrontendHost::recordPanelShown): Deleted.
2239         (WebCore::JSInspectorFrontendHost::recordSettingChanged): Deleted.
2240         * inspector/InspectorFrontendHost.idl:
2241
2242 2014-08-22  Joseph Pecoraro  <pecoraro@apple.com>
2243
2244         Remove unnecessary WTFString creation in Dictionary getter
2245         https://bugs.webkit.org/show_bug.cgi?id=136184
2246
2247         Reviewed by Benjamin Poulain.
2248
2249         * bindings/js/Dictionary.cpp:
2250         (WebCore::Dictionary::getWithUndefinedOrNullCheck):
2251         * bindings/js/Dictionary.h:
2252         * bindings/js/JSDictionary.cpp:
2253         (WebCore::JSDictionary::getWithUndefinedOrNullCheck):
2254         * bindings/js/JSDictionary.h:
2255
2256 2014-08-22  Commit Queue  <commit-queue@webkit.org>
2257
2258         Unreviewed, rolling out r172866.
2259         https://bugs.webkit.org/show_bug.cgi?id=136177
2260
2261         Broke iOS build (Requested by othermaciej on #webkit).
2262
2263         Reverted changeset:
2264
2265         "Replace use of WKCopyCFLocalizationPreferredName with
2266         NSLocale public API"
2267         https://bugs.webkit.org/show_bug.cgi?id=136082
2268         http://trac.webkit.org/changeset/172866
2269
2270 2014-08-22  David Hyatt  <hyatt@apple.com>
2271
2272         Add proper support for letter-spacing to bopomofo Ruby
2273         https://bugs.webkit.org/show_bug.cgi?id=136171
2274
2275         Reviewed by Sam Weinig.
2276
2277         Added fast/ruby/bopomofo-letter-spacing.html
2278
2279         * rendering/RenderRubyRun.cpp:
2280         (WebCore::RenderRubyRun::layout):
2281         Alter the layout of bopomofo ruby so that the distance between the base characters is the max of
2282         the letter-spacing between the characters and the minimum required width to hold two rows of
2283         Ruby.
2284
2285         Push the bopomofo ruby into the letter-spacing to ensure that it comes right after the base character
2286         and not after all the letter-spacing.
2287
2288 2014-08-22  Simon Fraser  <simon.fraser@apple.com>
2289
2290         Fix showing paint rects when selecting lines in the timeline
2291         https://bugs.webkit.org/show_bug.cgi?id=136173
2292
2293         Reviewed by Joseph Pecoraro.
2294
2295         Fix the condition used to decide when to show the overlay.
2296
2297         * inspector/InspectorOverlay.cpp:
2298         (WebCore::InspectorOverlay::shouldShowOverlay):
2299
2300 2014-08-22  Simon Fraser  <simon.fraser@apple.com>
2301
2302         Use the correct rect for paint flashing
2303         https://bugs.webkit.org/show_bug.cgi?id=136169
2304
2305         Reviewed by Sam Weinig.
2306
2307         Use the rect we've converted to root document coordinates for paint flashing.
2308
2309         * inspector/InspectorPageAgent.cpp:
2310         (WebCore::InspectorPageAgent::didPaint):
2311
2312 2014-08-22  Dean Jackson  <dino@apple.com>
2313
2314         Google Canvas2D maps are too slow and uncontrollable with Safari with full screen mode
2315         https://bugs.webkit.org/show_bug.cgi?id=136168
2316
2317         Reviewed by Tim Horton.
2318
2319         When Google maps are using their 2D "lite" fallback and you're drawing in a huge
2320         window such as fullscreen 4K, we would drop back to unaccelerated mode, thinking
2321         that we'd exceeded the maximum IOSurface size.
2322
2323         Remove the hardcoded limit on IOSurface sizes, and instead ask the system
2324         what it believe the maximum to be. This was significantly higher than our
2325         limit on the systems I tested.
2326
2327         * platform/graphics/cg/ImageBufferCG.cpp:
2328         (WebCore::ImageBuffer::ImageBuffer): Include our IOSurface wrapper, which
2329         has a query for maximum size, and use that instead.
2330
2331 2014-08-22  Simon Fraser  <simon.fraser@apple.com>
2332
2333         Maybe fix Windows.
2334
2335         * inspector/InspectorOverlay.cpp:
2336         (WebCore::InspectorOverlay::showPaintRect):
2337
2338 2014-08-22  Simon Fraser  <simon.fraser@apple.com>
2339
2340         Implement paint flashing in the WK1 InspectorOverlay page
2341         https://bugs.webkit.org/show_bug.cgi?id=136138
2342
2343         Reviewed by Sam Weinig, Joseph Pecoraro.
2344
2345         Implement paint flashing for the WebKit1 InspectorOverlay via a second canvas in the overlay page.
2346         We avoid allocating backing store for this canvas until we have paint rects.
2347         
2348         Because this overlay page is weird and doesn't know how to paint itself, InspectorOverlay manages
2349         an array of rects, and pushes them to the page when they change, before forcing a paint.
2350         
2351         Because iOS doesn't use the InspectorOverlay page, stub out setShowPaintRects on its
2352         WebKit WebInspectorClient, but don't yet implement paint flashing there.
2353
2354         * inspector/InspectorOverlay.cpp:
2355         (WebCore::InspectorOverlay::InspectorOverlay):
2356         (WebCore::InspectorOverlay::shouldShowOverlay):
2357         (WebCore::InspectorOverlay::update):
2358         (WebCore::buildObjectForRect):
2359         (WebCore::InspectorOverlay::setShowingPaintRects):
2360         (WebCore::InspectorOverlay::showPaintRect):
2361         (WebCore::InspectorOverlay::updatePaintRectsTimerFired):
2362         (WebCore::InspectorOverlay::drawPaintRects):
2363         (WebCore::InspectorOverlay::forcePaint):
2364         (WebCore::quadToPath): Deleted.
2365         (WebCore::drawOutlinedQuad): Deleted.
2366         (WebCore::InspectorOverlay::drawOutline): Deleted.
2367         * inspector/InspectorOverlay.h:
2368         * inspector/InspectorOverlayPage.html:
2369         * inspector/InspectorOverlayPage.js:
2370         (updatePaintRects):
2371         (reset):
2372         (_drawShapeHighlight):
2373         * inspector/InspectorPageAgent.cpp:
2374         (WebCore::InspectorPageAgent::setShowPaintRects):
2375         (WebCore::InspectorPageAgent::didPaint):
2376
2377 2014-08-22  Eric Carlson  <eric.carlson@apple.com>
2378
2379         [iOS] Cleanup media code
2380         https://bugs.webkit.org/show_bug.cgi?id=136163
2381
2382         Reviewed by Jer Noble.
2383
2384         No new tests, no functionality was changed.
2385
2386         * html/HTMLMediaElement.cpp:
2387         (WebCore::HTMLMediaElement::HTMLMediaElement): Don't initialize m_requestingPlay.
2388         (WebCore::HTMLMediaElement::parseMediaPlayerAttribute): Deleted.
2389         (WebCore::HTMLMediaElement::parseAttribute): Don't call parseMediaPlayerAttribute.
2390         (WebCore::HTMLMediaElement::playInternal): m_requestingPlay is dead, Jim.
2391         (WebCore::HTMLMediaElement::updatePlayState): Ditto.
2392         (WebCore::HTMLMediaElement::updatePlayState): Remove obsolete FIXME.
2393         * html/HTMLMediaElement.h:
2394         * platform/graphics/MediaPlayer.cpp:
2395         (WebCore::MediaPlayer::attributeChanged): Deleted.
2396         (WebCore::MediaPlayer::readyForPlayback): Deleted.
2397         * platform/graphics/MediaPlayer.h:
2398         * platform/graphics/MediaPlayerPrivate.h:
2399         (WebCore::MediaPlayerPrivateInterface::attributeChanged): Deleted.
2400         (WebCore::MediaPlayerPrivateInterface::readyForPlayback): Deleted.
2401
2402 2014-08-20  Maciej Stachowiak  <mjs@apple.com>
2403
2404         Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API
2405         https://bugs.webkit.org/show_bug.cgi?id=136082
2406
2407         Reviewed by Alexey Proskuryakov.
2408
2409         * platform/mac/Language.mm:
2410         (WebCore::httpStyleLanguageCode): Replace use of WKCopyCFLocalizationPreferredName
2411         with new WebCoreNSStringExtras helper.
2412         * platform/mac/WebCoreNSStringExtras.mm: Replacements for the aspects of
2413         WKCopyCFLocalizationPreferredName.
2414         (preferredBundleLocalizationName): New helper - most preferred localization available
2415         in the main bundle, canonicalized the way we like it.
2416         (canonicalLocalizationName): Convert a lcalization name to a string with language and
2417         country code, using default if necessary (e.g. "en" maps to "en_US").
2418         * WebCore.order: Remove mention of WKCopyCFLocalizationPreferredName.
2419         * WebCore.exp.in: ditto; also export preferredBundleLocalizationName for WebKit(2).
2420         * platform/ios/WebCoreSystemInterfaceIOS.mm: ditto
2421         * platform/mac/WebCoreSystemInterface.h: ditto
2422         * platform/mac/WebCoreSystemInterface.mm: ditto
2423
2424 2014-08-22  Daniel Bates  <dabates@apple.com>
2425
2426         [iOS] Disable ENABLE_IOS_{GESTURE, TOUCH}_EVENTS, and temporarily disable ENABLE_TOUCH_EVENTS
2427         and ENABLE_XSLT when building with the iOS public SDK
2428         https://bugs.webkit.org/show_bug.cgi?id=135945
2429
2430         Reviewed by Andy Estes.
2431
2432         Towards bringing up the iOS WebKit port using the iOS public SDK, disable the proprietary
2433         iOS gesture and touch event code. For now we also temporarily disable ENABLE_TOUCH_EVENTS
2434         and ENABLE_XSLT while we focus to get the rest of the port built using the public SDK. We'll
2435         look to enable these features once we stabilize the build.
2436
2437         * Configurations/FeatureDefines.xcconfig: Disable ENABLE_IOS_{GESTURE, TOUCH}_EVENTS, ENABLE_TOUCH_EVENTS
2438         and ENABLE_XSLT when building with the public SDK.
2439         * Configurations/WebCore.xcconfig:
2440         * DerivedSources.make: Conditionally generate derived sources for touch and gesture events as applicable and pass
2441         define WTF_USE_APPLE_INTERNAL_SDK when generating bindings (if applicable). Make the logic for determining
2442         whether WTF_PLATFORM_IOS is defined consistent with logic for determining whether WTF_USE_APPLE_INTERNAL_SDK and
2443         ENABLE_ORIENTATION_EVENTS are defined. We should look to further cleanup this code.
2444         * bindings/js/ios/TouchConstructors.cpp: Substitute ENABLE(IOS_TOUCH_EVENTS) for macro expression "PLATFORM(IOS) && ENABLE(TOUCH_EVENTS)".
2445         * bindings/objc/DOMEvents.h: Write preprocessor logic in terms of ENABLE_TOUCH_EVENTS and ENABLE_IOS_GESTURE_EVENTS.
2446         * bindings/objc/PublicDOMInterfaces.h: Include private header <WebKitAdditions/PublicDOMInterfacesIOS.h> when
2447         it exists as opposed to assuming it exists when building for iOS.
2448         * dom/Document.cpp:
2449         (WebCore::Document::Document): Substitute ENABLE(IOS_TOUCH_EVENTS) for macro expression "ENABLE(TOUCH_EVENTS) && PLATFORM(IOS)".
2450         (WebCore::Document::prepareForDestruction): Ditto.
2451         (WebCore::Document::removeAllEventListeners): Ditto.
2452         * dom/Document.h: Write preprocessor logic in terms of ENABLE_IOS_TOUCH_EVENTS and ENABLE_TOUCH_EVENTS.
2453         * dom/Document.idl: Ditto.
2454         * dom/Touch.h: Substitute ENABLE(IOS_TOUCH_EVENTS) for PLATFORM(IOS)..
2455         * dom/TouchEvent.h: Ditto.
2456         * dom/TouchList.h: Ditto.
2457         * dom/ios/TouchEvents.cpp: Substitute ENABLE(IOS_TOUCH_EVENTS) for macro expression "PLATFORM(IOS) && ENABLE(TOUCH_EVENTS)".
2458         * history/CachedFrame.cpp: Add PLATFORM(IOS) guard.
2459         * html/shadow/SliderThumbElement.cpp:
2460         (WebCore::SliderThumbElement::SliderThumbElement): Substitute ENABLE(IOS_TOUCH_EVENTS) for ENABLE(TOUCH_EVENTS).
2461         (WebCore::SliderThumbElement::willDetachRenderers): Ditto.
2462         * html/shadow/SliderThumbElement.h: Ditto.
2463         * loader/EmptyClients.h: Ditto.
2464         * platform/ios/PlatformEventFactoryIOS.h: Write preprocessor logic in terms of ENABLE_IOS_TOUCH_EVENTS and ENABLE_TOUCH_EVENTS.
2465         Only include header <WebKitAdditions/PlatformTouchEventIOS.h> when building with ENABLE_TOUCH_EVENTS enabled.
2466
2467 2014-08-22  Simon Fraser  <simon.fraser@apple.com>
2468
2469         Implement paint flashing via GraphicsLayers in the WK2 inspector overlay
2470         https://bugs.webkit.org/show_bug.cgi?id=136136
2471
2472         Reviewed by Sam Weinig, Joseph Pecoraro.
2473
2474         Allow InspectorClient to have a custom implementation of showPaintRect(). For
2475         WebKit2's WebInspectorClient, implement this by creating a set of GraphicsLayers
2476         which are parented in a document overlay, with 0.25s fade-out animations.
2477         
2478         Also change InspectorInstrumentation::didPaintImpl() to no longer take a GraphicsContext;
2479         it makes no sense to paint the paint rects directly into the context of the web page.
2480         Now that the paint rects are painted into an overlay, the rectangles need to be converted
2481         to root document coordinates, which is done in InspectorInstrumentation::didPaintImpl().
2482         
2483         Remove the generic InspectorOverlay::drawOutline()-based indicators; they will
2484         be reimplemented in a later patch.
2485
2486         * WebCore.exp.in:
2487         * inspector/InspectorClient.h:
2488         (WebCore::InspectorClient::showPaintRect):
2489         * inspector/InspectorInstrumentation.cpp:
2490         (WebCore::InspectorInstrumentation::didPaintImpl):
2491         * inspector/InspectorInstrumentation.h:
2492         (WebCore::InspectorInstrumentation::didPaint):
2493         * inspector/InspectorPageAgent.cpp:
2494         (WebCore::InspectorPageAgent::didPaint):
2495         * inspector/InspectorPageAgent.h:
2496         * page/FrameView.cpp:
2497         (WebCore::FrameView::didPaintContents):
2498         * rendering/RenderLayerBacking.cpp:
2499         (WebCore::RenderLayerBacking::paintContents):
2500
2501 2014-08-22  Commit Queue  <commit-queue@webkit.org>
2502
2503         Unreviewed, rolling out r172844.
2504         https://bugs.webkit.org/show_bug.cgi?id=136164
2505
2506         re-applying WEBCORE_EXPORTS patch (Requested by
2507         alexchristensen on #webkit).
2508
2509         Reverted changeset:
2510
2511         "Revert r172831, it broke the Windows build."
2512         http://trac.webkit.org/changeset/172844
2513
2514 2014-08-21  David Hyatt  <hyatt@apple.com>
2515
2516         Implement rudimentary Bopomofo Ruby support (ruby-position:inter-character)
2517         https://bugs.webkit.org/show_bug.cgi?id=136137
2518         <rdar://problem/12567545>
2519
2520         Reviewed by Sam Weinig.
2521
2522         Added fast/ruby/bopomofo.html and fast/ruby/bopomofo-rl.html.
2523
2524         * css/CSSParser.cpp:
2525         (WebCore::isValidKeywordPropertyAndValue):
2526         * css/CSSPrimitiveValueMappings.h:
2527         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2528         (WebCore::CSSPrimitiveValue::operator RubyPosition):
2529         * css/CSSPropertyNames.in:
2530         * css/CSSValueKeywords.in:
2531         Add support for the new inter-character value for ruby-position and also
2532         add support for a new font-size keyword, -webkit-ruby-text, that is used
2533         to set a smart initial font size based off the type of ruby being presented.
2534
2535         * css/DeprecatedStyleBuilder.cpp:
2536         (WebCore::ApplyPropertyFontSize::determineRubyTextSizeMultiplier):
2537         (WebCore::ApplyPropertyFontSize::applyValue):
2538         Determine the Ruby text size multiplier when -webkit-ruby-text is specified
2539         as the font size. For ruby-position of before/after, we use 50% of the parent
2540         font size. For inter-character ruby, we default to 25% instead. If inter-character
2541         Ruby is nested, we assume it's to display tone marks, and we use 100% to ensure
2542         the tone mark is the same size and does not get smaller.
2543
2544         * css/StyleResolver.cpp:
2545         (WebCore::StyleResolver::adjustStyleForInterCharacterRuby):
2546         (WebCore::StyleResolver::applyMatchedProperties):
2547         * css/StyleResolver.h:
2548         ruby-position is now the highest priority CSS property, and it is resolved
2549         before all other properties to ensure that its value can be checked when
2550         determining a smart default font size. adjustStyleForInterCharacterRuby is a new
2551         function called to auto-adjust inter-character ruby text to be vertical writing mode when
2552         encountered inside horizontal documents.
2553
2554         * css/html.css:
2555         (ruby > rt):
2556         Change the font-size from 50% to -webkit-ruby-text to allow us to customize it as
2557         needed depending on what kind of Ruby we want to show.
2558
2559         * rendering/RenderRubyRun.cpp:
2560         (WebCore::RenderRubyRun::layout):
2561         * rendering/RenderRubyRun.h:
2562         Add layout code to properly position vertical ruby text relative to a horizontal base.
2563
2564         * rendering/style/RenderStyleConstants.h:
2565         Add the new inter-character constant for ruby-position.
2566
2567         * rendering/style/StyleRareInheritedData.h:
2568         Increase the number of storage bits for RubyPosition from 1 to 2 now that we support 3 values.
2569
2570 2014-08-22  Jon Lee  <jonlee@apple.com>
2571
2572         Fix iOS build due to r172832 and move RUBBER_BANDING out of FeatureDefines.h
2573         https://bugs.webkit.org/show_bug.cgi?id=136157
2574
2575         Reviewed by Simon Fraser.
2576
2577         * Configurations/FeatureDefines.xcconfig: Add ENABLE(RUBBER_BANDING).
2578
2579 2014-08-22  Iago Toral  <itoral@igalia.com> and Zan Dobersek  <zdobersek@igalia.com>
2580
2581         [GTK] Add the Wayland protocol extension
2582         https://bugs.webkit.org/show_bug.cgi?id=136102
2583
2584         Reviewed by Martin Robinson.
2585
2586         Add the Wayland protocol extension that allows mapping GtkWidget
2587         objects (via an ID that's unique to that GtkWidget) to the
2588         corresponding Wayland surface objects. This way the nested
2589         compositor has the proper information about what GtkWidget has
2590         to be updated when surfaces are committed by the LayerTreeHost.
2591
2592         * PlatformGTK.cmake:
2593         * platform/graphics/wayland: Added.
2594         * platform/graphics/wayland/WebKitGtkWaylandClientProtocol.xml: Added.
2595
2596 2014-08-21  Antti Koivisto  <antti@apple.com>
2597
2598         Animated GIFs scrolled out of view still cause titlebar blur to update, on tumblr.com page
2599         https://bugs.webkit.org/show_bug.cgi?id=136139
2600
2601         Reviewed by Simon Fraser.
2602
2603         The mechanism for pausing GIF images outside the viewport did not work for subframes.
2604
2605         Test: fast/repaint/no-animation-outside-viewport-subframe.html
2606
2607         * WebCore.exp.in:
2608         * page/FrameView.cpp:
2609         (WebCore::FrameView::scrollPositionChanged):
2610         (WebCore::FrameView::resumeVisibleImageAnimationsIncludingSubframes):
2611
2612             Add a function for resuming animations as needed in all subframes.
2613             This is used after scrolling instead of calling the RenderView function directly.
2614
2615         * page/FrameView.h:
2616         * page/Page.cpp:
2617         (WebCore::Page::resumeAnimatingImages):
2618         * rendering/RenderElement.cpp:
2619         (WebCore::RenderElement::newImageAnimationFrameAvailable):
2620
2621             Determine the overall visible rect so that it is correct in subframes too.
2622
2623         * rendering/RenderLayer.cpp:
2624         (WebCore::RenderLayer::scrollTo):
2625         * rendering/RenderView.cpp:
2626         (WebCore::RenderView::resumePausedImageAnimationsIfNeeded):
2627
2628 2014-08-21  Alex Christensen  <achristensen@webkit.org>
2629
2630         More WEBCORE_EXPORT macros!
2631         https://bugs.webkit.org/show_bug.cgi?id=136146
2632
2633         Reviewed by Benjamin Poulain.
2634
2635         * Modules/geolocation/GeolocationClient.h:
2636         * Modules/mediastream/UserMediaClient.h:
2637         * Modules/mediastream/UserMediaRequest.h:
2638         * Modules/notifications/NotificationClient.h:
2639         * Modules/speech/SpeechSynthesis.h:
2640         * bindings/generic/RuntimeEnabledFeatures.h:
2641         * bindings/js/DOMWrapperWorld.h:
2642         * bindings/js/GCController.h:
2643         * bindings/js/IDBBindingUtilities.h:
2644         * bindings/js/JSDOMBinding.h:
2645         * bindings/js/JSNodeCustom.h:
2646         * bindings/js/JSNodeListCustom.h:
2647         * bindings/js/JSPluginElementFunctions.h:
2648         * bindings/js/ScriptController.h:
2649         * bindings/js/SerializedScriptValue.h:
2650         * crypto/SerializedCryptoKeyWrap.h:
2651         * css/LengthFunctions.h:
2652         * css/StyleProperties.h:
2653         * css/StyleSheetContents.h:
2654         * dom/DeviceOrientationClient.h:
2655         * dom/Range.h:
2656         * dom/ScriptExecutionContext.h:
2657         * dom/StyledElement.h:
2658         * dom/TreeScope.h:
2659         * dom/UIEventWithKeyState.h:
2660         * dom/UserGestureIndicator.h:
2661         * dom/UserTypingGestureIndicator.h:
2662         * dom/ViewportArguments.h:
2663         * editing/SmartReplace.h:
2664         * editing/TextIterator.h:
2665         * editing/VisiblePosition.h:
2666         * editing/VisibleSelection.h:
2667         * editing/VisibleUnits.h:
2668         * editing/cocoa/HTMLConverter.h:
2669         * editing/htmlediting.h:
2670         * editing/mac/TextAlternativeWithRange.h:
2671         * editing/mac/TextUndoInsertionMarkupMac.h:
2672         * editing/markup.h:
2673         * history/HistoryItem.cpp:
2674         * history/PageCache.h:
2675         * html/TimeRanges.h:
2676         * html/parser/HTMLParserIdioms.h:
2677         * inspector/InstrumentingAgents.h:
2678         * loader/FrameLoader.h:
2679         * loader/ResourceBuffer.h:
2680         * loader/ResourceLoadScheduler.h:
2681         * loader/ResourceLoader.h:
2682         (WebCore::ResourceLoader::originalRequest):
2683         * loader/SubframeLoader.h:
2684         * loader/SubresourceLoader.h:
2685         * loader/TextResourceDecoder.h:
2686         * loader/appcache/ApplicationCacheStorage.h:
2687         * loader/cache/MemoryCache.h:
2688         * loader/icon/IconDatabaseBase.h:
2689         * loader/ios/DiskImageCacheIOS.h:
2690         * page/Chrome.h:
2691         * page/SecurityOrigin.h:
2692         * page/SecurityPolicy.h:
2693         * page/Settings.h:
2694         * page/UserContentController.h:
2695         * page/UserContentURLPattern.h:
2696         * page/UserMessageHandlerDescriptor.h:
2697         * page/ViewportConfiguration.h:
2698         * page/VisitedLinkStore.h:
2699         * page/WheelEventDeltaTracker.h:
2700         * page/cocoa/UserAgent.h:
2701         * page/scrolling/ScrollingConstraints.h:
2702         * page/scrolling/ScrollingCoordinator.h:
2703         * page/scrolling/ScrollingStateFixedNode.h:
2704         * page/scrolling/ScrollingStateFrameScrollingNode.h:
2705         * page/scrolling/ScrollingStateNode.h:
2706         * page/scrolling/ScrollingStateOverflowScrollingNode.h:
2707         * page/scrolling/ScrollingStateScrollingNode.h:
2708         * page/scrolling/ScrollingStateStickyNode.h:
2709         * page/scrolling/ScrollingStateTree.h:
2710         * page/scrolling/ScrollingThread.h:
2711         * page/scrolling/ScrollingTree.h:
2712         * page/scrolling/ScrollingTreeOverflowScrollingNode.h:
2713         * page/scrolling/ScrollingTreeScrollingNode.h:
2714         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
2715         * page/scrolling/mac/ScrollingTreeFixedNode.h:
2716         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
2717         * page/scrolling/mac/ScrollingTreeStickyNode.h:
2718         * platform/Cursor.h:
2719         * platform/DragImage.h:
2720         * platform/FileSystem.h:
2721         * platform/Language.h:
2722         * platform/LinkHash.h:
2723         * platform/LocalizedStrings.h:
2724         * platform/Logging.h:
2725         * platform/MemoryPressureHandler.h:
2726         * platform/NotImplemented.h:
2727         * platform/PlatformStrategies.h:
2728         * platform/PublicSuffix.h:
2729         * platform/RuntimeApplicationChecks.h:
2730         * platform/RuntimeApplicationChecksIOS.h:
2731         * platform/SchemeRegistry.h:
2732         * platform/ScrollView.h:
2733         * platform/ScrollableArea.h:
2734         * platform/Scrollbar.h:
2735         * platform/ScrollbarTheme.h:
2736         * platform/SharedBuffer.h:
2737         * platform/ThreadCheck.h:
2738         * platform/ThreadGlobalData.h:
2739         * platform/Timer.h:
2740         * platform/URL.h:
2741         * platform/UUID.h:
2742         * platform/UserActivity.h:
2743         * platform/Widget.h:
2744         * platform/cf/CFURLExtras.h:
2745         * platform/cf/RunLoopObserver.h:
2746         * platform/cocoa/SystemVersion.h:
2747         * platform/graphics/Color.h:
2748         * platform/graphics/FloatRect.h:
2749         * platform/graphics/FontCache.h:
2750         * platform/graphics/GeometryUtilities.h:
2751         * platform/graphics/GraphicsContext.h:
2752         * platform/graphics/IntRect.h:
2753         * platform/graphics/LayoutRect.h:
2754         * platform/graphics/StringTruncator.h:
2755         * platform/graphics/TextRun.h:
2756         * platform/graphics/ca/TileController.h:
2757         * platform/graphics/ca/mac/PlatformCAAnimationMac.h:
2758         * platform/graphics/cg/GraphicsContextCG.h:
2759         * platform/graphics/mac/ColorMac.h:
2760         * platform/graphics/transforms/TransformationMatrix.h:
2761         * platform/ios/FileSystemIOS.h:
2762         * platform/ios/PlatformEventFactoryIOS.h:
2763         * platform/ios/SelectionRect.h:
2764         * platform/ios/SystemMemory.h:
2765         * platform/ios/TileControllerMemoryHandlerIOS.h:
2766         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2767         * platform/mac/PlatformEventFactoryMac.h:
2768         * platform/mac/ScrollbarThemeMac.h:
2769         * platform/mac/WebCoreNSURLExtras.h:
2770         * platform/mac/WebNSAttributedStringExtras.h:
2771         * platform/network/BlobRegistry.h:
2772         * platform/network/CookieStorage.h:
2773         * platform/network/DNS.h:
2774         * platform/network/NetworkStateNotifier.h:
2775         * platform/network/PlatformCookieJar.h:
2776         * platform/network/ProxyServer.h:
2777         * platform/network/ResourceErrorBase.h:
2778         * platform/network/ResourceHandle.h:
2779         * platform/network/ResourceHandleClient.h:
2780         * platform/network/ResourceRequestBase.h:
2781         * platform/network/ResourceResponseBase.h:
2782         * platform/network/SynchronousLoaderClient.h:
2783         * platform/network/cf/ResourceError.h:
2784         * platform/network/cf/ResourceRequest.h:
2785         * platform/network/cf/ResourceResponse.h:
2786         * platform/network/ios/QuickLook.h:
2787         * platform/network/mac/AuthenticationMac.h:
2788         * platform/sql/SQLiteDatabase.cpp:
2789         * platform/text/LocaleToScriptMapping.h:
2790         * platform/text/TextBreakIterator.h:
2791         * platform/text/TextEncoding.h:
2792         (WebCore::TextEncoding::decode):
2793         * platform/text/TextEncodingRegistry.h:
2794         * platform/text/TextStream.h:
2795         * rendering/RenderBlock.h:
2796         * rendering/RenderBox.h:
2797         * rendering/RenderEmbeddedObject.h:
2798         * rendering/RenderLayer.h:
2799         * rendering/RenderLayerBacking.h:
2800         * rendering/RenderLayerCompositor.h:
2801         * rendering/RenderListItem.h:
2802         * rendering/RenderObject.h:
2803         * rendering/RenderText.h:
2804         * rendering/RenderTextControl.h:
2805         * rendering/RenderThemeIOS.h:
2806         * rendering/RenderTreeAsText.h:
2807         * rendering/RenderView.h:
2808         * rendering/RenderWidget.h:
2809         * rendering/ScrollBehavior.cpp:
2810         * rendering/break_lines.cpp:
2811         * rendering/style/RenderStyle.h:
2812         * replay/UserInputBridge.h:
2813         * storage/StorageEventDispatcher.h:
2814         * storage/StorageMap.h:
2815         * storage/StorageStrategy.h:
2816         * storage/StorageTracker.h:
2817         * testing/Internals.h:
2818         * workers/WorkerThread.h:
2819         Added more WEBCORE_EXPORT macros where needed.
2820
2821 2014-08-21  Tim Horton  <timothy_horton@apple.com>
2822
2823         Revert r172831, it broke the Windows build.
2824
2825 2014-08-21  Ryuan Choi  <ryuan.choi@samsung.com>
2826
2827         Unreviewed build fix when RUBBER_BANDING is not enabled.
2828
2829         * rendering/RenderLayer.cpp:
2830         (WebCore::RenderLayer::overhangAmount):
2831         (WebCore::RenderLayer::setHasHorizontalScrollbar):
2832         (WebCore::RenderLayer::setHasVerticalScrollbar):
2833
2834 2014-08-21  Brent Fulgham  <bfulgham@apple.com>
2835
2836         [Win] WebCore.proj is not copying WebKit resource files.
2837         https://bugs.webkit.org/show_bug.cgi?id=136142
2838         <rdar://problem/17733682>
2839
2840         Reviewed by Tim Horton.
2841
2842         * WebCore.vcxproj/WebCore.proj: Copy missing resource files during
2843         post-build step.
2844
2845 2014-08-21  Simon Fraser  <simon.fraser@apple.com>
2846
2847         Try to fix the 32-bit build by using wildcards in the exported non-virtual thunks
2848         for GraphicsLayerCA::platformCALayerAnimationStarted and GraphicsLayerCA::platformCALayerAnimationEnded.
2849
2850         * WebCore.exp.in:
2851
2852 2014-08-21  Simon Fraser  <simon.fraser@apple.com>
2853
2854         Add animationDidEnd callbacks on GraphicsLayer
2855         https://bugs.webkit.org/show_bug.cgi?id=136084
2856
2857         Reviewed by Tim Horton.
2858
2859         Hook up GraphicsLayerClient::notifyAnimationEnded() so that code using GraphicsLayers directly
2860         can add animations, and know when they finish.
2861
2862         * WebCore.exp.in:
2863         * platform/graphics/GraphicsLayerClient.h:
2864         (WebCore::GraphicsLayerClient::notifyAnimationStarted):
2865         (WebCore::GraphicsLayerClient::notifyAnimationEnded):
2866         * platform/graphics/ca/GraphicsLayerCA.cpp:
2867         (WebCore::GraphicsLayerCA::platformCALayerAnimationStarted):
2868         (WebCore::GraphicsLayerCA::platformCALayerAnimationEnded):
2869         * platform/graphics/ca/GraphicsLayerCA.h:
2870         * platform/graphics/ca/PlatformCALayer.h:
2871         * platform/graphics/ca/PlatformCALayerClient.h:
2872         (WebCore::PlatformCALayerClient::platformCALayerAnimationStarted):
2873         (WebCore::PlatformCALayerClient::platformCALayerAnimationEnded):
2874         * platform/graphics/ca/mac/PlatformCALayerMac.h:
2875         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2876         (-[WebAnimationDelegate animationDidStart:]):
2877         (-[WebAnimationDelegate animationDidStop:finished:]):
2878         (PlatformCALayerMac::animationStarted):
2879         (PlatformCALayerMac::animationEnded):
2880         * rendering/RenderLayerBacking.cpp:
2881         (WebCore::RenderLayerBacking::notifyAnimationStarted):
2882         * rendering/RenderLayerBacking.h:
2883
2884 2014-08-21  Zalan Bujtas  <zalan@apple.com>
2885
2886         Enable SATURATED_LAYOUT_ARITHMETIC.
2887         https://bugs.webkit.org/show_bug.cgi?id=136106
2888
2889         Reviewed by Simon Fraser.
2890
2891         SATURATED_LAYOUT_ARITHMETIC protects LayoutUnit against arithmetic overflow.
2892         (No measurable performance regression on Mac.)
2893
2894         Test: fast/dynamic/saturated-layout-arithmetic.html
2895
2896         * Configurations/FeatureDefines.xcconfig:
2897
2898 2014-08-21  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
2899
2900         New ruby parsing rule breaks some real web sites.
2901         https://bugs.webkit.org/show_bug.cgi?id=136062
2902
2903         Reviewed by Ryosuke Niwa.
2904
2905         An RP element should not auto close an RTC element.
2906
2907         The HTML5.1 spec was changed:
2908         http://www.w3.org/html/wg/drafts/html/master/syntax.html#parsing-main-inbody
2909         This was done at the following commit:
2910         https://github.com/w3c/html/commit/c61397b989b28235ee2228f280aa8d475f3b9ebf
2911
2912         This patch changed the RP element's behavior to follow the spec change.
2913
2914         Test: fast/ruby/rp-inside-rtc.html
2915
2916         * html/parser/HTMLTreeBuilder.cpp:
2917         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
2918
2919 2014-08-21  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
2920
2921         REGRESSION: CSS not() selector does not work when it appears after or within @supports
2922         https://bugs.webkit.org/show_bug.cgi?id=136063
2923
2924         Reviewed by Darin Adler.
2925
2926         CSSParser changes its m_parsingMode to SupportsMode when it finds
2927         "@supports" token. However, the mode will be never changed to
2928         NormalMode. This changes parsing algorithm for "not" token forever,
2929         and it cannot parse not pseudo class selector.
2930
2931         When we finish parsing @supports rule, we should change to normal
2932         mode.
2933
2934         @media does the same thing. This patch changed CharacterEndMediaQuery
2935         to CharacterEndConditionQuery, and we change parsing mode from
2936         SupportsMode to NormalMode when the parser finished to parse
2937         @supports rule.
2938
2939         Like "@-webkit-mediaquery", we cannot use '{' to
2940         "@-webkit-supports-condition". Changed "@-webkit-supports-condition"
2941         parsing rule and parseSupportsCondition() not to use '{'.
2942
2943         Tests: css3/supports-not-selector-cssom.html
2944                css3/supports-not-selector.html
2945
2946         * css/CSSGrammar.y.in:
2947         * css/CSSParser.cpp:
2948         (WebCore::CSSParser::parseSupportsCondition):
2949         (WebCore::isCSSLetter):
2950         (WebCore::CSSParser::realLex):
2951
2952 2014-08-21  Beth Dakin  <bdakin@apple.com>
2953
2954         overflow:scroll elements should support rubber-banding
2955         https://bugs.webkit.org/show_bug.cgi?id=91655
2956
2957         Reviewed by Sam Weinig and Darin Adler.
2958
2959         This patch enables rubber-banding in overflow regions and it keeps latching 
2960         working as currently implemented.
2961
2962         We cannot return early here if there is no scroll delta. There won't be a scroll
2963         delta in most cases during event.phase() == PlatformWheelEventPhaseEnded, but that 
2964         phase is required to be processed in order for rubber-banding to work properly. 
2965         * dom/Element.cpp:
2966         (WebCore::Element::dispatchWheelEvent):
2967         * page/EventHandler.cpp:
2968         (WebCore::handleWheelEventInAppropriateEnclosingBoxForSingleAxis):
2969
2970         Add a setting for this, which will default to true. This allows us to disable the 
2971         feature in WebKit1 for now. There is a bug about making it work.
2972         * page/Settings.in:
2973
2974         allowsHorizontalStretching() and allowsVerticalStretching() now take the 
2975         PlatformWheelEvent as a parameter, so that ScrollElasticityAutomatic can use the 
2976         event to decide whether or not stretching should be allowed in this case. 
2977         ScrollElasticityAutomatic will not allow stretching if it is a brand new gesture 
2978         that would result in a rubber-band. We don't want to rubber-band in that case
2979         because we want the event to propagate up to a parent view. Also added some helper 
2980         functions just to make that code easier to read.
2981         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
2982         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2983         (WebCore::newGestureIsStarting):
2984         (WebCore::ScrollingTreeFrameScrollingNodeMac::isAlreadyPinnedInDirectionOfGesture):
2985         (WebCore::ScrollingTreeFrameScrollingNodeMac::allowsHorizontalStretching):
2986         (WebCore::ScrollingTreeFrameScrollingNodeMac::allowsVerticalStretching):
2987         * platform/mac/ScrollAnimatorMac.h:
2988         * platform/mac/ScrollAnimatorMac.mm:
2989         (WebCore::ScrollAnimatorMac::handleWheelEvent):
2990         (WebCore::newGestureIsStarting):
2991         (WebCore::ScrollAnimatorMac::isAlreadyPinnedInDirectionOfGesture):
2992         (WebCore::ScrollAnimatorMac::allowsVerticalStretching):
2993         (WebCore::ScrollAnimatorMac::allowsHorizontalStretching):
2994         * platform/mac/ScrollElasticityController.h:
2995         * platform/mac/ScrollElasticityController.mm:
2996         (WebCore::ScrollElasticityController::handleWheelEvent):
2997
2998         To opt into rubber-banding, all we have to do is implement overhangAmount and set 
2999         scroll elasticity. We'll choose ScrollElasticityAutomatic which means that we'll
3000         only rubber-band in directions that can scroll and that we won't rubber-band for
3001         new gestures when we're already pinned to the edge.
3002         * rendering/RenderLayer.cpp:
3003         (WebCore::RenderLayer::overhangAmount):
3004         (WebCore::RenderLayer::setHasHorizontalScrollbar):
3005         (WebCore::RenderLayer::setHasVerticalScrollbar):
3006
3007 2014-08-21  Alex Christensen  <achristensen@webkit.org>
3008
3009         More WEBCORE_EXPORT macros.
3010         https://bugs.webkit.org/show_bug.cgi?id=136129
3011
3012         Reviewed by Tim Horton.
3013
3014         * Modules/geolocation/Geolocation.h:
3015         * Modules/geolocation/GeolocationController.h:
3016         * Modules/indexeddb/IDBDatabaseBackend.h:
3017         * Modules/indexeddb/IDBDatabaseMetadata.h:
3018         * Modules/indexeddb/IDBKey.h:
3019         * Modules/indexeddb/IDBKeyData.h:
3020         * Modules/indexeddb/IDBKeyPath.h:
3021         * Modules/indexeddb/IDBKeyRange.h:
3022         * Modules/indexeddb/IDBKeyRangeData.h:
3023         * Modules/notifications/Notification.h:
3024         * Modules/notifications/NotificationController.h:
3025         * bindings/js/GCController.h:
3026         * bridge/IdentifierRep.h:
3027         * css/StyleProperties.h:
3028         * dom/ExceptionCodePlaceholder.h:
3029         * dom/KeyboardEvent.h:
3030         * dom/MouseEvent.h:
3031         * dom/MouseRelatedEvent.h:
3032         * dom/Node.h:
3033         (WebCore::Node::hasEditableStyle):
3034         * dom/NodeTraversal.h:
3035         * dom/Position.h:
3036         (WebCore::Position::Position):
3037         * dom/Range.h:
3038         (WebCore::Range::startContainer):
3039         (WebCore::Range::startOffset):
3040         (WebCore::Range::endContainer):
3041         (WebCore::Range::endOffset):
3042         * editing/FrameSelection.h:
3043         (WebCore::DragCaretController::clear):
3044         * history/HistoryItem.h:
3045         * history/PageCache.h:
3046         * html/FormController.h:
3047         * html/HTMLElement.h:
3048         * html/HTMLFormElement.h:
3049         * html/HTMLFrameOwnerElement.h:
3050         * html/HTMLInputElement.h:
3051         * html/HTMLMediaElement.h:
3052         * html/HTMLOptGroupElement.h:
3053         * html/HTMLOptionElement.h:
3054         * html/HTMLPlugInElement.h:
3055         * html/HTMLPlugInImageElement.h:
3056         * html/HTMLSelectElement.h:
3057         * html/HTMLTableCellElement.h:
3058         * html/HTMLTextAreaElement.h:
3059         * html/HTMLTextFormControlElement.h:
3060         * html/HTMLVideoElement.h:
3061         * html/ImageDocument.h:
3062         * html/PluginDocument.h:
3063         * html/forms/FileIconLoader.h:
3064         * html/shadow/InsertionPoint.h:
3065         * inspector/InspectorClient.h:
3066         * inspector/InspectorController.h:
3067         * inspector/InspectorFrontendClientLocal.h:
3068         * inspector/InspectorInstrumentation.h:
3069         * loader/FrameLoadRequest.h:
3070         * loader/FrameLoader.h:
3071         * loader/FrameLoaderStateMachine.h:
3072         * loader/HistoryController.h:
3073         * loader/LoaderStrategy.h:
3074         * loader/NavigationAction.h:
3075         * loader/NetscapePlugInStreamLoader.h:
3076         * loader/ProgressTracker.h:
3077         * loader/archive/cf/LegacyWebArchive.h:
3078         * loader/cache/MemoryCache.h:
3079         * loader/icon/IconController.h:
3080         * loader/icon/IconDatabase.h:
3081         * loader/icon/IconDatabaseBase.h:
3082         * page/FocusController.h:
3083         * page/Frame.h:
3084         * page/FrameDestructionObserver.h:
3085         Replaced WEBCORE_TESTING with WEBCORE_EXPORT.
3086         * page/FrameTree.h:
3087         * page/FrameView.h:
3088         * page/Page.h:
3089         * page/PageConsole.h:
3090         * page/PageGroup.h:
3091         * page/PageThrottler.h:
3092         * page/PrintContext.h:
3093         * page/scrolling/ScrollingConstraints.h:
3094         * page/scrolling/ScrollingStateNode.h:
3095         * platform/FileChooser.h:
3096         * platform/GamepadProvider.h:
3097         * platform/Length.h:
3098         * platform/MIMETypeRegistry.h:
3099         * platform/MemoryPressureHandler.h:
3100         * platform/Pasteboard.h:
3101         * platform/PlatformExportMacros.h:
3102         Removed WEBCORE_TESTING, which I'm replacing with WEBCORE_EXPORT.
3103         * platform/PlatformKeyboardEvent.h:
3104         * platform/PlatformPasteboard.h:
3105         * platform/PlatformSpeechSynthesisVoice.h:
3106         * platform/PlatformSpeechSynthesizer.h:
3107         * platform/audio/MediaSessionManager.h:
3108         * platform/graphics/FloatPoint.h:
3109         * platform/graphics/FloatQuad.h:
3110         * platform/graphics/FloatRect.h:
3111         * platform/graphics/FloatSize.h:
3112         * platform/graphics/Font.h:
3113         * platform/graphics/FontCache.h:
3114         * platform/graphics/FontGlyphs.h:
3115         * platform/graphics/FontPlatformData.h:
3116         * platform/graphics/GlyphPageTreeNode.h:
3117         * platform/graphics/Gradient.h:
3118         * platform/graphics/GraphicsContext.h:
3119         * platform/graphics/GraphicsLayer.h:
3120         * platform/graphics/Icon.h:
3121         * platform/graphics/Image.h:
3122         * platform/graphics/ImageBuffer.h:
3123         * platform/graphics/IntPoint.h:
3124         * platform/graphics/IntRect.h:
3125         * platform/graphics/IntSize.h:
3126         * platform/graphics/LayoutRect.h:
3127         * platform/graphics/MediaPlayer.h:
3128         * platform/graphics/Path.h:
3129         * platform/graphics/Region.h:
3130         * platform/graphics/ca/GraphicsLayerCA.h:
3131         * platform/graphics/ca/LayerFlushScheduler.h:
3132         * platform/graphics/ca/LayerPool.h:
3133         * platform/graphics/ca/PlatformCAFilters.h:
3134         * platform/graphics/ca/PlatformCALayer.h:
3135         * platform/graphics/ca/mac/PlatformCAAnimationMac.h:
3136         * platform/graphics/ca/mac/PlatformCALayerMac.h:
3137         * platform/graphics/cg/IOSurfacePool.h:
3138         * platform/graphics/cocoa/IOSurface.h:
3139         * platform/graphics/filters/FilterOperations.h:
3140         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3141         * platform/ios/LegacyTileCache.h:
3142         * platform/ios/PlatformEventFactoryIOS.h:
3143         * platform/ios/wak/FloatingPointEnvironment.h:
3144         * platform/mac/HIDGamepadProvider.h:
3145         * platform/mock/MockMediaStreamCenter.h:
3146         * platform/network/FormData.h:
3147         * platform/network/HTTPHeaderMap.h:
3148         * platform/network/NetworkStorageSession.h:
3149         * platform/network/ProtectionSpaceBase.h:
3150         * platform/network/cocoa/ProtectionSpaceCocoa.h:
3151         (WebCore::ProtectionSpace::encodingRequiresPlatformData):
3152         * platform/network/ios/QuickLook.h:
3153         * platform/text/TextBreakIterator.h:
3154         * plugins/PluginData.h:
3155         * plugins/PluginMainThreadScheduler.h:
3156         * rendering/HitTestLocation.h:
3157         * rendering/HitTestResult.h:
3158         * rendering/InlineBox.h:
3159         Added more WEBCORE_EXPORT macros, which don't do anything yet.
3160
3161 2014-08-21  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
3162
3163         [GTK] WebkitWebProcess crashing navigating away from ogg video element
3164         https://bugs.webkit.org/show_bug.cgi?id=135348
3165
3166         Reviewed by Philippe Normand.
3167
3168         Let GraphicsLayerTextureMapper know it needs to detach the platform
3169         layer when a MediaPlayerPrivateGStreamerBase is destroyed.
3170
3171         No new test since media/restore-from-page-cache.html covers it.
3172
3173         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3174         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
3175
3176 2014-08-20  Benjamin Poulain  <benjamin@webkit.org>
3177
3178         CSS: Implement the :placeholder-shown pseudo-class from Selectors Level 4
3179         https://bugs.webkit.org/show_bug.cgi?id=118162
3180
3181         Reviewed by Antti Koivisto.
3182
3183         Previously, HTMLTextFormControlElement was using some mix of its own state
3184         and style to change the visibility of the placeholder. That approach was a little
3185         bit too fragile, and we do not want the style to depends on the renderer() since
3186         that creates circular dependencies.
3187
3188         The biggest change here is refactoring HTMLTextFormControlElement to have
3189         1) An explicit "visible placeholder" state.
3190         2) Separate the textUpdate() from the visibilityUpdate().
3191         3) Remove the dependencies between the Element's style and the placeholder's style.
3192            This is done by simply using display:none; on the placeholder so that its parent's visibility
3193            is irrelevant.
3194
3195         When matching the selector, the style is set as unique since style sharing does not deal with
3196         the changes of HTMLTextFormControlElement.
3197
3198         Tests: fast/css/placeholder-shown-basics.html
3199                fast/selectors/placeholder-shown-long-adjacent-backtracking.html
3200                fast/selectors/placeholder-shown-sibling-style-update.html
3201                fast/selectors/placeholder-shown-style-update.html
3202                fast/selectors/placeholder-shown-with-input-basics.html
3203                fast/selectors/placeholder-shown-with-textarea-basics.html
3204
3205         * css/CSSSelector.cpp:
3206         (WebCore::CSSSelector::selectorText):
3207         Add the CSS Selector description for CSSOM.
3208
3209         * css/CSSSelector.h:
3210         * css/SelectorChecker.cpp:
3211         (WebCore::SelectorChecker::checkOne):
3212         * css/SelectorCheckerTestFunctions.h:
3213         (WebCore::isPlaceholderShown):
3214         * css/SelectorPseudoClassAndCompatibilityElementMap.in:
3215         * css/html.css:
3216         (::-webkit-input-placeholder):
3217         Previously, the display was forced through the UA stylesheet. Since the display is now part
3218         of the placeholder visibility, it is explicitly handled by HTMLTextFormControlElement and
3219         its subclasses.
3220
3221         * cssjit/SelectorCompiler.cpp:
3222         (WebCore::SelectorCompiler::addPseudoClassType):
3223         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
3224         (WebCore::SelectorCompiler::makeUniqueIfNecessaryAndTestIsPlaceholderShown):
3225         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPlaceholderShown):
3226         * html/HTMLInputElement.cpp:
3227         (WebCore::HTMLInputElement::parseAttribute):
3228         * html/HTMLTextAreaElement.cpp:
3229         (WebCore::HTMLTextAreaElement::updateValue):
3230         (WebCore::HTMLTextAreaElement::setValueCommon):
3231         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
3232         * html/HTMLTextFormControlElement.cpp:
3233         (WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement):
3234         (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
3235         (WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
3236         (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
3237         (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
3238         (WebCore::HTMLTextFormControlElement::selectionDirection):
3239         (WebCore::HTMLTextFormControlElement::restoreCachedSelection):
3240         (WebCore::HTMLTextFormControlElement::parseAttribute):
3241         (WebCore::HTMLTextFormControlElement::hidePlaceholder):
3242         (WebCore::HTMLTextFormControlElement::showPlaceholderIfNecessary):
3243         * html/HTMLTextFormControlElement.h:
3244         (WebCore::HTMLTextFormControlElement::isPlaceholderVisible):
3245         (WebCore::HTMLTextFormControlElement::cachedSelectionDirection):
3246         * html/TextFieldInputType.cpp:
3247         (WebCore::TextFieldInputType::updatePlaceholderText):
3248         (WebCore::TextFieldInputType::subtreeHasChanged):
3249         (WebCore::TextFieldInputType::updateInnerTextValue):
3250         * rendering/RenderTextControl.cpp:
3251         (WebCore::RenderTextControl::styleDidChange):
3252         * testing/Internals.cpp:
3253         (WebCore::Internals::visiblePlaceholder):
3254
3255 2014-08-20  Mark Rowe  <mrowe@apple.com>
3256
3257         Fix the release build after r172806.
3258
3259         * Modules/mediasource/SourceBuffer.cpp:
3260         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveRenderingError): Add a missing semicolon.
3261
3262 2014-08-20  Benjamin Poulain  <bpoulain@apple.com>
3263
3264         Remove HTMLInputElement's suggestedValue
3265         https://bugs.webkit.org/show_bug.cgi?id=136094
3266
3267         Reviewed by Darin Adler.
3268
3269         That code is Chrome specific. It is unused now.
3270
3271         * WebCore.exp.in:
3272         * html/HTMLInputElement.cpp:
3273         (WebCore::HTMLInputElement::setValue):
3274         (WebCore::HTMLInputElement::setValueFromRenderer):
3275         (WebCore::HTMLInputElement::suggestedValue): Deleted.
3276         (WebCore::HTMLInputElement::setSuggestedValue): Deleted.
3277         * html/HTMLInputElement.h:
3278         * html/HTMLTextFormControlElement.cpp:
3279         (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
3280         * html/HTMLTextFormControlElement.h:
3281         (WebCore::HTMLTextFormControlElement::isEmptySuggestedValue): Deleted.
3282         * html/InputType.cpp:
3283         (WebCore::InputType::canSetSuggestedValue): Deleted.
3284         * html/InputType.h:
3285         * html/TextFieldInputType.cpp:
3286         (WebCore::TextFieldInputType::updateInnerTextValue):
3287         (WebCore::TextFieldInputType::canSetSuggestedValue): Deleted.
3288         * html/TextFieldInputType.h:
3289         * testing/Internals.cpp:
3290         (WebCore::Internals::suggestedValue): Deleted.
3291         (WebCore::Internals::setSuggestedValue): Deleted.
3292         * testing/Internals.h:
3293         * testing/Internals.idl:
3294
3295 2014-08-20  Dean Jackson  <dino@apple.com>
3296
3297         WebAudio FFT analysis uses incorrect scaling
3298         https://bugs.webkit.org/show_bug.cgi?id=136120
3299
3300         Reviewed by Tim Horton.
3301
3302         This is a port of Blink r166687 (author rtoy)
3303         https://codereview.chromium.org/156993002
3304
3305         Currently, for a fixed sine-wave input, the peak FFT amplitude changes
3306         depending on the selected FFT size. This is incorrect; the FFT amplitude
3307         should not appreciably change when the FFT size changes.
3308
3309         Layout test added to verify the FFT result stays approximately constant,
3310         independent of the FFT size used.
3311
3312         When this test is run using an older version of WebKit, the peak varies
3313         from about -44 dB (FFT size 32) to -7 dB (FFT size 2048).  With this CL,
3314         the peak is about -7 dB.  (It's not 0 dB because of the Blackman window that is applied.)
3315
3316         Note: this change may break existing applications that depended on this strange scaling effect.
3317
3318         Test: webaudio/realtimeanalyser-fft-scaling.html
3319
3320         * Modules/webaudio/RealtimeAnalyser.cpp:
3321         (WebCore::RealtimeAnalyser::doFFTAnalysis):
3322
3323 2014-08-20  Alex Christensen  <achristensen@webkit.org>
3324
3325         Introducing WEBCORE_EXPORT macro.
3326         https://bugs.webkit.org/show_bug.cgi?id=136108
3327
3328         Reviewed by Antti Koivisto.
3329
3330         This should eventually replace WebCore.exp.in.
3331
3332         * platform/PlatformExportMacros.h:
3333         Define WEBCORE_EXPORT to nothing to not cause problems while I'm working on it.
3334         * Modules/encryptedmedia/CDM.h:
3335         * Modules/speech/DOMWindowSpeechSynthesis.h:
3336         * Modules/webdatabase/DatabaseManager.h:
3337         * Modules/webdatabase/DatabaseTracker.h:
3338         * accessibility/AXObjectCache.h:
3339         * bindings/js/DOMWrapperWorld.h:
3340         * bridge/jsc/BridgeJSC.h:
3341         * bridge/runtime_method.h:
3342         * bridge/runtime_object.h:
3343         * bridge/runtime_root.h:
3344         * css/CSSComputedStyleDeclaration.h:
3345         * css/CSSParserMode.h:
3346         * css/CSSValue.h:
3347         * css/DOMWindowCSS.h:
3348         * css/StyleSheetContents.h:
3349         * dom/CharacterData.h:
3350         * dom/ClientRect.h:
3351         * dom/ClientRectList.h:
3352         * dom/ContainerNode.h:
3353         * dom/ContextDestructionObserver.h:
3354         * dom/DOMImplementation.h:
3355         * dom/DataTransfer.h:
3356         * dom/DeviceMotionData.h:
3357         * dom/DeviceOrientationData.h:
3358         * dom/Document.h:
3359         (WebCore::Document::setAnnotatedRegionsDirty):
3360         * dom/DocumentMarker.h:
3361         * dom/DocumentMarkerController.h:
3362         * dom/DocumentStyleSheetCollection.h:
3363         * dom/Element.h:
3364         * dom/Event.h:
3365         (WebCore::Event::create):
3366         * dom/EventListenerMap.h:
3367         * editing/DictationAlternative.h:
3368         * editing/EditCommand.h:
3369         * editing/EditingStyle.h:
3370         * editing/Editor.h:
3371         * editing/mac/AlternativeTextUIController.h:
3372         * history/BackForwardController.h:
3373         * history/BackForwardList.h:
3374         * history/CachedFrame.h:
3375         * loader/CookieJar.h:
3376         * loader/CrossOriginPreflightResultCache.h:
3377         * loader/DocumentLoader.h:
3378         * loader/DocumentWriter.h:
3379         * loader/appcache/ApplicationCache.h:
3380         * loader/appcache/ApplicationCacheHost.h:
3381         * loader/appcache/ApplicationCacheStorage.h:
3382         * loader/archive/ArchiveResource.h:
3383         * loader/cache/CachedImage.h:
3384         * loader/cache/CachedResource.h:
3385         * loader/cache/CachedResourceHandle.h:
3386         * loader/cache/CachedResourceLoader.h:
3387         * page/Chrome.h:
3388         * page/ContextMenuController.h:
3389         * page/DOMWindow.h:
3390         * page/DOMWindowExtension.h:
3391         * page/DragController.h:
3392         * page/EventHandler.h:
3393         * page/animation/AnimationController.h:
3394         * page/scrolling/AsyncScrollingCoordinator.h:
3395         * platform/CalculationValue.h:
3396         * platform/ContentFilter.h:
3397         * platform/ContextMenu.h:
3398         * platform/ContextMenuItem.h:
3399         * platform/CrossThreadCopier.h:
3400         * platform/Cursor.h:
3401         * platform/DatabaseStrategy.h:
3402         * platform/DisplaySleepDisabler.h:
3403         * platform/DragData.h:
3404         * platform/LocalizedStrings.h:
3405         * platform/audio/AudioHardwareListener.h:
3406         * platform/audio/AudioSession.h:
3407         * platform/audio/ios/MediaSessionManagerIOS.mm:
3408         * platform/graphics/BitmapImage.h:
3409         * platform/graphics/Color.h:
3410         * platform/graphics/DisplayRefreshMonitor.h:
3411         * platform/graphics/transforms/AffineTransform.h:
3412         * platform/ios/WebCoreSystemInterfaceIOS.mm:
3413         * platform/ios/WebVideoFullscreenModelMediaElement.h:
3414         * platform/ios/wak/WAKView.mm:
3415         * platform/ios/wak/WKContentObservation.h:
3416         * platform/ios/wak/WKView.h:
3417         * platform/ios/wak/WebCoreThread.h:
3418         * platform/ios/wak/WebCoreThreadMessage.h:
3419         * platform/mac/BlockExceptions.h:
3420         * platform/mock/DeviceOrientationClientMock.h:
3421         * platform/network/AuthenticationChallengeBase.h:
3422         * platform/network/BlobData.h:
3423         * platform/network/BlobDataFileReference.h:
3424         * platform/network/BlobRegistry.h:
3425         * platform/network/BlobRegistryImpl.h:
3426         * platform/network/CredentialBase.h:
3427         * platform/network/CredentialStorage.h:
3428         * platform/network/PlatformCookieJar.h:
3429         * platform/network/cf/AuthenticationChallenge.h:
3430         * platform/network/cocoa/CredentialCocoa.h:
3431         * platform/network/mac/CertificateInfo.h:
3432         * platform/sql/SQLiteDatabase.h:
3433         (WebCore::SQLiteDatabase::disableThreadingChecks):
3434         * platform/sql/SQLiteDatabaseTracker.h:
3435         * platform/sql/SQLiteStatement.h:
3436         * platform/sql/SQLiteTransaction.h:
3437         * platform/text/BidiContext.h:
3438         Added WEBCORE_EXPORT macros.
3439
3440 2014-08-20  Pratik Solanki  <psolanki@apple.com>
3441
3442         Move DiskCacheMonitor to WebCore so that WebKit1 clients can use it as well
3443         https://bugs.webkit.org/show_bug.cgi?id=135896
3444
3445         Reviewed by Andreas Kling.
3446
3447         Refactor code and move it to WebCore.
3448
3449         * WebCore.exp.in:
3450         * WebCore.xcodeproj/project.pbxproj:
3451         * loader/ResourceLoader.h:
3452             Make willCacheResponse protected so that SubresourceLoader can override it.
3453         * loader/SubresourceLoader.h:
3454         * loader/cocoa/DiskCacheMonitorCocoa.h: Added.
3455             Mostly the same as the existing NetworkDiskCacheMonitor class in WebKit2. In the
3456             CFNetwork callback block, it calls a virtual function that is overridden by
3457             NetworkDiskCacheMonitor to send a message to WebContent process.
3458         (WebCore::DiskCacheMonitor::~DiskCacheMonitor):
3459         (WebCore::DiskCacheMonitor::resourceRequest):
3460         (WebCore::DiskCacheMonitor::sessionID):
3461         * loader/cocoa/DiskCacheMonitorCocoa.mm:
3462         (WebCore::DiskCacheMonitor::tryGetFileBackedSharedBufferFromCFURLCachedResponse):
3463             Copied from NetworkResourceLoader::tryGetFileBackedSharedBufferFromCFURLCachedResponse.
3464         (WebCore::DiskCacheMonitor::monitorFileBackingStoreCreation):
3465         (WebCore::DiskCacheMonitor::DiskCacheMonitor):
3466         (WebCore::DiskCacheMonitor::resourceBecameFileBacked):
3467             Replace the cached resource data with the contents of the file backed buffer. This is
3468             used in WebKit1 (and also for any resource loads that happen from the WebContent
3469             process).
3470         * loader/cocoa/SubresourceLoaderCocoa.mm: Added.
3471         (WebCore::SubresourceLoader::willCacheResponse):
3472             Override willCacheresponse from ResourceLoader to listen for disk cache notifications.
3473
3474 2014-08-20  Eric Carlson  <eric.carlson@apple.com>
3475
3476         Cleanup MediaSession
3477         https://bugs.webkit.org/show_bug.cgi?id=136116
3478
3479         Reviewed by Brent Fulgham.
3480
3481         MediaSessionManagerClient interface isn't used, remove it.
3482         No new tests, this doesn't change behavior.
3483
3484         * WebCore.exp.in:
3485         * platform/audio/MediaSessionManager.cpp:
3486         (WebCore::MediaSessionManager::addSession): 
3487         (WebCore::MediaSessionManager::removeSession):
3488         (WebCore::MediaSessionManager::sessionWillBeginPlayback):
3489         (WebCore::MediaSessionManager::addClient): Deleted.
3490         (WebCore::MediaSessionManager::removeClient): Deleted.
3491         * platform/audio/MediaSessionManager.h:
3492         (WebCore::MediaSessionManagerClient::~MediaSessionManagerClient): Deleted.
3493         (WebCore::MediaSessionManagerClient::MediaSessionManagerClient): Deleted.
3494
3495 2014-08-20  Eric Carlson  <eric.carlson@apple.com>
3496
3497         [MSE] add additional SourceBuffer and MediaSource logging
3498         https://bugs.webkit.org/show_bug.cgi?id=136114
3499
3500         Reviewed by Brent Fulgham.
3501
3502         No new tests, this adds debug-only logging.
3503
3504         * Modules/mediasource/MediaSource.cpp:
3505         (WebCore::MediaSource::setReadyState): Fix a typo.
3506         (WebCore::MediaSource::streamEndedWithError): Log the error.
3507
3508         * Modules/mediasource/SourceBuffer.cpp:
3509         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Log when parsing fails.
3510         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveRenderingError): Log error.
3511         (WebCore::SourceBuffer::sourceBufferPrivateDidEndStream): Ditto.
3512         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): Log.
3513         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Log error.
3514
3515 2014-08-20  Commit Queue  <commit-queue@webkit.org>
3516
3517         Unreviewed, rolling out r172798.
3518         https://bugs.webkit.org/show_bug.cgi?id=136113
3519
3520         Broke builds (Requested by msaboff on #webkit).
3521
3522         Reverted changeset:
3523
3524         "Introducing WEBCORE_EXPORT macro."
3525         https://bugs.webkit.org/show_bug.cgi?id=136108
3526         http://trac.webkit.org/changeset/172798
3527
3528 2014-08-20  Alex Christensen  <achristensen@webkit.org>
3529
3530         Introducing WEBCORE_EXPORT macro.
3531         https://bugs.webkit.org/show_bug.cgi?id=136108
3532
3533         Reviewed by Antti Koivisto.
3534
3535         This should eventually replace WebCore.exp.in.
3536
3537         * platform/PlatformExportMacros.h:
3538         Define WEBCORE_EXPORT to nothing to not cause problems while I'm working on it.
3539         * Modules/encryptedmedia/CDM.h:
3540         * Modules/speech/DOMWindowSpeechSynthesis.h:
3541         * Modules/webdatabase/DatabaseManager.h:
3542         * Modules/webdatabase/DatabaseTracker.h:
3543         * accessibility/AXObjectCache.h:
3544         * bindings/js/DOMWrapperWorld.h:
3545         * bridge/jsc/BridgeJSC.h:
3546         * bridge/runtime_method.cpp:
3547         * bridge/runtime_method.h:
3548         * bridge/runtime_object.cpp:
3549         * bridge/runtime_object.h:
3550         * bridge/runtime_root.h:
3551         * css/CSSComputedStyleDeclaration.h:
3552         * css/CSSParserMode.h:
3553         * css/CSSValue.h:
3554         * css/DOMWindowCSS.h:
3555         * css/StyleSheetContents.h:
3556         * dom/CharacterData.h:
3557         * dom/ClientRect.h:
3558         * dom/ClientRectList.h:
3559         * dom/ContainerNode.h:
3560         * dom/ContextDestructionObserver.h:
3561         * dom/DOMImplementation.h:
3562         * dom/DataTransfer.h:
3563         * dom/DeviceMotionData.h:
3564         * dom/DeviceOrientationData.h:
3565         * dom/Document.h:
3566         (WebCore::Document::setAnnotatedRegionsDirty):
3567         * dom/DocumentMarker.h:
3568         * dom/DocumentMarkerController.h:
3569         * dom/DocumentStyleSheetCollection.h:
3570         * dom/Element.h:
3571         * dom/Event.h:
3572         (WebCore::Event::create):
3573         * dom/EventListenerMap.h:
3574         * editing/DictationAlternative.h:
3575         * editing/EditCommand.h:
3576         * editing/EditingStyle.h:
3577         * editing/Editor.h:
3578         * editing/mac/AlternativeTextUIController.h:
3579         * history/BackForwardController.h:
3580         * history/BackForwardList.h:
3581         * history/CachedFrame.h:
3582         * loader/CookieJar.h:
3583         * loader/CrossOriginPreflightResultCache.h:
3584         * loader/DocumentLoader.h:
3585         * loader/DocumentWriter.h:
3586         * loader/appcache/ApplicationCache.h:
3587         * loader/appcache/ApplicationCacheHost.h:
3588         * loader/appcache/ApplicationCacheStorage.h:
3589         * loader/archive/ArchiveResource.h:
3590         * loader/cache/CachedImage.h:
3591         * loader/cache/CachedResource.h:
3592         * loader/cache/CachedResourceHandle.h:
3593         * loader/cache/CachedResourceLoader.h:
3594         * page/Chrome.h:
3595         * page/ContextMenuController.h:
3596         * page/DOMWindow.h:
3597         * page/DOMWindowExtension.h:
3598         * page/DragController.h:
3599         * page/EventHandler.h:
3600         * page/animation/AnimationController.h:
3601         * page/scrolling/AsyncScrollingCoordinator.h:
3602         * platform/CalculationValue.h:
3603         * platform/ContentFilter.h:
3604         * platform/ContextMenu.h:
3605         * platform/ContextMenuItem.h:
3606         * platform/CrossThreadCopier.h:
3607         * platform/Cursor.h:
3608         * platform/DatabaseStrategy.h:
3609         * platform/DisplaySleepDisabler.h:
3610         * platform/DragData.h:
3611         * platform/LocalizedStrings.h:
3612         * platform/audio/AudioHardwareListener.h:
3613         * platform/audio/AudioSession.h:
3614         * platform/audio/ios/MediaSessionManagerIOS.mm:
3615         * platform/graphics/BitmapImage.h:
3616         * platform/graphics/Color.h:
3617         * platform/graphics/DisplayRefreshMonitor.h:
3618         * platform/graphics/transforms/AffineTransform.h:
3619         * platform/ios/WebCoreSystemInterfaceIOS.mm:
3620         * platform/ios/WebVideoFullscreenModelMediaElement.h:
3621         * platform/ios/wak/WAKView.mm:
3622         * platform/ios/wak/WKContentObservation.h:
3623         * platform/ios/wak/WKView.h:
3624         * platform/ios/wak/WebCoreThread.h:
3625         * platform/ios/wak/WebCoreThreadMessage.h:
3626         * platform/mac/BlockExceptions.h:
3627         * platform/mock/DeviceOrientationClientMock.h:
3628         * platform/network/AuthenticationChallengeBase.h:
3629         * platform/network/BlobData.h:
3630         * platform/network/BlobDataFileReference.h:
3631         * platform/network/BlobRegistry.h:
3632         * platform/network/BlobRegistryImpl.h:
3633         * platform/network/CredentialBase.h:
3634         * platform/network/CredentialStorage.h:
3635         * platform/network/PlatformCookieJar.h:
3636         * platform/network/cf/AuthenticationChallenge.h:
3637         * platform/network/cocoa/CredentialCocoa.h:
3638         * platform/network/mac/CertificateInfo.h:
3639         * platform/sql/SQLiteDatabase.h:
3640         (WebCore::SQLiteDatabase::disableThreadingChecks):
3641         * platform/sql/SQLiteDatabaseTracker.h:
3642         * platform/sql/SQLiteStatement.h:
3643         * platform/sql/SQLiteTransaction.h:
3644         * platform/text/BidiContext.h:
3645         Added WEBCORE_EXPORT macros.
3646
3647 2014-08-20  Zalan Bujtas  <zalan@apple.com>
3648
3649         Dashed/dotted borders do not paint.
3650         https://bugs.webkit.org/show_bug.cgi?id=135898
3651
3652         Reviewed by Simon Fraser.
3653
3654         Remove the empty line checks for drawLines. There's no need to protect the graphics
3655         context from empty lines.
3656
3657         Tests: fast/borders/border-painting-dashed-at-all.html
3658                fast/borders/border-painting-dashed.html
3659                fast/borders/border-painting-dotted-at-all.html
3660                fast/borders/border-painting-dotted.html
3661                fast/borders/border-painting-double-at-all.html
3662                fast/borders/border-painting-double.html
3663                fast/borders/border-painting-groove-at-all.html
3664                fast/borders/border-painting-inset-at-all.html
3665                fast/borders/border-painting-inset.html
3666                fast/borders/border-painting-outset-at-all.html
3667                fast/borders/border-painting-outset.html
3668                fast/borders/border-painting-ridge-at-all.html
3669                fast/borders/border-painting-solid-at-all.html
3670                fast/borders/border-painting-solid.html
3671                fast/borders/hidpi-border-painting-groove.html
3672                fast/borders/hidpi-border-painting-ridge.html
3673
3674         * rendering/RenderObject.cpp:
3675         (WebCore::RenderObject::drawLineForBoxSide):
3676         (WebCore::drawBorderLineRect): Deleted.
3677         (WebCore::drawBorderLine): Deleted.
3678
3679 2014-08-19  Jinwoo Song  <jinwoo7.song@samsung.com>
3680
3681         Ignore usemap attributes without '#' in img element
3682         https://bugs.webkit.org/show_bug.cgi?id=133336
3683
3684         Reviewed by Ryosuke Niwa.
3685
3686         HTML5 specification says we should ignore usemap attributes without #.
3687         http://www.w3.org/TR/html5/infrastructure.html#valid-hash-name-reference
3688
3689         Test: fast/dom/replaced-image-map-valid-hash-name.html
3690
3691         * dom/TreeScope.cpp:
3692         (WebCore::TreeScope::getImageMap):
3693
3694 2014-08-19  Pratik Solanki  <psolanki@apple.com>
3695
3696         Remove PurgeableBuffer since it is not very useful any more
3697         https://bugs.webkit.org/show_bug.cgi?id=135939
3698
3699         Reviewed by Andreas Kling.
3700
3701         The usefulness of having purgeable memory for cached resources has diminished now that
3702         WebKit uses file backed resources when possible. Since this is read only memory, it is in
3703         essence "purgeable". Having the PurgeableBuffer code adds additional complexity that we
3704         don't need. e.g. on my Mac, I am not seeing any entry for "WebCore purgeable data" when I
3705         run vmmap against the web processes that I have running. It is used on iOS, however even
3706         there much of the purgeable memory we create gets replaced by file backed memory once we get
3707         the notification from CFNetwork.
3708
3709         No new tests because no functional changes.
3710
3711         * WebCore.xcodeproj/project.pbxproj:
3712         * inspector/InspectorPageAgent.cpp:
3713         (WebCore::prepareCachedResourceBuffer):
3714         * loader/DocumentLoader.cpp:
3715         (WebCore::DocumentLoader::subresource):
3716         * loader/ResourceBuffer.cpp:
3717         (WebCore::ResourceBuffer::hasPurgeableBuffer): Deleted.
3718         (WebCore::ResourceBuffer::setShouldUsePurgeableMemory): Deleted.
3719         (WebCore::ResourceBuffer::createPurgeableBuffer): Deleted.
3720         (WebCore::ResourceBuffer::releasePurgeableBuffer): Deleted.
3721         * loader/ResourceBuffer.h:
3722         * loader/SubresourceLoader.cpp:
3723         (WebCore::SubresourceLoader::didFinishLoading):
3724         * loader/cache/CachedCSSStyleSheet.cpp:
3725         (WebCore::CachedCSSStyleSheet::sheetText):
3726         (WebCore::CachedCSSStyleSheet::destroyDecodedData):
3727         * loader/cache/CachedCSSStyleSheet.h:
3728         * loader/cache/CachedImage.cpp:
3729         (WebCore::CachedImage::image):
3730         (WebCore::CachedImage::imageForRenderer):
3731         (WebCore::CachedImage::imageSizeForRenderer):
3732         (WebCore::CachedImage::destroyDecodedData):
3733         (WebCore::CachedImage::canUseDiskImageCache):
3734         * loader/cache/CachedImage.h:
3735         * loader/cache/CachedResource.cpp:
3736         (WebCore::CachedResource::addClientToSet):
3737         (WebCore::CachedResource::isSafeToMakePurgeable): Deleted.
3738         (WebCore::CachedResource::makePurgeable): Deleted.
3739         (WebCore::CachedResource::isPurgeable): Deleted.
3740         (WebCore::CachedResource::wasPurged): Deleted.
3741         * loader/cache/CachedResource.h:
3742         (WebCore::CachedResource::resourceBuffer):
3743         (WebCore::CachedResource::purgePriority): Deleted.
3744         * loader/cache/CachedScript.cpp:
3745         (WebCore::CachedScript::script):
3746         (WebCore::CachedScript::destroyDecodedData):
3747         * loader/cache/CachedScript.h:
3748         * loader/cache/MemoryCache.cpp:
3749         (WebCore::MemoryCache::resourceForRequestImpl):
3750         (WebCore::MemoryCache::pruneDeadResourcesToSize):
3751         (WebCore::MemoryCache::evict):
3752         (WebCore::MemoryCache::TypeStatistic::addResource):
3753         (WebCore::MemoryCache::dumpStats):
3754         (WebCore::MemoryCache::dumpLRULists):
3755         (WebCore::MemoryCache::makeResourcePurgeable): Deleted.
3756         * loader/cache/MemoryCache.h:
3757         (WebCore::MemoryCache::TypeStatistic::TypeStatistic):
3758         (WebCore::MemoryCache::shouldMakeResourcePurgeableOnEviction): Deleted.
3759         * platform/PurgePriority.h: Removed.
3760         * platform/PurgeableBuffer.h: Removed.
3761         * platform/SharedBuffer.cpp:
3762         (WebCore::SharedBuffer::SharedBuffer):
3763         (WebCore::SharedBuffer::size):
3764         (WebCore::SharedBuffer::data):
3765         (WebCore::SharedBuffer::append):
3766         (WebCore::SharedBuffer::clear):
3767         (WebCore::SharedBuffer::copy):
3768         (WebCore::SharedBuffer::getSomeData):
3769         (WebCore::SharedBuffer::adoptPurgeableBuffer): Deleted.
3770         (WebCore::SharedBuffer::createPurgeableBuffer): Deleted.
3771         (WebCore::SharedBuffer::releasePurgeableBuffer): Deleted.
3772         * platform/SharedBuffer.h:
3773         (WebCore::SharedBuffer::hasPurgeableBuffer): Deleted.
3774         (WebCore::SharedBuffer::shouldUsePurgeableMemory): Deleted.
3775         * platform/cf/SharedBufferCF.cpp:
3776         (WebCore::SharedBuffer::SharedBuffer):
3777         * platform/mac/PurgeableBufferMac.cpp: Removed.
3778         * platform/mac/SharedBufferMac.mm:
3779         (WebCore::SharedBuffer::createCFData):
3780         * platform/soup/SharedBufferSoup.cpp:
3781
3782 2014-08-19  Zalan Bujtas  <zalan@apple.com>
3783
3784         Remove ENABLE(SUBPIXEL_LAYOUT).
3785         https://bugs.webkit.org/show_bug.cgi?id=136077
3786
3787         Reviewed by Simon Fraser.
3788
3789         Remove compile time flag SUBPIXEL_LAYOUT. All ports have it enabled for a while now.
3790
3791         * Configurations/FeatureDefines.xcconfig:
3792         * css/CSSPrimitiveValue.cpp:
3793         (WebCore::CSSPrimitiveValue::computeLength):
3794         * dom/Element.cpp:
3795         (WebCore::adjustForLocalZoom):
3796         (WebCore::Element::offsetWidth):
3797         (WebCore::Element::offsetHeight):
3798         (WebCore::Element::clientLeft):
3799         (WebCore::Element::clientTop):
3800         (WebCore::Element::clientWidth):
3801         (WebCore::Element::clientHeight):
3802         * platform/LayoutUnit.h:
3803         (WebCore::LayoutUnit::LayoutUnit):
3804         (WebCore::LayoutUnit::ceilToFloat):
3805         (WebCore::LayoutUnit::ceil):
3806         (WebCore::LayoutUnit::round):
3807         (WebCore::LayoutUnit::floor):
3808         (WebCore::boundedMultiply):
3809         (WebCore::operator*):
3810         (WebCore::operator/):
3811         (WebCore::intMod):
3812         (WebCore::operator%):
3813         (WebCore::roundedLayoutUnit):
3814         (WebCore::ceiledLayoutUnit):
3815         (WebCore::LayoutUnit::toInt): Deleted.
3816         (WebCore::LayoutUnit::toFloat): Deleted.
3817         (WebCore::LayoutUnit::toDouble): Deleted.
3818         (WebCore::LayoutUnit::epsilon): Deleted.
3819         * platform/graphics/LayoutPoint.h:
3820         (WebCore::roundedForPainting):
3821         (WebCore::flooredForPainting):
3822         (WebCore::ceiledForPainting):
3823         (WebCore::roundedLayoutPoint):
3824         * platform/graphics/LayoutRect.cpp:
3825         (WebCore::enclosingLayoutRect):
3826         * platform/graphics/LayoutRect.h:
3827         (WebCore::pixelSnappedIntRect):
3828         (WebCore::pixelSnappedForPainting):
3829         * platform/graphics/LayoutSize.h:
3830         (WebCore::roundedLayoutSize):
3831         (WebCore::flooredForPainting):
3832         * rendering/RenderBlock.cpp:
3833         (WebCore::adjustFloatForSubPixelLayout):
3834         * rendering/RenderBlockFlow.cpp:
3835         (WebCore::RenderBlockFlow::layoutBlockChild):
3836         * rendering/RenderElement.h:
3837         (WebCore::adjustLayoutUnitForAbsoluteZoom):
3838         * rendering/style/RenderStyle.h:
3839         (WebCore::adjustLayoutUnitForAbsoluteZoom):
3840
3841 2014-08-19  Bem Jones-Bey  <bjonesbe@adobe.com>
3842
3843         [CSS Shapes] A few calc() test failures in the shape-image-threshold parsing tests
3844         https://bugs.webkit.org/show_bug.cgi?id=135926
3845
3846         Reviewed by Dirk Schulze.
3847
3848         shape-image-threshold is a Number, so it should be parsed as one. The
3849         default parsing doesn't support calcs, but numbers do.
3850
3851         No new tests, fixes exitsing test to pass.
3852
3853         * css/DeprecatedStyleBuilder.cpp:
3854         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Use
3855             ApplyPropertyNumber instead of ApplyPropertyDefault for
3856             shape-image-threshold.
3857
3858 2014-08-18  Maciej Stachowiak  <mjs@apple.com>
3859
3860         Use NSURLFileTypeMappings directly instead of depending on WebKitSystemInterface wrappers for it
3861         https://bugs.webkit.org/show_bug.cgi?id=136035
3862
3863         Reviewed by Dan Bernstein.
3864
3865         * WebCore.exp.in: Remove reference to no longer existent sumbols.
3866         * WebCore.order: ditto
3867         * WebCore.xcodeproj/project.pbxproj: Install new NSURLFileTyeMappings.h header.
3868         * platform/ios/MIMETypeRegistryIOS.mm:
3869         (WebCore::MIMETypeRegistry::getMIMETypeForExtension): Use NSURLFileTypeMappings
3870         directly instead of via WKSI wrapper.
3871         * platform/mac/MIMETypeRegistryMac.mm:
3872         (WebCore::MIMETypeRegistry::getMIMETypeForExtension): ditto
3873         (WebCore::MIMETypeRegistry::getExtensionsForMIMEType): ditto
3874         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType): ditto
3875         * platform/mac/WebCoreSystemInterface.h: Remove references to the no-longer-used
3876         WKGetExtensionsForMIMEType, WKGetPreferredExtensionForMIMEType, or WKGetMIMETypeForExtension
3877         * platform/mac/WebCoreSystemInterface.mm: ditto
3878         * platform/spi: Added. This is where headers to declare SPI go.
3879         * platform/spi/cocoa: Added. See above.
3880         * platform/spi/cocoa/NSURLFileTypeMappingsSPI.h: Added. Header to declare
3881         the internal class NSURLFileTypeMappings and some of its methods.
3882
3883 2014-08-18  Commit Queue  <commit-queue@webkit.org>
3884
3885         Unreviewed, rolling out r172736.
3886         https://bugs.webkit.org/show_bug.cgi?id=136060
3887
3888         Caused 14% PLT regressions (Requested by rniwa on #webkit).
3889
3890         Reverted changeset:
3891
3892         "Remove PurgeableBuffer since it is not very useful any more"
3893         https://bugs.webkit.org/show_bug.cgi?id=135939
3894         http://trac.webkit.org/changeset/172736
3895
3896 2014-08-18  Simon Fraser  <simon.fraser@apple.com>
3897
3898         Provide default implementations of all GraphicsLayerClient methods
3899         https://bugs.webkit.org/show_bug.cgi?id=136054
3900
3901         Reviewed by Tim Horton.
3902
3903         Make none of the functions in GraphicsLayerClient pure virtual, since in many cases
3904         subclasses don't need to provide their own implementations.
3905
3906         * platform/graphics/GraphicsLayerClient.h:
3907         (WebCore::GraphicsLayerClient::notifyAnimationStarted):
3908         (WebCore::GraphicsLayerClient::notifyFlushRequired):
3909         (WebCore::GraphicsLayerClient::paintContents):
3910         * rendering/RenderLayerCompositor.h:
3911
3912 2014-08-18  Pratik Solanki  <psolanki@apple.com>
3913
3914         Remove PurgeableBuffer since it is not very useful any more
3915         https://bugs.webkit.org/show_bug.cgi?id=135939
3916
3917         Reviewed by Geoffrey Garen.
3918
3919         The usefulness of having purgeable memory for cached resources has diminished now that
3920         WebKit uses file backed resources when possible. Since this is read only memory, it is in
3921         essence "purgeable". Having the PurgeableBuffer code adds additional complexity that we
3922         don't need. e.g. on my Mac, I am not seeing any entry for "WebCore purgeable data" when I
3923         run vmmap against the web processes that I have running. It is used on iOS, however even
3924         there much of the purgeable memory we create gets replaced by file backed memory once we get
3925         the notification from CFNetwork.
3926
3927         No new tests because no functional changes.
3928
3929         * WebCore.xcodeproj/project.pbxproj:
3930         * inspector/InspectorPageAgent.cpp:
3931         (WebCore::prepareCachedResourceBuffer):
3932         * loader/DocumentLoader.cpp:
3933         (WebCore::DocumentLoader::subresource):
3934         * loader/ResourceBuffer.cpp:
3935         (WebCore::ResourceBuffer::hasPurgeableBuffer): Deleted.
3936         (WebCore::ResourceBuffer::setShouldUsePurgeableMemory): Deleted.
3937         (WebCore::ResourceBuffer::createPurgeableBuffer): Deleted.
3938         (WebCore::ResourceBuffer::releasePurgeableBuffer): Deleted.
3939         * loader/ResourceBuffer.h:
3940         * loader/SubresourceLoader.cpp:
3941         (WebCore::SubresourceLoader::didFinishLoading):
3942         * loader/cache/CachedCSSStyleSheet.cpp:
3943         (WebCore::CachedCSSStyleSheet::sheetText):
3944         (WebCore::CachedCSSStyleSheet::destroyDecodedData):
3945         * loader/cache/CachedCSSStyleSheet.h:
3946         * loader/cache/CachedImage.cpp:
3947         (WebCore::CachedImage::image):
3948         (WebCore::CachedImage::imageForRenderer):
3949         (WebCore::CachedImage::imageSizeForRenderer):
3950         (WebCore::CachedImage::destroyDecodedData):
3951         (WebCore::CachedImage::canUseDiskImageCache):
3952         * loader/cache/CachedImage.h:
3953         * loader/cache/CachedResource.cpp:
3954         (WebCore::CachedResource::addClientToSet):
3955         (WebCore::CachedResource::isSafeToMakePurgeable): Deleted.
3956         (WebCore::CachedResource::makePurgeable): Deleted.
3957         (WebCore::CachedResource::isPurgeable): Deleted.
3958         (WebCore::CachedResource::wasPurged): Deleted.
3959         * loader/cache/CachedResource.h:
3960         (WebCore::CachedResource::resourceBuffer):
3961         (WebCore::CachedResource::purgePriority): Deleted.
3962         * loader/cache/CachedScript.cpp:
3963         (WebCore::CachedScript::script):
3964         (WebCore::CachedScript::destroyDecodedData):
3965         * loader/cache/CachedScript.h:
3966         * loader/cache/MemoryCache.cpp:
3967         (WebCore::MemoryCache::resourceForRequestImpl):
3968         (WebCore::MemoryCache::pruneDeadResourcesToSize):
3969         (WebCore::MemoryCache::evict):
3970         (WebCore::MemoryCache::TypeStatistic::addResource):
3971         (WebCore::MemoryCache::dumpStats):
3972         (WebCore::MemoryCache::dumpLRULists):
3973         (WebCore::MemoryCache::makeResourcePurgeable): Deleted.
3974         * loader/cache/MemoryCache.h:
3975         (WebCore::MemoryCache::TypeStatistic::TypeStatistic):
3976         (WebCore::MemoryCache::shouldMakeResourcePurgeableOnEviction): Deleted.
3977         * platform/PurgePriority.h: Removed.
3978         * platform/PurgeableBuffer.h: Removed.
3979         * platform/SharedBuffer.cpp:
3980         (WebCore::SharedBuffer::SharedBuffer):
3981         (WebCore::SharedBuffer::size):
3982         (WebCore::SharedBuffer::data):
3983         (WebCore::SharedBuffer::append):
3984         (WebCore::SharedBuffer::clear):
3985         (WebCore::SharedBuffer::copy):
3986         (WebCore::SharedBuffer::getSomeData):
3987         (WebCore::SharedBuffer::adoptPurgeableBuffer): Deleted.
3988         (WebCore::SharedBuffer::createPurgeableBuffer): Deleted.
3989         (WebCore::SharedBuffer::releasePurgeableBuffer): Deleted.
3990         * platform/SharedBuffer.h:
3991         (WebCore::SharedBuffer::hasPurgeableBuffer): Deleted.
3992         (WebCore::SharedBuffer::shouldUsePurgeableMemory): Deleted.
3993         * platform/cf/SharedBufferCF.cpp:
3994         (WebCore::SharedBuffer::SharedBuffer):
3995         * platform/mac/PurgeableBufferMac.cpp: Removed.
3996         * platform/mac/SharedBufferMac.mm:
3997         (WebCore::SharedBuffer::createCFData):
3998         * platform/soup/SharedBufferSoup.cpp:
3999
4000 2014-08-18  Pratik Solanki  <psolanki@apple.com>
4001
4002         Use modern for loop instead of iterators in SharedBufferCF.cpp
4003         https://bugs.webkit.org/show_bug.cgi?id=136000
4004
4005         Reviewed by Andreas Kling.
4006
4007         * platform/cf/SharedBufferCF.cpp:
4008         (WebCore::SharedBuffer::copyBufferAndClear):
4009         (WebCore::SharedBuffer::copySomeDataFromDataArray):
4010         (WebCore::SharedBuffer::maybeAppendDataArray): Use auto& instead of auto for less RetainPtr/refcount churn.
4011
4012 2014-08-18  Antti Koivisto  <antti@apple.com>
4013
4014         Tighten RenderCounter typing
4015         https://bugs.webkit.org/show_bug.cgi?id=136049
4016
4017         Reviewed by Andreas Kling.
4018
4019         RenderObject* -> RenderElement&
4020
4021         * rendering/CounterNode.cpp:
4022         (WebCore::CounterNode::CounterNode):
4023         (WebCore::CounterNode::create):
4024         (WebCore::showTreeAndMark):
4025         * rendering/CounterNode.h:
4026         (WebCore::CounterNode::owner):
4027         * rendering/RenderCounter.cpp:
4028         (WebCore::previousInPreOrder):
4029         (WebCore::parentOrPseudoHostElement):
4030         (WebCore::previousSiblingOrParent):
4031         (WebCore::areRenderersElementsSiblings):
4032         (WebCore::nextInPreOrder):
4033         (WebCore::planCounter):
4034         (WebCore::findPlaceForCounter):
4035         (WebCore::makeCounterNode):
4036         (WebCore::RenderCounter::originalText):