3cc3c263428394e2101ec8ddb19782ea84fd35cb
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-05-31  David Kilzer  <ddkilzer@apple.com>
2
3         DerivedSources.make: any rules that use $(FEATURE_DEFINES) should be rebuilt when FeatureDefines.xcconfig changes
4         <http://webkit.org/b/117081>
5
6         Reviewed by Mark Rowe.
7
8         * DerivedSources.make: Add $(PLATFORM_FEATURE_DEFINES)
9         dependency for all rules that use $(FEATURE_DEFINES) to generate
10         files.
11         (PLATFORM_FEATURE_DEFINES): Set this variable to
12         Configurations/FeatureDefines.xcconfig if not already set on
13         Mac OS X.
14
15 2013-05-31  Tiancheng Jiang  <tijiang@rim.com>
16
17         Text Field UX updates.
18         https://bugs.webkit.org/show_bug.cgi?id=116996
19
20         Reviewed by Rob Buis.
21
22         BlackBerry PR 342333.
23         Internally Reviewed by Jeff Rogers.
24
25         Update disabled text field font color.
26
27         * css/themeBlackBerry.css:
28
29 2013-05-31  Dean Jackson  <dino@apple.com>
30
31         Update CheckedInt.h to latest version from Mozilla
32         https://bugs.webkit.org/show_bug.cgi?id=117009
33
34         Reviewed by Darin Adler.
35
36         Mozilla have updated their version of CheckedInt and suggested
37         we sync. Here are the improvements:
38
39         - CheckedInt now consistently rejects unsupported types. Before, you
40         could sometimes construct a CheckedInt from an unsupported type (like,
41         float) or multiply a CheckedInt by a float, and have it not caught! See
42         https://bugzilla.mozilla.org/show_bug.cgi?id=869194
43          - Fixed a possibility of undefined behavior in unary operator-. See bug
44         https://bugzilla.mozilla.org/show_bug.cgi?id=849666
45          - CheckedInt now supports the "long long" and "unsigned long long"
46         types. We don't like "long long" (and neither does the Google C++ style
47         guide!) but we had to do that because libogg exposes typedefs to those
48         types. See Bug https://bugzilla.mozilla.org/show_bug.cgi?id=869685
49          - CheckedInt also now supports "signed char" in addition to "char" ---
50         they are not the same type! See Bug https://bugzilla.mozilla.org/show_bug.cgi?id=847521
51          - Fixed and simplified usage of CheckedInt outside of Mozilla. You'll
52         like this one! See Bug https://bugzilla.mozilla.org/show_bug.cgi?id=849667
53          - Fixed compilation with the Intel C++ compiler. See bug https://bugzilla.mozilla.org/show_bug.cgi?id=784309
54
55         * html/canvas/CheckedInt.h: Updated.
56
57 2013-05-31  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
58
59         Make sure gstreamer source element is thread-safe
60         https://bugs.webkit.org/show_bug.cgi?id=115352
61
62         Reviewed by Philippe Normand.
63
64         GStreamer source element may be created by any gstreamer element on any thread by calling
65         gst_element_make_from_uri with the URIs handled by the source element.
66         This patch makes sure the gstreamer source element is thread-safe to avoid issues with it
67         being created outside the main thread.
68
69         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
70         (_WebKitWebSrcPrivate):
71         (webkit_web_src_init):
72         (webKitWebSrcFinalize):
73         (webKitWebSrcSetProperty):
74         (webKitWebSrcGetProperty):
75         (webKitWebSrcStop):
76         (webKitWebSrcStart):
77         (webKitWebSrcChangeState):
78         (webKitWebSrcQueryWithParent):
79         (webKitWebSrcGetUri):
80         (webKitWebSrcSetUri):
81         (webKitWebSrcNeedDataMainCb):
82         (webKitWebSrcEnoughDataMainCb):
83         (webKitWebSrcSeekMainCb):
84         (webKitWebSrcSeekDataCb):
85         (webKitWebSrcSetMediaPlayer):
86         (StreamingClient::StreamingClient):
87         (StreamingClient::~StreamingClient):
88         (StreamingClient::didReceiveResponse):
89         (StreamingClient::didReceiveData):
90         (StreamingClient::didFinishLoading):
91         (StreamingClient::wasBlocked):
92         (StreamingClient::cannotShowURL):
93
94 2013-05-31  Sergio Villar Senin  <svillar@igalia.com>
95
96         Build fix when CSSParser debugging is enabled
97         https://bugs.webkit.org/show_bug.cgi?id=117075
98
99         Reviewed by Andreas Kling.
100
101         Build fails when enabling parser debugging by setting YYDEBUG to
102         1 because of a missing include.
103
104         * css/CSSGrammar.y.includes:
105
106 2013-05-31  Alberto Garcia  <agarcia@igalia.com>
107
108         [Soup] [Gstreamer] ASSERT in StreamingClient::getOrCreateReadBuffer
109         https://bugs.webkit.org/show_bug.cgi?id=116686
110
111         Reviewed by Carlos Garcia Campos.
112
113         We were using g_input_stream_read_async() to handle redirections
114         because of Gnome bug #691489.
115
116         This produces an unexpected read attempt which triggers an assert
117         in StreamingClient::getOrCreateReadBuffer().
118
119         Now that the Gnome bug is fixed we can replace read_async() with
120         skip_async().
121
122         * platform/network/soup/ResourceHandleSoup.cpp:
123         (WebCore::ResourceHandle::ensureReadBuffer):
124         (WebCore::redirectSkipCallback):
125         (WebCore::sendRequestCallback):
126
127 2013-05-30  Eugene Klyuchnikov  <eustas@chromium.org>
128
129         selectionStart/selectionEnd return "obsolete" values when requested during "input" event
130         https://bugs.webkit.org/show_bug.cgi?id=110742
131
132         Reviewed by Ryosuke Niwa.
133
134         This patch defers firing "webkitEditableContentChanged" until new
135         selection is applied to control. This makes selection during "input"
136         more consistent and reliable.
137
138         Background: "input" event is fired by "webkitEditableContentChanged"
139         dispatcher. But "input" is scoped event, so under some conditions its
140         dispatching may be deferred. When "input" dispatching is deferred,
141         dispatcher observes updated selectionStart and selectionEnd.
142         Otherwise values repersent state before applying editing command.
143
144         So, to make selectionStart/End to be more predictable and useful, we
145         need either always dispatch "input" before selection is updated, or
146         always dispatch "input" after selection is updated.
147
148         As it was mentioned, dispatching could be deferred by scoping. So
149         dispatching before updating selection couldn't be guaranteed.
150         Moreover, it will be hard to calculate updated selection in user
151         code. On the other side - old selection could be easily tracked.
152
153         So, it looks logically that we should guarantee dispatching "input"
154         after updating selection. There are no execution paths in
155         "webkitEditableContentChanged" dispatched that depends on current
156         selection. So it is safe to fire this event after selection is updated.
157
158         Test: editing/selection/caret-after-keypress.html
159
160         * editing/Editor.cpp:
161         Dispatch "input" event after new selection in applied.
162
163 2013-05-30  Ruth Fong  <ruth_fong@apple.com>
164
165         WebKit's Enter Full Screen for <video> elements isn't working
166         https://bugs.webkit.org/show_bug.cgi?id=117001
167
168         Reviewed by Jer Noble.
169
170         Fix workflow to allow a video to enter into full screen
171         mode from a kWKContextMenuItemTagEnterVideoFullscreen 
172         context menu item by denoting the enterFullscreenForVideo
173         call as a user gesture, so Document::requestFullScreenForElement
174         will execute correctly.
175
176         No new tests. Covered by media/context-menu-actions.html,
177         which is disabled due to bug #116651.
178
179         * rendering/HitTestResult.cpp:
180         (WebCore::HitTestResult::enterFullscreenForVideo):
181
182 2013-05-30  Rafael Brandao  <rafael.lobo@openbossa.org>
183
184         Fix double hash lookup in RenderTableSection::paintObject loop
185         https://bugs.webkit.org/show_bug.cgi?id=117055
186
187         Reviewed by Antonio Gomes.
188
189         * rendering/RenderTableSection.cpp:
190         (WebCore::RenderTableSection::paintObject):
191
192 2013-05-30  Rafael Brandao  <rafael.lobo@openbossa.org>
193
194         Fix double hash lookup in WebSocket::connect loop
195         https://bugs.webkit.org/show_bug.cgi?id=117052
196
197         Reviewed by Anders Carlsson.
198
199         * Modules/websockets/WebSocket.cpp:
200         (WebCore::WebSocket::connect):
201
202 2013-05-30  Benjamin Poulain  <bpoulain@apple.com>
203
204         Remove some 16bits conversion.
205         https://bugs.webkit.org/show_bug.cgi?id=116935
206
207         Reviewed by Darin Adler.
208
209         Merge chromium ce35a544d09e6cb907457535340eb0e9984e57b8.
210         https://chromium.googlesource.com/chromium/blink/+/ce35a544d09e6cb907457535340eb0e9984e57b8
211
212         * html/parser/InputStreamPreprocessor.h:
213         * platform/FileSystem.cpp:
214         (WebCore::encodeForFileName):
215
216 2013-05-30  Anders Carlsson  <andersca@apple.com>
217
218         REGRESSION (r119759): Adobe Flash Player "smaller" installer relies on the incorrect firing of a load event and needs an app-specific hack for compatibility
219         https://bugs.webkit.org/show_bug.cgi?id=117042
220         <rdar://problem/13916291>
221
222         Reviewed by Mark Rowe.
223
224         Ignore HTTP errors for scripts requested from within the installer. Instead of just checking for the
225         Adobe Flash installer, we use the "com.solidstatenetworks.awkhost" bundle identifier to determine
226         whether to apply the workaround. This could in theory fix other installers that use the same mechanism.
227
228         * loader/cache/CachedScript.cpp:
229         (WebCore::CachedScript::shouldIgnoreHTTPStatusCodeErrors):
230         * loader/cache/CachedScript.h:
231         * platform/RuntimeApplicationChecks.cpp:
232         (WebCore::applicationIsSolidStateNetworksDownloader):
233         * platform/RuntimeApplicationChecks.h:
234
235 2013-05-30  Sergio Villar Senin  <svillar@igalia.com>
236
237         Allow no space between "background-position:" dimensions
238         https://bugs.webkit.org/show_bug.cgi?id=116870
239
240         Reviewed by Darin Adler.
241
242         From Blink r149314 by <ericwilligers@chromium.org>
243
244         Specs allow no spaces between the dimensions of a
245         "background-position:" like "1px+1px", we should support
246         that.
247
248         Whitespaces are no longer early consumed, dramatically dropping
249         the shift/reduce conflicts to half. The productions unary_term,
250         calc_func_term, calc_func_expr and calc_func_paren_expr no longer
251         consume whitespaces.
252
253         * css/CSSGrammar.y.in:
254         * css/CSSParser.cpp:
255         (WebCore::CSSParser::realLex):
256
257 2013-05-30  Jer Noble  <jer.noble@apple.com>
258
259         HTMLMediaElement will not unthrottle page when playback stops for nreasons other than user-initiated pause.
260         https://bugs.webkit.org/show_bug.cgi?id=117016
261
262         Reviewed by Oliver Hunt.
263
264         Add a new class PageActivityAssertionToken to allow HTMLMediaElement to decouple
265         knowledge of and control over the lifetime of PageThrottler. The new class will
266         have weak references to and from the PageThrottler so that holders of the token
267         will not need to care if the Page or PageThrottler has been destroyed. 
268
269         HTMLMediaElement will create one of these PageActivityAssertionTokens when playback
270         begins and destroy it when playback stops for any reason, or when the element is
271         destroyed.
272
273         * html/HTMLMediaElement.cpp:
274         (WebCore::HTMLMediaElement::~HTMLMediaElement):
275         (WebCore::HTMLMediaElement::playInternal):
276         (WebCore::HTMLMediaElement::pauseInternal):
277         (WebCore::HTMLMediaElement::playbackProgressTimerFired):
278         (WebCore::HTMLMediaElement::updatePlayState):
279         * html/HTMLMediaElement.h:
280         * page/Page.cpp:
281         (WebCore::createActivityToken): Added simple factory method.
282         * page/Page.h:
283         * page/PageActivityAssertionToken.cpp: 
284         (WebCore::PageActivityAssertionToken::PageActivityAssertionToken): Call addActivityToken();
285         (WebCore::PageActivityAssertionToken::~PageActivityAssertionToken): Call removeActivityToken();
286         (WebCore::PageActivityAssertionToken::invalidate): Clear m_throttler.
287         * page/PageActivityAssertionToken.h:
288         * page/PageThrottler.cpp:
289         (WebCore::PageThrottler::~PageThrottler): Invalidate all outstanding tokens.
290         (WebCore::PageThrottler::addActivityToken): Bump the activity count.
291         (WebCore::PageThrottler::removeActivityToken): Lower the activity count.
292         * page/PageThrottler.h:
293
294         Add the new files to the various build systems:
295         * CMakeLists.txt:
296         * GNUmakefile.list.am:
297         * Target.pri:
298         * WebCore.vcproj/WebCore.vcproj:
299         * WebCore.vcxproj/WebCore.vcxproj:
300         * WebCore.vcxproj/WebCore.vcxproj.filters:
301         * WebCore.xcodeproj/project.pbxproj:
302
303 2013-05-29  Jeffrey Pfau  <jpfau@apple.com>
304
305         [Mac] Enable cache partitioning and the public suffix list on 10.8
306         <rdar://problem/13679019>
307
308         Rubber-stamped by David Kilzer.
309
310         * Configurations/FeatureDefines.xcconfig:
311
312 2013-05-30  Andreas Kling  <akling@apple.com>
313
314         Fix double hash lookup in DocumentEventQueue::cancelEvent().
315         <http://webkit.org/b/117031>
316
317         Reviewed by Anders Carlsson.
318
319         * dom/DocumentEventQueue.cpp:
320         (WebCore::DocumentEventQueue::cancelEvent):
321
322 2013-05-30  Andreas Kling  <akling@apple.com>
323
324         Fix double hash lookup in DocumentLoader::removeSubresourceLoader().
325         <http://webkit.org/b/117030>
326
327         Reviewed by Anders Carlsson.
328
329         * loader/DocumentLoader.cpp:
330         (WebCore::DocumentLoader::removeSubresourceLoader):
331
332 2013-05-30  Andreas Kling  <akling@apple.com>
333
334         Fix double hash lookup in RenderView::repaintSelection() loop.
335         <http://webkit.org/b/117029>
336
337         Reviewed by Anders Carlsson.
338
339         * rendering/RenderView.cpp:
340         (WebCore::RenderView::repaintSelection):
341
342 2013-05-30  Peter Gal  <galpeter@inf.u-szeged.hu>
343
344         CURL: Incorrect stripping of query from file URL
345         https://bugs.webkit.org/show_bug.cgi?id=104307
346
347         Reviewed by Darin Adler.
348
349         Clear the query part of the file URL if there is any.
350
351         * platform/network/curl/ResourceHandleManager.cpp:
352         (WebCore::ResourceHandleManager::initializeHandle):
353
354 2013-05-30  Antti Koivisto  <antti@apple.com>
355
356         Separate generic font family settings to a class
357         https://bugs.webkit.org/show_bug.cgi?id=117027
358
359         Reviewed by Andreas Kling.
360
361         The new class is under platform/ and can be accessed by the font code directly without platform violations.
362
363         * WebCore.xcodeproj/project.pbxproj:
364         * page/Settings.cpp:
365         (WebCore::invalidateAfterGenericFamilyChange):
366         (WebCore::Settings::Settings):
367         (WebCore::Settings::~Settings):
368         (WebCore::Settings::create):
369         (WebCore::Settings::standardFontFamily):
370         (WebCore::Settings::setStandardFontFamily):
371         (WebCore::Settings::fixedFontFamily):
372         (WebCore::Settings::setFixedFontFamily):
373         (WebCore::Settings::serifFontFamily):
374         (WebCore::Settings::setSerifFontFamily):
375         (WebCore::Settings::sansSerifFontFamily):
376         (WebCore::Settings::setSansSerifFontFamily):
377         (WebCore::Settings::cursiveFontFamily):
378         (WebCore::Settings::setCursiveFontFamily):
379         (WebCore::Settings::fantasyFontFamily):
380         (WebCore::Settings::setFantasyFontFamily):
381         (WebCore::Settings::pictographFontFamily):
382         (WebCore::Settings::setPictographFontFamily):
383         * page/Settings.h:
384         * platform/graphics/FontGenericFamilies.cpp: Added.
385         (WebCore::setGenericFontFamilyForScript):
386         (WebCore::genericFontFamilyForScript):
387         (WebCore::FontGenericFamilies::FontGenericFamilies):
388         (WebCore::FontGenericFamilies::standardFontFamily):
389         (WebCore::FontGenericFamilies::fixedFontFamily):
390         (WebCore::FontGenericFamilies::serifFontFamily):
391         (WebCore::FontGenericFamilies::sansSerifFontFamily):
392         (WebCore::FontGenericFamilies::cursiveFontFamily):
393         (WebCore::FontGenericFamilies::fantasyFontFamily):
394         (WebCore::FontGenericFamilies::pictographFontFamily):
395         (WebCore::FontGenericFamilies::setStandardFontFamily):
396         (WebCore::FontGenericFamilies::setFixedFontFamily):
397         (WebCore::FontGenericFamilies::setSerifFontFamily):
398         (WebCore::FontGenericFamilies::setSansSerifFontFamily):
399         (WebCore::FontGenericFamilies::setCursiveFontFamily):
400         (WebCore::FontGenericFamilies::setFantasyFontFamily):
401         (WebCore::FontGenericFamilies::setPictographFontFamily):
402         * platform/graphics/FontGenericFamilies.h: Added.
403         (WebCore::UScriptCodeHashTraits::emptyValue):
404         (WebCore::UScriptCodeHashTraits::constructDeletedValue):
405         (WebCore::UScriptCodeHashTraits::isDeletedValue):
406         (WebCore::FontGenericFamilies::create):
407
408 2013-05-30  Andreas Kling  <akling@apple.com>
409
410         Avoid using CSSOM style declarations in HTML editing.
411         <http://webkit.org/b/117019>
412
413         Reviewed by Antti Koivisto.
414
415         Convert the editing code to use ComputedStyleExtractor instead of instantiating CSSOM wrappers.
416
417         * css/CSSComputedStyleDeclaration.h:
418         * css/CSSComputedStyleDeclaration.cpp:
419         (WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword):
420         (WebCore::ComputedStyleExtractor::useFixedFontDefaultSize):
421         (WebCore::ComputedStyleExtractor::propertyMatches):
422         (WebCore::ComputedStyleExtractor::copyProperties):
423         (WebCore::ComputedStyleExtractor::copyPropertiesInSet):
424
425             Moved here from CSSComputedStyleDeclaration. These methods are used by HTML editing.
426
427         (WebCore::CSSComputedStyleDeclaration::copyProperties):
428
429             Reimplemented to call ComputedStyleExtractor.
430
431         * css/CSSStyleDeclaration.h:
432         * css/PropertySetCSSStyleDeclaration.h:
433         * css/PropertySetCSSStyleDeclaration.cpp:
434         (WebCore::PropertySetCSSStyleDeclaration::copyProperties):
435
436             Removed CSSStyleDeclaration::cssPropertyMatches(), the remaining code lives in
437             ComputedStyleExtractor::propertyMatches() and is only used by HTML editing.
438
439         * css/StylePropertySet.h:
440         * css/StylePropertySet.cpp:
441         (WebCore::MutableStylePropertySet::removeEquivalentProperties):
442
443             Added an overload that takes a ComputedStyleExtractor.
444             This code should move into EditingStyle.cpp, material for a follow-up patch.
445
446         * editing/ApplyStyleCommand.cpp:
447         (WebCore::toIdentifier):
448
449             Add a file-local helper for yanking the identifier value (if any) out of a CSSPrimitiveValue.
450
451         (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
452         (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
453         (WebCore::highestEmbeddingAncestor):
454         * editing/EditingStyle.h:
455         * editing/EditingStyle.cpp:
456         (WebCore::editingStyleFromComputedStyle):
457         (WebCore::extractPropertyValue):
458         (WebCore::identifierForStyleProperty):
459         (WebCore::textColorFromStyle):
460         (WebCore::backgroundColorFromStyle):
461         (WebCore::EditingStyle::init):
462         (WebCore::EditingStyle::removeStyleAddedByNode):
463         (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
464         (WebCore::EditingStyle::triStateOfStyle):
465         (WebCore::EditingStyle::styleIsPresentInComputedStyleOfNode):
466         (WebCore::EditingStyle::removeStyleFromRulesAndContext):
467         (WebCore::StyleChange::StyleChange):
468         (WebCore::fontWeightIsBold):
469         (WebCore::extractPropertiesNotIn):
470         (WebCore::getPropertiesNotIn):
471
472             Use ComputedStyleExtractor instead of CSSComputedStyleDeclaration in all of this code.
473             Templatized a bunch of the code so we don't have to repeat ourselves for both StylePropertySet
474             and ComputedStyleExtractor inputs.
475
476 2013-05-30  Roland Takacs  <rtakacs@inf.u-szeged.hu>
477
478         Remove "hidden"=true from Inspector.json
479         https://bugs.webkit.org/show_bug.cgi?id=114116
480
481         Reviewed by Timothy Hatcher.
482
483         Remove "hidden"=true because it's a Chromium concept.
484         Patch created by Timothy Hatcher.
485
486         * inspector/Inspector.json:
487
488 2013-05-30  Kondapally Kalyan  <kalyan.kondapally@intel.com>
489
490         [EFL][EGL] Implement TransportSurface client.
491         https://bugs.webkit.org/show_bug.cgi?id=114122
492
493         Reviewed by Kenneth Rohde Christiansen.
494
495         Covered by existing WebGL tests.
496
497         This patch implements the client support for Transport
498         Surface with EGL backend using GLES2.
499
500         * platform/graphics/surfaces/efl/GLTransportSurface.cpp:
501         (WebCore::GLTransportSurfaceClient::createTransportSurfaceClient):
502         (WebCore::GLTransportSurfaceClient::GLTransportSurfaceClient):
503         * platform/graphics/surfaces/efl/GLTransportSurface.h:
504         (GLTransportSurfaceClient):
505         * platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp:
506         (WebCore::GraphicsSurfacePrivate::initializeClient):
507         * platform/graphics/surfaces/egl/EGLConfigSelector.cpp:
508         (WebCore):
509         (WebCore::EGLConfigSelector::surfaceClientConfig):
510         (WebCore::EGLConfigSelector::findMatchingConfigWithVisualId):
511         * platform/graphics/surfaces/egl/EGLConfigSelector.h:
512         (WebCore):
513         (EGLConfigSelector):
514
515         Support for retrieving valid EGLConfig on client side.
516
517         * platform/graphics/surfaces/egl/EGLHelper.cpp:
518         (WebCore):
519         (WebCore::resolveDisplay):
520         (WebCore::EGLHelper::resolveEGLBindings):
521         (WebCore::EGLHelper::createEGLImage):
522         (WebCore::EGLHelper::destroyEGLImage):
523         (WebCore::EGLHelper::imageTargetTexture2DOES):
524         * platform/graphics/surfaces/egl/EGLHelper.h:
525
526         Helper functions to create and destroy EGLImage.
527
528         * platform/graphics/surfaces/egl/EGLXSurface.cpp:
529         (WebCore::EGLXTransportSurfaceClient::EGLXTransportSurfaceClient):
530         (WebCore):
531         (WebCore::EGLXTransportSurfaceClient::~EGLXTransportSurfaceClient):
532         (WebCore::EGLXTransportSurfaceClient::destroy):
533         (WebCore::EGLXTransportSurfaceClient::prepareTexture):
534         (WebCore::EGLTextureFromPixmap::EGLTextureFromPixmap):
535         (WebCore::EGLTextureFromPixmap::~EGLTextureFromPixmap):
536         (WebCore::EGLTextureFromPixmap::destroy):
537         (WebCore::EGLTextureFromPixmap::isValid):
538         (WebCore::EGLTextureFromPixmap::bindTexImage):
539         (WebCore::EGLTextureFromPixmap::reBindTexImage):
540         * platform/graphics/surfaces/egl/EGLXSurface.h:
541         (EGLXTransportSurfaceClient):
542
543         TransportSurfaceClient implementation.
544
545         (WebCore):
546         * platform/graphics/surfaces/glx/GLXSurface.cpp:
547         (WebCore::GLXTransportSurfaceClient::GLXTransportSurfaceClient):
548         * platform/graphics/surfaces/glx/GLXSurface.h:
549         (GLXTransportSurfaceClient):
550         * platform/graphics/surfaces/glx/X11Helper.cpp:
551         (WebCore::X11Helper::createOffScreenWindow):
552         (WebCore):
553         (WebCore::X11Helper::createPixmap):
554         * platform/graphics/surfaces/glx/X11Helper.h:
555         (X11Helper):
556
557 2013-05-30  Mike West  <mkwst@chromium.org>
558
559         Rename 'KURL::elidedString' and inspector's 'String.prototype.trimMiddle' for clarity.
560         https://bugs.webkit.org/show_bug.cgi?id=111700
561
562         Reviewed by Darin Adler.
563
564         Darin suggested that 'KURL::elidedString' is inaccurately named[1], this
565         patch is an attempt to do better. It additionally brings the Inspector's
566         'String.prototype.trimMiddle' method into line, as the two methods do
567         more or less the same thing.
568
569         After a bit of discussion with Maciej and Daniel Bates on IRC, I've
570         settled on 'KURL::stringCenterEllipsizedToLength(unsigned)' and
571         'String.prototype.centerEllipsizedToLength(number)' respectively.
572
573         No new tests are added, as this patch shouldn't have any visible effect
574         on the web. It's strictly an internal refactoring.
575
576         * Modules/websockets/WebSocket.cpp:
577         (WebCore::WebSocket::connect):
578         (WebCore::WebSocket::send):
579         * Modules/websockets/WebSocketChannel.cpp:
580         (WebCore::WebSocketChannel::send):
581         (WebCore::WebSocketChannel::fail):
582         * bindings/ScriptControllerBase.cpp:
583         (WebCore::ScriptController::canExecuteScripts):
584         * dom/Document.cpp:
585         (WebCore::Document::processHttpEquiv):
586         * dom/ScriptElement.cpp:
587         (WebCore::ScriptElement::executeScript):
588         * html/HTMLMediaElement.cpp:
589         (WebCore::HTMLMediaElement::canPlayType):
590         (WebCore::HTMLMediaElement::isSafeToLoadURL):
591         * loader/FrameLoader.cpp:
592         (WebCore::FrameLoader::submitForm):
593         (WebCore::FrameLoader::loadFrameRequest):
594         (WebCore::FrameLoader::commitProvisionalLoad):
595         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
596         (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
597         (WebCore::createWindow):
598         * loader/MainResourceLoader.cpp:
599         (WebCore::MainResourceLoader::willSendRequest):
600         (WebCore::MainResourceLoader::responseReceived):
601         * loader/MixedContentChecker.cpp:
602         (WebCore::MixedContentChecker::logWarning):
603         * loader/appcache/ApplicationCacheGroup.cpp:
604         (WebCore::ApplicationCacheGroup::didReceiveResponse):
605         (WebCore::ApplicationCacheGroup::didFail):
606         * loader/cache/CachedResourceLoader.cpp:
607         (WebCore::CachedResourceLoader::canRequest):
608         (WebCore::CachedResourceLoader::requestResource):
609         (WebCore::CachedResourceLoader::loadResource):
610         (WebCore::CachedResourceLoader::printAccessDeniedMessage):
611         * page/ContentSecurityPolicy.cpp:
612         (WebCore::CSPDirectiveList::checkSourceAndReportViolation):
613         (WebCore::CSPDirectiveList::allowScriptNonce):
614         (WebCore::CSPDirectiveList::allowPluginType):
615         * platform/KURL.cpp:
616         (WebCore::KURL::stringCenterEllipsizedToLength):
617         * platform/KURL.h:
618             Rename 'KURL::elidedString' to 'KURL::stringCenterEllipsizedToLength',
619             and adjust callsites accordingly.
620         * inspector/front-end/CallStackSidebarPane.js:
621         (WebInspector.CallStackSidebarPane.Placard.prototype._update):
622         * inspector/front-end/ElementsTreeOutline.js:
623         (WebInspector.ElementsTreeElement.prototype._buildAttributeDOM):
624         * inspector/front-end/HeapSnapshotGridNodes.js:
625         (WebInspector.HeapSnapshotGenericObjectNode.prototype.shortenWindowURL):
626         * inspector/front-end/Linkifier.js:
627         (WebInspector.Linkifier.DefaultFormatter.prototype.formatLiveAnchor):
628         * inspector/front-end/ResourceUtils.js:
629         (WebInspector.linkifyURLAsNode):
630         * inspector/front-end/TabbedEditorContainer.js:
631         (WebInspector.TabbedEditorContainer.prototype._titleForFile):
632         * inspector/front-end/utilities.js:
633             Rename 'String.prototype.trimMiddle' to 'String.prototype.centerEllipsizedToLength'
634             and adjust callsites accordingly.
635
636 2013-05-30  Antti Koivisto  <antti@apple.com>
637
638         Rename FontFallbackList.cpp/h to FontGlyphs.cpp/h
639         https://bugs.webkit.org/show_bug.cgi?id=117022
640
641         Reviewed by Andreas Kling.
642
643         Rename to match the class name.
644
645         * CMakeLists.txt:
646         * GNUmakefile.list.am:
647         * Target.pri:
648         * WebCore.vcproj/WebCore.vcproj:
649         * WebCore.vcxproj/WebCore.vcxproj:
650         * WebCore.vcxproj/WebCore.vcxproj.filters:
651         * WebCore.xcodeproj/project.pbxproj:
652         * platform/graphics/Font.h:
653         * platform/graphics/FontCache.cpp:
654         * platform/graphics/FontFallbackList.cpp: Removed.
655         * platform/graphics/FontFallbackList.h: Removed.
656         * platform/graphics/FontFastPath.cpp:
657         * platform/graphics/FontGlyphs.cpp: Copied from Source/WebCore/platform/graphics/FontFallbackList.cpp.
658         * platform/graphics/FontGlyphs.h: Copied from Source/WebCore/platform/graphics/FontFallbackList.h.
659         * platform/graphics/mac/FontComplexTextMac.cpp:
660
661 2013-05-30  Ryosuke Niwa  <rniwa@webkit.org>
662
663         Get rid of Position::computedStyle
664         https://bugs.webkit.org/show_bug.cgi?id=117024
665
666         Reviewed by Andreas Kling.
667
668         Removed the function.
669
670         * dom/Position.cpp:
671         * dom/Position.h:
672         * editing/ApplyStyleCommand.cpp:
673         (WebCore::ApplyStyleCommand::positionToComputeInlineStyleChange): We need a position
674         inside the dummy element since we'll get the containing element's style instead
675         if we had the position before the dummy element.
676         * editing/EditingStyle.cpp:
677         (WebCore::StyleChange::StyleChange):
678
679 2013-05-30  Seokju Kwon  <seokju.kwon@gmail.com>
680
681         Remove obsolete forward declaration from InspectorFrontendHost.h
682         https://bugs.webkit.org/show_bug.cgi?id=117017
683
684         Reviewed by Joseph Pecoraro.
685
686         Remove obsolete forward declaration and fix style issue as well.
687
688         No change in behavior, no new tests.
689
690         * inspector/InspectorFrontendHost.h:
691         (WebCore):
692         (InspectorFrontendHost):
693
694 2013-05-29  Tim Horton  <timothy_horton@apple.com>
695
696         Expose incrementalRenderingSuppressionTimeout via WK2
697         https://bugs.webkit.org/show_bug.cgi?id=117015
698         <rdar://problem/13992853>
699
700         Reviewed by Darin Adler.
701
702         * dom/Document.cpp:
703         (WebCore::Document::setVisualUpdatesAllowed):
704         Inform the FrameLoader that we're ready to transition the page, if
705         nothing else already has. This will be forwarded to the FrameLoaderClient,
706         and WebKit2's implementation will go ahead and un-freeze the layer tree,
707         so that the incremental rendering suppression watchdog timer actually works.
708
709         (WebCore::Document::setVisualUpdatesAllowedByClient):
710         Make incremental rendering suppression extension tokens play nice with the
711         watchdog timer; allow setVisualUpdatesAllowedByClient=true to re-enable updates
712         if either the page is in the "completed" state or the watchdog has already fired.
713
714         * loader/FrameLoader.cpp:
715         * loader/FrameLoader.h:
716         (WebCore::FrameLoader::forcePageTransitionIfNeeded): Added.
717         Forward to the client.
718
719         * loader/FrameLoaderClient.h:
720         (WebCore::FrameLoaderClient::forcePageTransitionIfNeeded): Added.
721
722 2013-05-29  Praveen R Jadhav  <praveen.j@samsung.com>
723
724         ProgressEvent should not be cancelable
725         https://bugs.webkit.org/show_bug.cgi?id=114444
726
727         Reviewed by Darin Adler.
728
729         Parameter "cancelable" in ProgressEvent is set to false, by default, as mentioned in the specification. The spec link is given below.
730
731         Spec: http://www.w3.org/TR/2011/CR-progress-events-20110922/#suggested-names-for-events-using-the-progressevent-interface
732
733         No new tests. file-reader-event-listener.html and infoOnProgressEvent-expected.txt are updated.
734
735         * dom/ProgressEvent.cpp:
736         (WebCore::ProgressEvent::ProgressEvent):
737         (WebCore):
738
739 2013-05-29  Simon Fraser  <simon.fraser@apple.com>
740
741         Fix paint-related milestones to not fire when the layer tree is frozen
742         https://bugs.webkit.org/show_bug.cgi?id=117012
743
744         Reviewed by Tim Horton.
745
746         In the previous code, it was possible to paint some layer and schedule
747         the m_paintRelatedMilestonesTimer, but then the layer tree was put into
748         a frozen state because the page redirected. However, the paint-related
749         milestones timer would still fire. This caused woes with header/footer
750         banners.
751         
752         Fix by not firing paint-related milestones if the layer tree is frozen,
753         which we know via a new ChromeClient callback. When unfrozen, we'll
754         paint again, and fire the timer later.
755
756         * page/ChromeClient.h:
757         (WebCore::ChromeClient::layerTreeStateIsFrozen):
758         * rendering/RenderLayerCompositor.cpp:
759         (WebCore::RenderLayerCompositor::paintRelatedMilestonesTimerFired):
760
761 2013-05-29  Ryosuke Niwa  <rniwa@webkit.org>
762
763         Store form control list with RefPtr
764         https://bugs.webkit.org/show_bug.cgi?id=116910
765
766         Reviewed by Kent Tamura.
767
768         Merge https://chromium.googlesource.com/chromium/blink/+/582132773280455ead1d42b0073be37efdeaf989.
769
770         Unfortunately, the Blink change doesn't provide much insight as to what kind of crashes are fixed
771         by this code change but it cleans up the way form elements with state are registered to the form
772         controller so it seems benefitial to merge it anyway.
773
774         * dom/Document.cpp:
775         (WebCore::Document::dispose):
776         * html/FormController.cpp:
777         (WebCore::FormController::createSavedFormStateMap):
778         (WebCore::FormController::registerFormElementWithState):
779         (WebCore::FormController::unregisterFormElementWithState):
780         (WebCore):
781         * html/FormController.h:
782         (FormController):
783         * html/HTMLFormControlElementWithState.cpp:
784         (WebCore::HTMLFormControlElementWithState::HTMLFormControlElementWithState):
785         (WebCore::HTMLFormControlElementWithState::~HTMLFormControlElementWithState):
786         (WebCore::HTMLFormControlElementWithState::insertedInto):
787         (WebCore):
788         (WebCore::HTMLFormControlElementWithState::removedFrom):
789         * html/HTMLFormControlElementWithState.h:
790         (HTMLFormControlElementWithState):
791         * html/HTMLTextFormControlElement.cpp:
792         (WebCore::HTMLTextFormControlElement::insertedInto):
793
794 2013-05-29  Andreas Kling  <akling@apple.com>
795
796         Take ComputedStyleExtractor for a spin.
797         <http://webkit.org/b/116968>
798
799         Reviewed by Antti Koivisto.
800
801         Convert some editing and SVG code to use ComputedStyleExtractor instead of creating full
802         blown CSSComputedStyleDeclaration objects.
803
804         * editing/ApplyStyleCommand.cpp:
805         (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
806         (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
807         (WebCore::highestEmbeddingAncestor):
808         (WebCore::ApplyStyleCommand::computedFontSize):
809         * editing/EditingStyle.cpp:
810         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
811         (WebCore::EditingStyle::textDirectionForSelection):
812         (WebCore::getIdentifierValue):
813         (WebCore::backgroundColorInEffect):
814         * editing/EditingStyle.h:
815         * svg/SVGAnimationElement.cpp:
816         (WebCore::SVGAnimationElement::computeCSSPropertyValue):
817
818 2013-05-29  Benjamin Poulain  <bpoulain@apple.com>
819
820         Add a special case for SelectorDataList::execute when there is only one selector
821         https://bugs.webkit.org/show_bug.cgi?id=116891
822
823         Reviewed by Andreas Kling.
824
825         In the vast majority of cases, querySelector is called with a single selector.
826
827         This patch takes that input into account to improve the performance of
828         SelectorDataList::execute(). For the case of a single selector, we avoid three
829         branches executed for every node of the traversal.
830
831         This improves QuerySelector's time by 2.3%.
832
833         * dom/SelectorQuery.cpp:
834         (WebCore::SelectorDataList::execute):
835
836 2013-05-29  Dean Jackson  <dino@apple.com>
837
838         -webkit-text-underline-position should not be inherited
839         https://bugs.webkit.org/show_bug.cgi?id=116363
840
841         Reverting http://trac.webkit.org/changeset/150366
842         It was an incorrect fix referring to an old specification.
843
844         * css/CSSProperty.cpp:
845         (WebCore::CSSProperty::isInheritedProperty):
846         * rendering/style/RenderStyle.h:
847         * rendering/style/StyleRareInheritedData.cpp:
848         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
849         (WebCore::StyleRareInheritedData::operator==):
850         * rendering/style/StyleRareInheritedData.h:
851         (StyleRareInheritedData):
852         * rendering/style/StyleRareNonInheritedData.cpp:
853         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
854         (WebCore::StyleRareNonInheritedData::operator==):
855         * rendering/style/StyleRareNonInheritedData.h:
856         (StyleRareNonInheritedData):
857
858 2013-05-29  Ryuan Choi  <ryuan.choi@samsung.com>
859
860         [CMAKE] cmake errors when CMAKE_BUILD_TYPE is not specified.
861         https://bugs.webkit.org/show_bug.cgi?id=116899
862
863         Reviewed by Laszlo Gombos.
864
865         * CMakeLists.txt: Fixed if statement to escape when find command fails.
866
867 2013-05-28  Oliver Hunt  <oliver@apple.com>
868
869         Add more accurate activity state tracking
870         https://bugs.webkit.org/show_bug.cgi?id=116893
871
872         Reviewed by Gavin Barraclough.
873
874         Add a hysteresis to Page activity throttling.  We do this
875         through a PageThrottler class that now handles entering and
876         exiting throttling state, and adds a hysteresis to we can
877         limit the amount of on/off bouncing on the throttle.
878
879         Media elements now make use of this to disable timer throttling
880         while they are playing, and plugins use it to momentarily bounce
881         from throttled to unthrottled state.
882
883         * CMakeLists.txt:
884         * GNUmakefile.list.am:
885         * Target.pri:
886         * WebCore.exp.in:
887         * WebCore.vcproj/WebCore.vcproj:
888         * WebCore.vcxproj/WebCore.vcxproj:
889         * WebCore.vcxproj/WebCore.vcxproj.filters:
890         * WebCore.xcodeproj/project.pbxproj:
891         * html/HTMLMediaElement.cpp:
892         (WebCore::HTMLMediaElement::~HTMLMediaElement):
893         (WebCore::HTMLMediaElement::pageThrottlerIfPossible):
894         (WebCore):
895         (WebCore::HTMLMediaElement::playInternal):
896         (WebCore::HTMLMediaElement::pauseInternal):
897         * html/HTMLMediaElement.h:
898         (WebCore):
899         * html/MediaController.cpp:
900         (MediaController::unpause):
901         * page/ChromeClient.h:
902         (WebCore::ChromeClient::incrementActivePageCount):
903         (WebCore::ChromeClient::decrementActivePageCount):
904         (ChromeClient):
905         * page/Page.cpp:
906         (WebCore::Page::Page):
907         (WebCore::Page::~Page):
908         (WebCore::Page::setThrottled):
909         * page/Page.h:
910         (WebCore):
911         (Page):
912         (WebCore::Page::pageThrottler):
913         * page/PageThrottleState.h: Added.
914         * page/PageThrottler.cpp: Added.
915         (WebCore):
916         (WebCore::PageThrottler::PageThrottler):
917         (WebCore::PageThrottler::~PageThrottler):
918         (WebCore::PageThrottler::clearPage):
919         (WebCore::PageThrottler::throttlePage):
920         (WebCore::PageThrottler::unthrottlePage):
921         (WebCore::PageThrottler::setThrottled):
922         (WebCore::PageThrottler::preventThrottling):
923         (WebCore::PageThrottler::allowThrottling):
924         (WebCore::PageThrottler::stopThrottleHysteresisTimer):
925         (WebCore::PageThrottler::reportInterestingEvent):
926         (WebCore::PageThrottler::startThrottleHysteresisTimer):
927         (WebCore::PageThrottler::throttleHysteresisTimerFired):
928         * page/PageThrottler.h: Added.
929         (WebCore):
930         (PageThrottler):
931         (WebCore::PageThrottler::create):
932         (WebCore::PageThrottler::shouldThrottleAnimations):
933         (WebCore::PageThrottler::shouldThrottleTimers):
934
935 2013-05-29  Kent Tamura  <tkent@chromium.org>
936
937         Remove leftover files for ENABLE_PAGE_POPUP and ENABLE_CALENDAR_PICKER
938         https://bugs.webkit.org/show_bug.cgi?id=116999
939
940         Reviewed by Anders Carlsson.
941
942         * Resources/pagepopups/colorSuggestionPicker.css: Removed.
943         * Resources/pagepopups/colorSuggestionPicker.js: Removed.
944         * Resources/pagepopups/pickerCommon.css: Removed.
945         * Resources/pagepopups/pickerCommon.js: Removed.
946         * Resources/pagepopups/suggestionPicker.css: Removed.
947         * Resources/pagepopups/suggestionPicker.js: Removed.
948
949 2013-05-29  Jer Noble  <jer.noble@apple.com>
950
951         Unreviewed build fix; remove unintentional semicolon.
952
953         * Modules/webaudio/AudioScheduledSourceNode.cpp:
954         (WebCore::AudioScheduledSourceNode::finish):
955
956 2013-05-29  Anders Carlsson  <andersca@apple.com>
957
958         Merge PODArea::Chunk into PODFreeListArena::FreeListChunk
959         https://bugs.webkit.org/show_bug.cgi?id=117000
960
961         Reviewed by Oliver Hunt.
962
963         * platform/PODArena.h:
964         (WebCore::PODArena::roundUp):
965         * platform/PODFreeListArena.h:
966         (PODFreeListArena):
967         (WebCore::PODFreeListArena::FreeListChunk::FreeListChunk):
968         (FreeListChunk):
969         (WebCore::PODFreeListArena::FreeListChunk::~FreeListChunk):
970         (WebCore::PODFreeListArena::FreeListChunk::allocate):
971
972 2013-05-29  Anders Carlsson  <andersca@apple.com>
973
974         Move some PODArena members to PODFreeListArena
975         https://bugs.webkit.org/show_bug.cgi?id=116993
976
977         Reviewed by Sam Weinig.
978
979         This is more work towards merging the two classes.
980
981         * platform/PODArena.h:
982         (PODArena):
983         * platform/PODFreeListArena.h:
984         (PODFreeListArena):
985         (WebCore::PODFreeListArena::PODFreeListArena):
986
987 2013-05-29  Jer Noble  <jer.noble@apple.com>
988
989         [Mac] Scrubbing long movie files results in timeline snapping back to 0 during scrub.
990         https://bugs.webkit.org/show_bug.cgi?id=116986
991
992         Reviewed by Eric Carlson.
993
994         Keep a count of the number of in-flight seek requests, and only issue a timeupdate
995         (which triggers a "seeked" event) when the final seek completes.
996
997         Test: media/video-seek-multiple.html
998
999         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1000         (WebCore::MediaPlayerPrivateAVFoundation::seek):
1001         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted):
1002         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1003         (MediaPlayerPrivateAVFoundation):
1004
1005 2013-05-29  Anders Carlsson  <andersca@apple.com>
1006
1007         Remove unused code from PODArena
1008         https://bugs.webkit.org/show_bug.cgi?id=116990
1009
1010         Reviewed by Sam Weinig.
1011
1012         PODArena is only used as a base class of PODFreeListArena so remove unused member functions and make all
1013         members protected to make it impossible to use it without subclassing.
1014
1015         PODArena is a risky class to use since it doesn't return memory to the system unless the arena object is destroyed.
1016         This was the reason why PODFreeListArea was added. An upcoming patch will merge PODArena with PODFreeListArena and
1017         this is a small step towards that goal.
1018
1019         * platform/PODArena.h:
1020
1021 2013-05-29  Darin Adler  <darin@apple.com>
1022
1023         Remove custom binding for Clipboard setDragImage function
1024         https://bugs.webkit.org/show_bug.cgi?id=116422
1025
1026         Reviewed by Sam Weinig.
1027
1028         * bindings/js/JSClipboardCustom.cpp: Removed setDragImage binding.
1029
1030         * dom/Clipboard.cpp:
1031         (WebCore::Clipboard::canSetDragImage): Added a condition that this is a drag
1032         and drop clipboard. That used to be checked in the setDragImage binding.
1033         (WebCore::Clipboard::setDragImage): Added a version that takes an Element
1034         and calls through to the existing functions (in the legacy code path), or handles
1035         both the Element and HTMLImageElement not-in-document cases (in the new code path).
1036
1037         * dom/Clipboard.h: Updated for changes above.
1038
1039         * dom/Clipboard.idl: Removed [Custom] from setDragImage.
1040
1041         * page/EventHandler.cpp:
1042         (WebCore::EventHandler::handleDrag): Call the new setDragImage instead of the
1043         old setDragImageElement.
1044
1045 2013-05-29  Praveen R Jadhav  <praveen.j@samsung.com>
1046
1047         Cleanup AudioSourceNode.idl from WebKit build.
1048         https://bugs.webkit.org/show_bug.cgi?id=116905.
1049
1050         Reviewed by Darin Adler.
1051
1052         AudioSourceNode.idl is not part of WebAudio Specifications anymore.
1053         AudioNode is inherited directly in all the audio source nodes.
1054
1055         No new tests. Current test cases will cover all the scenarios.
1056
1057         * CMakeLists.txt:
1058         * DerivedSources.make:
1059         * DerivedSources.pri:
1060         * GNUmakefile.list.am:
1061         * Modules/webaudio/AudioBufferSourceNode.h:
1062         * Modules/webaudio/AudioBufferSourceNode.idl:
1063         * Modules/webaudio/AudioScheduledSourceNode.cpp:
1064         (WebCore::AudioScheduledSourceNode::AudioScheduledSourceNode):
1065         * Modules/webaudio/AudioScheduledSourceNode.h:
1066         * Modules/webaudio/AudioSourceNode.h: Removed.
1067         * Modules/webaudio/AudioSourceNode.idl: Removed.
1068         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
1069         (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode):
1070         * Modules/webaudio/MediaElementAudioSourceNode.h:
1071         (MediaElementAudioSourceNode):
1072         * Modules/webaudio/MediaElementAudioSourceNode.idl:
1073         * Modules/webaudio/MediaStreamAudioDestinationNode.idl:
1074         * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
1075         (WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode):
1076         * Modules/webaudio/MediaStreamAudioSourceNode.h:
1077         (MediaStreamAudioSourceNode):
1078         * Modules/webaudio/MediaStreamAudioSourceNode.idl:
1079         * Modules/webaudio/OscillatorNode.h:
1080         * Modules/webaudio/OscillatorNode.idl:
1081         * Target.pri:
1082         * WebCore.xcodeproj/project.pbxproj:
1083
1084 2013-05-29  Adam Barth  <abarth@webkit.org>
1085
1086         Optimize RenderText::offsetNext for 8 bit strings
1087         https://bugs.webkit.org/show_bug.cgi?id=116877
1088
1089         Reviewed by Darin Adler.
1090
1091         Previously, this function was always upconverting strings to 16 bits in
1092         order to create a cursorMovementIterator. This patch adds a fast path
1093         for ASCII and Latin-1 strings, which don't need this complicated cursor
1094         movement logic.
1095
1096         I ran into this code because nextOffset showed up as a memory pig on a
1097         memory profile of Mobile Gmail.
1098
1099         Test: editing/selection/move-by-character-brute-force.html
1100
1101         * rendering/RenderText.cpp:
1102         (WebCore::RenderText::previousOffset):
1103         (WebCore::RenderText::nextOffset):
1104
1105 2013-05-29  Brent Fulgham  <bfulgham@apple.com>
1106
1107         [Windows] Correct copy command (form versus forms)
1108
1109         * WebCore.vcproj/copyForwardingHeaders.cmd:
1110         * WebCore.vcxproj/copyForwardingHeaders.cmd:
1111
1112 2013-05-29  Bem Jones-Bey  <bjonesbe@adobe.com>
1113
1114         [CSS Shapes] Fix style issues in BasicShapes
1115         https://bugs.webkit.org/show_bug.cgi?id=116734
1116
1117         Reviewed by Alexandru Chiculita.
1118
1119         Fix indentation in BasicShapes.cpp, and change enums to respect the
1120         style rules CamelCase instead of HAVING_UNDERSCORES.
1121
1122         No new tests, only style changes.
1123
1124         * css/BasicShapeFunctions.cpp:
1125         (WebCore::valueForBasicShape):
1126         (WebCore::basicShapeForValue):
1127         * css/CSSBasicShapes.cpp:
1128         (WebCore::buildRectangleString):
1129         (WebCore::CSSBasicShapeRectangle::equals):
1130         (WebCore::CSSBasicShapeCircle::equals):
1131         (WebCore::CSSBasicShapeEllipse::equals):
1132         (WebCore::CSSBasicShapePolygon::equals):
1133         (WebCore::CSSBasicShapeInsetRectangle::equals):
1134         * css/CSSBasicShapes.h:
1135         (WebCore::CSSBasicShapeRectangle::type):
1136         (WebCore::CSSBasicShapeInsetRectangle::type):
1137         (WebCore::CSSBasicShapeCircle::type):
1138         (WebCore::CSSBasicShapeEllipse::type):
1139         (WebCore::CSSBasicShapePolygon::type):
1140         * rendering/ExclusionShape.cpp:
1141         (WebCore::ExclusionShape::createExclusionShape):
1142         * rendering/ExclusionShapeInsideInfo.cpp:
1143         (WebCore::ExclusionShapeInsideInfo::isEnabledFor):
1144         * rendering/ExclusionShapeOutsideInfo.cpp:
1145         (WebCore::ExclusionShapeOutsideInfo::isEnabledFor):
1146         * rendering/style/BasicShapes.cpp:
1147         (WebCore::BasicShape::canBlend):
1148         (WebCore::BasicShapeRectangle::path):
1149         (WebCore::BasicShapeCircle::path):
1150         (WebCore::BasicShapeEllipse::path):
1151         (WebCore::BasicShapeInsetRectangle::path):
1152         * rendering/style/BasicShapes.h:
1153         (WebCore::BasicShapeRectangle::type):
1154         (WebCore::BasicShapeCircle::type):
1155         (WebCore::BasicShapeEllipse::type):
1156         (WebCore::BasicShapePolygon::type):
1157         (WebCore::BasicShapeInsetRectangle::type):
1158
1159 2013-05-29  Otto Derek Cheung  <otcheung@rim.com>
1160
1161         [BlackBerry] Handle Host-Only cookies
1162         https://bugs.webkit.org/show_bug.cgi?id=116969
1163
1164         PR 338809
1165         Reviewed by Rob Buis.
1166         Internally Reviewed by Joe Mason.
1167
1168         Adding support for host-only cookies (cookies with no
1169         specified domains). These cookies should only be returned
1170         when the host matches the cookie domain exactly.
1171
1172         Tested using Opera and Browser cookie test suite. Tested
1173         that host cookies are being stored in it's own map using
1174         Web Inspector.
1175
1176         * platform/blackberry/CookieManager.cpp:
1177         (WebCore::CookieManager::getRawCookies):
1178         (WebCore::CookieManager::checkAndTreatCookie):
1179         (WebCore::CookieManager::findOrCreateCookieMap):
1180         * platform/blackberry/CookieParser.cpp:
1181         (WebCore::CookieParser::CookieParser):
1182         (WebCore::CookieParser::parseOneCookie):
1183         * platform/blackberry/ParsedCookie.h:
1184         (WebCore::ParsedCookie::isHostOnly):
1185         (ParsedCookie):
1186
1187 2013-05-29  Ryosuke Niwa  <rniwa@webkit.org>
1188
1189         Remove the size of DataVector in HTMLToken
1190         https://bugs.webkit.org/show_bug.cgi?id=116931
1191
1192         Reviewed by Sam Weinig.
1193
1194         Merge https://chromium.googlesource.com/chromium/blink/+/7977721e62c471bfa17b84d82cd5d8243a4eb9a9.
1195
1196         Shink HTMLToken by 1.5 kB
1197
1198         HTMLToken has an inline vector for buffering characters during tokenization. We
1199         originally picked the inline capacity of this buffer somewhat arbitrarily. This
1200         CL tunes the number based on a somewhat non-scientific browse of a number of
1201         popular web sites.
1202
1203         I (abarth) instrumented content_shell to log the length of each complete DataVector. I
1204         then browsed around a variety of web sites to collect data. The 99% percentile
1205         of DataVector lengths was just shy of 250 characters. I rounded that up to 256
1206         because powers of two are pretty. That means we'll malloc an external buffer
1207         less than 1% of the time, which seems fine.
1208
1209         * html/parser/HTMLToken.h:
1210         (HTMLToken):
1211
1212 2013-05-29  Brent Fulgham  <bfulgham@apple.com>
1213
1214         [Windows] Build correction after r150837
1215
1216         New 'forms' sub-folder of html needs to be included in
1217         copy operations.
1218
1219         * WebCore.vcproj/copyForwardingHeaders.cmd: copy html/forms.
1220         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Use correct
1221         'obj32' folder for build output.
1222         * WebCore.vcxproj/copyForwardingHeaders.cmd: copy html/forms.
1223
1224 2013-05-29  Tiancheng Jiang  <tijiang@rim.com>
1225
1226         [BlackBerry] Radio Button UX updates.
1227         https://bugs.webkit.org/show_bug.cgi?id=116881
1228
1229         Reviewed by Rob Buis.
1230
1231         BlackBerry PR 342322.
1232         Internally Reviewed by Jeff Rogers.
1233         Change images.
1234
1235         * platform/blackberry/RenderThemeBlackBerry.cpp:
1236         (WebCore::RenderThemeBlackBerry::paintRadio):
1237
1238 2013-05-29  Tiancheng Jiang  <tijiang@rim.com>
1239
1240         [BlackBerry] Datetime string is not centred in form controls.
1241         https://bugs.webkit.org/show_bug.cgi?id=100760
1242
1243         Reviewed by Rob Buis.
1244
1245         BlackBerry PR 343512
1246         Internally Reviewed by Jeff Rogers.
1247
1248         Adjust margin for inner text node of datetime form controls.
1249
1250         * css/themeBlackBerry.css:
1251         (input::-webkit-date-and-time-value):
1252
1253 2013-05-29  Brent Fulgham  <bfulgham@apple.com>
1254
1255         [Windows] Build correction after r150876
1256
1257         A clean build will now fail because the BaseMultipleFieldsDateAndTimeInputType sources have
1258         been removed, but are still referenced in the project file.
1259
1260         * WebCore.vcxproj/WebCore.vcxproj: Remove reference to BaseMultipleFieldsDateAndTimeInputType
1261         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto
1262
1263 2013-05-28  Jer Noble  <jer.noble@apple.com>
1264
1265         Support the 'onended' EventListener property for AudioBufferSourceNode and OscillatorNode.
1266         https://bugs.webkit.org/show_bug.cgi?id=116798
1267
1268         Reviewed by Eric Carlson.
1269
1270         Tests: webaudio/audiobuffersource-ended.html
1271                webaudio/oscillator-ended.html
1272
1273         * Modules/webaudio/AudioScheduledSourceNode.cpp:
1274         (WebCore::AudioScheduledSourceNode::AudioScheduledSourceNode):
1275         (WebCore::AudioScheduledSourceNode::setOnended): Set m_hasEndedListener.
1276         (WebCore::AudioScheduledSourceNode::finish): Call notifyEndedDispatch on the main thread.
1277         (WebCore::AudioScheduledSourceNode::notifyEndedDispatch): Call notifyEnded().
1278         (WebCore::AudioScheduledSourceNode::notifyEnded): Call the onended event listener.
1279         * Modules/webaudio/AudioScheduledSourceNode.h:
1280         (WebCore::AudioScheduledSourceNode::onended): Added boilerplate.
1281         * Modules/webaudio/AudioBufferSourceNode.idl: Added the onerror attribute.
1282         * Modules/webaudio/OscillatorNode.idl: Ditto.
1283
1284 2013-05-29  Bem Jones-Bey  <bjonesbe@adobe.com>
1285
1286         [CSS Shapes] Support parsing inset-rectangle shapes
1287         https://bugs.webkit.org/show_bug.cgi?id=116638
1288
1289         Reviewed by Dean Jackson.
1290
1291         Add parsing for inset-rectangle. It's very similar to parsing for
1292         rectangle.
1293
1294         No new tests, updated existing tests to cover this.
1295
1296         * css/BasicShapeFunctions.cpp:
1297         (WebCore::valueForBasicShape): Add support for inset rectangles.
1298         (WebCore::basicShapeForValue): Add support for inset rectangles.
1299         * css/CSSBasicShapes.cpp:
1300         (WebCore::buildInsetRectangleString): Create an inset-rectangle css
1301             string.
1302         (WebCore::CSSBasicShapeInsetRectangle::cssText): Convert inset
1303             rectangle shape to a CSS string.
1304         (WebCore::CSSBasicShapeInsetRectangle::equals): Compare two inset
1305             rectangles.
1306         (WebCore::CSSBasicShapeInsetRectangle::serializeResolvingVariables):
1307             Create an inset rectangle string, with CSS variables resolved.
1308         (WebCore::CSSBasicShapeInsetRectangle::hasVariableReference):
1309             Determine if this inset rectangle has any CSS Variable references.
1310         * css/CSSBasicShapes.h:
1311         (CSSBasicShapeInsetRectangle): Add inset rectangle class. This is a
1312             direct representation of the CSS property. All the methods below
1313             are just simple getters and setters, along with a construtor and a
1314             factory method.
1315         (WebCore::CSSBasicShapeInsetRectangle::create): 
1316         (WebCore::CSSBasicShapeInsetRectangle::top): 
1317         (WebCore::CSSBasicShapeInsetRectangle::right):
1318         (WebCore::CSSBasicShapeInsetRectangle::bottom):
1319         (WebCore::CSSBasicShapeInsetRectangle::left):
1320         (WebCore::CSSBasicShapeInsetRectangle::radiusX):
1321         (WebCore::CSSBasicShapeInsetRectangle::radiusY):
1322         (WebCore::CSSBasicShapeInsetRectangle::setTop):
1323         (WebCore::CSSBasicShapeInsetRectangle::setRight):
1324         (WebCore::CSSBasicShapeInsetRectangle::setBottom):
1325         (WebCore::CSSBasicShapeInsetRectangle::setLeft):
1326         (WebCore::CSSBasicShapeInsetRectangle::setRadiusX):
1327         (WebCore::CSSBasicShapeInsetRectangle::setRadiusY):
1328         (WebCore::CSSBasicShapeInsetRectangle::type):
1329         (WebCore::CSSBasicShapeInsetRectangle::CSSBasicShapeInsetRectangle):
1330         (WebCore):
1331         * css/CSSParser.cpp:
1332         (WebCore::CSSParser::parseBasicShapeInsetRectangle): Parse the
1333             inset-rectangle CSS property and create a
1334             CSSBasicShapeInsetRectangle.
1335         (WebCore::CSSParser::parseBasicShape): Add a call to parse
1336             inset-rectangle.
1337         * rendering/ExclusionShapeInsideInfo.cpp:
1338         (WebCore::ExclusionShapeInsideInfo::isEnabledFor): Disable
1339             inset-rectangles, since only the parsing has been implemented so
1340             far.
1341         * rendering/ExclusionShapeOutsideInfo.cpp:
1342         (WebCore::ExclusionShapeOutsideInfo::isEnabledFor): Disable
1343             inset-rectangles, since only the parsing has been implemented so
1344             far.
1345         * rendering/style/BasicShapes.cpp:
1346         (WebCore::BasicShapeInsetRectangle::path): Calculate the Path for an
1347             inset-rectangle.
1348         (WebCore::BasicShapeInsetRectangle::blend): Blend two inset rectangles
1349             together at a point depending on the "progress" and return the
1350             blended rectangle.
1351         * rendering/style/BasicShapes.h:
1352         (BasicShapeInsetRectangle): Add higher level inset rectangle class.
1353             This is used outside of the CSS representation. The methods below
1354             are just simple getters and setters, along with a constructor and
1355             a factory method.
1356         (WebCore::BasicShapeInsetRectangle::create):
1357         (WebCore::BasicShapeInsetRectangle::top):
1358         (WebCore::BasicShapeInsetRectangle::right):
1359         (WebCore::BasicShapeInsetRectangle::bottom):
1360         (WebCore::BasicShapeInsetRectangle::left):
1361         (WebCore::BasicShapeInsetRectangle::cornerRadiusX):
1362         (WebCore::BasicShapeInsetRectangle::cornerRadiusY):
1363         (WebCore::BasicShapeInsetRectangle::setTop):
1364         (WebCore::BasicShapeInsetRectangle::setRight):
1365         (WebCore::BasicShapeInsetRectangle::setBottom):
1366         (WebCore::BasicShapeInsetRectangle::setLeft):
1367         (WebCore::BasicShapeInsetRectangle::setCornerRadiusX):
1368         (WebCore::BasicShapeInsetRectangle::setCornerRadiusY):
1369         (WebCore::BasicShapeInsetRectangle::type):
1370         (WebCore::BasicShapeInsetRectangle::BasicShapeInsetRectangle):
1371
1372 2013-05-29  Andreas Kling  <akling@apple.com>
1373
1374         Move computed style extraction out of CSSComputedStyleDeclaration.
1375         <http://webkit.org/b/116965>
1376
1377         Reviewed by Antti Koivisto.
1378
1379         Make it possible to get computed CSSValues from a Node without creating a CSSOM
1380         style declaration object.
1381
1382         The bulk of the logic moves to a new class; ComputedStyleExtractor, which can be created
1383         on the stack, and takes the same setup variables as CSSComputedStyleDeclaration.
1384
1385         This is prep to enable futuristic optimizations in editing and elsewhere.
1386
1387         * css/CSSComputedStyleDeclaration.h:
1388         * css/CSSComputedStyleDeclaration.cpp:
1389         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1390
1391             Create a ComputedStyleExtractor to do the work!
1392
1393         (WebCore::ComputedStyleExtractor::currentColorOrValidColor):
1394         (WebCore::ComputedStyleExtractor::valueForFilter):
1395         (WebCore::ComputedStyleExtractor::ComputedStyleExtractor):
1396         (WebCore::ComputedStyleExtractor::valueForShadow):
1397         (WebCore::ComputedStyleExtractor::styledNode):
1398         (WebCore::ComputedStyleExtractor::propertyValue):
1399         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties):
1400         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForSidesShorthand):
1401         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand):
1402         (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
1403         * css/SVGCSSComputedStyleDeclaration.cpp:
1404         (WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor):
1405         (WebCore::ComputedStyleExtractor::svgPropertyValue):
1406
1407             Moved all of these from CSSComputedStyleDeclaration to the new class.
1408
1409         * rendering/style/RenderStyle.h:
1410         * svg/SVGPaint.h:
1411
1412             Have these two befriend ComputedStyleExtractor.
1413
1414 2013-05-29  Antti Koivisto  <antti@apple.com>
1415
1416         Another attempt to fix windows build.
1417         
1418         Not reviewed.
1419
1420         * css/CSSFontSelector.h:
1421
1422 2013-05-29  Antti Koivisto  <antti@apple.com>
1423
1424         Try to fix window build.
1425         
1426         Not reviewed.
1427
1428         * platform/graphics/FontCache.h:
1429         (WebCore::FontDescriptionFontDataCacheKey::computeHash):
1430
1431 2013-05-29  Simon Fraser  <simon.fraser@apple.com>
1432
1433         Fix the firing of m_paintRelatedMilestonesTimer
1434         https://bugs.webkit.org/show_bug.cgi?id=116919
1435
1436         Reviewed by Tim Horton.
1437
1438         r150671 intended to change things so that paint-related milestones
1439         only fire when painting has actually happened, so that WebKit clients
1440         are notified when we actually have bits to present.
1441         
1442         However, it made an incorrect assumption that painting would happen
1443         inside of flushCompositingState(). This is not the case; flushCompositingState()
1444         will just dirty CALayers, and later on Core Animation will ask us to paint them.
1445         
1446         This incorrect assumption meant that we would never start the
1447         m_paintRelatedMilestonesTimer, so never fire the milestones.
1448         
1449         Fix by starting the m_paintRelatedMilestonesTimer via the RenderLayerBacking
1450         paintContents call back. At this time we know we're painting, so we can both
1451         set the FrameView's last paint time, and start up the timer. We also only
1452         want to start the timer if there are pending milestones.
1453
1454         * rendering/RenderLayerBacking.cpp:
1455         (WebCore::RenderLayerBacking::paintIntoLayer):
1456         (WebCore::RenderLayerBacking::paintContents):
1457         * rendering/RenderLayerCompositor.cpp:
1458         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
1459         (WebCore::RenderLayerCompositor::didPaintBacking):
1460         * rendering/RenderLayerCompositor.h:
1461         (RenderLayerCompositor):
1462
1463 2013-05-29  Antti Koivisto  <antti@apple.com>
1464
1465         Share FontGlyphs
1466         https://bugs.webkit.org/show_bug.cgi?id=116863
1467
1468         Reviewed by Anreas Kling.
1469
1470         Style system generates many Font objects that are identical or similar enough to have identical FontGlyphs. 
1471         We can figure out that the FontGlyphs are going to be the same and share them. This reduces memory usage.
1472         It also improves performance as the glyph cache and the width cache hang from FontGlyphs and their hit rate
1473         increases.
1474         
1475         On PLT3 this takes the number of live FontGlyphs at the end from 40k+ to <1k. Width cache hit rate improves
1476         from ~42% to ~55%.
1477
1478         * css/CSSFontSelector.cpp:
1479         (WebCore::CSSFontSelector::CSSFontSelector):
1480         
1481             Add unique id we can use in cache key.
1482
1483         (WebCore::CSSFontSelector::dispatchInvalidationCallbacks):
1484         
1485             Bump the version number on invalidation so we don't reuse cache entries after web font is loaded.
1486
1487         (WebCore::CSSFontSelector::resolvesFamilyFor):
1488         
1489             Test if FontSelector is needed for resolving a particular FontDescription.
1490
1491         * css/CSSFontSelector.h:
1492         * page/Settings.cpp:
1493         (WebCore::setGenericFontFamilyMap):
1494         
1495             Invalidate the cache if standard font settings change.
1496
1497         * platform/graphics/Font.cpp:
1498         (FontGlyphsCacheKey):
1499         (FontGlyphsCacheEntry):
1500         (WebCore::operator==):
1501         (WebCore::fontGlyphsCache):
1502         (WebCore::invalidateFontGlyphsCache):
1503         (WebCore::makeFontSelectorFlags):
1504         (WebCore::makeFontGlyphsCacheKey):
1505         
1506             The cache key consists of
1507             
1508             - all families.
1509             - shared key with the lower level FontData cache (FontCache), guaranteeing FontDatas would be identical.
1510             - font selector specific keys.
1511
1512             These guarantee the FontData will be identical.
1513
1514         (WebCore::computeFontGlyphsCacheHash):
1515         (WebCore::pruneUnreferencedFromFontGlyphsCache):
1516         
1517             Don't accumulate unused entries.
1518
1519         (WebCore::retrieveOrAddCachedFontGlyphs):
1520         (WebCore::Font::update):
1521         * platform/graphics/Font.h:
1522         * platform/graphics/FontCache.cpp:
1523         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
1524         (WebCore::FontPlatformDataCacheKey::isHashTableDeletedValue):
1525         (WebCore::FontPlatformDataCacheKey::operator==):
1526         (FontPlatformDataCacheKey):
1527         (WebCore::computeHash):
1528         (WebCore::FontCache::getCachedFontPlatformData):
1529         (WebCore::FontCache::purgeInactiveFontData):
1530         (WebCore::FontCache::invalidate):
1531         * platform/graphics/FontCache.h:
1532         (WebCore::FontDescriptionFontDataCacheKey::FontDescriptionFontDataCacheKey):
1533         (WebCore::FontDescriptionFontDataCacheKey::makeFlagKey):
1534         (WebCore::FontDescriptionFontDataCacheKey::operator==):
1535         (WebCore::FontDescriptionFontDataCacheKey::operator!=):
1536         (WebCore::FontDescriptionFontDataCacheKey::computeHash):
1537         
1538             Separate part of the key for sharing.
1539
1540         (FontDescriptionFontDataCacheKey):
1541         * platform/graphics/FontFallbackList.cpp:
1542         (WebCore::FontGlyphs::FontGlyphs):
1543         (WebCore::FontGlyphs::releaseFontData):
1544         * platform/graphics/FontFallbackList.h:
1545         (WebCore::FontGlyphs::create):
1546         (WebCore::FontGlyphs::~FontGlyphs):
1547         
1548             Remove invalidate(). If FontGlyphs needs invalidation it is reconstructed.
1549
1550         * platform/graphics/FontSelector.h:
1551
1552 2013-05-29  Nico Weber  <thakis@chromium.org>
1553
1554         Remove unused file PlatformGestureEvent.cpp
1555         https://bugs.webkit.org/show_bug.cgi?id=116894
1556
1557         Reviewed by Darin Adler.
1558
1559         This was added in https://bugs.webkit.org/show_bug.cgi?id=49345 but
1560         not removed in https://bugs.webkit.org/show_bug.cgi?id=77492 which
1561         removed most of that code again.
1562         
1563         * platform/PlatformGestureRecognizer.cpp: Removed.
1564
1565 2013-05-29  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
1566
1567         [texmap][GStreamer][GTK] Composited Video support
1568         https://bugs.webkit.org/show_bug.cgi?id=86410
1569
1570         Reviewed by Noam Rosenthal.
1571
1572         Enable the video accelerated compositing using the WebKit's
1573         TextureMapper.
1574
1575         This patch does not use hardware accelerated video decoding. It
1576         provides a generic path for system memory buffers.
1577
1578         This new functionality is only available when the coordinated graphics
1579         system is not used.
1580
1581         No new tests, already covered by existing tests.
1582
1583         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1584         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
1585         (WebCore):
1586         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): update the
1587         texture content with the new received video buffer.
1588         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint): choose to
1589         use the accelerated compositing or the normal code path
1590         (WebCore::MediaPlayerPrivateGStreamerBase::paint): if accelerated
1591         compositing is used this method is halted.
1592         (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper): get
1593         a texture from the pool and draws it if it is already available.
1594         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1595         (MediaPlayerPrivateGStreamerBase):
1596         (WebCore::MediaPlayerPrivateGStreamerBase::platformLayer): returns itself
1597         (WebCore::MediaPlayerPrivateGStreamerBase::supportsAcceleratedRendering):
1598         returns true
1599
1600 2013-05-29  Peter Gal  <galpeter@inf.u-szeged.hu>
1601
1602         [Qt] Missing files from build after r150853
1603         https://bugs.webkit.org/show_bug.cgi?id=116932
1604
1605         Reviewed by Csaba Osztrogonác.
1606
1607         * Target.pri: Added missing include path.
1608
1609 2013-05-29  Mihai Maerean  <mmaerean@adobe.com>
1610
1611         [CSS Regions] Content that has overflow: scroll cannot be scrolled by dragging the scroll thumbs with the mouse
1612         https://bugs.webkit.org/show_bug.cgi?id=113703
1613
1614         Reviewed by Darin Adler.
1615
1616         The point inside a box that's inside a region has its coordinates relative to the region, not the FlowThread
1617         that is its container in the RenderObject tree.
1618
1619         Previously, the coordinates were computed relatively to the FlowThread which doesn't really have a location in
1620         the page.
1621
1622         Tests: fast/regions/drag-scrollbars-of-content.html
1623                fast/regions/hover-in-second-region.html
1624
1625         * rendering/RenderBox.cpp:
1626         (WebCore::RenderBox::offsetFromContainer):
1627         * rendering/RenderBoxModelObject.cpp:
1628         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
1629
1630 2013-05-29  Andreas Kling  <akling@apple.com>
1631
1632         Fix dumb typo in r150879.
1633
1634         * editing/htmlediting.cpp:
1635         (WebCore::nextLeafNode):
1636
1637 2013-05-29  Andreas Kling  <akling@apple.com>
1638
1639         Move leaf Node traversal helpers to htmlediting.cpp
1640         <http://webkit.org/b/116940>
1641
1642         Reviewed by Antti Koivisto.
1643
1644         Move Node::previousLeafNode() and Node::nextLeafNode() to htmlediting.cpp along with their helpers.
1645         Fixes an 8-year old FIXME. \o/
1646
1647         * dom/Node.h:
1648         * dom/Node.cpp:
1649         * dom/Position.cpp:
1650         (WebCore::nextRenderedEditable):
1651         (WebCore::previousRenderedEditable):
1652         * editing/VisibleUnits.cpp:
1653         (WebCore::previousLeafWithSameEditability):
1654         (WebCore::nextLeafWithSameEditability):
1655         * editing/htmlediting.h:
1656         * editing/htmlediting.cpp:
1657         (WebCore::previousNodeConsideringAtomicNodes):
1658         (WebCore::nextNodeConsideringAtomicNodes):
1659         (WebCore::previousLeafNode):
1660         (WebCore::nextLeafNode):
1661
1662 2013-05-29  Peter Gal  <galpeter@inf.u-szeged.hu>
1663
1664         [Qt] Missing files from build after r150853
1665         https://bugs.webkit.org/show_bug.cgi?id=116932
1666
1667         Reviewed by Csaba Osztrogonác.
1668
1669         * Target.pri: Added the CFURLExtras.{cpp,h} files to the projectfile.
1670
1671 2013-05-29  Ryosuke Niwa  <rniwa@webkit.org>
1672
1673         PresentationAttributeCacheCleaner::m_hitCount is never initialized
1674         https://bugs.webkit.org/show_bug.cgi?id=116946
1675
1676         Reviewed by Andreas Kling.
1677
1678         Merge https://chromium.googlesource.com/chromium/blink/+/70be7ddc41141ef6dec7795d37842c27dab2e194.
1679
1680         * dom/StyledElement.cpp:
1681         (WebCore::PresentationAttributeCacheCleaner::PresentationAttributeCacheCleaner):
1682
1683 2013-05-29  Kent Tamura  <tkent@chromium.org>
1684
1685         Remove ENABLE_INPUT_MULTIPLE_FIELDS_UI.
1686         https://bugs.webkit.org/show_bug.cgi?id=116796
1687
1688         Reviewed by Ryosuke Niwa.
1689
1690         This feature was used only by Chromium port.
1691
1692         * CMakeLists.txt:
1693         * GNUmakefile.list.am:
1694         * Target.pri:
1695         * WebCore.vcproj/WebCore.vcproj:
1696         * WebCore.vcxproj/WebCore.vcxproj:
1697         * WebCore.vcxproj/WebCore.vcxproj.filters:
1698         * WebCore.xcodeproj/project.pbxproj:
1699         * css/html.css:
1700         (input::-webkit-date-and-time-value):
1701         * dom/Element.cpp:
1702         * dom/Element.h:
1703         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
1704         * html/BaseChooserOnlyDateAndTimeInputType.h:
1705         * html/BaseMultipleFieldsDateAndTimeInputType.cpp: Removed.
1706         * html/BaseMultipleFieldsDateAndTimeInputType.h: Removed.
1707         * html/DateInputType.cpp:
1708         * html/DateInputType.h:
1709         (DateInputType):
1710         * html/DateTimeFieldsState.cpp: Removed.
1711         * html/DateTimeFieldsState.h: Removed.
1712         * html/DateTimeInputType.cpp:
1713         * html/DateTimeInputType.h:
1714         (DateTimeInputType):
1715         * html/DateTimeLocalInputType.cpp:
1716         * html/DateTimeLocalInputType.h:
1717         (DateTimeLocalInputType):
1718         * html/HTMLInputElement.cpp:
1719         (WebCore::HTMLInputElement::HTMLInputElement):
1720         (WebCore):
1721         * html/HTMLInputElement.h:
1722         (HTMLInputElement):
1723         * html/InputType.cpp:
1724         * html/InputType.h:
1725         (InputType):
1726         * html/MonthInputType.cpp:
1727         * html/MonthInputType.h:
1728         (MonthInputType):
1729         * html/TimeInputType.cpp:
1730         * html/TimeInputType.h:
1731         (TimeInputType):
1732         * html/WeekInputType.cpp:
1733         * html/WeekInputType.h:
1734         (WeekInputType):
1735         * html/shadow/ClearButtonElement.cpp: Removed.
1736         * html/shadow/ClearButtonElement.h: Removed.
1737         * html/shadow/DateTimeEditElement.cpp: Removed.
1738         * html/shadow/DateTimeEditElement.h: Removed.
1739         * html/shadow/DateTimeFieldElement.cpp: Removed.
1740         * html/shadow/DateTimeFieldElement.h: Removed.
1741         * html/shadow/DateTimeFieldElements.cpp: Removed.
1742         * html/shadow/DateTimeFieldElements.h: Removed.
1743         * html/shadow/DateTimeNumericFieldElement.cpp: Removed.
1744         * html/shadow/DateTimeNumericFieldElement.h: Removed.
1745         * html/shadow/DateTimeSymbolicFieldElement.cpp: Removed.
1746         * html/shadow/DateTimeSymbolicFieldElement.h: Removed.
1747         * html/shadow/PickerIndicatorElement.cpp: Removed.
1748         * html/shadow/PickerIndicatorElement.h: Removed.
1749         * page/ChromeClient.h:
1750         (ChromeClient):
1751         * platform/LocalizedStrings.h:
1752         (WebCore):
1753         * platform/text/PlatformLocale.cpp:
1754         * platform/text/PlatformLocale.h:
1755         (Locale):
1756         * rendering/RenderDetailsMarker.cpp:
1757         * rendering/RenderDetailsMarker.h:
1758         * rendering/RenderObject.h:
1759         (RenderObject):
1760
1761 2013-05-29  Ryosuke Niwa  <rniwa@webkit.org>
1762
1763         Remove setFullScreenRendererSize and setFullScreenRendererBackgroundColor
1764         https://bugs.webkit.org/show_bug.cgi?id=116914
1765
1766         Reviewed by Benjamin Poulain.
1767
1768         Merge https://chromium.googlesource.com/chromium/blink/+/508eb21a07f69ed38b9be9ff92fe75dcb907861f
1769
1770         * dom/Document.cpp:
1771         * dom/Document.h:
1772
1773 2013-05-29  Ryosuke Niwa  <rniwa@webkit.org>
1774
1775         Make WidgetHierarchyUpdatesSuspensionScope use swap instead of copy
1776         https://bugs.webkit.org/show_bug.cgi?id=116927
1777
1778         Reviewed by Andreas Kling.
1779
1780         Merge https://chromium.googlesource.com/chromium/blink/+/1d577e1fd5c5716a06e4007e04fc3d9d0a88f5e4
1781
1782         This is equivalent behavior code that is unambiguously better performance. swap is O(1) time and memory,
1783         copying a hash table is at least linear with the number of elements.
1784
1785         * rendering/RenderWidget.cpp:
1786         (WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets):
1787
1788 2013-05-29  Andreas Kling  <akling@apple.com>
1789
1790         Remove Document::nodeAbsIndex() and Document::nodeWithAbsIndex().
1791
1792         Rubber-stamped by Antti "Lucky" Koivisto.
1793
1794         * dom/Document.h:
1795         * dom/Document.cpp:
1796
1797 2013-05-28  Andreas Kling  <akling@apple.com>
1798
1799         FocusController should operate on Elements internally.
1800         <http://webkit.org/b/116781>
1801
1802         Reviewed by Antti Koivisto.
1803
1804         Switch from Node* to Element* as much as possible inside FocusController.
1805         Mostly mechanical, gets rid of some unnecessary isElementNode() checks and casts.
1806
1807         * page/FocusController.h:
1808         * page/FocusController.cpp:
1809         (WebCore::dispatchEventsOnWindowAndFocusedElement):
1810         (WebCore::isNonFocusableShadowHost):
1811         (WebCore::adjustedTabIndex):
1812         (WebCore::shouldVisit):
1813         (WebCore::FocusController::setFocused):
1814         (WebCore::FocusController::findFocusableElementDescendingDownIntoFrameDocument):
1815         (WebCore::FocusController::advanceFocusInDocumentOrder):
1816         (WebCore::FocusController::findFocusableElementAcrossFocusScope):
1817         (WebCore::FocusController::findFocusableElementRecursively):
1818         (WebCore::FocusController::findFocusableElement):
1819         (WebCore::FocusController::nextFocusableElement):
1820         (WebCore::FocusController::previousFocusableElement):
1821         (WebCore::FocusController::setActive):
1822
1823 2013-05-29  Radu Stavila  <stavila@adobe.com>
1824
1825         [CSS Regions] Mouse over an element does not trigger :hover state for parent when the element is flowed in a region
1826         https://bugs.webkit.org/show_bug.cgi?id=111749
1827
1828         Reviewed by Antti Koivisto.
1829
1830         When searching for the hover ancestor and encountering a named flow thread,
1831         the search will continue with the DOM ancestor of the top-most element
1832         in the named flow thread.
1833
1834         Tests: fast/regions/hover-in-region-grandparent.html
1835                fast/regions/hover-in-region-parent-skip.html
1836                fast/regions/hover-in-region-parent-skip-inlines-anonymous.html
1837                fast/regions/hover-on-child-in-region.html
1838                fast/regions/hover-on-child-in-region-in-region.html
1839
1840         * rendering/RenderObject.cpp:
1841         (WebCore::RenderObject::hoverAncestor):
1842         * rendering/RenderObject.h:
1843
1844 2013-05-28  Nate Chapin  <japhet@chromium.org>
1845
1846         Crash in WebCore::SubresourceLoader::releaseResources when connection fails
1847         https://bugs.webkit.org/show_bug.cgi?id=87743
1848
1849         Don't do anything complicated in SubresourceLoader::releaseResources(),
1850         just clear variables. With this patch, releaseResources() will still
1851         assert in debug builds if it is called twice, but it will safely execute
1852         in release.
1853
1854         Reviewed by Darin Adler.
1855
1856         * loader/ResourceLoader.cpp:
1857         (WebCore::ResourceLoader::cleanupForError): Pull shared cleanup code out of didFail()
1858             and cancel() into a helper.
1859         (WebCore::ResourceLoader::cancel): Merge a couple variables into an enum, check for
1860             reentrancy from within didCancel().
1861         * loader/ResourceLoader.h: Replace m_calledWillCancel and m_cancelled with an enum.
1862         * loader/SubresourceLoader.cpp:
1863         (WebCore::SubresourceLoader::didFinishLoading): Don't call ResourceLoader::didFinishLoading(),
1864             put finish() in the middle of the process.
1865         (WebCore::SubresourceLoader::didFail): Don't call ResourceLoader::didFail(), put finish()
1866             in the middle of the process.
1867         (WebCore::SubresourceLoader::didCancel):
1868         (WebCore::SubresourceLoader::notifyDone): Do the non-trivial work previous done in releaseResources(),
1869             most importantly calling loadDone().
1870         (WebCore::SubresourceLoader::releaseResources): Only do simple variable clearing here.
1871         * loader/SubresourceLoader.h:
1872         (SubresourceLoader):
1873         * loader/cache/CachedResource.cpp: Split stopLoading() into cancelLoad() (which notifies clients)
1874             and clearLoader() (which just nulls m_loader).
1875         * loader/cache/CachedResource.h:
1876         * loader/chromium/ResourceLoaderChromium.cpp:
1877
1878 2013-05-28  Seokju Kwon  <seokju.kwon@gmail.com>
1879
1880         [GTK] Build fix after r150837
1881         https://bugs.webkit.org/show_bug.cgi?id=116904
1882
1883         Unreviewed build fix.
1884
1885         * GNUmakefile.am:
1886
1887 2013-05-28  Andy Estes  <aestes@apple.com>
1888
1889         REGRESSION (r150169): Images from file: URLs display after a delay even though they were preloaded by JavaScript
1890         https://bugs.webkit.org/show_bug.cgi?id=116906
1891         <rdar://problem/13991927>
1892
1893         Reviewed by Andreas Kling.
1894
1895         Writing a test for this is blocked on https://webkit.org/b/116199.
1896
1897         Some WebKit clients use JavaScript to preload images from disk so that
1898         subsequent loads will display immediately from the memory cache. By not
1899         caching non-HTTP sub-resources in memory, we break this common pattern.
1900         This change restricts r150169 to only apply to cached main resources.
1901         Sub-resources will again be cached indefinitely as they were prior to
1902         r150169.
1903
1904         * loader/cache/CachedResource.cpp:
1905         (WebCore::CachedResource::freshnessLifetime): If this is a non-HTTP
1906         main resource from a scheme that should not be cached indefinitely,
1907         return 0 for the freshness lifetime. For other non-HTTP cached
1908         resources, return an indefinite freshness lifetime.
1909
1910 2013-05-28  Dean Jackson  <dino@apple.com>
1911
1912         Animations do not restart after exiting page cache
1913         https://bugs.webkit.org/show_bug.cgi?id=116900
1914
1915         Reviewed by Tim Horton.
1916
1917         Animations are suspended as they enter the page cache, but
1918         were not getting correctly resumed when exiting. The cause
1919         was an error in r149576 which was checking a global flag for suspension
1920         on the AnimationController and thus not trying to resume anything.
1921
1922         Test: animations/resume-after-page-cache.html
1923
1924         * page/animation/AnimationController.cpp:
1925         (WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
1926         (WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
1927
1928 2013-05-28  Chris Rogers  <crogers@google.com>
1929
1930         Support multiple HRTFDatabases for different sample-rates
1931         https://bugs.webkit.org/show_bug.cgi?id=116183
1932
1933         Reviewed by Kenneth Russell.
1934
1935         Adapted from Blink:
1936         https://codereview.chromium.org/14636011/
1937
1938         This removes the limitation which required OfflineAudioContexts to be created at native sample-rate
1939
1940         * Modules/webaudio/AudioContext.h:
1941         (WebCore::AudioContext::hrtfDatabaseLoader):
1942         (AudioContext):
1943         * Modules/webaudio/OfflineAudioContext.cpp:
1944         (WebCore::OfflineAudioContext::create):
1945         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
1946         (WebCore::OfflineAudioDestinationNode::offlineRender):
1947         * Modules/webaudio/PannerNode.cpp:
1948         (WebCore::PannerNode::initialize):
1949         (WebCore::PannerNode::setPanningModel):
1950         * platform/audio/HRTFDatabaseLoader.cpp:
1951         (WebCore):
1952         (WebCore::HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary):
1953         (WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader):
1954         * platform/audio/HRTFDatabaseLoader.h:
1955         (HRTFDatabaseLoader):
1956         (WebCore::HRTFDatabaseLoader::loaderMap):
1957         * platform/audio/HRTFPanner.cpp:
1958         (WebCore::HRTFPanner::HRTFPanner):
1959         (WebCore::HRTFPanner::calculateDesiredAzimuthIndexAndBlend):
1960         (WebCore::HRTFPanner::pan):
1961         * platform/audio/HRTFPanner.h:
1962         (HRTFPanner):
1963         * platform/audio/Panner.cpp:
1964         (WebCore::Panner::create):
1965         * platform/audio/Panner.h:
1966         (WebCore):
1967
1968 2013-05-28  Alexey Proskuryakov  <ap@apple.com>
1969
1970         Windows build fix.
1971
1972         * platform/cf/KURLCFNet.cpp:
1973         (WebCore::KURL::createCFURL):
1974
1975 2013-05-28  Alexey Proskuryakov  <ap@apple.com>
1976
1977         Freeze when loading a particular page on washingtonpost.com with NetworkProcess enabled
1978         https://bugs.webkit.org/show_bug.cgi?id=116887
1979         <rdar://problem/12965959>
1980
1981         Reviewed by Darin Adler.
1982
1983         Test: http/tests/uri/curly-braces-escaping.html
1984
1985         The issue was that WebKit used an incorrect accessor to get a string out of CFURL,
1986         unlike WebCore.
1987
1988         Centralized code for converting between CFURLs and strings in a place that WebKit
1989         can use directly.
1990
1991         * WebCore.exp.in:
1992         * WebCore.vcproj/WebCore.vcproj:
1993         * WebCore.vcxproj/WebCore.vcxproj:
1994         * WebCore.vcxproj/WebCore.vcxproj.filters:
1995         * WebCore.xcodeproj/project.pbxproj:
1996         Keeping things building.
1997
1998         * platform/KURL.cpp: (WebCore::KURL::copyToBuffer):
1999         * platform/KURL.h:
2000         Updated for a new typedef name. The code was using Vector<char, 512> and CharBuffer
2001         inconsistently, and now URLs use URLCharBuffer.
2002
2003         * platform/cf/CFURLExtras.cpp: Added.
2004         (WebCore::createCFURLFromBuffer):
2005         (WebCore::getURLBytes):
2006         * platform/cf/CFURLExtras.h: Added.
2007         * platform/cf/KURLCFNet.cpp:
2008         (WebCore::KURL::KURL):
2009         (WebCore::KURL::createCFURL):
2010         Extracted code for CFURL string manipulation that is not logcally part of KURL.
2011
2012         * platform/mac/KURLMac.mm:
2013         (WebCore::KURL::KURL): Use the new getURLBytes function.
2014         (WebCore::KURL::operator NSURL *): Added a comment.
2015         (WebCore::KURL::createCFURL): Added a comment, and updated for new names and
2016         signatures.
2017
2018         * platform/network/cf/ResourceErrorCF.cpp: (WebCore::ResourceError::platformLazyInit):
2019         Added a FIXME. We are still using CFURLGetString here. The difficulty is getting
2020         encodings right.
2021
2022 2013-05-28  Anders Carlsson  <andersca@apple.com>
2023
2024         Create a html/forms subdirectory and move FileIconLoader there
2025         https://bugs.webkit.org/show_bug.cgi?id=116880
2026
2027         Reviewed by Jessie Berlin.
2028
2029         A lot (if not the majority) of files in html/ are forms related, so it makes sense to begin splitting
2030         them out into a separate subdirectory, html/forms.
2031
2032         Begin my moving FileIconLoader from platform to html/forms. It is related to HTML forms (it's only used by
2033         the file upload element), and is not really a platform abstraction so it doesn't belong in platform.
2034
2035         * CMakeLists.txt:
2036         * GNUmakefile.list.am:
2037         * Target.pri:
2038         * WebCore.vcproj/WebCore.vcproj:
2039         * WebCore.vcxproj/WebCore.vcxproj:
2040         * WebCore.vcxproj/WebCore.vcxproj.filters:
2041         * WebCore.xcodeproj/project.pbxproj:
2042         * html/forms/FileIconLoader.cpp: Renamed from Source/WebCore/platform/FileIconLoader.cpp.
2043         * html/forms/FileIconLoader.h: Renamed from Source/WebCore/platform/FileIconLoader.h.
2044
2045 2013-05-28  Chris Fleizach  <cfleizach@apple.com>
2046
2047         AX: WKView is unable to set AXFocused to YES and does not handle keyboard events as expected
2048         https://bugs.webkit.org/show_bug.cgi?id=116756
2049
2050         Reviewed by Tim Horton.
2051
2052         If AXFocused is set to true, but the WebView is not the first responder, then the call will
2053         not do anything. This change asks the Chrome to make the WebView the first responder before
2054         trying to set focus within the page.
2055
2056         Was not able to make a test, it requires on interplay between areas outside the web view.
2057
2058         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2059         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
2060
2061 2013-05-28  Jer Noble  <jer.noble@apple.com>
2062
2063         Crash in DumpRenderTree at com.apple.WebCore: WebCore::RenderTextTrackCue::repositionGenericCue + 154
2064         https://bugs.webkit.org/show_bug.cgi?id=116882
2065
2066         Reviewed by Eric Carlson.
2067
2068         Remove an inappropriate assert. No cues coming through repositionGenericCue will be WebVTT ones.
2069
2070         * rendering/RenderTextTrackCue.cpp:
2071         (WebCore::RenderTextTrackCue::repositionGenericCue):
2072
2073 2013-05-28  Alberto Garcia  <agarcia@igalia.com>
2074
2075         [BlackBerry] GraphicsContext: add missing definitions.
2076         https://bugs.webkit.org/show_bug.cgi?id=115515
2077
2078         Reviewed by Rob Buis.
2079
2080         * platform/graphics/GraphicsContext.h:
2081         (Graphics):
2082         Add definition for PlatformGraphicsContext.
2083         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
2084         Include RoundedRect.h
2085
2086 2013-05-28  Arvid Nilsson  <anilsson@rim.com>
2087
2088         [BlackBerry] Fix style issues in BlackBerry accelerated compositing backend
2089         https://bugs.webkit.org/show_bug.cgi?id=116604
2090
2091         Reviewed by Carlos Garcia Campos.
2092
2093         PR 273550, 99638
2094
2095         Remove the "get" prefix from getters in the WebKit- and compositing-
2096         thread layer classes, as well as LayerRendererSurface. Clarify which
2097         geometry-related getters return normalized device coordinates by adding
2098         a comment.
2099
2100         Also remove dead code related to LayerData::m_holePunchClipRect, which
2101         was part of an eventually disabled fix for video clipping in iframes,
2102         PR 99638. Since we now use AC layers for iframes, the bug is no longer
2103         reproducible, and the dead code will never need to be enabled again.
2104
2105         No change in behavior, no new tests.
2106
2107         * platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp:
2108         (WebCore::EGLImageLayerCompositingThreadClient::drawTextures):
2109         * platform/graphics/blackberry/LayerCompositingThread.cpp:
2110         (WebCore::LayerCompositingThread::setDrawTransform):
2111         (WebCore::LayerCompositingThread::transformedHolePunchRect):
2112         (WebCore::LayerCompositingThread::drawTextures):
2113         (WebCore::LayerCompositingThread::drawSurface):
2114         * platform/graphics/blackberry/LayerCompositingThread.h:
2115         (WebCore::LayerCompositingThread::sublayers): Removed "get" prefix
2116         (LayerCompositingThread):
2117         (WebCore::LayerCompositingThread::boundingBox): Renamed from "getDrawRect"
2118         (WebCore::LayerCompositingThread::transformedBounds): Removed "get" prefix
2119         (WebCore::LayerCompositingThread::transformedHolePunchRect): Removed "get" prefix
2120         * platform/graphics/blackberry/LayerData.h:
2121         (LayerData): Removed unused data member "m_holePunchClipRect"
2122         * platform/graphics/blackberry/LayerFilterRenderer.cpp:
2123         (WebCore::LayerFilterRenderer::applyActions):
2124         * platform/graphics/blackberry/LayerRenderer.cpp:
2125         (WebCore::LayerRenderer::compositeLayers):
2126         (WebCore::LayerRenderer::drawDebugBorder):
2127         (WebCore::LayerRenderer::drawHolePunchRect):
2128         (WebCore::LayerRenderer::prepareFrameRecursive):
2129         (WebCore::LayerRenderer::updateLayersRecursive):
2130         (WebCore::collect3DPreservingLayers):
2131         (WebCore::LayerRenderer::compositeLayersRecursive):
2132         * platform/graphics/blackberry/LayerRendererSurface.cpp:
2133         (WebCore::LayerRendererSurface::boundingBox):
2134         * platform/graphics/blackberry/LayerRendererSurface.h:
2135         (WebCore::LayerRendererSurface::boundingBox): Renamed from "drawRect" because that sounds like a verb, and this is a getter
2136         * platform/graphics/blackberry/LayerWebKitThread.h:
2137         (WebCore::LayerWebKitThread::sublayers): Removed "get" prefix
2138         * platform/graphics/blackberry/VideoLayerWebKitThread.cpp:
2139         (WebCore::VideoLayerWebKitThread::setHolePunchRect):
2140         (WebCore::VideoLayerWebKitThread::boundsChanged):
2141
2142 2013-05-28  Jer Noble  <jer.noble@apple.com>
2143
2144         Made AudioNode an EventTarget
2145         https://bugs.webkit.org/show_bug.cgi?id=116871
2146
2147         Merge: https://chromium.googlesource.com/chromium/blink/+/ef37484162ddb95d677dcfdcdd778ec60590928b
2148
2149         Reviewed by Darin Adler.
2150
2151         Tests: webaudio/audionode-expected.txt:
2152                webaudio/audionode.html:
2153
2154         Add the requisite boilerplate to allow AudioNode to become an EventTarget. Remove
2155         all that same boilerplate from ScriptProcessorNode now that it's base class
2156         is an EventTarget.
2157
2158         * Modules/webaudio/AudioNode.cpp:
2159         (WebCore::AudioNode::interfaceName): Added boilerplate.
2160         (WebCore::AudioNode::scriptExecutionContext): Return the AudioContext's context.
2161         (WebCore::AudioNode::processIfNecessary): Whitespace.
2162         * Modules/webaudio/AudioNode.h:
2163         * Modules/webaudio/AudioNode.idl: Make AudioNode an EventTarget.
2164         * Modules/webaudio/ScriptProcessorNode.cpp: Remove EventTarget boilerplate.
2165         * Modules/webaudio/ScriptProcessorNode.h: Ditto.
2166         * Modules/webaudio/ScriptProcessorNode.idl: Ditto.
2167         * dom/EventTarget.h: Mark AudioNode as an EventTarget.
2168         * dom/EventTargetFactory.in: Ditto.
2169
2170 2013-05-28  Arvid Nilsson  <anilsson@rim.com>
2171
2172         [BlackBerry] backface-visibility: hidden doesn't work properly with masks and filters
2173         https://bugs.webkit.org/show_bug.cgi?id=116616
2174
2175         Reviewed by Carlos Garcia Campos.
2176
2177         The BlackBerry::Platform::Graphics::GraphicsContext generates geometry
2178         with a different winding order than the accelerated compositing backend
2179         of the BlackBerry port. So, when we switched from Skia to this new
2180         rendering engine, we switched from glFrontFace(GL_CCW) to
2181         glFrontFace(GL_CW), and all was well when drawing display lists.
2182         However, we forgot to update the winding order of geometry generated
2183         within the accelerated compositing backend, which is used for masks and
2184         filters, so they were getting erroneously culled out when
2185         backface-visibility: hidden was applied to them. Fixed by switching the
2186         winding order of all geometry generated up here, which has the added
2187         benefit of enabling us to use TransformationMatrix::mapQuad instead of
2188         transforming point-by-point.
2189
2190         To further complicate matters, a right-side up transform is used when
2191         drawing layers into surfaces, reversing the winding order and requiring
2192         us to switch back to glFrontFace(GL_CCW) temporarily, when drawing
2193         layers to surfaces, or the layers will get culled out inside the
2194         surface.
2195
2196         Also fix spelling error, "drawed" should be "drawn".
2197
2198         No new tests, this is only detectable by pixel tests, which the
2199         BlackBerry port currently doesn't support.
2200
2201         PR 341945.
2202
2203         * platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp:
2204         (WebCore::EGLImageLayerCompositingThreadClient::drawTextures):
2205         * platform/graphics/blackberry/LayerCompositingThread.cpp:
2206         (WebCore::LayerCompositingThread::setDrawTransform):
2207         (WebCore::getTransformedRect):
2208         (WebCore::LayerCompositingThread::drawTextures):
2209         (WebCore::LayerCompositingThread::drawSurface):
2210         * platform/graphics/blackberry/LayerCompositingThread.h:
2211         (LayerCompositingThread):
2212         (WebCore::LayerCompositingThread::origin):
2213         * platform/graphics/blackberry/LayerFilterRenderer.cpp:
2214         (WebCore):
2215         * platform/graphics/blackberry/LayerRenderer.cpp:
2216         (WebCore::LayerRenderer::compositeLayers):
2217         (WebCore):
2218         (WebCore::LayerRenderer::drawLayersOnSurfaces):
2219         * platform/graphics/blackberry/LayerRendererSurface.cpp:
2220         (WebCore::LayerRendererSurface::drawRect):
2221         (WebCore::LayerRendererSurface::transformedBounds):
2222         * platform/graphics/blackberry/LayerRendererSurface.h:
2223         (WebCore::LayerRendererSurface::origin):
2224         (LayerRendererSurface):
2225         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
2226         (WebCore):
2227         (WebCore::loadBufferingImageData):
2228         (WebCore::MediaPlayerPrivate::drawBufferingAnimation):
2229
2230 2013-05-28  Andreas Kling  <akling@apple.com>
2231
2232         Move Node::dispatchChangeEvent() to HTMLFormControlElement.
2233         <http://webkit.org/b/116866>
2234
2235         Reviewed by Anders Carlsson.
2236
2237         ...and devirtualize it, since it had no overrides.
2238
2239         * dom/Node.h:
2240         * dom/Node.cpp:
2241         * html/HTMLFormControlElement.h:
2242         * html/HTMLFormControlElement.cpp:
2243         (WebCore::HTMLFormControlElement::dispatchChangeEvent):
2244         (WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent):
2245         * html/FileInputType.cpp:
2246         (WebCore::FileInputType::setFiles):
2247         * html/HTMLTextFormControlElement.cpp:
2248         (WebCore::HTMLTextFormControlElement::dispatchFormControlChangeEvent):
2249
2250 2013-05-28  Sergio Villar Senin  <svillar@igalia.com>
2251
2252         Refactoring CSS grammar
2253         https://bugs.webkit.org/show_bug.cgi?id=116679
2254
2255         Reviewed by Andreas Kling.
2256
2257         From Blink r149948 by <serya@chromium.org>
2258
2259         Added "closing_parenthesis:" and "error_recovery:" to avoid code
2260         duplication in a couple of error recovery rules. Some other rules
2261         were also refactored which allows to reduce the the number of
2262         shift/reduce conflicts by 2.
2263
2264         No new tests required as this is just a refactoring, no new
2265         functionality added.
2266
2267         * css/CSSGrammar.y.in:
2268
2269 2013-05-28  Sergio Villar Senin  <svillar@igalia.com>
2270
2271         Invalid block doesn't make declaration invalid
2272         https://bugs.webkit.org/show_bug.cgi?id=115709
2273
2274         Reviewed by Andreas Kling.
2275
2276         From Blink r149446 by <serya@chromium.org>
2277
2278         Added a new rule "declaration_recovery:" which covers any kind of
2279         "invalid_block_list maybe_space" sequence. By appending this new
2280         rule to every rule reductable to "declaration:" we can remove some
2281         redundant rules and improve error recovery of some others that
2282         were only accepting exactly one error.
2283
2284         One of the rules being removed was preventing invalid blocks in a
2285         declaration to invalidate the whole declaration. The rule was
2286         reporting the syntax error but at the same time accepting the
2287         invalid block as part of a valid declaration.
2288
2289         * css/CSSGrammar.y.in:
2290
2291 2013-05-28  Andreas Kling  <akling@apple.com>
2292
2293         Move dispatching of focus-related events from Node to Element.
2294         <http://webkit.org/b/116864>
2295
2296         Reviewed by Antti Koivisto.
2297
2298         ...and pass around pointers to Element instead of Node.
2299
2300         * dom/Node.cpp:
2301         * dom/Node.h:
2302         * dom/Element.h:
2303         * dom/Element.cpp:
2304         (WebCore::Element::dispatchFocusInEvent):
2305         (WebCore::Element::dispatchFocusOutEvent):
2306         (WebCore::Element::dispatchFocusEvent):
2307         (WebCore::Element::dispatchBlurEvent):
2308
2309             Moved here from Node.
2310
2311         * html/HTMLFormControlElement.h:
2312         * html/HTMLFormControlElement.cpp:
2313         (WebCore::HTMLFormControlElement::dispatchBlurEvent):
2314         * html/HTMLSelectElement.h:
2315         * html/HTMLSelectElement.cpp:
2316         (WebCore::HTMLSelectElement::dispatchFocusEvent):
2317         (WebCore::HTMLSelectElement::dispatchBlurEvent):
2318         * html/HTMLTextFormControlElement.h:
2319         * html/HTMLTextFormControlElement.cpp:
2320         (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
2321         (WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
2322
2323             Update subclass overrides and sprinkle OVERRIDE/FINAL.
2324
2325 2013-05-28  Zan Dobersek  <zdobersek@igalia.com>
2326
2327         Remove CachedResourceRequest::initiatorElement
2328         https://bugs.webkit.org/show_bug.cgi?id=116862
2329
2330         Reviewed by Andreas Kling.
2331
2332         The CachedResourceRequest::initiatorElement method is not used anywhere and should be removed.
2333
2334         * loader/cache/CachedResourceRequest.cpp: Remove the initiatorElement method definition.
2335         * loader/cache/CachedResourceRequest.h:
2336         (CachedResourceRequest): Remove the initiatorElement method declaration.
2337
2338 2013-05-28  Andreas Kling  <akling@apple.com>
2339
2340         Document::setFocusedNode() should be setFocusedElement().
2341         <http://webkit.org/b/116857>
2342
2343         Reviewed by Antti Koivisto.
2344
2345         Only Elements can be focused, so tighten Document's idea of what's focused.
2346
2347         Most of this patch is just updating call sites for the new names and removing
2348         now-unnecessary isElementNode() checks and casts.
2349
2350         * WebCore.exp.in:
2351         * accessibility/AXObjectCache.cpp:
2352         (WebCore::AXObjectCache::focusedUIElementForPage):
2353         * accessibility/AccessibilityNodeObject.cpp:
2354         (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
2355         * accessibility/AccessibilityRenderObject.cpp:
2356         (WebCore::AccessibilityRenderObject::isFocused):
2357         (WebCore::AccessibilityRenderObject::setFocused):
2358         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
2359         * bindings/objc/DOM.mm:
2360         (-[DOMElement isFocused]):
2361         * dom/Document.cpp:
2362         (WebCore::Document::dispose):
2363         (WebCore::Document::detach):
2364         (WebCore::Document::focusedNodeRemoved):
2365         (WebCore::Document::removeFocusedNodeOfSubtree):
2366         (WebCore::Document::setFocusedElement):
2367         (WebCore::Document::updateFocusAppearanceTimerFired):
2368         (WebCore::eventTargetNodeForDocument):
2369         * dom/Document.h:
2370         (Document):
2371         (WebCore::Document::focusedElement):
2372         * dom/Element.cpp:
2373         (WebCore::Element::attach):
2374         (WebCore::Element::focus):
2375         (WebCore::Element::blur):
2376         (WebCore::Element::cancelFocusAppearanceUpdate):
2377         * dom/Node.cpp:
2378         (WebCore::Node::rendererIsEditable):
2379         * dom/TreeScope.cpp:
2380         (WebCore::TreeScope::focusedElement):
2381         * dom/UserTypingGestureIndicator.cpp:
2382         (WebCore::UserTypingGestureIndicator::UserTypingGestureIndicator):
2383         * editing/Editor.cpp:
2384         (WebCore::Editor::setBaseWritingDirection):
2385         (WebCore::Editor::setComposition):
2386         (WebCore::Editor::guessesForMisspelledOrUngrammatical):
2387         * editing/EditorCommand.cpp:
2388         (WebCore::verticalScrollDistance):
2389         * editing/FrameSelection.cpp:
2390         (WebCore::FrameSelection::selectAll):
2391         (WebCore::FrameSelection::focusedOrActiveStateChanged):
2392         (WebCore::FrameSelection::setFocusedElementIfNeeded):
2393         (WebCore::FrameSelection::currentForm):
2394         * history/CachedPage.cpp:
2395         (WebCore::CachedPage::restore):
2396         * html/HTMLInputElement.cpp:
2397         (WebCore::HTMLInputElement::updateType):
2398         (WebCore::HTMLInputElement::attach):
2399         * html/HTMLTextAreaElement.cpp:
2400         (WebCore::HTMLTextAreaElement::setValueCommon):
2401         * html/HTMLTextFormControlElement.cpp:
2402         (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
2403         (WebCore::HTMLTextFormControlElement::selectionStart):
2404         (WebCore::HTMLTextFormControlElement::selectionEnd):
2405         (WebCore::HTMLTextFormControlElement::selectionDirection):
2406         * html/RadioInputType.cpp:
2407         (WebCore::RadioInputType::handleKeydownEvent):
2408         (WebCore::RadioInputType::isKeyboardFocusable):
2409         * html/shadow/DateTimeEditElement.cpp:
2410         (WebCore::DateTimeEditElement::focusedFieldIndex):
2411         * loader/FrameLoader.cpp:
2412         (WebCore::FrameLoader::stopLoading):
2413         * page/DOMWindow.cpp:
2414         (WebCore::DOMWindow::focus):
2415         * page/EventHandler.cpp:
2416         (WebCore::EventHandler::scrollOverflow):
2417         (WebCore::EventHandler::logicalScrollOverflow):
2418         (WebCore::EventHandler::dispatchMouseEvent):
2419         (WebCore::EventHandler::sendContextMenuEventForKey):
2420         (WebCore::EventHandler::capsLockStateMayHaveChanged):
2421         * page/FocusController.cpp:
2422         (WebCore::dispatchEventsOnWindowAndFocusedNode):
2423         (WebCore::FocusController::advanceFocusInDocumentOrder):
2424         (WebCore::FocusController::setFocusedElement):
2425         (WebCore::FocusController::findFocusCandidateInContainer):
2426         (WebCore::FocusController::advanceFocusDirectionallyInContainer):
2427         (WebCore::FocusController::advanceFocusDirectionally):
2428         * page/FrameView.cpp:
2429         (WebCore::FrameView::scrollToAnchor):
2430         * plugins/PluginView.cpp:
2431         (WebCore::PluginView::focusPluginElement):
2432         * plugins/efl/PluginViewEfl.cpp:
2433         (WebCore::PluginView::setFocus):
2434         * plugins/mac/PluginViewMac.mm:
2435         (WebCore::PluginView::platformStart):
2436         * rendering/RenderImage.cpp:
2437         (WebCore::RenderImage::paintAreaElementFocusRing):
2438         * rendering/RenderListBox.cpp:
2439         (WebCore::RenderListBox::paintItemForeground):
2440         (WebCore::RenderListBox::paintItemBackground):
2441         * rendering/RenderTextControlSingleLine.cpp:
2442         (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
2443         (WebCore::RenderTextControlSingleLine::textShouldBeTruncated):
2444         * rendering/RenderTheme.cpp:
2445         (WebCore::RenderTheme::isFocused):
2446
2447 2013-05-28  Sergio Villar Senin  <svillar@igalia.com>
2448
2449         Web Inspector: Enable CSS logging
2450         https://bugs.webkit.org/show_bug.cgi?id=113401
2451
2452         Reviewed by Benjamin Poulain.
2453
2454         From Blink r149265 by <serya@chromium.org>
2455
2456         CSS logging was disabled in r147028 to prevent message overflow in
2457         the inspector console. This change restores it by modifying the
2458         CSS grammar in order to reduce as much consecutive errors as
2459         possible in 'declaration_list' and 'decl_list' rules.
2460
2461         This way, for rules like 'x { color: ### }' only the first '#'
2462         will be reported as error (instead of 3 identical errors).
2463
2464         The rule 'declaration' still produces multiple errors, because it
2465         does not eat as much errors as possible. So in order not to create
2466         a complex risky patch we just disable logging in the parser for
2467         that rule.
2468
2469         * css/CSSGrammar.y.in:
2470         * css/CSSParser.cpp:
2471         (WebCore::CSSParser::CSSParser):
2472         (WebCore::CSSParser::parseSheet):
2473         (WebCore::CSSParser::syntaxError):
2474         (WebCore::CSSParser::isLoggingErrors):
2475         (WebCore::CSSParser::rewriteSpecifiers):
2476         * css/CSSParser.h:
2477         (CSSParser):
2478
2479 2013-05-27  Patrick Gansterer  <paroga@webkit.org>
2480
2481         Build fix for WinCE after r150730.
2482
2483         * platform/graphics/FontFallbackList.cpp:
2484         (WebCore::FontGlyphs::glyphDataAndPageForCharacter):
2485
2486 2013-05-27  Patrick Gansterer  <paroga@webkit.org>
2487
2488         Build fix for WinCE after r150772.
2489
2490         * platform/win/ClipboardWin.cpp:
2491         (WebCore):
2492         * platform/win/PasteboardWin.cpp:
2493         (WebCore::Pasteboard::readFilenames):
2494         (WebCore):
2495
2496 2013-05-27  Darin Adler  <darin@apple.com>
2497
2498         Fix build.
2499
2500         * html/HTMLAnchorElement.cpp:
2501         (WebCore::hasNonEmptyBox): Fix typo.
2502
2503 2013-05-27  Darin Adler  <darin@apple.com>
2504
2505         Move hasNonEmptyBoundingBox from Node to HTMLAnchorElement
2506         https://bugs.webkit.org/show_bug.cgi?id=116842
2507
2508         Reviewed by Antti Koivisto.
2509
2510         * dom/Node.cpp: Removed hasNonEmptyBoundingBox.
2511         * dom/Node.h: Ditto.
2512
2513         * html/HTMLAnchorElement.cpp:
2514         (WebCore::HTMLAnchorElement::isMouseFocusable): Fixed #if to be more readable and
2515         added more-explicit clearer comments. No behavior change.
2516         (WebCore::hasNonEmptyBox): Added.  Has the same code that was in
2517         Node::hasNonEmptyBoundingBox with some additional comments.
2518         (WebCore::HTMLAnchorElement::isKeyboardFocusable): Call hasNonEmptyBox.
2519
2520 2013-05-27  Darin Adler  <darin@apple.com>
2521
2522         Move isBlockFlowElement and related functions out of the Node class into editing code
2523         https://bugs.webkit.org/show_bug.cgi?id=116846
2524
2525         Reviewed by Antti Koivisto.
2526
2527         * dom/Node.cpp: Removed isBlockFlowElement, enclosingBlockFlowElement, and
2528         inSameContainingBlockFlowElement. These are all editing functions that don't
2529         belong in the Node class, and mostly-deprecated ones to boot.
2530         * dom/Node.h: Ditto.
2531
2532         * dom/Position.cpp:
2533         (WebCore::inSameEnclosingBlockFlowElement): Added. This editing-specific function
2534         is used only here, so put it here.
2535         (WebCore::Position::rendersInDifferentPosition): Updated to call new function above.
2536         (WebCore::Position::leadingWhitespacePosition): Ditto.
2537
2538         * editing/InsertLineBreakCommand.cpp:
2539         (WebCore::InsertLineBreakCommand::insertNodeAfterPosition): Use
2540         deprecatedEnclosingBlockFlowElement at its new location.
2541         (WebCore::InsertLineBreakCommand::insertNodeBeforePosition): Ditto.
2542
2543         * editing/InsertListCommand.cpp:
2544         (WebCore::InsertListCommand::doApplyForSingleParagraph): use
2545         isBlockFlowElement at its new location.
2546         * editing/ReplaceSelectionCommand.cpp:
2547         (WebCore::enclosingInline): Ditto.
2548
2549         * editing/VisiblePosition.cpp:
2550         (WebCore::VisiblePosition::canonicalPosition): Use deprecatedEnclosingBlockFlowElement
2551         at its new location.
2552         (WebCore::enclosingBlockFlowElement): Ditto. Also added FIXME.
2553         * editing/VisibleSelection.cpp:
2554         (WebCore::makeSearchRange): Ditto.
2555
2556         * editing/htmlediting.cpp:
2557         (WebCore::isBlockFlowElement): Added. Same as the Node::isBlockFlowElement
2558         function, but here because this is an editing function, not suitable as a Node member.
2559         (WebCore::deprecatedEnclosingBlockFlowElement): Ditto. Added "deprecated" to the name
2560         since the Node member function had a comment saying it was deprecated. Also changed so
2561         it tolerates a 0 for an argument, which made it easier for one caller.
2562
2563         * editing/htmlediting.h: Added the two new functions.
2564
2565 2013-05-27  Seokju Kwon  <seokju.kwon@gmail.com>
2566
2567         Add guard around paintForFixedRootBackground
2568         https://bugs.webkit.org/show_bug.cgi?id=116754
2569
2570         Reviewed by Simon Fraser.
2571
2572         paintForFixedRootBackground is only used when ACCELERATED_COMPOSITING is enabled.
2573
2574         No new tests, no behavior change.
2575
2576         * rendering/RenderLayer.cpp:
2577         (WebCore):
2578
2579 2013-05-27  Seokju Kwon  <seokju.kwon@gmail.com>
2580
2581         Remove a leftover Pagepoup from PickerIndicatorElement.h
2582         https://bugs.webkit.org/show_bug.cgi?id=116801
2583
2584         Reviewed by Anders Carlsson.
2585
2586         No new tests, no behavior change.
2587
2588         * html/shadow/PickerIndicatorElement.h:
2589         (WebCore):
2590
2591 2013-05-27  Claudio Saavedra  <csaavedra@igalia.com>
2592
2593         [CSS] -webkit-var prefix is case-sensitive
2594         https://bugs.webkit.org/show_bug.cgi?id=116829
2595
2596         Reviewed by Darin Adler.
2597
2598         Tests: Added case to fast/css/variables/case-sensitive.html
2599
2600         * css/CSSParser.cpp:
2601         (WebCore::isEqualToCSSCaseSensitiveIdentifier): Add variant to
2602         IsEqualToCSSIdentifier that respects case-sensitivity.
2603         (WebCore::CSSParser::realLex): Use the above method for CSS
2604         variable declarations.
2605
2606 2013-05-27  Zalan Bujtas  <zalan@apple.com>
2607
2608         drop-shadow filter with overflow:hidden child misbehaves.
2609         https://bugs.webkit.org/show_bug.cgi?id=109783
2610
2611         Reviewed by Simon Fraser.
2612
2613         Applying CSS filters only to the scrollbar rect leaves rendering
2614         artefacts. Filters should skip such partial repaints.
2615
2616         Tests: Test framework uses mock theme for scrollbars. Such scrollbars do not
2617         initiate partial repaints.
2618
2619         * rendering/RenderLayer.cpp:
2620         (WebCore::RenderLayer::setupFilters):
2621         (WebCore::RenderLayer::paintLayerContents):
2622         * rendering/RenderLayer.h:
2623         (RenderLayer):
2624
2625 2013-05-27  Xueqing Huang  <huangxueqing@baidu.com>
2626
2627         Move Windows port off legacy clipboard.
2628         https://bugs.webkit.org/show_bug.cgi?id=116258
2629
2630         Reviewed by Darin Adler.
2631
2632         Clipboard refactor, no new tests.
2633
2634         * dom/Clipboard.h:
2635         * page/win/EventHandlerWin.cpp:
2636         (WebCore::EventHandler::createDraggingClipboard): Create Clipboard instead of ClipboardWin.
2637         * platform/Pasteboard.h:
2638         (WebCore::Pasteboard::dataObject): Get IDataObject by Clipborad.
2639         (WebCore::Pasteboard::writableDataObject): Get WCDataObject by Clipborad.
2640         * platform/win/ClipboardWin.cpp:
2641         (WebCore::Clipboard::createDragImage): Change parameter name loc to dragLocation.
2642         (WebCore::Clipboard::declareAndWriteDragImage): Implement declareAndWriteDragImage use WCDataObject exposed by Pasteboard.
2643         * platform/win/ClipboardWin.h: Removed.
2644         * platform/win/EditorWin.cpp:
2645         (WebCore::Editor::newGeneralClipboard): Create Clipboard instead of ClipboardWin.
2646         * platform/win/PasteboardWin.cpp:
2647         (WebCore::Pasteboard::createForCopyAndPaste): Create a Pasteboard.
2648         (WebCore::Pasteboard::createPrivate): Ditto.
2649         (WebCore::Pasteboard::createForDragAndDrop): Ditto.
2650         (WebCore::Pasteboard::finishCreatingPasteboard): Create Pasteboard use Windows API.
2651         (WebCore::Pasteboard::Pasteboard):
2652         (WebCore::clipboardTypeFromMIMEType): Copied from ClipboardWin.cpp.
2653         (WebCore::Pasteboard::clear): Ditto.
2654         (WebCore::Pasteboard::hasData): Ditto.
2655         (WebCore::addMimeTypesForFormat): Ditto.
2656         (WebCore::Pasteboard::types): Ditto.
2657         (WebCore::Pasteboard::readString): Ditto.
2658         (WebCore::Pasteboard::readFilenames): Ditto.
2659         (WebCore::writeURL): Ditto.
2660         (WebCore::Pasteboard::writeString): Ditto.
2661         (WebCore::Pasteboard::setDragImage): Ditto.
2662         (WebCore::Pasteboard::writeRangeToDataObject): Write range to WCDataObject.
2663         (WebCore::Pasteboard::writeSelection):
2664         (WebCore::Pasteboard::writePlainTextToDataObject): Write PlainText to WCDataObject.
2665         (WebCore::Pasteboard::writePlainText):
2666         (WebCore::pathRemoveBadFSCharacters): Copied from ClipboardWin.cpp.
2667         (WebCore::filesystemPathFromUrlOrTitle): Ditto.
2668         (WebCore::writeFileToDataObject): Ditto.
2669         (WebCore::Pasteboard::writeURLToDataObject): Write URL to WCDataObject.
2670         (WebCore::Pasteboard::writeURL): Copied from ClipboardWin.cpp.
2671         (WebCore::Pasteboard::writePasteboard): Copied from Pasteboard::writeClipboard.
2672         (WebCore::Pasteboard::documentFragment): Copied from ClipboardWin.cpp.
2673         (WebCore::Pasteboard::setExternalDataObject): Clipboard can set new IDataObject.
2674         (WebCore::getCachedImage): Copied from ClipboardWin.cpp.
2675         (WebCore::createGlobalImageFileDescriptor): Ditto.
2676         (WebCore::createGlobalImageFileContent): Ditto.
2677         (WebCore::createGlobalHDropContent): Ditto.
2678         (WebCore::Pasteboard::writeImageToDataObject): Expose to make Clipboard implement declareAndWriteDragImage.
2679         (WebCore::Pasteboard::writeURLToWritableDataObject): Ditto.
2680
2681 2013-05-27  Tim Horton  <timothy_horton@apple.com>
2682
2683         PDFPlugin: Main-frame PDFPlugin Accessibility
2684         https://bugs.webkit.org/show_bug.cgi?id=116563
2685         <rdar://problem/13458534>
2686
2687         Reviewed by Sam Weinig.
2688
2689         * WebCore.exp.in: Export AffineTransform::mapRect.
2690
2691 2013-05-27  Tiancheng Jiang  <tijiang@rim.com>
2692
2693         Checkbox UX update.
2694         https://bugs.webkit.org/show_bug.cgi?id=116838.
2695
2696         Reviewed by Rob Buis.
2697
2698         BlackBerry PR 342302.
2699         Internally Reviewed by Jeff Rogers.
2700         Remove old background and change pressed checkmark image.
2701
2702         * platform/blackberry/RenderThemeBlackBerry.cpp:
2703         (WebCore::RenderThemeBlackBerry::paintCheckbox):
2704
2705 2013-05-27  Sam Weinig  <sam@webkit.org>
2706
2707         When the background is completely transparent we should be conservative and use the default scrollbar style, not the light one
2708         https://bugs.webkit.org/show_bug.cgi?id=116836
2709         <rdar://problem/13949905>
2710
2711         Reviewed by Simon Fraser.
2712
2713         * page/FrameView.cpp:
2714         (WebCore::FrameView::recalculateScrollbarOverlayStyle):
2715         Don't use the light style when the background is completely transparent.
2716
2717 2013-05-27  Patrick Gansterer  <paroga@webkit.org>
2718
2719         Use ICU_INCLUDE_DIRS in BlackBerry CMake files
2720         https://bugs.webkit.org/show_bug.cgi?id=116210
2721
2722         Reviewed by Rob Buis.
2723
2724         Set and use the ICU_INCLUDE_DIRS variable to avoid
2725         duplicated adding of the ICU include directory.
2726
2727         * PlatformBlackBerry.cmake:
2728
2729 2013-05-27  Antti Koivisto  <antti@apple.com>
2730
2731         Tighten FontGlyphs::glyphDataAndPageForCharacter to take FontDescription
2732         https://bugs.webkit.org/show_bug.cgi?id=116823
2733
2734         Reviewed by Andreas Kling.
2735
2736         FontGlyphs does not need to know about Font anymore.
2737
2738         * platform/graphics/Font.cpp:
2739         (WebCore::Font::Font):
2740         (WebCore::Font::operator=):
2741         * platform/graphics/Font.h:
2742         (WebCore::Font::isPlatformFont):
2743         (WebCore::Font::glyphDataAndPageForCharacter):
2744         (Font):
2745         * platform/graphics/FontCache.h:
2746         * platform/graphics/FontFallbackList.cpp:
2747         (WebCore::FontGlyphs::FontGlyphs):
2748         (WebCore::FontGlyphs::glyphDataAndPageForCharacter):
2749         * platform/graphics/FontFallbackList.h:
2750         (WebCore):
2751         (WebCore::FontGlyphs::createForPlatformFont):
2752         
2753             Tweaked the name.
2754
2755         (WebCore::FontGlyphs::isForPlatformFont):
2756         
2757             Move knowledge about platform font to FontGlyphs as it is needed for resolving system fallback on Mac.
2758
2759         * platform/graphics/blackberry/FontCacheBlackBerry.cpp:
2760         (WebCore::FontCache::systemFallbackForCharacters):
2761         * platform/graphics/freetype/FontCacheFreeType.cpp:
2762         (WebCore::FontCache::systemFallbackForCharacters):
2763         * platform/graphics/mac/FontCacheMac.mm:
2764         (WebCore::FontCache::systemFallbackForCharacters):
2765         * platform/graphics/qt/FontCacheQt.cpp:
2766         (WebCore::FontCache::systemFallbackForCharacters):
2767         * platform/graphics/win/FontCacheWin.cpp:
2768         (WebCore::FontCache::systemFallbackForCharacters):
2769         * platform/graphics/wince/FontCacheWinCE.cpp:
2770         (WebCore::FontCache::systemFallbackForCharacters):
2771         
2772             More descriptive name and tighter interface.
2773
2774 2013-05-27  Mihnea Ovidenie  <mihnea@adobe.com>
2775
2776         [CSSRegions] Prevent unnecessary copy of LayoutRect objects
2777         https://bugs.webkit.org/show_bug.cgi?id=116828
2778
2779         Reviewed by Andreas Kling.
2780
2781         Use const references for parameter passing.
2782         No functional change, no new tests.
2783
2784         * rendering/RenderFlowThread.cpp:
2785         (WebCore::RenderFlowThread::paintFlowThreadPortionInRegion):
2786         (WebCore::RenderFlowThread::hitTestFlowThreadPortionInRegion):
2787         * rendering/RenderFlowThread.h:
2788         * rendering/RenderRegion.cpp:
2789         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
2790         * rendering/RenderRegion.h:
2791
2792 2013-05-27  Leo Yang  <leoyang@rim.com>
2793
2794         [BlackBerry] Reveal HTTP error code for XHR even if there is no response body
2795         https://bugs.webkit.org/show_bug.cgi?id=116543
2796
2797         Reviewed by Rob Buis.
2798         Reviewed internally by Joe Mason.
2799
2800         It's a regression introduced by r132556.
2801         BlackBerry is doing friendly HTTP error handling: if there is no response body
2802         for an HTTP error it will display an error message made by the port. But for a
2803         XHR request, which usually does not result in displaying error messages to the
2804         end user, HTTP error code should be revealed to let the JavaScript know what
2805         the actual server error code is.
2806
2807         Covered by existing tests:
2808         ManualTests/blackberry/head-xhr-nonexistant-file.html
2809         LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-check-head-readystate-for-404.html
2810         LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-check-get-readystate-for-404-without-body.html
2811
2812         * platform/network/blackberry/NetworkJob.cpp:
2813         (WebCore::NetworkJob::shouldNotifyClientFailed):
2814
2815 2013-05-27  Tiancheng Jiang  <tijiang@rim.com>
2816
2817         Adjust date input width.
2818         https://bugs.webkit.org/show_bug.cgi?id=100760.
2819
2820         Reviewed by Rob Buis.
2821
2822         BlackBerry PR 343497.
2823         Internally Reviewed by Jeff Rogers.
2824
2825         Set width to auto to fit the string length.
2826
2827         * css/themeBlackBerry.css:
2828         (input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="time"], input[type="month"]):
2829
2830 2013-05-27  Andreas Kling  <akling@apple.com>
2831
2832         Document::setHoveredNode() should be setHoveredElement().
2833         <http://webkit.org/b/116819>
2834
2835         Reviewed by Antti Koivisto.
2836
2837         Only Elements can be hovered, teach Document about this.
2838
2839         * dom/Document.h:
2840         * dom/Document.cpp:
2841         (WebCore::Document::dispose):
2842         (WebCore::Document::detach):
2843
2844             m_hoverNode => m_hoveredElement.
2845             Removed hoverNode() and setHoverNode() since those were only used internally.
2846
2847         (WebCore::Document::updateHoverActiveState):
2848
2849             Updated for hovered things always being Elements.
2850
2851         (WebCore::Document::hoveredElementDidDetach):
2852         * dom/Element.cpp:
2853         (WebCore::Element::detach):
2854
2855             Renamed Document::hoveredNodeDetached() to hoveredElementDidDetach() and fix it up
2856             following the same pattern as elementInActiveChainDidDetach().
2857
2858 2013-05-27  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2859
2860         [Qt] REGRESSION(r150716): It made 15 inspector and 1 mozilla test to assert
2861         https://bugs.webkit.org/show_bug.cgi?id=116822
2862
2863         Reviewed by Andreas Kling.
2864
2865         The input fontDescription may have more than one family defined.
2866
2867         * platform/qt/RenderThemeQStyle.cpp:
2868         (WebCore::RenderThemeQStyle::adjustButtonStyle):
2869
2870 2013-05-27  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
2871
2872         [Qt][Win] Input events aren't mapped properly with windowless plugins.
2873         https://bugs.webkit.org/show_bug.cgi?id=116094
2874
2875         Reviewed by Tor Arne Vestbø.
2876
2877         The events are first sent properly but Flash then immediately repaints
2878         and this causes flickering painting.
2879         The issue is that Flash seems to be doing some input event tracking of
2880         its own internally, using the HWND returned through NPN_GetValue(NPNVnetscapeWindow).
2881
2882         We are currently using two coordinate systems for windowless plugins on Windows with Qt:
2883         - FrameView coordinates: Used for input events and ajusted with the WM_WINDOWPOSCHANGED message
2884         - Drawable coordinates: Used by WM_PAINT and adjusted with NPP_SetWindow
2885
2886         This patch fixes the bug by mapping input events to the native window returned
2887         as NPNVnetscapeWindow instead of the FrameView to ensure that those coordinates will match
2888         the ones used by Flash internally.
2889         With this we shouldn't be using FrameView coordinates anywhere for windowless plugins
2890         on Windows with Qt.
2891
2892         * platform/qt/QWebPageClient.h:
2893         (QWebPageClient):
2894           Added mapToOwnerWindow to the interface, mapping from the FrameView up to the wrapping nativeParentWidget.
2895         * plugins/win/PluginViewWin.cpp:
2896         (WebCore::contentsToNativeWindow):
2897         (WebCore::PluginView::paintIntoTransformedContext):
2898         (WebCore::PluginView::handleMouseEvent):
2899
2900 2013-05-27  Antti Koivisto  <antti@apple.com>
2901
2902         Tighten FontGlyphs interfaces to take FontDescription instead of Font
2903         https://bugs.webkit.org/show_bug.cgi?id=116818
2904
2905         Reviewed by Andreas Kling.
2906
2907         This gives better understanding of what the actual inputs are.
2908
2909         * WebCore.exp.in:
2910         * platform/graphics/Font.h:
2911         (WebCore::Font::primaryFont):
2912         (WebCore::Font::fontDataAt):
2913         (WebCore::Font::isFixedPitch):
2914         * platform/graphics/FontCache.cpp:
2915         (WebCore::FontCache::getFontData):
2916         * platform/graphics/FontCache.h:
2917         * platform/graphics/FontFallbackList.cpp:
2918         (WebCore::FontGlyphs::determinePitch):
2919         (WebCore::FontGlyphs::realizeFontDataAt):
2920         (WebCore::FontGlyphs::glyphDataAndPageForCharacter):
2921         * platform/graphics/FontFallbackList.h:
2922         (WebCore::FontGlyphs::primaryFontData):
2923         (WebCore::FontGlyphs::isFixedPitch):
2924         (WebCore::FontGlyphs::primarySimpleFontData):
2925         * platform/graphics/blackberry/FontCacheBlackBerry.cpp:
2926         * platform/graphics/freetype/FontCacheFreeType.cpp:
2927         * platform/graphics/mac/FontCacheMac.mm:
2928         (WebCore::FontCache::similarFontPlatformData):
2929         
2930             Drop get* naming and make this Mac only as no other platform has it.
2931
2932         * platform/graphics/qt/FontCacheQt.cpp:
2933         * platform/graphics/win/FontCacheWin.cpp:
2934         * platform/graphics/wince/FontCacheWinCE.cpp:
2935         (WebCore):
2936
2937 2013-05-27  Andreas Kling  <akling@apple.com>
2938
2939         Strengthen typing of detaching an Element from Document's :active chain.
2940         <http://webkit.org/b/116815>
2941
2942         Reviewed by Antti Koivisto.
2943
2944         Tiny cleanup now that the :active chain can only contain elements.
2945         Rename Document::activeChainNodeDetached() to elementInActiveChainDidDetach().
2946
2947         * dom/Element.cpp:
2948         (WebCore::Element::detach):
2949         * dom/Document.h:
2950         * dom/Document.cpp:
2951         (WebCore::Document::elementInActiveChainDidDetach):
2952
2953             Rename, take Element*, remove silly condition that was always true.
2954
2955 2013-05-27  Andrei Bucur  <abucur@adobe.com>
2956
2957         [CSS Regions] Remove the offsetFromLogicalTopOfFirstPage parameter from layout functions
2958         https://bugs.webkit.org/show_bug.cgi?id=116441
2959
2960         Reviewed by David Hyatt.
2961
2962         The patch changes the following things:
2963         - exposes offsetFromLogicalTopOfFirstPage() to all the RenderBoxes;
2964         - offsetFromLogicalTopOfFirstPage() is now safe to call from any box inside a flow thread, not only the
2965         currently being laid out;
2966         - removes the offsetFromLogicalTopOfFirstPage parameter from all the layout functions
2967         that didn't actually required it; when the value is necessary, the offsetFromLogicalTopOfFirstPage
2968         function is called instead;
2969         - RenderFlowThread now handles its own logic for obtaining the offset from logical top of the first
2970         region for a box, based on the layout states pushed on RenderView; it provides a better caching mechanism
2971         that can be used for all the ancestor containing blocks of the current box being laid out.
2972
2973         The RenderBoxRegionInfo structures are cached only based on the box and the region. This means that
2974         passing around a value for offsetFromLogicalTopOfFirstPage different in some cases than others was
2975         risky. If there is a possibility of having a different box info result for a different offset
2976         then the cache is not working correctly.
2977
2978         Tests: No function change, no tests.
2979
2980         * rendering/RenderBlock.cpp:
2981         (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
2982         (WebCore::RenderBlock::logicalLeftOffsetForContent):
2983         (WebCore::RenderBlock::logicalRightOffsetForContent):
2984         (WebCore::RenderBlock::getClearDelta):
2985         (WebCore::RenderBlock::lineWidthForPaginatedLineChanged):
2986         (WebCore::RenderBlock::offsetFromLogicalTopOfFirstPage):
2987         (WebCore::RenderBlock::logicalWidthChangedInRegions):
2988         * rendering/RenderBlock.h:
2989         (WebCore::RenderBlock::availableLogicalWidthForLine):
2990         (WebCore::RenderBlock::logicalRightOffsetForLine):
2991         (WebCore::RenderBlock::logicalLeftOffsetForLine):
2992         (WebCore::RenderBlock::startOffsetForLine):
2993         (WebCore::RenderBlock::endOffsetForLine):
2994         (WebCore::RenderBlock::availableLogicalWidthForContent):
2995         (WebCore::RenderBlock::startOffsetForContent):
2996         (WebCore::RenderBlock::endOffsetForContent):
2997         (WebCore::RenderBlock::logicalLeftOffsetForContent):
2998         (WebCore::RenderBlock::logicalRightOffsetForContent):
2999         * rendering/RenderBox.cpp:
3000         (WebCore::RenderBox::borderBoxRectInRegion):
3001         (WebCore::RenderBox::constrainLogicalWidthInRegionByMinMax):
3002         (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
3003         (WebCore::RenderBox::containingBlockLogicalWidthForContentInRegion):
3004         (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
3005         (WebCore::RenderBox::computeLogicalWidthInRegion):
3006         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
3007         (WebCore::RenderBox::renderBoxRegionInfo):
3008         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
3009         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
3010         (WebCore::computeInlineStaticDistance):
3011         (WebCore::RenderBox::computePositionedLogicalWidth):
3012         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
3013         (WebCore::RenderBox::computePositionedLogicalHeight):
3014         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
3015         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
3016         (WebCore::RenderBox::computePositionedLogicalHeightReplaced):
3017         (WebCore::RenderBox::offsetFromLogicalTopOfFirstPage):
3018         * rendering/RenderBox.h:
3019         * rendering/RenderFlexibleBox.cpp:
3020         (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
3021         * rendering/RenderFlowThread.cpp:
3022         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
3023         (WebCore::RenderFlowThread::hasCachedOffsetFromLogicalTopOfFirstRegion):
3024         (WebCore::RenderFlowThread::cachedOffsetFromLogicalTopOfFirstRegion):
3025         (WebCore::RenderFlowThread::setOffsetFromLogicalTopOfFirstRegion):
3026         (WebCore::RenderFlowThread::clearOffsetFromLogicalTopOfFirstRegion):
3027         (WebCore::RenderFlowThread::currentActiveRenderBox):
3028         (WebCore::RenderFlowThread::pushFlowThreadLayoutState):
3029         (WebCore::RenderFlowThread::popFlowThreadLayoutState):
3030         (WebCore::RenderFlowThread::offsetFromLogicalTopOfFirstRegion):
3031         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
3032         * rendering/RenderFlowThread.h:
3033         * rendering/RenderTable.cpp:
3034         (WebCore::RenderTable::updateLogicalWidth):
3035         * rendering/RenderView.cpp:
3036         (WebCore::RenderView::pushLayoutState):
3037         (WebCore::RenderView::pushLayoutStateForCurrentFlowThread):
3038         (WebCore::RenderView::popLayoutStateForCurrentFlowThread):
3039         * rendering/RenderView.h:
3040         (WebCore::RenderView::pushLayoutState):
3041         (WebCore::RenderView::popLayoutState):
3042
3043 2013-05-27  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3044
3045         Active DOM objects stopped twice
3046         https://bugs.webkit.org/show_bug.cgi?id=116524
3047
3048         Reviewed by Alexey Proskuryakov.
3049
3050         Only iterate over all active DOM object to stop them once.
3051
3052         To ensure later created active DOM objects are stopped,
3053         suspendActiveDOMObjectIfNeeded now also stops active DOM objects
3054         if needed. This also fixes an existing bug when active DOM
3055         objects were created after stopActiveDOMObjects had been called.
3056
3057         Two existing tests creates new active DOM objects after stopActiveDOMObjects
3058         has been called:
3059             fast/dom/xmlhttprequest-constructor-in-detached-document.html
3060             fast/dom/Window/timer-null-script-execution-context.html
3061
3062         * dom/ScriptExecutionContext.cpp:
3063         (WebCore::ScriptExecutionContext::stopActiveDOMObjects):
3064         (WebCore::ScriptExecutionContext::suspendActiveDOMObjectIfNeeded):
3065
3066 2013-05-27  Charles Wei  <charles.wei@torchmobile.com.cn>
3067
3068         Remove redundant CachedRawResource::loader()
3069         https://bugs.webkit.org/show_bug.cgi?id=116805
3070
3071         Reviewed by Andreas Kling.
3072
3073         Just remove redundant code, no test case needed.
3074
3075         * loader/cache/CachedRawResource.cpp:
3076         * loader/cache/CachedRawResource.h:
3077
3078 2013-05-27  Andreas Kling  <akling@apple.com>
3079
3080         WinCE build TLC: Node::active() moved to Element.
3081
3082         * rendering/RenderThemeWinCE.cpp:
3083         (WebCore::RenderThemeWinCE::paintSearchFieldCancelButton):
3084
3085 2013-05-26  Jaehun Lim  <ljaehun.lim@samsung.com>
3086
3087         CSSParser::parseImageResolution doesn't need a parameter.
3088         https://bugs.webkit.org/show_bug.cgi?id=116755
3089
3090         Reviewed by Darin Adler.
3091
3092         parseImageResolution() can get CSSPraserValueList from m_valueList directly.
3093
3094         No new tests, no behavior change.
3095
3096         * css/CSSParser.cpp:
3097         (WebCore::CSSParser::parseImageResolution):
3098         * css/CSSParser.h:
3099
3100 2013-05-26  Andreas Kling  <akling@apple.com>
3101
3102         Turn TreeScope::focusedNode() into focusedElement().
3103         <http://webkit.org/b/116802>
3104
3105         Reviewed by Darin Adler.
3106
3107         For the hundredth time, only Elements can be focused!
3108
3109         This change mostly reverts r121079 since that made things unnecessarily complicated
3110         just to tweak the behavior of ShadowRoot.activeElement, an API that we don't expose.
3111         Finding a TreeScope's focused element now does a simple walk up the parent chain instead
3112         of running the full Shadow DOM re-targeting algorithm.
3113
3114         (WebCore::TreeScope::focusedElement):
3115
3116             Simplify and return Element* instead of Node*.
3117
3118         * dom/TreeScope.h:
3119         * dom/TreeScope.cpp:
3120         (WebCore::focusedFrameOwnerElement):
3121
3122             Make this return Element* as the name already suggested.
3123
3124         * dom/Document.cpp:
3125         (WebCore::Document::removeFocusedNodeOfSubtree):
3126         * dom/Element.cpp:
3127         (WebCore::Element::blur):
3128         * dom/ShadowRoot.h:
3129         (WebCore::ShadowRoot::activeElement):
3130         * html/HTMLDocument.cpp:
3131         (WebCore::HTMLDocument::activeElement):
3132
3133             Simplified call sites that were paranoid about getting a non-Element focused node.
3134
3135 2013-05-26  Dean Jackson  <dino@apple.com>
3136
3137         Plugins with no src but valid type should not snapshot
3138         https://bugs.webkit.org/show_bug.cgi?id=116799
3139         <rdar://problem/13695911>
3140
3141         Reviewed by Simon Fraser.
3142
3143         There are a few plug-ins around that don't take any source content
3144         via the src attribute, but rather just load the binary based on the
3145         mime-type. In those cases we shouldn't snapshot until we have a
3146         mechanism to do so.
3147
3148         * html/HTMLPlugInImageElement.cpp:
3149         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
3150             Add MIMEType logging, and detect the case of no src but valid type.
3151         * html/HTMLPlugInImageElement.h: Add another SnapshotReason enum for
3152             this special case.
3153
3154 2013-05-26  Antti Koivisto  <antti@apple.com>
3155
3156         Encapsulate FontGlyphs
3157         https://bugs.webkit.org/show_bug.cgi?id=116803
3158
3159         Reviewed by Andreas Kling.
3160
3161         FontGlyphs is unfriending Font. Give it a real class interface and some actual code.
3162
3163         * platform/graphics/Font.cpp:
3164         (WebCore::Font::Font):
3165         * platform/graphics/Font.h:
3166         (WebCore::Font::glyphDataForCharacter):
3167         (WebCore::Font::glyphDataAndPageForCharacter):
3168         * platform/graphics/FontFallbackList.cpp:
3169         (WebCore::FontGlyphs::FontGlyphs):
3170         (WebCore::isInRange):
3171         (WebCore::shouldIgnoreRotation):
3172         (WebCore::glyphDataAndPageForNonCJKCharacterWithGlyphOrientation):
3173         
3174             Helpers from FontFastPath.cpp.
3175
3176         (WebCore::FontGlyphs::glyphDataAndPageForCharacter):
3177         
3178             This is the primary interface. The code moves here from FontFastPath.cpp.
3179
3180         * platform/graphics/FontFallbackList.h:
3181         (WebCore::FontGlyphs::createForPlatformData):
3182         
3183             Remove setPlatformData in favor of constructor.
3184
3185         (WebCore::FontGlyphs::primarySimpleFontData):
3186         * platform/graphics/FontFastPath.cpp:
3187         * platform/graphics/GraphicsContext.h:
3188
3189             Remove a stray function definition also called setPlatformFont().
3190
3191         * rendering/svg/SVGTextRunRenderingContext.cpp:
3192         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
3193
3194 2013-05-26  Seokju Kwon  <seokju.kwon@gmail.com>
3195
3196         Remove a leftover CALENDAR_PICKER from LocaleNone.cpp
3197         https://bugs.webkit.org/show_bug.cgi?id=116800
3198
3199         Reviewed by Kent Tamura.
3200
3201         No new tests, no behavior change.
3202
3203         * platform/text/LocaleNone.cpp:
3204         (LocaleNone):
3205
3206 2013-05-26  Antti Koivisto  <antti@apple.com>
3207
3208         Rename FontFallbackList to FontGlyphs
3209         https://bugs.webkit.org/show_bug.cgi?id=116797
3210
3211         Reviewed by Andreas Kling.
3212
3213         Maybe it was a fallback list once. Nowadays its purpose is to cache realized glyphs and related data.
3214         
3215         File renaming will be done separately.
3216
3217         * WebCore.exp.in:
3218         * platform/graphics/Font.cpp:
3219         (WebCore::Font::Font):
3220         (WebCore::Font::operator=):
3221         (WebCore::Font::operator==):
3222         
3223             Refactored to early return style.
3224
3225         (WebCore::Font::update):
3226         (WebCore::Font::width):
3227         * platform/graphics/Font.h:
3228         (Font):
3229         (WebCore::Font::glyphs):
3230         (WebCore::Font::loadingCustomFonts):
3231         (WebCore::Font::primaryFont):
3232         (WebCore::Font::fontDataAt):
3233         (WebCore::Font::isFixedPitch):
3234         (WebCore::Font::fontSelector):
3235         * platform/graphics/FontCache.h:
3236         (FontCache):
3237         * platform/graphics/FontFallbackList.cpp:
3238         (WebCore::FontGlyphs::FontGlyphs):
3239         (WebCore::FontGlyphs::invalidate):
3240         (WebCore::FontGlyphs::releaseFontData):
3241         (WebCore::FontGlyphs::determinePitch):
3242         (WebCore::FontGlyphs::realizeFontDataAt):
3243         
3244             Renamed for clarity along with m_fontList -> m_realizedFontData.
3245
3246         (WebCore::FontGlyphs::setPlatformFont):
3247         * platform/graphics/FontFallbackList.h:
3248         (FontGlyphs):
3249         (WebCore::FontGlyphs::GlyphPagesStateSaver::GlyphPagesStateSaver):
3250         (WebCore::FontGlyphs::GlyphPagesStateSaver::~GlyphPagesStateSaver):
3251         (GlyphPagesStateSaver):
3252         (WebCore::FontGlyphs::create):
3253         (WebCore::FontGlyphs::~FontGlyphs):
3254         (WebCore::FontGlyphs::primaryFontData):
3255         * platform/graphics/FontFastPath.cpp:
3256         (WebCore::Font::glyphDataAndPageForCharacter):
3257         * rendering/svg/SVGTextRunRenderingContext.cpp:
3258         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
3259
3260 2013-05-26  Kent Tamura  <tkent@chromium.org>
3261
3262         Remove ENABLE_CALENDAR_PICKER
3263         https://bugs.webkit.org/show_bug.cgi?id=116795
3264
3265         Reviewed by Ryosuke Niwa.
3266
3267         This feature was used only by Chromium port.
3268
3269         * Resources/pagepopups/calendarPicker.css: Removed.
3270         * Resources/pagepopups/calendarPicker.js: Removed.
3271         * css/html.css:
3272         * platform/text/LocaleICU.cpp:
3273         (WebCore::LocaleICU::LocaleICU):
3274         (WebCore):
3275         * platform/text/LocaleICU.h:
3276         (LocaleICU):
3277         * platform/text/PlatformLocale.h:
3278         (Locale):
3279         * platform/text/mac/LocaleMac.h:
3280         (LocaleMac):
3281         * platform/text/mac/LocaleMac.mm:
3282         (WebCore::LocaleMac::monthLabels):
3283         * platform/text/win/LocaleWin.cpp:
3284         (WebCore::LocaleWin::LocaleWin):
3285         (WebCore::LocaleWin::monthLabels):
3286         * platform/text/win/LocaleWin.h:
3287         (LocaleWin):
3288
3289 2013-05-26  Andreas Kling  <akling@apple.com>
3290
3291         Move :active chain participation state from Node to Element.
3292         <http://webkit.org/b/116786>
3293
3294         Reviewed by Antti Koivisto.
3295
3296         Only Elements can be in the :active chain so move the logic there from Node.
3297
3298         * dom/Document.cpp:
3299         (WebCore::Document::updateHoverActiveState):
3300
3301             Add isElementNode() type checks when updating the :active chain.
3302
3303         * dom/Node.h:
3304         * dom/Node.cpp:
3305         (WebCore::Node::detach):
3306         * dom/Element.cpp:
3307         (WebCore::Element::detach):
3308
3309             Move the remaining logic for detaching from the UserActionElementSet to Element.
3310
3311         (WebCore::Element::isUserActionElementInActiveChain):
3312         * dom/Element.h:
3313         (WebCore::Element::inActiveChain):
3314
3315             Move all the :active chain stuff from Node to Element.
3316
3317         * dom/UserActionElementSet.cpp:
3318         (WebCore::UserActionElementSet::didDetach):
3319         * dom/UserActionElementSet.h:
3320         (WebCore::UserActionElementSet::isInActiveChain):
3321         (WebCore::UserActionElementSet::setInActiveChain):
3322
3323             UserActionElementSet now only takes Element* in its API.
3324
3325 2013-05-26  Antti Koivisto  <antti@apple.com>
3326
3327         Remove FontFamily.h/.cpp
3328         https://bugs.webkit.org/show_bug.cgi?id=116788
3329
3330         Reviewed by Anders Carlsson.
3331         
3332         Empty files.
3333
3334         * CMakeLists.txt:
3335         * GNUmakefile.list.am:
3336         * Target.pri:
3337         * WebCore.vcproj/WebCore.vcproj:
3338         * WebCore.vcxproj/WebCore.vcxproj:
3339         * WebCore.xcodeproj/project.pbxproj:
3340         * platform/graphics/FontDescription.h:
3341         * platform/graphics/FontFamily.cpp: Removed.
3342         * platform/graphics/FontFamily.h: Removed.
3343
3344 2013-05-26  Antti Koivisto  <antti@apple.com>
3345
3346         Use Vector instead of custom linked list for font families
3347         https://bugs.webkit.org/show_bug.cgi?id=116783
3348
3349         Reviewed by Andreas Kling.
3350
3351         Get rid of FontFamily and SharedFontFamily.
3352
3353         * accessibility/AccessibilityRenderObject.cpp:
3354         (WebCore::AccessibilityRenderObject::hasSameFont):
3355         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
3356         (getAttributeSetForAccessibilityObject):
3357         * css/CSSComputedStyleDeclaration.cpp:
3358         (WebCore::fontFamilyFromStyle):
3359         * css/DeprecatedStyleBuilder.cpp:
3360         (WebCore::ApplyPropertyFontFamily::applyInheritValue):
3361         (WebCore::ApplyPropertyFontFamily::applyInitialValue):
3362         (WebCore::ApplyPropertyFontFamily::applyValue):
3363         * css/StyleResolver.cpp:
3364         (WebCore::StyleResolver::styleForDocument):
3365         (WebCore::StyleResolver::initializeFontStyle):
3366         * html/canvas/CanvasRenderingContext2D.cpp:
3367         (WebCore::CanvasRenderingContext2D::font):
3368         (WebCore::CanvasRenderingContext2D::setFont):
3369         * page/PrintContext.cpp:
3370         (WebCore::PrintContext::pageProperty):
3371         * platform/efl/RenderThemeEfl.cpp:
3372         (WebCore::RenderThemeEfl::systemFont):
3373         * platform/graphics/Font.h:
3374         (WebCore::Font::firstFamily):
3375         (WebCore::Font::familyCount):
3376         (WebCore::Font::familyAt):
3377         * platform/graphics/FontCache.cpp:
3378         (WebCore::FontCache::getFontData):
3379         * platform/graphics/FontDescription.cpp:
3380         (SameSizeAsFontDescription):
3381         * platform/graphics/FontDescription.h:
3382         (WebCore::FontDescription::FontDescription):
3383         (WebCore::FontDescription::familyCount):
3384         (WebCore::FontDescription::firstFamily):
3385         (WebCore::FontDescription::familyAt):
3386         (WebCore::FontDescription::families):
3387         (WebCore::FontDescription::useFixedDefaultSize):
3388         (WebCore::FontDescription::setOneFamily):
3389         (WebCore::FontDescription::setFamilies):
3390         (WebCore::FontDescription::adoptFamilies):
3391         (WebCore::FontDescription::operator==):
3392         * platform/graphics/FontFamily.cpp:
3393         * platform/graphics/FontFamily.h:
3394         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
3395         (PlatformCALayerWinInternal::displayCallback):
3396         * platform/graphics/mac/FontCacheMac.mm:
3397         (WebCore::FontCache::getSimilarFontPlatformData):
3398         * platform/graphics/qt/FontCacheQt.cpp:
3399         (WebCore::FontCache::getLastResortFallbackFont):
3400         * platform/gtk/RenderThemeGtk.cpp:
3401         (WebCore::RenderThemeGtk::systemFont):
3402         * platform/mac/ThemeMac.mm:
3403         (WebCore::ThemeMac::controlFont):
3404         * platform/qt/RenderThemeQStyle.cpp:
3405         (WebCore::RenderThemeQStyle::adjustButtonStyle):
3406         * platform/text/transcoder/FontTranscoder.cpp:
3407         (WebCore::FontTranscoder::converterType):
3408         * platform/win/DragImageWin.cpp:
3409         (WebCore::dragLabelFont):
3410         * rendering/RenderText.cpp:
3411         (WebCore::RenderText::styleDidChange):
3412         * rendering/RenderTextControl.cpp:
3413         (WebCore::RenderTextControl::computeIntrinsicLogicalWidths):
3414         * rendering/RenderTextControlSingleLine.cpp:
3415         (WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
3416         * rendering/RenderThemeMac.mm:
3417         (WebCore::RenderThemeMac::systemFont):
3418         (WebCore::RenderThemeMac::setFontFromControlSize):
3419         * rendering/RenderThemeSafari.cpp:
3420         (WebCore::RenderThemeSafari::systemFont):
3421         (WebCore::RenderThemeSafari::setFontFromControlSize):
3422         * rendering/RenderThemeWin.cpp:
3423         (WebCore::fillFontDescription):
3424
3425 2013-05-26  Andreas Kling  <akling@apple.com>
3426
3427         Move "active" state logic from Node to Element.
3428         <http://webkit.org/b/116785>
3429
3430         Reviewed by Antti Koivisto.
3431
3432         Resolve another 7 year old FIXME by merging the "active" state logic from Node and ContainerNode
3433         and moving it all to Element instead.
3434
3435         * dom/UserActionElementSet.h:
3436         (WebCore::UserActionElementSet::isActive):
3437         (WebCore::UserActionElementSet::setActive):
3438         * dom/ContainerNode.cpp:
3439         * dom/ContainerNode.h:
3440         * dom/Node.cpp:
3441         * dom/Node.h:
3442         * dom/Element.h:
3443         (WebCore::Element::active):
3444         * dom/Element.cpp:
3445         (WebCore::Element::isUserActionElementActive):
3446         (WebCore::Element::setActive):
3447
3448             Moved here from Node/ContainerNode.
3449
3450         * accessibility/AccessibilityNodeObject.cpp:
3451         (WebCore::AccessibilityNodeObject::isPressed):
3452         * dom/Document.cpp:
3453         (WebCore::Document::setFocusedNode):
3454         (WebCore::Document::updateHoverActiveState):
3455         * rendering/RenderTheme.cpp:
3456         (WebCore::RenderTheme::isPressed):
3457         (WebCore::RenderTheme::isSpinUpButtonPartPressed):
3458         * rendering/RenderThemeMac.mm:
3459         (WebCore::getMediaUIPartStateFlags):
3460         (WebCore::RenderThemeMac::updatePressedState):
3461         * platform/qt/RenderThemeQt.cpp:
3462         (WebCore::RenderThemeQt::getMediaControlForegroundColor):
3463
3464             Check that the inspected Node is an Element before asking if it's active.
3465
3466         * html/HTMLAnchorElement.cpp:
3467         (WebCore::HTMLAnchorElement::setActive):
3468
3469             Call the right superclass.
3470
3471         * html/HTMLAnchorElement.h:
3472         * html/HTMLLabelElement.h:
3473         * html/shadow/MediaControlElementTypes.h:
3474
3475             Sprinkle OVERRIDE>
3476
3477 2013-05-26  Andreas Kling  <akling@apple.com>
3478
3479         Move Node::dispatchSimulatedClick() to Element.
3480         <http://webkit.org/b/116784>
3481
3482         Reviewed by Antti Koivisto.
3483
3484         Only Elements use the dispatchSimulatedClick() functionality, so move it there.
3485
3486         * dom/Node.cpp:
3487         * dom/Node.h:
3488         * dom/Element.h:
3489         * dom/Element.cpp:
3490         (WebCore::Element::dispatchSimulatedClick):
3491         * dom/EventDispatcher.h:
3492         * dom/EventDispatcher.cpp:
3493         (WebCore::EventDispatcher::dispatchSimulatedClick):
3494
3495 2013-05-26  Andreas Kling  <akling@apple.com>
3496
3497         TreeScope::rootNode() should return a ContainerNode.
3498         <http://webkit.org/b/116782>
3499
3500         Reviewed by Antti Koivisto.
3501
3502         The rootNode() of a TreeScope is always a ContainerNode, so update pointer types to reflect that.
3503         This lets us take advantage of Antti's optimized traversal functions.
3504
3505         * dom/ContainerNode.h:
3506         (WebCore::Node::isTreeScope):
3507         * dom/Document.cpp:
3508         (WebCore::Document::buildAccessKeyMap):
3509         * dom/Node.cpp:
3510         (WebCore::Node::containingShadowRoot):
3511         * dom/Node.h:
3512         * dom/TreeScope.h:
3513         (WebCore::TreeScope::rootNode):
3514         (TreeScope):
3515         * page/FocusController.cpp:
3516         (WebCore::FocusNavigationScope::rootNode):
3517         (WebCore::FocusNavigationScope::owner):
3518         * page/FocusController.h:
3519         (FocusNavigationScope):
3520
3521 2013-05-26  Andreas Kling  <akling@apple.com>
3522
3523         FocusController::setFocusedNode() should be setFocusedElement().
3524         <http://webkit.org/b/116780>
3525
3526         Reviewed by Antti Koivisto.
3527
3528         Only Elements can have focus, so make the public API of FocusController take Element*.
3529
3530         * WebCore.exp.in:
3531         * page/FocusController.h:
3532         * page/FocusController.cpp:
3533         (WebCore::FocusController::setFocusedElement):
3534
3535             Out with the setFocusedNode(), in with the setFocusedElement().
3536
3537         * dom/Element.cpp:
3538         (WebCore::Element::focus):
3539         (WebCore::Element::blur):
3540         * page/EventHandler.cpp:
3541         (WebCore::EventHandler::dispatchMouseEvent):
3542         * plugins/PluginView.cpp:
3543         (WebCore::PluginView::focusPluginElement):
3544         * editing/FrameSelection.cpp:
3545         (WebCore::FrameSelection::setFocusedNodeIfNeeded):
3546
3547             Tweak for FocusController taking Element* instead of Node*.
3548
3549         (WebCore::FrameSelection::setFocusedElementIfNeeded):
3550
3551             Renamed from setFocusedNodeIfNeeded().
3552
3553         * editing/htmlediting.h:
3554         * editing/htmlediting.cpp:
3555         (WebCore::enclosingAnchorElement):
3556
3557             Cleaned up the loop for readability and made it return an Element.
3558
3559 2013-05-26  Andreas Kling  <akling@apple.com>
3560
3561         Move some form control things from Element to HTMLFormControlElement.
3562         <http://webkit.org/b/116779>
3563
3564         Reviewed by Antti Koivisto.
3565
3566         The following methods sit better on HTMLFormControlElement than on Element:
3567
3568             - formControlType()
3569             - wasChangedSinceLastFormControlChangeEvent()
3570             - setChangedSinceLastFormControlChangeEvent()
3571             - dispatchFormControlChangeEvent()
3572
3573         Moved them, and devirtualized as much as possible.
3574
3575         * dom/Document.cpp:
3576         (WebCore::Document::setFocusedNode):
3577
3578             Check if the old focus target is an Element before (possibly) dispatching a change event.
3579
3580         * dom/Element.cpp:
3581         * dom/Element.h:
3582
3583             Removed some stub methods that were only used by HTMLFormControlElement subclasses.
3584
3585         * html/HTMLFormControlElement.cpp:
3586         * html/HTMLFormControlElement.h:
3587         (WebCore::isHTMLFormControlElement):
3588         (WebCore::toHTMLFormControlElement):
3589
3590             Add toHTMLFormControlElement() helper with ASSERT_WITH_SECURITY_IMPLICATION.
3591
3592         * html/HTMLTextFormControlElement.h:
3593
3594             Sprinkle OVERRIDE.
3595
3596 2013-05-25  Andreas Kling  <akling@apple.com>
3597
3598         Move Node::supportsFocus() to Element.
3599         <http://webkit.org/b/116778>
3600
3601         Reviewed by Antti Koivisto.
3602
3603         Node never supports focus, so move supportsFocus() to Element instead.
3604
3605         * dom/Element.h:
3606         * dom/Node.cpp:
3607         * dom/Node.h:
3608
3609             Removed Node::supportsFocus(), it always returned false anyway.
3610
3611         * accessibility/AccessibilityNodeObject.cpp:
3612         (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
3613
3614             Check that the underlying Node is an Element before asking if it supports focus.
3615
3616         * html/HTMLAnchorElement.h:
3617         * html/HTMLAreaElement.h:
3618         * html/HTMLBodyElement.h:
3619         * html/HTMLElement.h:
3620         * html/HTMLFieldSetElement.h:
3621         * html/HTMLFormControlElement.h:
3622         * html/HTMLFrameElementBase.h:
3623         * html/HTMLMediaElement.h:
3624         * html/HTMLOptGroupElement.h:
3625         * html/HTMLOptionElement.h:
3626         * html/HTMLOutputElement.h:
3627         * svg/SVGAElement.h:
3628         * svg/SVGCircleElement.h:
3629         * svg/SVGEllipseElement.h:
3630         * svg/SVGGElement.h:
3631         * svg/SVGImageElement.h:
3632         * svg/SVGLineElement.h:
3633         * svg/SVGPathElement.h:
3634         * svg/SVGPolyElement.h:
3635         * svg/SVGRectElement.h:
3636         * svg/SVGSVGElement.h:
3637         * svg/SVGSwitchElement.h:
3638         * svg/SVGSymbolElement.h:
3639         * svg/SVGTextElement.h:
3640         * svg/SVGUseElement.h:
3641
3642             OVERRIDE ALL THE THINGS!
3643
3644 2013-05-25  Andreas Kling  <akling@apple.com>
3645
3646         Move Node::isFocusable() to Element.
3647         <http://webkit.org/b/116777>
3648
3649         Reviewed by Anders Carlsson.
3650
3651         Nodes cannot be focusable, so move isFocusable() from Node to Element.
3652
3653         * dom/Node.cpp:
3654         * dom/Node.h:
3655         * dom/Element.h:
3656         * dom/Element.cpp:
3657         (WebCore::Element::isFocusable):
3658
3659             Moved here from Node.
3660
3661         * dom/Document.cpp:
3662         (WebCore::Document::setFocusedNode):
3663         * accessibility/AccessibilityNodeObject.cpp:
3664         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
3665
3666             Check that the underlying node is an Element before asking if it's focusable.
3667
3668         * page/FrameView.cpp:
3669         (WebCore::FrameView::scrollToAnchor):
3670
3671             Renamed the 'anchorNode' variable to 'anchorElement' because reasons.
3672
3673         * html/HTMLAreaElement.h:
3674         * html/HTMLFormControlElement.h:
3675         * html/HTMLLabelElement.h:
3676         * html/HTMLOptionElement.h:
3677         * svg/SVGAElement.h:
3678
3679             Sprinkle OVERRIDE.
3680
3681         * html/ValidationMessage.cpp:
3682         (WebCore::ValidationMessage::setMessage):
3683
3684             Update a comment to refer to Element::isFocusable() instead of Node.
3685
3686 2013-05-25  Andreas Kling  <akling@apple.com>
3687
3688         Move Node::tabIndex() to Element.
3689         <http://webkit.org/b/116772>
3690
3691         Reviewed by Ryosuke Niwa.
3692
3693         Since only Elements are keyboard-focusable, it doesn't make sense for Node to have a tabIndex().
3694
3695         * dom/Element.h:
3696         * dom/Node.cpp:
3697         * dom/Node.h:
3698
3699             A Node can't have a tab index, so move tabIndex() to Element.
3700
3701         * page/FocusController.h:
3702         * page/FocusController.cpp:
3703         (WebCore::adjustedTabIndex):
3704         (WebCore::FocusController::findElementWithExactTabIndex):
3705         (WebCore::nextElementWithGreaterTabIndex):
3706         (WebCore::previousElementWithLowerTabIndex):
3707         (WebCore::FocusController::nextFocusableNode):
3708         (WebCore::FocusController::previousFocusableNode):
3709
3710             Make this code deal in Element* when doing tab index stuff. FocusController needs
3711             more Node->Element cleanup, but let's do that separately.
3712
3713         * html/HTMLAnchorElement.h:
3714         * html/HTMLElement.h:
3715         * html/HTMLFormControlElement.h:
3716
3717             Sprinkle OVERRIDE.
3718
3719 2013-05-25  Andreas Kling  <akling@apple.com>
3720
3721         Don't instantiate ChildNodeLists just to get a child count.
3722         <http://webkit.org/b/116776>
3723
3724         Reviewed by Ryosuke Niwa.
3725
3726         Use ContainerNode::childNodeCount() instead of Node::childNodes()->length().
3727
3728         * editing/ApplyStyleCommand.cpp:
3729         (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
3730
3731 2013-05-25  Andreas Kling  <akling@apple.com>
3732
3733         PluginDocument::pluginNode() should be pluginElement() instead.
3734         <http://webkit.org/b/116774>
3735
3736         Reviewed by Anders Carlsson.
3737
3738         Make PluginDocument hand out a HTMLPlugInElement* instead of a Node*.
3739
3740         * dom/Document.cpp:
3741         (WebCore::eventTargetNodeForDocument):
3742         * html/PluginDocument.h:
3743         * html/PluginDocument.cpp:
3744         (WebCore::PluginDocumentParser::createDocumentStructure):
3745         (WebCore::PluginDocument::pluginWidget):
3746         (WebCore::PluginDocument::setPluginElement):
3747         (WebCore::PluginDocument::detach):
3748
3749 2013-05-25  Andreas Kling  <akling@apple.com>
3750
3751         Remove Document::getFocusableNodes().
3752         <http://webkit.org/b/116773>
3753
3754         Reviewed by Joseph Pecoraro.
3755
3756         This was added in r42191 and there are no remaining clients of the API.
3757
3758         * dom/Document.cpp:
3759         * dom/Document.h:
3760         * WebCore.exp.in:
3761
3762 2013-05-25  Andreas Kling  <akling@apple.com>
3763
3764         Move Node::focusDelegate() to Element.
3765         <http://webkit.org/b/116768>
3766
3767         Reviewed by Anders Carlsson.
3768
3769         Only Element can be a focus delegate (it's currently only ever HTMLInputElement actually)
3770         so move Node::focusDelegate() to Element. Sprinkled isElementNode() checks as needed.
3771
3772         * dom/Node.cpp:
3773         * dom/Node.h:
3774         * dom/Element.h:
3775         * dom/Element.cpp:
3776         * html/shadow/SliderThumbElement.cpp:
3777         (WebCore::SliderThumbElement::focusDelegate):
3778         * html/shadow/SliderThumbElement.h:
3779         * rendering/RenderTheme.cpp:
3780         (WebCore::RenderTheme::isFocused):
3781         * rendering/RenderThemeMac.mm:
3782         (WebCore::RenderThemeMac::paintSliderThumb):
3783
3784 2013-05-25  Alberto Garcia  <agarcia@igalia.com>
3785
3786         Path: clean up addPathForRoundedRect()
3787         https://bugs.webkit.org/show_bug.cgi?id=116765
3788
3789         Reviewed by Andreas Kling.
3790
3791         Reorganize code that is a bit redundant.
3792
3793         No new tests, no behavior change.
3794
3795         * platform/graphics/Path.cpp:
3796         (WebCore::Path::addPathForRoundedRect):
3797
3798 2013-05-25  Simon Fraser  <simon.fraser@apple.com>
3799
3800         Unprefix Page Visibility API
3801         https://bugs.webkit.org/show_bug.cgi?id=102340
3802
3803         Reviewed by Tim Horton.
3804         
3805         Remove prefixes from the document properties, and the visibilitychanged event.
3806         
3807         Rename the "preview" state to "unloaded". The "unloaded" state is never
3808         reached yet (see https://bugs.webkit.org/show_bug.cgi?id=116769).
3809         
3810         Add some comments to places where we should update the visibility state
3811         when going in and out of the page cache, but cannot safely do so yet.
3812
3813         Tested by existing Page Visibility tests.
3814
3815         * dom/Document.cpp:
3816         (WebCore::Document::pageVisibilityState):
3817         (WebCore::Document::visibilityState):
3818         (WebCore::Document::hidden):
3819         (WebCore::Document::dispatchVisibilityStateChangeEvent):
3820         * dom/Document.h:
3821         * dom/Document.idl:
3822         * dom/EventNames.h:
3823         * history/CachedFrame.cpp:
3824         (WebCore::CachedFrameBase::restore):
3825         * loader/FrameLoader.cpp:
3826         (WebCore::FrameLoader::stopLoading):
3827         * page/Page.cpp:
3828         (WebCore::Page::setVisibilityState):
3829         * page/PageVisibilityState.cpp:
3830         (WebCore::pageVisibilityStateString):
3831         * page/PageVisibilityState.h:
3832
3833 2013-05-25  Andreas Kling  <akling@apple.com>
3834
3835         Move Node::isMouseFocusable() to Element.
3836         <http://webkit.org/b/116762>
3837
3838         Reviewed by Anders Carlsson.
3839
3840         Node::isMouseFocusable() would just return isFocusable(), which is never true for a non-Element
3841         since Node::supportsFocus() always returns false. So move it to Element!
3842
3843         * dom/Node.h:
3844         * dom/Node.cpp:
3845         * dom/Element.h:
3846         * dom/Element.cpp:
3847         (WebCore::Element::isMouseFocusable):
3848
3849             Moved here from Node.
3850
3851         * editing/FrameSelection.cpp:
3852         (WebCore::FrameSelection::setFocusedNodeIfNeeded):
3853         * page/EventHandler.cpp:
3854         (WebCore::EventHandler::dispatchMouseEvent):
3855
3856             Walk up the parent chain with parentOrShadowHostElement() instead of parentOrShadowHostNode().
3857             Removed a misleading no-op hunk about mouse-focusable ShadowRoots, since ShadowRoots are not
3858             Elements and thus cannot be mouse-focusable.
3859
3860         * page/TouchAdjustment.cpp:
3861         (WebCore::TouchAdjustment::nodeRespondsToTapGesture):
3862
3863             Check that the Node is an Element before asking if it's mouse-focusable.
3864
3865         * html/HTMLAnchorElement.h:
3866         * html/HTMLAreaElement.h:
3867         * html/HTMLFormControlElement.h:
3868         * html/HTMLInputElement.h:
3869         * html/HTMLMediaElement.h:
3870         * html/HTMLSelectElement.h:
3871         * html/HTMLTextAreaElement.h:
3872         * html/shadow/ClearButtonElement.h:
3873         * html/shadow/TextControlInnerElements.h:
3874         * svg/SVGAElement.h:
3875         * svg/SVGStyledElement.h:
3876
3877             Sprinkle OVERRIDE.
3878
3879 2013-05-25  Andreas Kling  <akling@apple.com>
3880
3881         Move Node::isKeyboardFocusable() to Element.
3882         <http://webkit.org/b/116761>
3883
3884         Reviewed by Antti Koivisto.
3885
3886         Only Elements can be keyboard-focusable. Move the base isKeyboardFocusable() implementation to Element
3887         and sprinkle OVERRIDE on subclass overrides.
3888         FocusController gets some temporary type checks that will go away as that code moves to dealing in
3889         Elements instead of Node.
3890
3891         * dom/Node.h:
3892         * dom/Node.cpp:
3893         * dom/Element.h:
3894         * dom/Element.cpp:
3895         (WebCore::Element::isKeyboardFocusable):
3896
3897             Move isKeyboardFocusable() from Node to Element.
3898
3899         * page/FocusController.cpp:
3900         (WebCore::isNonFocusableShadowHost):
3901         (WebCore::isFocusableShadowHost):
3902         (WebCore::shouldVisit):
3903         (WebCore::FocusController::advanceFocusInDocumentOrder):
3904
3905             Check that the inspected Node is an Element before querying isKeyboardFocusable().
3906
3907         * html/HTMLAnchorElement.h:
3908         * html/HTMLAreaElement.h:
3909         * html/HTMLFormControlElement.h:
3910         * html/HTMLFrameOwnerElement.h:
3911         * html/HTMLInputElement.h:
3912         * html/HTMLPlugInElement.h:
3913         * html/HTMLSelectElement.h:
3914         * html/HTMLTextAreaElement.h:
3915         * svg/SVGAElement.h:
3916         * svg/SVGStyledElement.h:
3917
3918             Sprinkle OVERRIDE.
3919
3920 2013-05-25  Andreas Kling  <akling@apple.com>
3921
3922         Begin moving "focus" state logic from Node to Element.
3923         <http://webkit.org/b/116760>
3924
3925         Reviewed by Antti Koivisto.
3926
3927         Only Elements can be focused, so merge the "focus" state logic from Node and ContainerNode
3928         and move it into Element. There's a lot more iceberg under this tip, but we'll be starting
3929         with setFocus(bool) and focused().
3930
3931         * dom/Node.h:
3932         * dom/ContainerNode.cpp:
3933         * dom/ContainerNode.h:
3934         * dom/Element.cpp:
3935         (WebCore::Element::isUserActionElementFocused):
3936         (WebCore::Element::setFocus):
3937         * dom/Element.h:
3938         (WebCore::Element::focused):
3939         * dom/Node.cpp:
3940
3941             Move focused() and setFocus(bool) from Node/ContainerNode to Element.
3942
3943         * dom/Document.cpp:
3944         (WebCore::Document::setFocusedNode):
3945         * page/EventHandler.cpp:
3946         (WebCore::EventHandler::dispatchMouseEvent):
3947
3948             Check if the inspected Node is an Element before asking if it's focused.
3949
3950 2013-05-25  Noam Rosenthal  <noam.rosenthal@nokia.com>
3951
3952         Direct pattern compositing breaks when no-repeat is set on a large layer
3953         https://bugs.webkit.org/show_bug.cgi?id=116140
3954
3955         Reviewed by Antti Koivisto.
3956
3957         In some cases the directly composited background color logic overrides the layer's
3958         contentsRect, which results in wrong rendering of tiled images.
3959         This patch makes sure that the background image is applied after the solid color,
3960         which ensures the correct contentsRect.
3961
3962         Test: compositing/patterns/direct-pattern-compositing-contain-no-repeat.html
3963
3964         * rendering/RenderLayerBacking.cpp:
3965         (WebCore::RenderLayerBacking::updateDirectlyCompositedContents):
3966
3967 2013-05-24  Andreas Kling  <akling@apple.com>
3968
3969         Move "hover" state logic from Node to Element.
3970         <http://webkit.org/b/116757>
3971
3972         Reviewed by Antti Koivisto.
3973
3974         Resolve a 7 year old FIXME by merging the "hover" state logic from Node and ContainerNode
3975         and moving it all to Element instead.
3976
3977         * dom/Node.cpp:
3978         (WebCore::Node::detach):
3979         * dom/Element.cpp:
3980         (WebCore::Element::detach):
3981
3982             Move Document::hoveredNodeDetached() call from Node::detach() to Element::detach().
3983
3984         (WebCore::Element::isUserActionElementHovered):
3985         (WebCore::Element::setHovered):
3986         * dom/Element.h:
3987         (WebCore::Element::hovered):
3988
3989             Moved here from Node/ContainerNode.
3990
3991         * dom/UserActionElementSet.h:
3992         (WebCore::UserActionElementSet::setHovered):
3993         (WebCore::UserActionElementSet::setFlags):
3994
3995             Make setHovered() take an Element* instead of a Node*. I'd like to do this will all
3996             of these methods eventually, so added a setFlags() helper with the tighter type.
3997
3998         * html/HTMLLabelElement.h:
3999         * html/shadow/SpinButtonElement.h:
4000
4001             Sprinkle OVERRIDE on setHovered() overrides.
4002
4003         * dom/Document.cpp:
4004         (WebCore::Document::updateHoverActiveState):
4005         * accessibility/AccessibilityNodeObject.cpp:
4006         (WebCore::AccessibilityNodeObject::isHovered):
4007         * rendering/RenderTheme.cpp:
4008         (WebCore::RenderTheme::isHovered):
4009
4010             Check if the inspected Node is an element before asking if it's hovered.
4011
4012 2013-05-25  Andreas Kling  <akling@apple.com>
4013
4014         Document::formController() should return a reference.
4015         <http://webkit.org/b/116758>
4016
4017         Reviewed by Antti Koivisto.
4018
4019         The formController() is created on demand, so return a reference instead.
4020
4021         * dom/Document.h:
4022         * dom/Document.cpp:
4023         (WebCore::Document::formController):
4024         (WebCore::Document::setStateForNewFormElements):
4025         * html/HTMLFormControlElementWithState.cpp:
4026         (WebCore::HTMLFormControlElementWithState::HTMLFormControlElementWithState):
4027         (WebCore::HTMLFormControlElementWithState::~HTMLFormControlElementWithState):
4028         (WebCore::HTMLFormControlElementWithState::didMoveToNewDocument):
4029         (WebCore::HTMLFormControlElementWithState::finishParsingChildren):
4030         * html/HTMLFormElement.cpp:
4031         (WebCore::HTMLFormElement::~HTMLFormElement):
4032         (WebCore::HTMLFormElement::finishParsingChildren):
4033         * html/HTMLInputElement.cpp:
4034         (WebCore::HTMLInputElement::~HTMLInputElement):
4035         (WebCore::HTMLInputElement::didMoveToNewDocument):
4036         (WebCore::HTMLInputElement::checkedRadioButtons):
4037
4038 2013-05-25  Sergio Villar Senin  <svillar@igalia.com>
4039
4040         Reducing CSS code duplication in declaration list error recovery
4041         https://bugs.webkit.org/show_bug.cgi?id=115157
4042
4043         Reviewed by Andreas Kling.
4044
4045         From Blink r148974 by <serya@chromium.org>
4046
4047         Refactor "invalid_block_list error | /* empty */" in a new
4048         decl_list_recovery rule that allows to remove 4 redundant rules.
4049
4050         No new test required as we're just refactoring code, no new behaviour.
4051
4052         * css/CSSGrammar.y.in:
4053
4054 2013-05-24  Ryosuke Niwa  <rniwa@webkit.org>
4055
4056         Build fix after r150664.
4057
4058         * bindings/scripts/test/JS/JSTestObj.cpp:
4059         (WebCore):
4060
4061 2013-05-24  Sergio Villar Senin  <svillar@igalia.com>
4062
4063         Fixing invalid block recovery in some declaration list.
4064         https://bugs.webkit.org/show_bug.cgi?id=115159
4065
4066         Reviewed by Darin Adler.
4067
4068         From Blink r148889 by <serya@chromium.org>
4069
4070         Improves the detection of some invalid block declarations inside a
4071         declaration list. This allows the parser not to completely discard
4072         a whole declaration list that contains an invalid block. In
4073         particular grammar failed in tests 8, 12, 13, 15, 16 and 17 in the
4074         new test added by this change.
4075
4076         Test: fast/css/parsing-invalid-block-recovery.html
4077
4078         * css/CSSGrammar.y.in:
4079
4080
4081 2013-05-24  Beth Dakin  <bdakin@apple.com>
4082
4083         DidFirstFlushForHeaderLayer can be called too soon on pages that redirect
4084         https://bugs.webkit.org/show_bug.cgi?id=116749
4085         -and corresponding-
4086         <rdar://problem/13886753>
4087
4088         Reviewed by Simon Fraser.
4089
4090         Only start m_paintRelatedMilestonesTimer if we have actually painted.
4091         * rendering/RenderLayerCompositor.cpp:
4092         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
4093
4094 2013-05-24  Anders Carlsson  <andersca@apple.com>
4095
4096         Fix Windows build.
4097
4098         * WebCore.vcproj/WebCore.vcproj:
4099         * WebCore.vcxproj/WebCore.vcxproj:
4100         * WebCore.vcxproj/WebCore.vcxproj.filters:
4101
4102 2013-05-24  Tim Horton  <timothy_horton@apple.com>
4103
4104         Animated GIFs don't repaint after TiledCoreAnimationDrawingArea un-suspends painting
4105         https://bugs.webkit.org/show_bug.cgi?id=116744
4106         <rdar://problem/13973514>
4107
4108         Reviewed by Simon Fraser.
4109
4110         * WebCore.exp.in: Export FrameView::resumeAnimatingImages.
4111         * page/FrameView.cpp:
4112         (WebCore::FrameView::setIsInWindow):
4113         (WebCore::FrameView::resumeAnimatingImages):
4114         Factor the code to restart animated images out of frameView::setIsInWindow.
4115
4116         * page/FrameView.h:
4117         (FrameView):
4118
4119 2013-05-24  Anders Carlsson  <andersca@apple.com>
4120
4121         Move history property list writer to WebKit
4122         https://bugs.webkit.org/show_bug.cgi?id=116746
4123
4124         Reviewed by Tim Horton.
4125
4126         Remove files from the Xcode project and remove symbols that now live in WebKit.
4127
4128         * WebCore.exp.in:
4129         * WebCore.xcodeproj/project.pbxproj:
4130
4131 2013-05-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
4132
4133         Global constructors exposed in worker environment have wrong attributes
4134         https://bugs.webkit.org/show_bug.cgi?id=116708
4135
4136         Reviewed by Geoffrey Garen.
4137
4138         Fix JSC bindings generator so that Global constructors exposed in worker environment
4139         have the following attributes:
4140         { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
4141
4142         This is now consistent with global constructors on DOMWindow and with the Web IDL
4143         specification: