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