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