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