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