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