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