6e4f1075e5d228dd4991ba8d74fd4c9364ae6a23
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-02-11  Viatcheslav Ostapenko  <sl.ostapenko@samsung.com>
2
3         [EFL][WebGL] WebGL content is not painted after resizing the viewport.
4         https://bugs.webkit.org/show_bug.cgi?id=106358
5
6         Reviewed by Noam Rosenthal.
7
8         When page size changes and layer parameters get updated LayerTreeRenderer::setLayerState
9         clears the layer backing store and detaches the canvas surface from the layer. If the layer
10         size is not changed then the canvas is not recreated. This leaves the canvas detached from
11         the layer, but still referenced from m_surfaceBackingStores.
12         Don't assign layer backing store to layer in assignImageBackingToLayer if there is a canvas
13         surface already attached to the layer.
14
15         Test: fast/canvas/webgl/webgl-layer-update.html
16
17         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
18         (WebCore::CoordinatedGraphicsScene::setLayerState):
19         (WebCore::CoordinatedGraphicsScene::assignImageBackingToLayer):
20         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
21
22 2013-02-11  Eric Carlson  <eric.carlson@apple.com>
23
24         [Mac] Track language selection should be sticky
25         https://bugs.webkit.org/show_bug.cgi?id=109466
26
27         Reviewed by Dean Jackson.
28
29         Choosing a text track from the caption menu should make that track's language the
30         preferred caption language. Turning captions off from the menu should disable captions
31         in videos loaded subsequently.
32
33         OS X has system support for these settings, so changes made by DRT should not change the
34         settings on the user's system. Add support for all other ports in DRT only.
35
36         Test: media/track/track-user-preferences.html
37
38         * WebCore.exp.in: Export PageGroup::captionPreferences().
39
40         * html/HTMLMediaElement.cpp:
41         (WebCore::HTMLMediaElement::HTMLMediaElement): Use page()->group().captionPreferences().
42         (WebCore::HTMLMediaElement::attach): Ditto.
43         (WebCore::HTMLMediaElement::detach): Ditto.
44         (WebCore::HTMLMediaElement::userPrefersCaptions): Ditto.
45         (WebCore::HTMLMediaElement::configureTextTrackGroup): Ditto. Update for 
46             preferredLanguageFromList change.
47         (WebCore::HTMLMediaElement::toggleTrackAtIndex): Set user prefs for captions visible and
48             caption language as appropriate.
49
50         * html/shadow/MediaControlElements.cpp:
51         (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler): Remove unneeded comment.
52         (WebCore::MediaControlTextTrackContainerElement::updateSizes):  Use page()->group().captionPreferences().
53
54         * html/shadow/MediaControlsApple.cpp:
55         (WebCore::MediaControlsApple::closedCaptionTracksChanged): Update caption menu button visibility.
56
57         * page/CaptionUserPreferences.h:
58         (WebCore::CaptionUserPreferences::userPrefersCaptions): Support "testing" mode.
59         (WebCore::CaptionUserPreferences::setUserPrefersCaptions): Ditto.
60         (WebCore::CaptionUserPreferences::registerForPreferencesChangedCallbacks): Ditto.
61         (WebCore::CaptionUserPreferences::unregisterForPreferencesChangedCallbacks): Ditto.
62         (WebCore::CaptionUserPreferences::setPreferredLanguage): Ditto.
63         (WebCore::CaptionUserPreferences::preferredLanguages): Ditto.
64         (WebCore::CaptionUserPreferences::testingMode): Ditto.
65         (WebCore::CaptionUserPreferences::setTestingMode): Ditto.
66         (WebCore::CaptionUserPreferences::CaptionUserPreferences): Ditto.
67
68         * page/CaptionUserPreferencesMac.h:
69         * page/CaptionUserPreferencesMac.mm:
70         (WebCore::CaptionUserPreferencesMac::userPrefersCaptions): Support "testing" mode.
71         (WebCore::CaptionUserPreferencesMac::setUserPrefersCaptions): Ditto.
72         (WebCore::CaptionUserPreferencesMac::userHasCaptionPreferences): Ditto.
73         (WebCore::CaptionUserPreferencesMac::registerForPreferencesChangedCallbacks): Change name from
74             registerForCaptionPreferencesChangedCallbacks. Support "testing" mode.
75         (WebCore::CaptionUserPreferencesMac::unregisterForPreferencesChangedCallbacks):  Change name from
76             unregisterForCaptionPreferencesChangedCallbacks. Support "testing" mode.
77         (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Support "testing" mode.
78         (WebCore::CaptionUserPreferencesMac::captionFontSizeScale): Ditto.
79         (WebCore::CaptionUserPreferencesMac::setPreferredLanguage): Ditto.
80         (WebCore::CaptionUserPreferencesMac::preferredLanguages): Ditto. Return the platform override when set.
81
82         * page/PageGroup.cpp:
83         (WebCore::PageGroup::registerForCaptionPreferencesChangedCallbacks): Remove because it is already
84             available from the caption preference object.
85         (WebCore::PageGroup::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
86         (WebCore::PageGroup::userPrefersCaptions): Ditto.
87         (WebCore::PageGroup::userHasCaptionPreferences): Ditto.
88         (WebCore::PageGroup::captionFontSizeScale): Ditto.
89         * page/PageGroup.h:
90
91         * platform/Language.cpp:
92         (WebCore::preferredLanguageFromList): Take the list of preferred languages instead of assuming
93             the system list.
94         * platform/Language.h:
95
96         * testing/Internals.cpp:
97         (WebCore::Internals::resetToConsistentState): Disable caption testing mode.
98         (WebCore::Internals::Internals): Enable caption testing mode so the user's system
99             preferences are not modified.
100
101 2013-02-11  Huang Dongsung  <luxtella@company100.net>
102
103         Coordinated Graphics: Make CoordinatedGraphicsScene not know contents size.
104         https://bugs.webkit.org/show_bug.cgi?id=108922
105
106         Reviewed by Noam Rosenthal.
107
108         Currently, CoordinatedGraphicsScene has two methods to know contents
109         size: setContentsSize() and setVisibleContentsRect(). Contents size is
110         used when adjusting a scroll position, but adjustment is not needed
111         because EFL and Qt platform code (currently PageViewportController)
112         already adjusts a scroll position, and it is natural for each platform
113         to be in charge of adjusting. So this patch makes CoordinatedGraphicsScene
114         not know contents size.
115
116         In addition, now DrawingAreaProxy::coordinatedLayerTreeHostProxy() is only used
117         to get CoordinatedGraphicsScene.
118
119         This patch can only be tested manually since there is no automated
120         testing facilities for in-motion touch.
121         Test: ManualTests/fixed-position.html
122               ManualTests/nested-fixed-position.html
123
124         * platform/graphics/texmap/TextureMapperLayer.cpp:
125         (WebCore::TextureMapperLayer::setScrollPositionDeltaIfNeeded):
126         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
127         (WebCore::CoordinatedGraphicsScene::setScrollPosition):
128         (WebCore::CoordinatedGraphicsScene::adjustPositionForFixedLayers):
129         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
130         (CoordinatedGraphicsScene):
131
132 2013-02-11  Huang Dongsung  <luxtella@company100.net>
133
134         Coordinated Graphics: remove the DidChangeScrollPosition message.
135         https://bugs.webkit.org/show_bug.cgi?id=108051
136
137         Reviewed by Noam Rosenthal.
138         Signed off for WebKit2 by Benjamin Poulain.
139
140         Currently, we use the DidChangeScrollPosition message to send the scroll
141         position that WebCore used in this frame to UI Process. We had to have
142         some member variables for the DidChangeScrollPosition message.
143         However, we can send a scroll position via the DidRenderFrame message,
144         because CoordinatedGraphicsScene::m_renderedContentsScrollPosition is
145         updated at the moment of flushing. So we can remove the
146         DidChangeScrollPosition message and some redundant member variables.
147
148         No tests. No change in behavior.
149
150         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
151         (WebCore::CoordinatedGraphicsScene::flushLayerChanges):
152         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
153         (CoordinatedGraphicsScene):
154
155 2013-02-11  Ryosuke Niwa  <rniwa@webkit.org>
156
157         Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
158         https://bugs.webkit.org/show_bug.cgi?id=109534
159
160         Reviewed by Anders Carlsson.
161
162         * editing/DeleteButtonController.cpp:
163         (WebCore::DeleteButtonController::show):
164         * editing/Editor.cpp:
165         (WebCore):
166         * editing/Editor.h:
167         (Editor):
168         * loader/EmptyClients.h:
169         (WebCore::EmptyEditorClient::shouldDeleteRange):
170         (EmptyEditorClient):
171         (WebCore::EmptyEditorClient::shouldShowDeleteInterface):
172         * page/EditorClient.h:
173         (EditorClient):
174
175 2013-02-11  Hayato Ito  <hayato@chromium.org>
176
177         Factor EventContext and introduces MouseOrFocusEventContext.
178         https://bugs.webkit.org/show_bug.cgi?id=109278
179
180         Reviewed by Dimitri Glazkov.
181
182         To supoort Touch event retargeting (bug 107800), we have to factor
183         event retargeting code so that it can support not only MouseEvent or FocusEvent,
184         but also other events.
185
186         This is the first attempt to refactor event retargeting code, a
187         separated patch from bug 109156.  EventContext is now factored and
188         MouseOrFocusEventContext was introduced to support MouseEvent or
189         FocusEvent separately.
190
191         In following patches, I'll introduce TouchEventContext and
192         TouchEventDispatchMediator to support Touch event retargeting.
193
194         No new tests. No change in functionality.
195
196         * dom/EventContext.cpp:
197         (WebCore::EventContext::EventContext): Factor relatedTarget out from EventContext into MouseOrFocusEventContext.
198         (WebCore::EventContext::~EventContext):
199         (WebCore):
200         (WebCore::EventContext::handleLocalEvents):
201         (WebCore::EventContext::isMouseOrFocusEventContext):
202         (WebCore::MouseOrFocusEventContext::MouseOrFocusEventContext):  New. Handles MouseEvent's (or FocusEvent's) relatedTarget retargeting.
203         (WebCore::MouseOrFocusEventContext::~MouseOrFocusEventContext):
204         (WebCore::MouseOrFocusEventContext::handleLocalEvents):
205         (WebCore::MouseOrFocusEventContext::isMouseOrFocusEventContext):
206         * dom/EventContext.h:
207         (EventContext):
208         (WebCore::EventContext::node):
209         (WebCore::EventContext::target):
210         (WebCore::EventContext::currentTargetSameAsTarget):
211         (WebCore):
212         (MouseOrFocusEventContext):
213         (WebCore::MouseOrFocusEventContext::relatedTarget):
214         (WebCore::MouseOrFocusEventContext::setRelatedTarget):
215         * dom/EventDispatcher.cpp:
216         (WebCore::EventRelatedTargetAdjuster::adjust):
217         (WebCore::EventDispatcher::adjustRelatedTarget):
218         (WebCore::EventDispatcher::ensureEventPath):  Renamad from ensureEventAncestors. Use the DOM Core terminology.
219         (WebCore::EventDispatcher::dispatchEvent):
220         (WebCore::EventDispatcher::dispatchEventAtCapturing):
221         (WebCore::EventDispatcher::dispatchEventAtTarget):
222         (WebCore::EventDispatcher::dispatchEventAtBubbling):
223         (WebCore::EventDispatcher::dispatchEventPostProcess):
224         (WebCore::EventDispatcher::topEventContext):
225         * dom/EventDispatcher.h:
226         (EventRelatedTargetAdjuster):
227         (EventDispatcher):
228         * inspector/InspectorInstrumentation.cpp:
229         (WebCore):
230         (WebCore::eventHasListeners):
231         (WebCore::InspectorInstrumentation::willDispatchEventImpl):
232         * inspector/InspectorInstrumentation.h:
233         (InspectorInstrumentation):
234         (WebCore::InspectorInstrumentation::willDispatchEvent):
235
236 2013-02-11  peavo@outlook.com  <peavo@outlook.com>
237
238         [Curl] setCookiesFromDOM function does not save cookies to disk.
239         https://bugs.webkit.org/show_bug.cgi?id=109285
240
241         Reviewed by Brent Fulgham.
242
243         Write cookies to disk by using the Curl easy api.
244
245         * platform/network/curl/CookieJarCurl.cpp:
246         (WebCore::setCookiesFromDOM):Write cookie to disk.
247         * platform/network/curl/ResourceHandleManager.cpp:
248         (WebCore::ResourceHandleManager::getCurlShareHandle): Added method to get Curl share handle.
249         (WebCore::ResourceHandleManager::getCookieJarFileName): Added method to get cookie file name.
250         * platform/network/curl/ResourceHandleManager.h: Added methods to get cookie file name, and Curl share handle.
251
252 2013-02-11  Hayato Ito  <hayato@chromium.org>
253
254         Split each RuleSet and feature out from StyleResolver into its own class.
255         https://bugs.webkit.org/show_bug.cgi?id=107777
256
257         Reviewed by Dimitri Glazkov.
258
259         Re-landing r141964, which was reverted in r141973, since r141964 seem to be innocent.
260
261         No tests. No change in behavior.
262
263         * CMakeLists.txt:
264         * GNUmakefile.list.am:
265         * Target.pri:
266         * WebCore.gypi:
267         * WebCore.xcodeproj/project.pbxproj:
268         * css/CSSAllInOne.cpp:
269         * css/DocumentRuleSets.cpp: Added.
270         (WebCore):
271         (WebCore::DocumentRuleSets::DocumentRuleSets):
272         (WebCore::DocumentRuleSets::~DocumentRuleSets):
273         (WebCore::DocumentRuleSets::initUserStyle): New helper to initialize each RuleSets.
274         (WebCore::DocumentRuleSets::collectRulesFromUserStyleSheets): Factored out from StyleResolver.
275         (WebCore::makeRuleSet): Ditto.
276         (WebCore::DocumentRuleSets::resetAuthorStyle): Ditto.
277         (WebCore::DocumentRuleSets::appendAuthorStyleSheets): Ditto.
278         (WebCore::DocumentRuleSets::collectFeatures): Ditto.
279         (WebCore::DocumentRuleSets::reportMemoryUsage): New methods to report memory usage. Factored out from StyleResolver.
280         * css/DocumentRuleSets.h: Added.
281         (WebCore):
282         (DocumentRuleSets):
283         (WebCore::DocumentRuleSets::authorStyle): Moved from StyleResolver.
284         (WebCore::DocumentRuleSets::userStyle): Ditto.
285         (WebCore::DocumentRuleSets::features): Ditto.
286         (WebCore::DocumentRuleSets::sibling): Ditto.
287         (WebCore::DocumentRuleSets::uncommonAttribute): Ditto.
288         * css/StyleResolver.cpp:
289         (WebCore::StyleResolver::StyleResolver):
290         (WebCore::StyleResolver::appendAuthorStyleSheets): Now calls DocumentRuleSets::appendAuthorStyleSheets.
291         (WebCore::StyleResolver::matchAuthorRules): Use m_ruleSets.
292         (WebCore::StyleResolver::matchUserRules): Ditto.
293         (WebCore::StyleResolver::classNamesAffectedByRules): Ditto.
294         (WebCore::StyleResolver::locateCousinList): Ditto.
295         (WebCore::StyleResolver::canShareStyleWithElement): Ditto.
296         (WebCore::StyleResolver::locateSharedStyle): Ditto.
297         (WebCore::StyleResolver::styleForPage): Ditto.
298         (WebCore::StyleResolver::checkRegionStyle): Ditto.
299         (WebCore::StyleResolver::applyProperty): Ditto.
300         (WebCore::StyleResolver::reportMemoryUsage): Now calls DocumentRuleSets::reportMemoryUsage.
301         * css/StyleResolver.h:
302         (WebCore::StyleResolver::scopeResolver):
303         (StyleResolver):
304         (WebCore::StyleResolver::ruleSets): accessor r to DocumentRuleSets.
305         (WebCore::StyleResolver::usesSiblingRules): Use m_ruleSets.
306         (WebCore::StyleResolver::usesFirstLineRules): Ditto.
307         (WebCore::StyleResolver::usesBeforeAfterRules): Ditto.
308         (WebCore::StyleResolver::hasSelectorForAttribute): Ditto.
309         (WebCore::StyleResolver::hasSelectorForClass): Ditto.
310         (WebCore::StyleResolver::hasSelectorForId): Ditto.
311         * dom/DocumentStyleSheetCollection.cpp:
312         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
313
314 2013-02-11  Keishi Hattori  <keishi@webkit.org>
315
316         REGRESSION (r140778):Calendar Picker buttons are wrong when rtl
317         https://bugs.webkit.org/show_bug.cgi?id=109158
318
319         Reviewed by Kent Tamura.
320
321         The calendar picker button's icon and position where wrong when rtl.
322
323
324         Test: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ar.html
325
326         * Resources/pagepopups/calendarPicker.css:
327         (.year-month-button-left .year-month-button): Use -webkit-margin-end so the margin is applide to the right side.
328         (.year-month-button-right .year-month-button): Use -webkit-margin-start so the margin is applide to the right side.
329         (.today-clear-area .today-button): Use -webkit-margin-end so the margin is applide to the right side.
330         * Resources/pagepopups/calendarPicker.js:
331         (YearMonthController.prototype._attachLeftButtonsTo): Flip icon image when rtl.
332         (YearMonthController.prototype._attachRightButtonsTo): Ditto.
333
334 2013-02-11  KwangYong Choi  <ky0.choi@samsung.com>
335
336         REGRESSION (r142549): Remove web intents code
337         https://bugs.webkit.org/show_bug.cgi?id=109532
338
339         Reviewed by Nico Weber.
340
341         Remove remaning code related to web intents.
342
343         No new tests, no change on behavior.
344
345         * UseJSC.cmake:
346         * bindings/js/JSIntentConstructor.cpp: Removed.
347
348 2013-02-11  Kenneth Russell  <kbr@google.com>
349
350         Add temporary typedef to ANGLEWebKitBridge to support incompatible API upgrade
351         https://bugs.webkit.org/show_bug.cgi?id=109127
352
353         Reviewed by Dean Jackson.
354
355         No new tests. Built and tested WebKit and Chromium with this change.
356
357         * platform/graphics/ANGLEWebKitBridge.cpp:
358         (WebCore):
359             Define temporary typedef spanning int -> size_t change.
360         (WebCore::getValidationResultValue):
361         (WebCore::getSymbolInfo):
362             Use temporary typedef.
363
364 2013-02-11  Kentaro Hara  <haraken@chromium.org>
365
366         [V8] ScheduledAction::m_context can be empty, so we shouldn't
367         retrieve an Isolate by using m_context->GetIsolate()
368         https://bugs.webkit.org/show_bug.cgi?id=109523
369
370         Reviewed by Adam Barth.
371
372         Chromium bug: https://code.google.com/p/chromium/issues/detail?id=175307#makechanges
373
374         Currently ScheduledAction is retrieving an Isolate by using m_context->GetIsolate().
375         This can crash because ScheduledAction::m_context can be empty. Specifically,
376         ScheduledAction::m_context is set to ScriptController::currentWorldContext(),
377         which can return an empty handle when a frame does not exist. In addition,
378         'if(context.IsEmpty())' in ScheduledAction.cpp implies that it can be empty.
379
380         Alternately, we should pass an Isolate explicitly when a ScheduledAction is instantiated.
381
382         No tests. The Chromium crash report doesn't provide enough information
383         to reproduce the bug.
384
385         * bindings/v8/ScheduledAction.cpp:
386         (WebCore::ScheduledAction::ScheduledAction):
387         (WebCore):
388         (WebCore::ScheduledAction::~ScheduledAction):
389         * bindings/v8/ScheduledAction.h:
390         (ScheduledAction):
391         * bindings/v8/custom/V8DOMWindowCustom.cpp:
392         (WebCore::WindowSetTimeoutImpl):
393         * bindings/v8/custom/V8WorkerContextCustom.cpp:
394         (WebCore::SetTimeoutOrInterval):
395
396 2013-02-11  Adenilson Cavalcanti  <cavalcantii@gmail.com>
397
398         Build fix: r142549 broke EFL build
399         https://bugs.webkit.org/show_bug.cgi?id=109527
400
401         Reviewed by Kentaro Hara.
402
403         No new tests, no change on behavior.
404
405         * CMakeLists.txt:
406
407 2013-02-11  Simon Fraser  <simon.fraser@apple.com>
408
409         REGRESSION (r142520?): Space no longer scrolls the page
410         https://bugs.webkit.org/show_bug.cgi?id=109526
411
412         Reviewed by Tim Horton.
413
414         ScrollingTree::updateTreeFromStateNode() used to bail early when it had
415         no children (no fixed or sticky elements), but that left updateAfterChildren()
416         uncalled. Fix by always calling updateAfterChildren(), which updates the scroll
417         position.
418
419         * page/scrolling/ScrollingTree.cpp:
420         (WebCore::ScrollingTree::updateTreeFromStateNode):
421
422 2013-02-11  Tim Horton  <timothy_horton@apple.com>
423
424         Remove extra early-return in FrameView::setScrollPosition
425
426         Rubber-stamped by Simon Fraser.
427
428         * page/FrameView.cpp:
429         (WebCore::FrameView::setScrollPosition):
430
431 2013-02-11  Arko Saha  <arko@motorola.com>
432
433         [Microdata] Fix crash after r141034 in chromuim port
434         https://bugs.webkit.org/show_bug.cgi?id=109514
435
436         Reviewed by Ryosuke Niwa.
437
438         Added V8SkipVTableValidation extended attribute to skip
439         VTable validation check for DOMSettableTokenList interface.
440
441         This patch fixes below test failures:
442         Tests: fast/dom/MicroData/domsettabletokenlist-attributes-add-token.html
443                fast/dom/MicroData/domsettabletokenlist-attributes-out-of-range-index.html
444                fast/dom/MicroData/element-with-empty-itemprop.html
445                fast/dom/MicroData/itemprop-add-remove-tokens.html
446                fast/dom/MicroData/itemprop-for-an-element-must-be-correct.html
447                fast/dom/MicroData/itemprop-must-be-read-only.html
448                fast/dom/MicroData/itemprop-reflected-by-itemProp-property.html
449                fast/dom/MicroData/itemref-add-remove-tokens.html
450                fast/dom/MicroData/itemref-attribute-reflected-by-itemRef-property.html
451                fast/dom/MicroData/itemref-for-an-element-must-be-correct.html
452                fast/dom/MicroData/itemref-must-be-read-only.html
453                fast/dom/MicroData/itemtype-add-remove-tokens.html
454                fast/dom/MicroData/itemtype-attribute-test.html
455                fast/dom/MicroData/microdata-domtokenlist-attribute-add-remove-tokens.html
456                fast/dom/MicroData/properties-collection-namedgetter-with-invalid-name.html
457                fast/dom/MicroData/propertynodelist-add-remove-itemprop-tokens.html
458                fast/dom/MicroData/propertynodelist-add-remove-itemref-tokens.html
459
460         * html/DOMSettableTokenList.idl:
461
462 2013-02-11  Adam Barth  <abarth@webkit.org>
463
464         Load event fires too early with threaded HTML parser (take 2)
465         https://bugs.webkit.org/show_bug.cgi?id=109485
466
467         Reviewed by Eric Seidel.
468
469         This patch restores the code that was removed in
470         http://trac.webkit.org/changeset/142492 and adds code to
471         DocumentLoader.cpp to avoid the regression.
472
473         * dom/Document.cpp:
474         (WebCore::Document::hasActiveParser):
475         (WebCore::Document::decrementActiveParserCount):
476         * loader/DocumentLoader.cpp:
477         (WebCore::DocumentLoader::isLoadingInAPISense):
478
479 2013-02-11  Eric Seidel  <eric@webkit.org>
480
481         Fold HTMLTokenizerState back into HTMLTokenizer now that MarkupTokenizerBase is RFG
482         https://bugs.webkit.org/show_bug.cgi?id=109502
483
484         Reviewed by Tony Gentilcore.
485
486         Just a search replace of HTMLTokenizerState with HTMLTokenizer and moving the enum.
487         This restores us to the peacefull world pre-NEW_XML.
488
489         * html/parser/BackgroundHTMLParser.cpp:
490         (WebCore::BackgroundHTMLParser::forcePlaintextForTextDocument):
491         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
492         * html/parser/HTMLDocumentParser.cpp:
493         (WebCore::tokenizerStateForContextElement):
494         (WebCore::HTMLDocumentParser::forcePlaintextForTextDocument):
495         (WebCore::HTMLDocumentParser::pumpTokenizer):
496         * html/parser/HTMLTokenizer.cpp:
497         (WebCore::isEndTagBufferingState):
498         (WebCore):
499         (WebCore::HTMLTokenizer::reset):
500         (WebCore::HTMLTokenizer::flushEmitAndResumeIn):
501         (WebCore::HTMLTokenizer::nextToken):
502         (WebCore::HTMLTokenizer::updateStateFor):
503         * html/parser/HTMLTokenizer.h:
504         (HTMLTokenizer):
505         (WebCore::HTMLTokenizer::create):
506         (WebCore::HTMLTokenizer::shouldSkipNullCharacters):
507         (WebCore::HTMLTokenizer::emitEndOfFile):
508         * html/parser/HTMLTreeBuilder.cpp:
509         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
510         (WebCore::HTMLTreeBuilder::processEndTag):
511         (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag):
512         (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag):
513         (WebCore::HTMLTreeBuilder::processScriptStartTag):
514         * html/parser/TextViewSourceParser.cpp:
515         (WebCore::TextViewSourceParser::TextViewSourceParser):
516
517 2013-02-11  Kentaro Hara  <haraken@chromium.org>
518
519         Build fix after r142528
520         https://bugs.webkit.org/show_bug.cgi?id=109520
521
522         Reviewed by Eric Seidel.
523
524         r142528 changed GIFImageReader from a struct to a class.
525         We also need to fix a forward declaration.
526
527         No tests.
528
529         * platform/image-decoders/gif/GIFImageDecoder.h:
530
531 2013-02-11  Nico Weber  <thakis@chromium.org>
532
533         Remove web intents code
534         https://bugs.webkit.org/show_bug.cgi?id=109501
535
536         Reviewed by Eric Seidel.
537
538         See thread "Removing ENABLE(WEB_INTENTS) code" on webkit-dev.
539
540         * DerivedSources.make:
541         * Modules/intents/DOMWindowIntents.cpp: Removed.
542         * Modules/intents/DOMWindowIntents.h: Removed.
543         * Modules/intents/DOMWindowIntents.idl: Removed.
544         * Modules/intents/DeliveredIntent.cpp: Removed.
545         * Modules/intents/DeliveredIntent.h: Removed.
546         * Modules/intents/DeliveredIntent.idl: Removed.
547         * Modules/intents/Intent.cpp: Removed.
548         * Modules/intents/Intent.h: Removed.
549         * Modules/intents/Intent.idl: Removed.
550         * Modules/intents/IntentRequest.cpp: Removed.
551         * Modules/intents/IntentRequest.h: Removed.
552         * Modules/intents/IntentResultCallback.h: Removed.
553         * Modules/intents/IntentResultCallback.idl: Removed.
554         * Modules/intents/NavigatorIntents.cpp: Removed.
555         * Modules/intents/NavigatorIntents.h: Removed.
556         * Modules/intents/NavigatorIntents.idl: Removed.
557         * WebCore.gyp/WebCore.gyp:
558         * WebCore.gypi:
559         * bindings/generic/RuntimeEnabledFeatures.cpp:
560         (WebCore):
561         * bindings/generic/RuntimeEnabledFeatures.h:
562         (RuntimeEnabledFeatures):
563         * bindings/v8/custom/V8IntentCustom.cpp: Removed.
564         * html/HTMLElementsAllInOne.cpp:
565         * html/HTMLIntentElement.cpp: Removed.
566         * html/HTMLIntentElement.h: Removed.
567         * html/HTMLIntentElement.idl: Removed.
568         * loader/EmptyClients.cpp:
569         * loader/EmptyClients.h:
570         (EmptyFrameLoaderClient):
571         * loader/FrameLoaderClient.h:
572         (WebCore):
573         * page/DOMWindow.idl:
574
575 2013-02-11  Eric Seidel  <eric@webkit.org>
576
577         Fix Mac build after http://trac.webkit.org/changeset/142535.
578
579         Unreviewed build fix.
580
581         * html/parser/HTMLTokenizer.h:
582         (WebCore::HTMLTokenizer::emitAndReconsumeIn):
583
584 2013-02-11  David Farler  <dfarler@apple.com>
585
586         Make WebCore Derived Sources work with SDK identifiers too
587         https://bugs.webkit.org/show_bug.cgi?id=109324
588
589         Reviewed by Sam Weinig.
590
591         * WebCore.xcodeproj/project.pbxproj: Pass SDKROOT to make for DerivedSources.make
592
593 2013-02-11  Zhenyao Mo  <zmo@google.com>
594
595         WEBGL_compressed_texture_s3tc extension can be enabled even when not supported
596         https://bugs.webkit.org/show_bug.cgi?id=109508
597
598         Reviewed by Kenneth Russell.
599
600         * html/canvas/WebGLRenderingContext.cpp:
601         (WebCore):
602         (WebCore::WebGLRenderingContext::getExtension): Check whether the extension support is there before returning the extension pointer.
603
604 2013-02-11  Emil A Eklund  <eae@chromium.org>
605
606         Change RenderFrameSet::paint to use m-rows/m_cols directly.
607         https://bugs.webkit.org/show_bug.cgi?id=108503
608
609         Reviewed by Eric Seidel.
610
611         Test: fast/frames/invalid-frameset.html
612
613         * rendering/RenderFrameSet.cpp:
614         (WebCore::RenderFrameSet::paint):
615
616 2013-02-11  Yong Li  <yoli@rim.com>
617
618         XMLHttpRequestProgressEventThrottle::resume() always schedules timer even when unnecessary
619         https://bugs.webkit.org/show_bug.cgi?id=105348
620
621         Reviewed by Alexey Proskuryakov.
622
623         Let resume() clear the defer flag and return if there is deferred events to dispatch.
624
625         No new tests as this should not affect existing cross-platform behavior. It should be
626         OK as long as it doesn't break anything.
627
628         * xml/XMLHttpRequestProgressEventThrottle.cpp:
629         (WebCore::XMLHttpRequestProgressEventThrottle::resume):
630
631 2013-02-11  Eric Seidel  <eric@webkit.org>
632
633         Fold MarkupTokenizerBase into HTMLTokenizer now that it is the only subclass
634         https://bugs.webkit.org/show_bug.cgi?id=109499
635
636         Reviewed by Adam Barth.
637
638         For great justice.  And sanity.
639         Epic amount of template code deleted.
640
641         * GNUmakefile.list.am:
642         * Target.pri:
643         * WebCore.gypi:
644         * WebCore.vcproj/WebCore.vcproj:
645         * WebCore.vcxproj/WebCore.vcxproj:
646         * WebCore.vcxproj/WebCore.vcxproj.filters:
647         * WebCore.xcodeproj/project.pbxproj:
648         * html/parser/HTMLTokenizer.cpp:
649         (WebCore::HTMLTokenizer::HTMLTokenizer):
650         * html/parser/HTMLTokenizer.h:
651         (HTMLTokenizer):
652         (Checkpoint):
653         (WebCore::HTMLTokenizer::state):
654         (WebCore::HTMLTokenizer::setState):
655         (WebCore::HTMLTokenizer::shouldSkipNullCharacters):
656         (WebCore::HTMLTokenizer::bufferCharacter):
657         (WebCore::HTMLTokenizer::emitAndResumeIn):
658         (WebCore::HTMLTokenizer::emitAndReconsumeIn):
659         (WebCore::HTMLTokenizer::emitEndOfFile):
660         (WebCore::HTMLTokenizer::haveBufferedCharacterToken):
661         * xml/parser/MarkupTokenizerBase.h: Removed.
662
663 2013-02-11  Anton Vayvod  <avayvod@chromium.org>
664
665         [Text Autosizing] Collect narrow descendants and process them separately. Refactoring for
666         a change to follow.
667         https://bugs.webkit.org/show_bug.cgi?id=109054
668
669         Preparational change to combine narrow descendants of the same autosizing cluster into
670         groups by the width difference between the descendant and the block containing all text of
671         the parent autosizing cluster. The groups will be autosized with the same multiplier.
672
673         For example, on sites with a sidebar, sometimes the paragraphs next to the sidebar will have
674         a large margin individually applied (via a CSS selector), causing them all to individually
675         appear narrower than their enclosing blockContainingAllText. Rather than making each of
676         these paragraphs into a separate cluster, we eventually want to be able to merge them back
677         together into one (or a few) descendant clusters.
678
679         Reviewed by Julien Chaffraix.
680
681         No behavioral changes thus no new tests or test changes.
682
683         * rendering/TextAutosizer.cpp:
684         (TextAutosizingClusterInfo): Vector of narrow descendants.
685         (WebCore::TextAutosizer::processCluster): Process narrow descendants separately.
686         (WebCore::TextAutosizer::processContainer):
687
688             Remember narrow descendants of the parent cluster for later processing.
689
690 2013-02-11  Enrica Casucci  <enrica@apple.com>
691
692         Add ENABLE_DELETION_UI to control the use of the deletion UI.
693         https://bugs.webkit.org/show_bug.cgi?id=109463.
694
695         Reviewed by Ryosuke Niwa.
696         
697         This patch adds #if ENABLE(DELETION_UI) in every spot where
698         DeleteButtonController is used. This class is now only instantiated
699         if the feature is enabled. I've also done some cleanup in the
700         DeleteButtonController class, removing unused methods and making
701         private some methods only used internally to the class.
702         Both DeleteButtonController and DeleteButton classes are now excluded
703         from the compilation if the feature is not enabled.
704
705         No new tests, no change of functionality.
706
707         * dom/ContainerNode.cpp:
708         (WebCore::ContainerNode::cloneChildNodes):
709         * editing/CompositeEditCommand.cpp:
710         (WebCore::EditCommandComposition::unapply):
711         (WebCore::EditCommandComposition::reapply):
712         (WebCore::CompositeEditCommand::apply):
713         * editing/DeleteButton.cpp:
714         * editing/DeleteButtonController.cpp:
715         * editing/DeleteButtonController.h: Some cleanup.
716         (WebCore::DeleteButtonController::enabled): Made private.
717         * editing/EditCommand.cpp:
718         (WebCore::EditCommand::EditCommand):
719         * editing/Editor.cpp:
720         (WebCore::Editor::notifyComponentsOnChangedSelection):
721         (WebCore::Editor::Editor):
722         (WebCore::Editor::rangeForPoint):
723         (WebCore::Editor::deviceScaleFactorChanged):
724         * editing/Editor.h:
725         * editing/htmlediting.cpp: avoidIntersectionWithNode is
726         used only if the feature is enabled.
727         * editing/htmlediting.h:
728         * editing/markup.cpp:
729         (WebCore::createMarkup):
730         (WebCore::createFragmentFromNodes):
731         * rendering/RenderTable.cpp: Removed unnecessary include
732         fo DeleteButtonController.h
733
734 2013-02-11  Rafael Weinstein  <rafaelw@chromium.org>
735
736         [HTMLTemplateElement] <template> inside of <head> may not create <body> if EOF is hit
737         https://bugs.webkit.org/show_bug.cgi?id=109338
738
739         Reviewed by Adam Barth.
740
741         This patch adds the logic to clear the stack of open elements back to the first <template> when EOF
742         is hit. This allows a <body> to be generated if the initial <template> was opened inside of <head>.
743
744         Tests added to html5lib.
745
746         * html/parser/HTMLTreeBuilder.cpp:
747         (WebCore):
748         (WebCore::HTMLTreeBuilder::popAllTemplates):
749         (WebCore::HTMLTreeBuilder::processEndTag):
750         (WebCore::HTMLTreeBuilder::processEndOfFile):
751         * html/parser/HTMLTreeBuilder.h:
752         (HTMLTreeBuilder):
753
754 2013-02-11  Andreas Kling  <akling@apple.com>
755
756         RenderText::isAllCollapsibleWhitespace() shouldn't upconvert string to 16-bit.
757         <http://webkit.org/b/109354>
758
759         Reviewed by Eric Seidel.
760
761         254 KB progression on Membuster3.
762
763         * rendering/RenderText.cpp:
764         (WebCore::RenderText::isAllCollapsibleWhitespace):
765
766 2013-02-11  Alpha Lam  <hclam@chromium.org>
767
768         Fix code style violations in GIFImageReader.{cc|h}
769         https://bugs.webkit.org/show_bug.cgi?id=109007
770
771         Reviewed by Stephen White.
772
773         This is just a style clean up for GIFImageReader.{cc|h}.
774
775         There's going to be a lot changes in these two files and style check
776         will add a lot of noise in later reviews. Fix style problems first.
777
778         There is no change in logic at all. Just style fixes.
779
780         No new tests.
781
782         * platform/image-decoders/gif/GIFImageDecoder.cpp:
783         (WebCore::GIFImageDecoder::frameCount):
784         (WebCore::GIFImageDecoder::repetitionCount):
785         (WebCore::GIFImageDecoder::haveDecodedRow):
786         (WebCore::GIFImageDecoder::initFrameBuffer):
787         * platform/image-decoders/gif/GIFImageReader.cpp:
788         (GIFImageReader::outputRow):
789         (GIFImageReader::doLZW):
790         (GIFImageReader::read):
791         * platform/image-decoders/gif/GIFImageReader.h:
792         (GIFFrameContext):
793         (GIFFrameContext::GIFFrameContext):
794         (GIFFrameContext::~GIFFrameContext):
795         (GIFImageReader::GIFImageReader):
796         (GIFImageReader::~GIFImageReader):
797         (GIFImageReader):
798         (GIFImageReader::imagesCount):
799         (GIFImageReader::loopCount):
800         (GIFImageReader::globalColormap):
801         (GIFImageReader::globalColormapSize):
802         (GIFImageReader::frameContext):
803
804 2013-02-11  Bem Jones-Bey  <bjonesbe@adobe.com>
805
806         [CSS Exclusions] Handle shape-outside changing a float's overhang behavior
807         https://bugs.webkit.org/show_bug.cgi?id=106927
808
809         Reviewed by Julien Chaffraix.
810
811         When the position on a shape outside causes a float to spill out into
812         another block than it's container, it was not being drawn correctly. It
813         became apparent that in order to fix this properly, the approach to
814         positioning shape outsides and floats needed to be changed. The new
815         approach also fixes some other outstanding issues, like hit detection.
816
817         When a float has a shape outside, inline and float layout happens
818         using the exclusion shape bounds instead of the float's box.  The
819         effect of this is that the float itself no longer has any effect on
820         layout, both with respect to positioning of the float's siblings as
821         well as positioning the float's box. This means that when the float is
822         positioned, it is the shape's box that must obey the positioning rules
823         for floats. When the shape is given a position relative to the float's
824         box, the rules for float positioning determine where the shape sits
825         in the parent, causing the float's box to be offset by the position of
826         the shape. Since the float's box does not affect layout (due to the
827         shape), this is similar to relative positioning in that the offset is
828         a paint time occurrence.
829
830         So the new approach is to implement positioning of shape outside on
831         floats similar to how relative positioning is implemented, using a
832         RenderLayer.
833
834         This is also tested by the existing tests for shape outside on floats positioning.
835
836         Test: fast/exclusions/shape-outside-floats/shape-outside-floats-overhang.html
837
838         * rendering/ExclusionShapeOutsideInfo.h:
839         (WebCore::ExclusionShapeOutsideInfo::shapeLogicalOffset): Utility method to create a LayoutSize for computing the layer offset.
840         (ExclusionShapeOutsideInfo):
841         * rendering/LayoutState.cpp:
842         (WebCore::LayoutState::LayoutState): Check for floats with shape outside as well as in flow positioning.
843         * rendering/RenderBlock.cpp:
844         (WebCore::RenderBlock::flipFloatForWritingModeForChild): Remove old positioning implementation.
845         (WebCore::RenderBlock::paintFloats): Remove old positioning implementation.
846         (WebCore::RenderBlock::blockSelectionGaps): Check for floats with shape outside as well as in flow positioning.
847         (WebCore::RenderBlock::positionNewFloats): Remove old positioning implementation.
848         (WebCore::RenderBlock::addOverhangingFloats): Remove FIXME.
849         (WebCore::positionForPointRespectingEditingBoundaries): Check for floats with shape outside as well as in flow positioning.
850         * rendering/RenderBlock.h:
851         (RenderBlock): Remove old positioning implementation.
852         (WebCore::RenderBlock::xPositionForFloatIncludingMargin): Remove old positioning implementation.
853         (WebCore::RenderBlock::yPositionForFloatIncludingMargin): Remove old positioning implementation.
854         * rendering/RenderBox.cpp:
855         (WebCore::RenderBox::mapLocalToContainer): Check for floats with shape outside as well as in flow positioning.
856         (WebCore::RenderBox::offsetFromContainer): Check for floats with shape outside as well as in flow positioning.
857         (WebCore::RenderBox::computeRectForRepaint): Check for floats with shape outside as well as in flow positioning.
858         (WebCore::RenderBox::layoutOverflowRectForPropagation): Check for floats with shape outside as well as in flow positioning.
859         * rendering/RenderBox.h: Make floats with shape outside get a layer.
860         * rendering/RenderBoxModelObject.cpp:
861         (WebCore::RenderBoxModelObject::paintOffset): Method to return in flow
862             positioning offset + offset from shape outside on floats.
863         * rendering/RenderBoxModelObject.h:
864         (RenderBoxModelObject): Add paintOffset method.
865         * rendering/RenderInline.cpp:
866         (WebCore::RenderInline::clippedOverflowRectForRepaint): Check for floats with shape outside as well as in flow positioning.
867         (WebCore::RenderInline::computeRectForRepaint): Check for floats with shape outside as well as in flow positioning.
868         (WebCore::RenderInline::mapLocalToContainer): Check for floats with shape outside as well as in flow positioning.
869         * rendering/RenderLayer.cpp:
870         (WebCore::RenderLayer::updateLayerPosition): Check for floats with shape outside as well as in flow positioning.
871         (WebCore::RenderLayer::calculateClipRects): Check for floats with shape outside as well as in flow positioning.
872         * rendering/RenderLayer.h:
873         (WebCore::RenderLayer::paintOffset): Rename offsetForInFlowPosition to reflect that it's not just for
874             in flow positioning, it also reflects shape outside position on floats.
875         (RenderLayer):
876         * rendering/RenderObject.h:
877         (WebCore::RenderObject::hasPaintOffset): Determines if this object is in flow positioined or is a float with shape outside.
878         * rendering/style/RenderStyle.h: Add hasPaintOffset method, analagous to method with same name on RenderObject.
879
880 2013-02-11  Tim Horton  <timothy_horton@apple.com>
881
882         FrameView::setScrollPosition should clamp scroll position before handing it to
883         ScrollingCoordinator instead of depending on ScrollView to do this
884         https://bugs.webkit.org/show_bug.cgi?id=109497
885         <rdar://problem/12631789>
886
887         Reviewed by Simon Fraser.
888
889         Clamp scroll position before handing it to ScrollingCoordinator. Also, like ScrollView does,
890         bail out if we've already scrolled to the clamped scroll position.
891
892         Test: platform/mac-wk2/tiled-drawing/clamp-out-of-bounds-scrolls.html
893
894         * page/FrameView.cpp:
895         (WebCore::FrameView::setScrollPosition):
896
897 2013-02-11  Adam Barth  <abarth@webkit.org>
898
899         The threaded HTML parser should pass all the fast/parser tests
900         https://bugs.webkit.org/show_bug.cgi?id=109486
901
902         Reviewed by Tony Gentilcore.
903
904         This patch fixes the last two test failures in fast/parser, which were
905         crashes caused by not having a tokenizer when document.close() was
906         called. (The tokenizer is created lazily by calls to document.write,
907         which might not happen before document.close).
908
909         fast/parser/document-close-iframe-load.html
910         fast/parser/document-close-nested-iframe-load.html
911
912         In addition, I've added a new test to make sure we flush the tokenizer
913         properly in these cases.
914
915         Test: fast/parser/document-close-iframe-load-partial-entity.html
916
917         * html/parser/HTMLDocumentParser.cpp:
918         (WebCore::HTMLDocumentParser::prepareToStopParsing):
919         (WebCore::HTMLDocumentParser::pumpTokenizer):
920
921 2013-02-11  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
922
923         [texmap] Implement frames-per-second debug counter
924         https://bugs.webkit.org/show_bug.cgi?id=107942
925
926         Reviewed by Noam Rosenthal.
927
928         Adds FPS counter via WEBKIT_SHOW_FPS=<interval> environment variable,
929         where <interval> is the period in seconds (i.e. =1.5) between FPS
930         updates on screen. It is measured by counting
931         CoordinatedGraphicsScene::paintTo* calls and is painted using
932         drawRepaintCounter() after TextureMapperLayer has finished painting its
933         contents.
934
935         Visual debugging feature, no need for new tests.
936
937         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
938         (WebCore::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
939         (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
940         (WebCore::CoordinatedGraphicsScene::paintToGraphicsContext):
941         (WebCore::CoordinatedGraphicsScene::updateFPS):
942         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
943
944 2013-02-11  Eric Seidel  <eric@webkit.org>
945
946         Fold MarkupTokenBase into HTMLToken now that it has no other subclasses
947         https://bugs.webkit.org/show_bug.cgi?id=109483
948
949         Reviewed by Adam Barth.
950
951         This deletes an epic amount of template yuck, as well as removes
952         a vtable !?! from HTMLToken.
953
954         This paves the way for further cleanup of HTMLToken now that we
955         can see the whole object at once.
956         We'll also probably re-create an HTMLToken.cpp again, now that we're
957         free from the chains of template nonsense.
958
959         * GNUmakefile.list.am:
960         * Target.pri:
961         * WebCore.gypi:
962         * WebCore.vcproj/WebCore.vcproj:
963         * WebCore.vcxproj/WebCore.vcxproj:
964         * WebCore.vcxproj/WebCore.vcxproj.filters:
965         * WebCore.xcodeproj/project.pbxproj:
966         * html/parser/HTMLToken.h:
967         (WebCore::findAttributeInVector):
968         (WebCore):
969         (HTMLToken):
970         (Attribute):
971         (Range):
972         (WebCore::HTMLToken::HTMLToken):
973         (WebCore::HTMLToken::clear):
974         (WebCore::HTMLToken::isUninitialized):
975         (WebCore::HTMLToken::type):
976         (WebCore::HTMLToken::makeEndOfFile):
977         (WebCore::HTMLToken::startIndex):
978         (WebCore::HTMLToken::endIndex):
979         (WebCore::HTMLToken::setBaseOffset):
980         (WebCore::HTMLToken::end):
981         (WebCore::HTMLToken::data):
982         (WebCore::HTMLToken::isAll8BitData):
983         (WebCore::HTMLToken::name):
984         (WebCore::HTMLToken::appendToName):
985         (WebCore::HTMLToken::nameString):
986         (WebCore::HTMLToken::selfClosing):
987         (WebCore::HTMLToken::setSelfClosing):
988         (WebCore::HTMLToken::beginStartTag):
989         (WebCore::HTMLToken::beginEndTag):
990         (WebCore::HTMLToken::addNewAttribute):
991         (WebCore::HTMLToken::beginAttributeName):
992         (WebCore::HTMLToken::endAttributeName):
993         (WebCore::HTMLToken::beginAttributeValue):
994         (WebCore::HTMLToken::endAttributeValue):
995         (WebCore::HTMLToken::appendToAttributeName):
996         (WebCore::HTMLToken::appendToAttributeValue):
997         (WebCore::HTMLToken::attributes):
998         (WebCore::HTMLToken::eraseValueOfAttribute):
999         (WebCore::HTMLToken::ensureIsCharacterToken):
1000         (WebCore::HTMLToken::characters):
1001         (WebCore::HTMLToken::appendToCharacter):
1002         (WebCore::HTMLToken::comment):
1003         (WebCore::HTMLToken::beginComment):
1004         (WebCore::HTMLToken::appendToComment):
1005         (WebCore::HTMLToken::eraseCharacters):
1006         * html/parser/HTMLTokenTypes.h:
1007         * html/parser/XSSAuditor.h:
1008         * xml/parser/MarkupTokenBase.h: Removed.
1009
1010 2013-02-11  Gavin Barraclough  <barraclough@apple.com>
1011
1012         PluginProcess should quit immediately if idle in response to low-memory notifications
1013         https://bugs.webkit.org/show_bug.cgi?id=109103
1014         <rdar://problem/12679827>
1015
1016         Reviewed by Brady Eidson.
1017
1018         This patch allows a process to set a custom callback for low memory warnings
1019         (defaulting to the current behaviour, as implemented in releaseMemory).
1020
1021         * platform/MemoryPressureHandler.cpp:
1022         (WebCore::MemoryPressureHandler::MemoryPressureHandler):
1023             - Initialize m_lowMemoryHandler to releaseMemory.
1024         (WebCore::MemoryPressureHandler::install):
1025         (WebCore::MemoryPressureHandler::uninstall):
1026         (WebCore::MemoryPressureHandler::holdOff):
1027             - Cleaned up spacing.
1028         (WebCore::MemoryPressureHandler::releaseMemory):
1029             - Added null implementation for non-Mac builds.
1030         * platform/MemoryPressureHandler.h:
1031         (WebCore::MemoryPressureHandler::setLowMemoryHandler):
1032             - Added method to set m_lowMemoryHandler.
1033         * platform/mac/MemoryPressureHandlerMac.mm:
1034         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
1035             - Changed to call releaseMemory via m_lowMemoryHandler.
1036
1037 2013-02-11  Simon Fraser  <simon.fraser@apple.com>
1038
1039         REGRESSION (r133807): Sticky-position review bar on bugzilla review page is jumpy
1040         https://bugs.webkit.org/show_bug.cgi?id=104276
1041         <rdar://problem/12827187>
1042
1043         Reviewed by Tim Horton.
1044
1045         When committing new scrolling tree state, if the root node has a scroll
1046         position update, we would handle that before updating the state of child
1047         nodes (with possibly new viewport constraints). That would cause incorrect
1048         child layer updates.
1049         
1050         Fix by adding a second 'update' phase that happens after child nodes,
1051         and moving the scroll position update into that.
1052
1053         Scrolling tests only dump the state tree, so cannot test the bug.
1054
1055         * page/FrameView.cpp:
1056         (WebCore::FrameView::setScrollPosition): If the scroll position didn't
1057         actually change, don't request a scroll position update from the ScrollingCoordinator.
1058         * page/scrolling/ScrollingTree.cpp:
1059         (WebCore::ScrollingTree::updateTreeFromStateNode): Keep track of the scrolling node so
1060         that we can call updateAfterChildren() on it.
1061         * page/scrolling/ScrollingTreeNode.h:
1062         (ScrollingTreeNode):
1063         (WebCore::ScrollingTreeNode::updateAfterChildren):
1064         * page/scrolling/ScrollingTreeScrollingNode.cpp:
1065         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
1066         * page/scrolling/ScrollingTreeScrollingNode.h:
1067         (ScrollingTreeScrollingNode):
1068         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1069         (WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode):
1070         In the current bug the scrolling tree was scheduled for commit because of a
1071         scroll position request, but if only the viewport constraints change, we also need
1072         to commit the tree.
1073         * page/scrolling/mac/ScrollingTreeFixedNode.h:
1074         (ScrollingTreeFixedNode):
1075         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
1076         (WebCore::ScrollingTreeFixedNode::updateBeforeChildren):
1077         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
1078         (ScrollingTreeScrollingNodeMac):
1079         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
1080         (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
1081         (WebCore::ScrollingTreeScrollingNodeMac::updateAfterChildren): Move code here
1082         that updates things that have to happen after children.
1083         * page/scrolling/mac/ScrollingTreeStickyNode.h:
1084         (ScrollingTreeStickyNode):
1085         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
1086         (WebCore::ScrollingTreeStickyNode::updateBeforeChildren):
1087
1088 2013-02-11  Roger Fong  <roger_fong@apple.com>
1089
1090         Unreviewed. Build fix for Win7 Release.
1091         Because of InspectorAllInOne.cpp static globals must be named differently in files included by InspectorAllInOne.
1092         This was the case for UserInitiatedProfileName. Also removed the repeated HeapProfileType definition in
1093         InspectorHeapProfilerAgent.cpp since it wasn't being used anyways.
1094
1095         * inspector/InspectorHeapProfilerAgent.cpp:
1096         (WebCore):
1097         (WebCore::InspectorHeapProfilerAgent::takeHeapSnapshot):
1098
1099 2013-02-11  Tony Gentilcore  <tonyg@chromium.org>
1100
1101         SegmentedString's copy ctor should copy all fields
1102         https://bugs.webkit.org/show_bug.cgi?id=109477
1103
1104         Reviewed by Adam Barth.
1105
1106         This fixes http/tests/inspector-enabled/document-write.html (and likely others) for the threaded HTML parser.
1107
1108         No new tests because covered by existing tests.
1109
1110         * platform/text/SegmentedString.cpp:
1111         (WebCore::SegmentedString::SegmentedString):
1112
1113 2013-02-11  Joshua Bell  <jsbell@chromium.org>
1114
1115         IndexedDB: database connections don't close after versionchange transaction aborts
1116         https://bugs.webkit.org/show_bug.cgi?id=102298
1117
1118         Reviewed by Tony Chang.
1119
1120         Per spec, close the database if the "versionchange" transaction aborts.
1121
1122         Tests: storage/indexeddb/aborted-versionchange-closes.html
1123                storage/indexeddb/lazy-index-population.html
1124                storage/objectstore-basics.html
1125
1126         * Modules/indexeddb/IDBTransaction.cpp:
1127         (WebCore::IDBTransaction::onAbort): Tell the IDBDatabase (connection) to close if
1128         this was a "versionchange" transaction.
1129
1130 2013-02-11  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1131
1132         [EFL] fast/forms/number/number-l10n-input.html is failing
1133         https://bugs.webkit.org/show_bug.cgi?id=109440
1134
1135         Reviewed by Laszlo Gombos.
1136
1137         Use LocaleICU instead of LocaleNone on EFL port. The EFL
1138         port already depends on ICU library and we get additional
1139         functionality this way.
1140
1141         No new tests, already covered by existing tests.
1142
1143         * CMakeLists.txt:
1144         * PlatformBlackBerry.cmake:
1145         * PlatformEfl.cmake:
1146         * PlatformWinCE.cmake:
1147
1148 2013-02-11  Benjamin Poulain  <benjamin@webkit.org>
1149
1150         Kill TestRunner::setMinimumTimerInterval; implement the feature with InternalSettings
1151         https://bugs.webkit.org/show_bug.cgi?id=109349
1152
1153         Reviewed by Sam Weinig.
1154
1155         Expose setMinimumTimerInterval() and implement the backup/restore to keep
1156         a consistent state between tests.
1157
1158         * testing/InternalSettings.cpp:
1159         (WebCore::InternalSettings::Backup::Backup):
1160         (WebCore::InternalSettings::Backup::restoreTo):
1161         (WebCore::InternalSettings::setMinimumTimerInterval):
1162         (WebCore):
1163         * testing/InternalSettings.h:
1164         (Backup):
1165         (InternalSettings):
1166         * testing/InternalSettings.idl:
1167
1168 2013-02-11  Dean Jackson  <dino@apple.com>
1169
1170         Source/WebCore: Snapshotted plug-in should use shadow root
1171         https://bugs.webkit.org/show_bug.cgi?id=108284
1172
1173         Reviewed by Simon Fraser.
1174
1175         Take three - relanding after rollout in r142400 that was caused by a global
1176         selector interfering with CSS Instrumentation in the Inspector.
1177
1178         A snapshotted plugin needs to indicate to the user that it can be clicked
1179         to be restarted. Previously this was done with an image that had embedded
1180         text. Instead, we now use an internal shadow root to embed some markup that
1181         will display instructions that can be localised.
1182
1183         The UA stylesheet for plug-ins provides a default styling for the label, which
1184         can be overridden by ports.
1185
1186         In the process, RenderSnapshottedPlugIn no longer inherits from RenderEmbeddedObject,
1187         since it is only responsible for drawing a paused plug-in. The snapshot creation
1188         can work with the default renderer, but a shadow root requires something like
1189         RenderBlock in order to draw its children. We swap from one renderer to another when
1190         necessary either by creating the shadow root or by explicitly detaching and attaching
1191         the plugin element.
1192
1193         Unfortunately this is difficult to test, because the snapshotting requires
1194         time to execute, and also a PluginView to be instantiated.
1195
1196         * css/plugIns.css:
1197         (object::-webkit-snapshotted-plugin-content): New rules for a default label style.
1198
1199         * platform/LocalizedStrings.cpp: Make sure all ports have plugin strings, now it is called.
1200         * platform/LocalizedStrings.h:
1201         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
1202         * platform/chromium/LocalizedStringsChromium.cpp:
1203         * platform/efl/LocalizedStringsEfl.cpp:
1204         * platform/gtk/LocalizedStringsGtk.cpp:
1205         * platform/qt/LocalizedStringsQt.cpp:
1206
1207         * html/HTMLPlugInElement.cpp:
1208         (WebCore::HTMLPlugInElement::defaultEventHandler): Take into account the fact
1209         that RenderSnapshottedPlugIn no longer is an embedded object.
1210
1211         * html/HTMLPlugInImageElement.cpp:
1212         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): New default values in constructor.
1213         (WebCore::HTMLPlugInElement::defaultEventHandler): Make sure to call base class.
1214         (WebCore::HTMLPlugInElement::willRecalcStyle): No need to reattach if we're a snapshot.
1215         (WebCore::HTMLPlugInImageElement::createRenderer): If we're showing a snapshot, create such
1216             a renderer, otherwise use the typical plug-in path.
1217         (WebCore::HTMLPlugInImageElement::updateSnapshot): Keep a record of the snapshot, since we'll
1218             need to give it to the renderer.
1219         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Build a subtree that will display a label.
1220         * html/HTMLPlugInImageElement.h:
1221         (HTMLPlugInImageElement): New member variable to record the snapshot image and whether the label
1222             should show immediately.
1223         (WebCore::HTMLPlugInImageElement::swapRendererTimerFired): The callback function triggered when we need
1224             to swap to the Shadow Root.
1225         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): The user has tapped on the snapshot so the plugin
1226             in being recreated. Make sure we reattach so that a plugin renderer will be created.
1227         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Make sure we set the right
1228             displayState for snapshots.
1229         * html/HTMLPlugInImageElement.h:
1230         (HTMLPlugInImageElement): The new methods listed above.
1231         (WebCore::HTMLPlugInImageElement::setShouldShowSnapshotLabelAutomatically): Indicates whether or not
1232             a snapshot should be immediately labeled.
1233
1234         * page/ChromeClient.h: No need for plugInStartLabelImage any more.
1235
1236         * rendering/RenderSnapshottedPlugIn.cpp:
1237         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): New inheritance.
1238         (WebCore::RenderSnapshottedPlugIn::paint): If we're in the background paint phase, render the snapshot image.
1239         (WebCore::RenderSnapshottedPlugIn::paintSnapshotImage): Rename.
1240         (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Rename.
1241         (WebCore::RenderSnapshottedPlugIn::paintSnapshotWithLabel): Rename. No need for label sizes.
1242         (WebCore::RenderSnapshottedPlugIn::getCursor):
1243         (WebCore::RenderSnapshottedPlugIn::handleEvent): The renderer doesn't restart the plug-in any more. Tell the element and it will do it.
1244         * rendering/RenderSnapshottedPlugIn.h:
1245         (RenderSnapshottedPlugIn): New inheritance. Some method renaming.
1246
1247 2013-02-11  Mike West  <mkwst@chromium.org>
1248
1249         CSP reports for blocked 'data:' URLs should report the scheme only.
1250         https://bugs.webkit.org/show_bug.cgi?id=109429
1251
1252         Reviewed by Adam Barth.
1253
1254         https://dvcs.w3.org/hg/content-security-policy/rev/001dc8e8bcc3 changed
1255         the CSP 1.1 spec to require that blocked URLs that don't refer to
1256         generally resolvable schemes (e.g. 'data:', 'javascript:', etc.) be
1257         stripped down to their scheme in violation reports.
1258
1259         Test: http/tests/security/contentSecurityPolicy/report-blocked-data-uri.html
1260
1261         * page/ContentSecurityPolicy.cpp:
1262         (WebCore::ContentSecurityPolicy::reportViolation):
1263             If the blocked URL is a web-resolvable scheme, apply the current
1264             stripping logic to it, otherwise, strip it to the scheme only.
1265         * platform/KURL.h:
1266         (KURL):
1267             Move KURL::isHierarchical() out into KURL's public API.
1268
1269 2013-02-11  Simon Fraser  <simon.fraser@apple.com>
1270
1271         ScrollingTree node maps keep getting larger
1272         https://bugs.webkit.org/show_bug.cgi?id=109348
1273
1274         Reviewed by Sam Weinig.
1275
1276         When navigating between pages, nodes would get left in the ScrollingTree's
1277         node map, and the ScrollingStateTree's node map, so these would get larger
1278         and larger as you browse.
1279         
1280         Simplify map maintenance by clearing the map when setting a new root node
1281         (which happens on the first commit of a new page). Also, don't keep root nodes
1282         around, but create them afresh for each page, which simplifies their ID
1283         management.
1284         
1285         This is closer to the original behavior; keeping the root nodes around was
1286         a fix for bug 99668, but we avoid regressing that fix by bailing early
1287         from frameViewLayoutUpdated() if there is no root state node (we'll get
1288         called again anyway).
1289         
1290         This now allows state nodeIDs to be purely read-only.
1291
1292         * page/scrolling/ScrollingStateNode.h:
1293         * page/scrolling/ScrollingStateTree.cpp:
1294         (WebCore::ScrollingStateTree::ScrollingStateTree):
1295         (WebCore::ScrollingStateTree::attachNode):
1296         (WebCore::ScrollingStateTree::clear):
1297         (WebCore::ScrollingStateTree::removeNode):
1298         * page/scrolling/ScrollingTree.cpp:
1299         (WebCore::ScrollingTree::updateTreeFromStateNode):
1300         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1301         (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
1302
1303 2013-02-11  Simon Fraser  <simon.fraser@apple.com>
1304
1305         Move m_stateNodeMap from ScrollingCoordinatorMac to ScrollingStateTree
1306         https://bugs.webkit.org/show_bug.cgi?id=109361
1307
1308         Reviewed by Sam Weinig.
1309         
1310         The map of scrolling node IDs to ScollingStateNodes was maintained by
1311         ScrollingCoordinatorMac, rather than ScrollingStateTree. This is different
1312         from the ScrollingTree (which owns its node map), and added some amount
1313         of to-and-fro between ScrollingStateTree and ScrollingCoordinatorMac.
1314         
1315         Having ScrollingCoordinatorMac maintain the map of IDs to state nodes
1316         simplifies things.
1317
1318         No behavior change.
1319
1320         * page/scrolling/ScrollingStateTree.cpp:
1321         (WebCore::ScrollingStateTree::attachNode):
1322         (WebCore::ScrollingStateTree::detachNode):
1323         (WebCore::ScrollingStateTree::clear):
1324         (WebCore::ScrollingStateTree::removeNode):
1325         (WebCore::ScrollingStateTree::stateNodeForID):
1326         * page/scrolling/ScrollingStateTree.h:
1327         (ScrollingStateTree): Remove some stale comments.
1328         (WebCore::ScrollingStateTree::removedNodes):
1329         * page/scrolling/mac/ScrollingCoordinatorMac.h:
1330         (ScrollingCoordinatorMac):
1331         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1332         (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
1333         (WebCore::ScrollingCoordinatorMac::recomputeWheelEventHandlerCountForFrameView):
1334         (WebCore::ScrollingCoordinatorMac::frameViewRootLayerDidChange):
1335         (WebCore::ScrollingCoordinatorMac::requestScrollPositionUpdate):
1336         (WebCore::ScrollingCoordinatorMac::attachToStateTree):
1337         (WebCore::ScrollingCoordinatorMac::detachFromStateTree):
1338         (WebCore::ScrollingCoordinatorMac::clearStateTree):
1339         (WebCore::ScrollingCoordinatorMac::updateScrollingNode):
1340         (WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode):
1341
1342 2013-02-11  Mark Rowe  <mrowe@apple.com>
1343
1344         Build fix.
1345
1346         * platform/mac/PlatformSpeechSynthesizerMac.mm: Fix the case in the include.
1347
1348 2013-02-11  Julien Chaffraix  <jchaffraix@webkit.org>
1349
1350         Regression(r131539): Heap-use-after-free in WebCore::RenderBlock::willBeDestroyed
1351         https://bugs.webkit.org/show_bug.cgi?id=107189
1352
1353         Reviewed by Abhishek Arya.
1354
1355         Test: fast/dynamic/continuation-detach-crash.html
1356
1357         This patch reverts r131539 and the following changes (r132591 and r139664).
1358         This means we redo detaching from the bottom-up which solves the regression.
1359         It fixes the attached test case as we re-attach child nodes before detaching
1360         the parent. It seems wrong to do but this avoid a stale continuation.
1361
1362         * dom/ContainerNode.cpp:
1363         (WebCore::ContainerNode::detach): Detach the children first, then ourself.
1364         * dom/Node.cpp:
1365         (WebCore::Node::detach): Clear the renderer instead of ASSERT'ing.
1366         * rendering/RenderObject.cpp:
1367         (WebCore::RenderObject::willBeDestroyed): Removed the code to clear the associated node's renderer.
1368         (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
1369         * rendering/RenderObjectChildList.cpp:
1370         (WebCore::RenderObjectChildList::removeChildNode):
1371         Moved the repainting logic back into removeChildNode from destroyAndCleanupAnonymousWrappers.
1372         (WebCore::RenderObjectChildList::destroyLeftoverChildren): Re-added the code to clear the associated node's
1373         renderer.
1374         * rendering/RenderTextFragment.cpp:
1375         (WebCore::RenderTextFragment::setText): Re-added the code to set the associated node's renderer.
1376
1377         * dom/ContainerNode.cpp:
1378         (WebCore::ContainerNode::detach):
1379         * dom/Node.cpp:
1380         (WebCore::Node::detach):
1381         * rendering/RenderObject.cpp:
1382         (WebCore::RenderObject::willBeDestroyed):
1383         (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
1384         * rendering/RenderObjectChildList.cpp:
1385         (WebCore::RenderObjectChildList::destroyLeftoverChildren):
1386         (WebCore::RenderObjectChildList::removeChildNode):
1387         * rendering/RenderTextFragment.cpp:
1388         (WebCore::RenderTextFragment::setText):
1389
1390 2013-02-11  Eric Seidel  <eric@webkit.org>
1391
1392         Make WebVTTTokenizer stop inheriting from MarkupTokenizerBase
1393         https://bugs.webkit.org/show_bug.cgi?id=109411
1394
1395         Reviewed by Adam Barth.
1396
1397         Moved InputStreamPreprocessor into its own header file so it can be
1398         used by both WebVTTTokenizer and HTMLTokenizer.
1399
1400         Also split out kEndOfFileMarker from InputStreamPreprocessor<T> so that
1401         it can be used w/o a specific instantiation of the template class.
1402         This also made it possible to fix three old fixmes about wanting to share
1403         that constant.
1404
1405         Again, separating WebVTT code from Markup* base classes made it simpler
1406         at the cost of a little copy/paste code.  WebVTT tokenization is remarkably
1407         simple compared to HTML.
1408
1409         This will make it immediately possible to pull MarkupTokenizerBase up into
1410         HTMLTokenizer and further simplify the code.
1411
1412         * GNUmakefile.list.am:
1413         * Target.pri:
1414         * WebCore.gypi:
1415         * WebCore.vcproj/WebCore.vcproj:
1416         * WebCore.vcxproj/WebCore.vcxproj:
1417         * WebCore.vcxproj/WebCore.vcxproj.filters:
1418         * WebCore.xcodeproj/project.pbxproj:
1419         * html/parser/BackgroundHTMLParser.cpp:
1420         (WebCore::BackgroundHTMLParser::markEndOfFile):
1421         * html/parser/HTMLInputStream.h:
1422         (WebCore::HTMLInputStream::markEndOfFile):
1423         * html/parser/HTMLTokenizer.cpp:
1424         (WebCore::HTMLTokenizer::nextToken):
1425         * html/parser/InputStreamPreprocessor.h: Added.
1426         (WebCore):
1427         (InputStreamPreprocessor):
1428         (WebCore::InputStreamPreprocessor::InputStreamPreprocessor):
1429         (WebCore::InputStreamPreprocessor::nextInputCharacter):
1430         (WebCore::InputStreamPreprocessor::peek):
1431         (WebCore::InputStreamPreprocessor::advance):
1432         (WebCore::InputStreamPreprocessor::skipNextNewLine):
1433         (WebCore::InputStreamPreprocessor::reset):
1434         (WebCore::InputStreamPreprocessor::shouldTreatNullAsEndOfFileMarker):
1435         * html/track/WebVTTTokenizer.cpp:
1436         (WebCore::WebVTTTokenizer::WebVTTTokenizer):
1437         (WebCore::WebVTTTokenizer::nextToken):
1438         * html/track/WebVTTTokenizer.h:
1439         (WebVTTTokenizer):
1440         (WebCore::WebVTTTokenizer::haveBufferedCharacterToken):
1441         (WebCore::WebVTTTokenizer::bufferCharacter):
1442         (WebCore::WebVTTTokenizer::emitAndResumeIn):
1443         (WebCore::WebVTTTokenizer::emitEndOfFile):
1444         (WebCore::WebVTTTokenizer::shouldSkipNullCharacters):
1445         * xml/parser/MarkupTokenizerBase.h:
1446         (MarkupTokenizerBase):
1447         (WebCore::MarkupTokenizerBase::bufferCharacter):
1448
1449 2013-02-11  Adam Barth  <abarth@webkit.org>
1450
1451         document.write during window.onload can trigger DumpRenderTree to dump the render tree
1452         https://bugs.webkit.org/show_bug.cgi?id=109465
1453
1454         Reviewed by Eric Seidel.
1455
1456         This patch is a partial revert of
1457         http://trac.webkit.org/changeset/142378. It's not safe to call
1458         checkComplete during the load event. We'll need to find another way of
1459         calling checkComplete at the right time.
1460
1461         Test: fast/parser/document-write-during-load.html
1462
1463         * dom/Document.cpp:
1464         (WebCore::Document::decrementActiveParserCount):
1465
1466 2013-02-11  Andrey Kosyakov  <caseq@chromium.org>
1467
1468         Web Inspector: Timeline: invalidate and force locations are same for Layout records caused by style recalculaiton
1469         https://bugs.webkit.org/show_bug.cgi?id=109294
1470
1471         Reviewed by Pavel Feldman.
1472
1473         Use the stack that caused style recalculation as a cause for relayout performed due to
1474         layout invalidation caused by style recalculation.
1475
1476         * inspector/front-end/TimelinePresentationModel.js:
1477         (WebInspector.TimelinePresentationModel.prototype.reset):
1478         (WebInspector.TimelinePresentationModel.Record):
1479
1480 2013-02-01  Andrey Kosyakov  <caseq@chromium.org>
1481
1482         Web Inspector: [Extension API] adjust inspectedWindow.eval() callback parameters to expose non-exceptional error
1483         https://bugs.webkit.org/show_bug.cgi?id=108640
1484
1485         Reviewed by Vsevolod Vlasov.
1486
1487         - only set first parameter to eval() callback iff expression successfully evaluates;
1488         - use object, not bool as second parameter;
1489         - pass exceptions and extension errors as second parameter if evaluate failed;
1490         - minor drive-by changes in ExtensionAPI utilities.
1491
1492         * inspector/front-end/ExtensionAPI.js:
1493         (injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setExpression):
1494         (injectedExtensionAPI.InspectedWindow.prototype.):
1495         (injectedExtensionAPI.InspectedWindow.prototype.eval):
1496         (injectedExtensionAPI.extractCallbackArgument):
1497         * inspector/front-end/ExtensionServer.js:
1498         (WebInspector.ExtensionServer.prototype.):
1499         (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
1500         (WebInspector.ExtensionStatus):
1501
1502 2013-02-11  Andrey Kosyakov  <caseq@chromium.org>
1503
1504         Web Inspector: [Extensions API] expose ExtensionServerClient to tests so tests use same port as extensions API
1505         https://bugs.webkit.org/show_bug.cgi?id=109443
1506
1507         Reviewed by Vsevolod Vlasov.
1508
1509         Promote extensionServer var to the outer closure, so it may be accessed by platform-specific (or test) code.
1510
1511         * inspector/front-end/ExtensionAPI.js:
1512         (buildExtensionAPIInjectedScript):
1513
1514 2013-02-11  Eric Seidel  <eric@webkit.org>
1515
1516         Move WebVTTToken off of MarkupTokenBase
1517         https://bugs.webkit.org/show_bug.cgi?id=109410
1518
1519         Reviewed by Tony Gentilcore.
1520
1521         This introduces a small amount of "copy/paste" code
1522         but actually makes WebVTTToken much smaller and simpler!
1523         This also frees the HTMLParser to have its Token class
1524         back to itself so we can tune it to make HTML faster.
1525
1526         * html/track/WebVTTToken.h:
1527         (WebVTTToken):
1528         (WebCore::WebVTTToken::WebVTTToken):
1529         (WebCore::WebVTTToken::appendToName):
1530         (WebCore::WebVTTToken::type):
1531         (WebCore::WebVTTToken::name):
1532         (WebCore::WebVTTToken::ensureIsCharacterToken):
1533         (WebCore::WebVTTToken::appendToCharacter):
1534         (WebCore::WebVTTToken::beginEmptyStartTag):
1535         (WebCore::WebVTTToken::beginStartTag):
1536         (WebCore::WebVTTToken::beginEndTag):
1537         (WebCore::WebVTTToken::beginTimestampTag):
1538         (WebCore::WebVTTToken::makeEndOfFile):
1539         (WebCore::WebVTTToken::clear):
1540
1541 2013-02-11  Joshua Bell  <jsbell@chromium.org>
1542
1543         [V8] IndexedDB: Minor GC can collect IDBDatabase wrapper with versionchange handler
1544         https://bugs.webkit.org/show_bug.cgi?id=108670
1545
1546         Reviewed by Kentaro Hara.
1547
1548         Prevent IDBDatabase's wrapper from being GC'd while the database is open if it has
1549         listeners, as those listeners may close the database in response to events.
1550
1551         Also, removed extraneous super-calls from hasPendingActivity() overrides.
1552
1553         Test: storage/indexeddb/database-wrapper.html
1554
1555         * Modules/indexeddb/IDBDatabase.cpp:
1556         (WebCore::IDBDatabase::hasPendingActivity): Implemented.
1557         * Modules/indexeddb/IDBDatabase.h: Declared.
1558         * Modules/indexeddb/IDBRequest.cpp:
1559         (WebCore::IDBRequest::hasPendingActivity): Simplified.
1560         * Modules/indexeddb/IDBTransaction.cpp:
1561         (WebCore::IDBTransaction::hasPendingActivity): Simplified.
1562
1563 2013-02-11  Eric Seidel  <eric@webkit.org>
1564
1565         Remove AttributeBase now that NEW_XML is gone
1566         https://bugs.webkit.org/show_bug.cgi?id=109408
1567
1568         Reviewed by Adam Barth.
1569
1570         Just deleting code.  HTMLToken::Attribute is now just
1571         the real class and not a typedef.
1572
1573         * html/parser/CompactHTMLToken.cpp:
1574         (WebCore::CompactHTMLToken::CompactHTMLToken):
1575         * html/parser/HTMLTokenizer.cpp:
1576         (WebCore::AtomicHTMLToken::nameForAttribute):
1577         * xml/parser/MarkupTokenBase.h:
1578         (WebCore):
1579         (MarkupTokenBase):
1580         (Attribute):
1581         (Range):
1582
1583 2013-02-11  Eric Seidel  <eric@webkit.org>
1584
1585         Rename PreloadTask to StartTagScanner to match its purpose
1586         https://bugs.webkit.org/show_bug.cgi?id=109406
1587
1588         Reviewed by Sam Weinig.
1589
1590         As discussed in bug 107807.
1591
1592         * html/parser/HTMLPreloadScanner.cpp:
1593         (WebCore::StartTagScanner::StartTagScanner):
1594         (WebCore::StartTagScanner::processAttributes):
1595         (WebCore::HTMLPreloadScanner::processToken):
1596
1597 2013-02-11  Vsevolod Vlasov  <vsevik@chromium.org>
1598
1599         Web Inspector: WebInspector.Project refactorings.
1600         https://bugs.webkit.org/show_bug.cgi?id=109433
1601
1602         Reviewed by Alexander Pavlov.
1603
1604         This change prepares Workspace and Project to migration to project-per-domain mode for network based projects.
1605         Renamed WebInspector.WorkspaceProvider to WebInspector.ProjectDelegate.
1606         Renamed Project.name() to Project.id() and delegated it to project delegate.
1607         Added Project.displayName() method that is delegated to project delegate.
1608         SimpleWorkspaceProvider is now responsible for creation of SimpleWorkspaceDelegates and
1609         isolates various mappings from Project/ProjectDelegate concept.
1610         UISourceCode is now created based on path in the project.
1611         UISourceCode uri is now calculated based on project and path (right now uri is equal to path).
1612
1613         * WebCore.gypi:
1614         * WebCore.vcproj/WebCore.vcproj:
1615         * inspector/compile-front-end.py:
1616         * inspector/front-end/FileSystemProjectDelegate.js: Renamed from Source/WebCore/inspector/front-end/FileSystemWorkspaceProvider.js.
1617         (WebInspector.FileSystemProjectDelegate):
1618         (WebInspector.FileSystemProjectDelegate.prototype.id):
1619         (WebInspector.FileSystemProjectDelegate.prototype.type):
1620         (WebInspector.FileSystemProjectDelegate.prototype.displayName):
1621         (WebInspector.FileSystemProjectDelegate.prototype.innerCallback):
1622         (WebInspector.FileSystemProjectDelegate.prototype.requestFileContent):
1623         (WebInspector.FileSystemProjectDelegate.prototype.setFileContent):
1624         (WebInspector.FileSystemProjectDelegate.prototype.contentCallback):
1625         (WebInspector.FileSystemProjectDelegate.prototype.searchInFileContent):
1626         (WebInspector.FileSystemProjectDelegate.prototype._contentTypeForPath):
1627         (WebInspector.FileSystemProjectDelegate.prototype._populate.filesLoaded):
1628         (WebInspector.FileSystemProjectDelegate.prototype._populate):
1629         (WebInspector.FileSystemProjectDelegate.prototype._addFile):
1630         (WebInspector.FileSystemProjectDelegate.prototype._removeFile):
1631         (WebInspector.FileSystemProjectDelegate.prototype.reset):
1632         (WebInspector.FileSystemUtils):
1633         (WebInspector.FileSystemUtils.errorHandler):
1634         (WebInspector.FileSystemUtils.requestFileSystem):
1635         (.fileSystemLoaded):
1636         (.innerCallback):
1637         (WebInspector.FileSystemUtils.requestFilesRecursive):
1638         (.fileEntryLoaded):
1639         (.fileLoaded):
1640         (.readerLoadEnd):
1641         (WebInspector.FileSystemUtils.requestFileContent):
1642         (.fileWriterCreated.fileTruncated):
1643         (.fileWriterCreated):
1644         (.writerEnd):
1645         (WebInspector.FileSystemUtils.setFileContent):
1646         (WebInspector.FileSystemUtils._getDirectory):
1647         (.toArray):
1648         (WebInspector.FileSystemUtils._readDirectory):
1649         (WebInspector.FileSystemUtils._requestEntries):
1650         * inspector/front-end/IsolatedFileSystemModel.js:
1651         (WebInspector.IsolatedFileSystemModel.prototype._innerAddFileSystem):
1652         * inspector/front-end/SimpleWorkspaceProvider.js:
1653         (WebInspector.SimpleProjectDelegate):
1654         (WebInspector.SimpleProjectDelegate.prototype.id):
1655         (WebInspector.SimpleProjectDelegate.prototype.displayName):
1656         (WebInspector.SimpleProjectDelegate.prototype.requestFileContent):
1657         (WebInspector.SimpleProjectDelegate.prototype.setFileContent):
1658         (WebInspector.SimpleProjectDelegate.prototype.searchInFileContent):
1659         (WebInspector.SimpleProjectDelegate.prototype.addFile):
1660         (WebInspector.SimpleProjectDelegate.prototype._uniquePath):
1661         (WebInspector.SimpleProjectDelegate.prototype.removeFile):
1662         (WebInspector.SimpleProjectDelegate.prototype.reset):
1663         (WebInspector.SimpleWorkspaceProvider):
1664         (WebInspector.SimpleWorkspaceProvider.uriForURL):
1665         (WebInspector.SimpleWorkspaceProvider.prototype.addFileForURL):
1666         (WebInspector.SimpleWorkspaceProvider.prototype.addUniqueFileForURL):
1667         (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL):
1668         (WebInspector.SimpleWorkspaceProvider.prototype.removeFile):
1669         (WebInspector.SimpleWorkspaceProvider.prototype.reset):
1670         * inspector/front-end/UISourceCode.js:
1671         (WebInspector.UISourceCode):
1672         (WebInspector.UISourceCode.prototype.path):
1673         (WebInspector.UISourceCode.prototype.uri):
1674         * inspector/front-end/WebKit.qrc:
1675         * inspector/front-end/Workspace.js:
1676         (WebInspector.FileDescriptor):
1677         (WebInspector.ProjectDelegate):
1678         (WebInspector.ProjectDelegate.prototype.id):
1679         (WebInspector.ProjectDelegate.prototype.displayName):
1680         (WebInspector.ProjectDelegate.prototype.requestFileContent):
1681         (WebInspector.ProjectDelegate.prototype.setFileContent):
1682         (WebInspector.ProjectDelegate.prototype.searchInFileContent):
1683         (WebInspector.Project):
1684         (WebInspector.Project.prototype.id):
1685         (WebInspector.Project.prototype.type):
1686         (WebInspector.Project.prototype.displayName):
1687         (WebInspector.Project.prototype.isServiceProject):
1688         (WebInspector.Project.prototype._fileAdded):
1689         (WebInspector.Project.prototype._fileRemoved):
1690         (WebInspector.Project.prototype._reset):
1691         (WebInspector.Project.prototype.uiSourceCode):
1692         (WebInspector.Project.prototype.uiSourceCodeForOriginURL):
1693         (WebInspector.Project.prototype.uiSourceCodeForURI):
1694         (WebInspector.Project.prototype.uiSourceCodes):
1695         (WebInspector.Project.prototype.requestFileContent):
1696         (WebInspector.Project.prototype.setFileContent):
1697         (WebInspector.Project.prototype.searchInFileContent):
1698         (WebInspector.Project.prototype.dispose):
1699         (WebInspector.Workspace.prototype.uiSourceCode):
1700         (WebInspector.Workspace.prototype.uiSourceCodeForURI):
1701         (WebInspector.Workspace.prototype.addProject):
1702         (WebInspector.Workspace.prototype.removeProject):
1703         (WebInspector.Workspace.prototype.project):
1704         (WebInspector.Workspace.prototype.uiSourceCodes):
1705         (WebInspector.Workspace.prototype.projectForUISourceCode):
1706         * inspector/front-end/inspector.html:
1707
1708 2013-02-11  Yury Semikhatsky  <yurys@chromium.org>
1709
1710         Web Inspector: fix closure compiler warnings in the profiler code
1711         https://bugs.webkit.org/show_bug.cgi?id=109432
1712
1713         Reviewed by Pavel Feldman.
1714
1715         Updated type annotations to match the code.
1716
1717         * inspector/front-end/NativeMemorySnapshotView.js:
1718         * inspector/front-end/ProfilesPanel.js:
1719
1720 2013-02-11  Alexander Shalamov  <alexander.shalamov@intel.com>
1721
1722         [QT] Regression (r142444): Broke qt linux minimal build
1723         https://bugs.webkit.org/show_bug.cgi?id=109423
1724
1725         Reviewed by Kenneth Rohde Christiansen.
1726
1727         Test: cssom/cssvalue-comparison.html
1728
1729         * css/CSSValue.cpp:
1730         (WebCore::CSSValue::equals):
1731
1732 2013-02-11  Andrey Lushnikov  <lushnikov@chromium.org>
1733
1734         Web Inspector: introduce WebInspector.TextUtils
1735         https://bugs.webkit.org/show_bug.cgi?id=109289
1736
1737         Reviewed by Pavel Feldman.
1738
1739         Add new WebInspector.TextUtils file and extract commonly used
1740         text-operation subroutines from DefaultTextEditor into it.
1741
1742         No new tests: no change in behaviour.
1743
1744         * WebCore.gypi:
1745         * WebCore.vcproj/WebCore.vcproj:
1746         * inspector/compile-front-end.py:
1747         * inspector/front-end/DefaultTextEditor.js:
1748         (WebInspector.TextEditorMainPanel.TokenHighlighter.prototype._isWord):
1749         (WebInspector.DefaultTextEditor.WordMovementController.prototype._rangeForCtrlArrowMove):
1750         (WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.handleSelectionChange):
1751         * inspector/front-end/TextUtils.js: Added.
1752         (WebInspector.TextUtils.isStopChar):
1753         (WebInspector.TextUtils.isWordChar):
1754         (WebInspector.TextUtils.isSpaceChar):
1755         (WebInspector.TextUtils.isWord):
1756         (WebInspector.TextUtils.isBraceChar):
1757         * inspector/front-end/WebKit.qrc:
1758         * inspector/front-end/inspector.html:
1759
1760 2013-02-11  Zan Dobersek  <zdobersek@igalia.com>
1761
1762         [GTK][Clang] Build errors in LocalizedStringsGtk.cpp
1763         https://bugs.webkit.org/show_bug.cgi?id=109418
1764
1765         Reviewed by Philippe Normand.
1766
1767         Use the C++ isfinite(float) and abs(float) (instead of fabsf(float))
1768         methods by including the WTF MathExtras.h header. Use a static cast to
1769         an integer type on the float return value of the abs(float) method call
1770         instead of the C-style cast.
1771
1772         No new tests - no new functiolnality.
1773
1774         * platform/gtk/LocalizedStringsGtk.cpp:
1775         (WebCore::localizedMediaTimeDescription):
1776
1777 2013-02-11  Zan Dobersek  <zdobersek@igalia.com>
1778
1779         Unreviewed build fix for the WTFURL backend of KURL.
1780
1781         * platform/KURL.cpp:
1782         (WebCore::KURL::isSafeToSendToAnotherThread): m_urlImpl is of RefPtr type so use
1783         the appropriate operator on it when calling the isSafeToSendToAnotherThread method.
1784
1785 2013-02-11  Mike West  <mkwst@chromium.org>
1786
1787         Range::collapsed callers should explicitly ASSERT_NO_EXCEPTION.
1788         https://bugs.webkit.org/show_bug.cgi?id=108921
1789
1790         Reviewed by Jochen Eisinger.
1791
1792         For clarity and consistency, this patch adjusts Range::collapsed() to
1793         drop the default value of the ExceptionCode parameter it accepts. The
1794         three call sites that called the method with no arguments (all part of
1795         Editor::rangeOfString) will now explicitly ASSERT_NO_EXCEPTION.
1796
1797         * dom/Range.h:
1798         (Range):
1799         * editing/Editor.cpp:
1800         (WebCore::Editor::rangeOfString):
1801
1802 2013-02-11  Alexei Filippov  <alph@chromium.org>
1803
1804         Web Inspector: Split Profiler domain in protocol into Profiler and HeapProfiler
1805         https://bugs.webkit.org/show_bug.cgi?id=108653
1806
1807         Reviewed by Yury Semikhatsky.
1808
1809         Currently CPU and heap profilers share the same domain 'Profiler' in the protocol.
1810         In fact these two profile types have not too much in common. So put each into its own domain.
1811         It should also help when Profiles panel gets split into several tools.
1812         This is the phase 1 which adds InspectorHeapProfilerAgent but doesn't
1813         change the original InspectorProfilerAgent.
1814
1815         * CMakeLists.txt:
1816         * GNUmakefile.list.am:
1817         * Target.pri:
1818         * WebCore.gypi:
1819         * WebCore.vcproj/WebCore.vcproj:
1820         * WebCore.vcxproj/WebCore.vcxproj:
1821         * WebCore.vcxproj/WebCore.vcxproj.filters:
1822         * WebCore.xcodeproj/project.pbxproj:
1823         * inspector/Inspector.json:
1824         * inspector/InspectorAllInOne.cpp:
1825         * inspector/InspectorController.cpp:
1826         (WebCore::InspectorController::InspectorController):
1827         * inspector/InspectorHeapProfilerAgent.cpp: Added.
1828         (WebCore):
1829         (WebCore::InspectorHeapProfilerAgent::create):
1830         (WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
1831         (WebCore::InspectorHeapProfilerAgent::~InspectorHeapProfilerAgent):
1832         (WebCore::InspectorHeapProfilerAgent::resetState):
1833         (WebCore::InspectorHeapProfilerAgent::resetFrontendProfiles):
1834         (WebCore::InspectorHeapProfilerAgent::setFrontend):
1835         (WebCore::InspectorHeapProfilerAgent::clearFrontend):
1836         (WebCore::InspectorHeapProfilerAgent::restore):
1837         (WebCore::InspectorHeapProfilerAgent::collectGarbage):
1838         (WebCore::InspectorHeapProfilerAgent::createSnapshotHeader):
1839         (WebCore::InspectorHeapProfilerAgent::hasHeapProfiler):
1840         (WebCore::InspectorHeapProfilerAgent::getProfileHeaders):
1841         (WebCore::InspectorHeapProfilerAgent::getHeapSnapshot):
1842         (WebCore::InspectorHeapProfilerAgent::removeProfile):
1843         (WebCore::InspectorHeapProfilerAgent::takeHeapSnapshot):
1844         (WebCore::InspectorHeapProfilerAgent::getObjectByHeapObjectId):
1845         (WebCore::InspectorHeapProfilerAgent::getHeapObjectId):
1846         (WebCore::InspectorHeapProfilerAgent::reportMemoryUsage):
1847         * inspector/InspectorHeapProfilerAgent.h: Added.
1848         (WebCore):
1849         (InspectorHeapProfilerAgent):
1850         (WebCore::InspectorHeapProfilerAgent::clearProfiles):
1851         * inspector/InspectorInstrumentation.cpp:
1852         (WebCore):
1853         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
1854         * inspector/InstrumentingAgents.h:
1855         (WebCore):
1856         (InstrumentingAgents):
1857         (WebCore::InstrumentingAgents::inspectorHeapProfilerAgent):
1858         (WebCore::InstrumentingAgents::setInspectorHeapProfilerAgent):
1859         * inspector/WorkerInspectorController.cpp:
1860         (WebCore::WorkerInspectorController::WorkerInspectorController):
1861         * inspector/front-end/HeapSnapshotDataGrids.js:
1862         * inspector/front-end/HeapSnapshotGridNodes.js:
1863         (WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent):
1864         * inspector/front-end/HeapSnapshotView.js:
1865         (WebInspector.HeapProfileHeader.prototype.startSnapshotTransfer):
1866         (WebInspector.HeapProfileHeader.prototype.saveToFile.onOpen):
1867         (WebInspector.HeapProfileHeader.prototype.saveToFile):
1868         * inspector/front-end/ProfilesPanel.js:
1869         (WebInspector.ProfilesPanel):
1870         (WebInspector.ProfilesPanel.prototype._clearProfiles):
1871         (WebInspector.ProfilesPanel.prototype._garbageCollectButtonClicked):
1872         (WebInspector.ProfilesPanel.prototype._removeProfileHeader):
1873         (WebInspector.ProfilesPanel.prototype._populateProfiles.var):
1874         (WebInspector.ProfilesPanel.prototype._populateProfiles.populateCallback):
1875         (WebInspector.ProfilesPanel.prototype._populateProfiles):
1876         (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot):
1877         (WebInspector.ProfilesPanel.prototype.revealInView):
1878         (WebInspector.HeapProfilerDispatcher):
1879         (WebInspector.HeapProfilerDispatcher.prototype.addProfileHeader):
1880         (WebInspector.HeapProfilerDispatcher.prototype.addHeapSnapshotChunk):
1881         (WebInspector.HeapProfilerDispatcher.prototype.finishHeapSnapshot):
1882         (WebInspector.HeapProfilerDispatcher.prototype.resetProfiles):
1883         (WebInspector.HeapProfilerDispatcher.prototype.reportHeapSnapshotProgress):
1884         * inspector/front-end/TimelinePanel.js:
1885         (WebInspector.TimelinePanel.prototype._garbageCollectButtonClicked):
1886         * inspector/front-end/inspector.js:
1887         (WebInspector.doLoadedDone):
1888
1889 2013-02-11  Mike West  <mkwst@chromium.org>
1890
1891         Use IGNORE_EXCEPTION for Editor::countMatchesForText's ignored exceptions.
1892         https://bugs.webkit.org/show_bug.cgi?id=109372
1893
1894         Reviewed by Jochen Eisinger.
1895
1896         Rather than implicitly ignoring exceptions, we should use the
1897         IGNORE_EXCEPTION macro for clarity.
1898
1899         * editing/Editor.cpp:
1900         (WebCore::Editor::countMatchesForText):
1901
1902 2013-02-11  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
1903
1904         [Qt] Unreviewed. Fix minimal build after r142444.
1905
1906         * css/CSSValue.cpp:
1907         (WebCore::CSSValue::equals):
1908
1909 2013-02-11  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1910
1911         [EFL] Stop using smart pointers for Ecore_Timer
1912         https://bugs.webkit.org/show_bug.cgi?id=109409
1913
1914         Reviewed by Kenneth Rohde Christiansen.
1915
1916         Stop using a smart pointer for Ecore_Timer in RunLoop::TimerBase. This
1917         is a bad idea because the timer handle becomes invalid as soon as the
1918         timer callback returns ECORE_CALLBACK_CANCEL. This may lead to crashes
1919         on destruction because OwnPtr calls ecore_timer_del() on an invalid
1920         handle.
1921
1922         No new tests, already covered by exiting tests.
1923
1924         * platform/RunLoop.h:
1925         (TimerBase):
1926         * platform/efl/RunLoopEfl.cpp:
1927         (WebCore::RunLoop::TimerBase::timerFired):
1928         (WebCore::RunLoop::TimerBase::start):
1929         (WebCore::RunLoop::TimerBase::stop):
1930
1931 2013-02-11  Vladislav Kaznacheev  <kaznacheev@chromium.org>
1932
1933         Web Inspector: Allow SplitView to keep the sidebar size as a fraction of the container size
1934         https://bugs.webkit.org/show_bug.cgi?id=109414
1935
1936         Reviewed by Vsevolod Vlasov.
1937
1938         SplitView now interprets defaultSidebarWidth and defaultSidebarHeight values between 0 and 1 as
1939         fractions of the total container size. The sidebar then will grow or shrink along with the container.
1940         When the sidebar is resized manually the updated ratio is stored in the settings.
1941
1942         * inspector/front-end/SplitView.js:
1943         (WebInspector.SplitView):
1944         (WebInspector.SplitView.prototype._removeAllLayoutProperties):
1945         (WebInspector.SplitView.prototype._updateTotalSize):
1946         (WebInspector.SplitView.prototype._innerSetSidebarSize):
1947         (WebInspector.SplitView.prototype._saveSidebarSize):
1948
1949 2013-02-11  Pavel Feldman  <pfeldman@chromium.org>
1950
1951         Web Inspector: highlight DOM nodes on hover while debugging
1952         https://bugs.webkit.org/show_bug.cgi?id=109355
1953
1954         Reviewed by Vsevolod Vlasov.
1955
1956         Along with showing the popover, highlight the remote object as node.
1957
1958         * inspector/front-end/ObjectPopoverHelper.js:
1959         (WebInspector.ObjectPopoverHelper.prototype.):
1960         (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover):
1961         (WebInspector.ObjectPopoverHelper.prototype._onHideObjectPopover):
1962
1963 2013-02-11  Andrey Lushnikov  <lushnikov@chromium.org>
1964
1965         Web Inspector: displaying whitespace characters is broken
1966         https://bugs.webkit.org/show_bug.cgi?id=109412
1967
1968         Reviewed by Vsevolod Vlasov.
1969
1970         Add "pointer-events: none" rule for pseudo-class "before", which
1971         maintains rendering of whitespace characters.
1972
1973         No new tests.
1974
1975         * inspector/front-end/inspectorSyntaxHighlight.css:
1976         (.webkit-whitespace::before):
1977
1978 2013-02-11  Alexander Pavlov  <apavlov@chromium.org>
1979
1980         Web Inspector: Implement position-based sourcemapping for stylesheets
1981         https://bugs.webkit.org/show_bug.cgi?id=109168
1982
1983         Reviewed by Vsevolod Vlasov.
1984
1985         This change introduces support for position-based source maps for CSS stylesheets.
1986         Sourcemaps and originating resources (sass, scss, etc.) are loaded synchronously
1987         upon the CSS UISourceCode addition. RangeBasedSourceMap is removed as it is not used.
1988
1989         Test: http/tests/inspector/stylesheet-source-mapping.html
1990
1991         * inspector/front-end/CSSStyleModel.js:
1992         (WebInspector.CSSStyleModel):
1993         (WebInspector.CSSStyleModel.prototype.setSourceMapping):
1994         (WebInspector.CSSStyleModel.prototype.rawLocationToUILocation):
1995         (WebInspector.CSSStyleModel.LiveLocation.prototype.uiLocation):
1996         (WebInspector.CSSLocation):
1997         (WebInspector.CSSProperty):
1998         (WebInspector.CSSProperty.parsePayload):
1999         * inspector/front-end/CompilerScriptMapping.js:
2000         (WebInspector.CompilerScriptMapping):
2001         (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation):
2002         (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript):
2003         * inspector/front-end/SASSSourceMapping.js:
2004         (WebInspector.SASSSourceMapping):
2005         (WebInspector.SASSSourceMapping.prototype._styleSheetChanged.callback):
2006         (WebInspector.SASSSourceMapping.prototype._styleSheetChanged):
2007         (WebInspector.SASSSourceMapping.prototype._reloadCSS):
2008         (WebInspector.SASSSourceMapping.prototype._resourceAdded.didRequestContent):
2009         (WebInspector.SASSSourceMapping.prototype._resourceAdded):
2010         (WebInspector.SASSSourceMapping.prototype._loadAndProcessSourceMap):
2011         (WebInspector.SASSSourceMapping.prototype.loadSourceMapForStyleSheet):
2012         (WebInspector.SASSSourceMapping.prototype._bindUISourceCode):
2013         (WebInspector.SASSSourceMapping.prototype.rawLocationToUILocation):
2014         (WebInspector.SASSSourceMapping.prototype.uiLocationToRawLocation):
2015         (WebInspector.SASSSourceMapping.prototype._reset):
2016         * inspector/front-end/SourceMap.js:
2017         (WebInspector.SourceMap):
2018         (WebInspector.SourceMap.load):
2019         (WebInspector.SourceMap.prototype.findEntry):
2020         (WebInspector.SourceMap.prototype.findEntryReversed):
2021         (WebInspector.SourceMap.prototype._parseMap):
2022         * inspector/front-end/StylesSourceMapping.js:
2023         (WebInspector.StylesSourceMapping):
2024         (WebInspector.StylesSourceMapping.prototype._bindUISourceCode):
2025         * inspector/front-end/inspector.js:
2026
2027 2013-02-11  Alexander Shalamov  <alexander.shalamov@intel.com>
2028
2029         Implement CSSValue::equals(const CSSValue&) to optimise CSSValue comparison
2030         https://bugs.webkit.org/show_bug.cgi?id=102901
2031
2032         Reviewed by Antti Koivisto.
2033
2034         Added comparison method to CSSValue and its children, so that the
2035         css values could be compared efficiently. Before this patch, CSSValue
2036         objects were compared using strings that were generated by the cssText() method.
2037
2038         Test: cssom/cssvalue-comparison.html
2039
2040         * css/CSSAspectRatioValue.cpp:
2041         (WebCore::CSSAspectRatioValue::equals):
2042         (WebCore):
2043         * css/CSSAspectRatioValue.h:
2044         (CSSAspectRatioValue):
2045         * css/CSSBasicShapes.cpp:
2046         (WebCore::CSSBasicShapeRectangle::equals):
2047         (WebCore):
2048         (WebCore::CSSBasicShapeCircle::equals):
2049         (WebCore::CSSBasicShapeEllipse::equals):
2050         (WebCore::CSSBasicShapePolygon::equals):
2051         * css/CSSBasicShapes.h:
2052         (CSSBasicShapeRectangle):
2053         (CSSBasicShapeCircle):
2054         (CSSBasicShapeEllipse):
2055         (CSSBasicShapePolygon):
2056         * css/CSSBorderImageSliceValue.cpp:
2057         (WebCore::CSSBorderImageSliceValue::equals):
2058         (WebCore):
2059         * css/CSSBorderImageSliceValue.h:
2060         (CSSBorderImageSliceValue):
2061         * css/CSSCalculationValue.cpp:
2062         (WebCore::CSSCalcValue::equals):
2063         (WebCore):
2064         (WebCore::CSSCalcPrimitiveValue::equals):
2065         (CSSCalcPrimitiveValue):
2066         (WebCore::CSSCalcPrimitiveValue::type):
2067         (WebCore::CSSCalcBinaryOperation::equals):
2068         (CSSCalcBinaryOperation):
2069         (WebCore::CSSCalcBinaryOperation::type):
2070         * css/CSSCalculationValue.h:
2071         (WebCore::CSSCalcExpressionNode::equals):
2072         (CSSCalcExpressionNode):
2073         (CSSCalcValue):
2074         * css/CSSCanvasValue.cpp:
2075         (WebCore::CSSCanvasValue::equals):
2076         (WebCore):
2077         * css/CSSCanvasValue.h:
2078         (CSSCanvasValue):
2079         * css/CSSComputedStyleDeclaration.cpp:
2080         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2081         (WebCore::CSSComputedStyleDeclaration::cssPropertyMatches):
2082         (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand):
2083         * css/CSSCrossfadeValue.cpp:
2084         (WebCore::CSSCrossfadeValue::equals):
2085         (WebCore):
2086         * css/CSSCrossfadeValue.h:
2087         (CSSCrossfadeValue):
2088         * css/CSSCursorImageValue.cpp:
2089         (WebCore::CSSCursorImageValue::equals):
2090         (WebCore):
2091         * css/CSSCursorImageValue.h:
2092         (CSSCursorImageValue):
2093         * css/CSSFontFaceSrcValue.cpp:
2094         (WebCore::CSSFontFaceSrcValue::equals):
2095         (WebCore):
2096         * css/CSSFontFaceSrcValue.h:
2097         (CSSFontFaceSrcValue):
2098         * css/CSSFunctionValue.cpp:
2099         (WebCore::CSSFunctionValue::equals):
2100         (WebCore):
2101         * css/CSSFunctionValue.h:
2102         (CSSFunctionValue):
2103         * css/CSSGradientValue.cpp:
2104         (WebCore::CSSLinearGradientValue::equals):
2105         (WebCore):
2106         (WebCore::CSSRadialGradientValue::equals):
2107         * css/CSSGradientValue.h:
2108         (WebCore::CSSGradientColorStop::operator==):
2109         (CSSLinearGradientValue):
2110         (CSSRadialGradientValue):
2111         * css/CSSImageValue.cpp:
2112         (WebCore::CSSImageValue::equals):
2113         (WebCore):
2114         * css/CSSImageValue.h:
2115         (CSSImageValue):
2116         * css/CSSInheritedValue.h:
2117         (WebCore::CSSInheritedValue::equals):
2118         (CSSInheritedValue):
2119         * css/CSSInitialValue.h:
2120         (WebCore::CSSInitialValue::equals):
2121         (CSSInitialValue):
2122         * css/CSSLineBoxContainValue.h:
2123         (WebCore::CSSLineBoxContainValue::equals):
2124         * css/CSSPrimitiveValue.cpp:
2125         (WebCore::CSSPrimitiveValue::equals):
2126         (WebCore):
2127         * css/CSSPrimitiveValue.h:
2128         (CSSPrimitiveValue):
2129         * css/CSSReflectValue.cpp:
2130         (WebCore::CSSReflectValue::equals):
2131         (WebCore):
2132         * css/CSSReflectValue.h:
2133         (CSSReflectValue):
2134         * css/CSSTimingFunctionValue.cpp:
2135         (WebCore::CSSCubicBezierTimingFunctionValue::equals):
2136         (WebCore):
2137         (WebCore::CSSStepsTimingFunctionValue::equals):
2138         * css/CSSTimingFunctionValue.h:
2139         (WebCore::CSSLinearTimingFunctionValue::equals):
2140         (CSSLinearTimingFunctionValue):
2141         (CSSCubicBezierTimingFunctionValue):
2142         (CSSStepsTimingFunctionValue):
2143         * css/CSSUnicodeRangeValue.cpp:
2144         (WebCore::CSSUnicodeRangeValue::equals):
2145         (WebCore):
2146         * css/CSSUnicodeRangeValue.h:
2147         (CSSUnicodeRangeValue):
2148         * css/CSSValue.cpp:
2149         (WebCore):
2150         (WebCore::compareCSSValues):
2151         (WebCore::CSSValue::equals):
2152         * css/CSSValue.h:
2153         (CSSValue):
2154         (WebCore):
2155         (WebCore::compareCSSValueVector):
2156         (WebCore::compareCSSValuePtr):
2157         * css/CSSValueList.cpp:
2158         (WebCore::CSSValueList::removeAll):
2159         (WebCore::CSSValueList::hasValue):
2160         (WebCore::CSSValueList::equals):
2161         (WebCore):
2162         * css/CSSValueList.h:
2163         (CSSValueList):
2164         * css/CSSVariableValue.h:
2165         (WebCore::CSSVariableValue::equals):
2166         (CSSVariableValue):
2167         * css/Counter.h:
2168         (Counter):
2169         (WebCore::Counter::equals):
2170         * css/DashboardRegion.h:
2171         (WebCore::DashboardRegion::equals):
2172         * css/FontFeatureValue.cpp:
2173         (WebCore::FontFeatureValue::equals):
2174         (WebCore):
2175         * css/FontFeatureValue.h:
2176         (FontFeatureValue):
2177         * css/FontValue.cpp:
2178         (WebCore::FontValue::equals):
2179         (WebCore):
2180         * css/FontValue.h:
2181         (FontValue):
2182         * css/MediaQueryExp.h:
2183         (WebCore::MediaQueryExp::operator==):
2184         * css/Pair.h:
2185         (WebCore::Pair::equals):
2186         (Pair):
2187         * css/Rect.h:
2188         (WebCore::RectBase::equals):
2189         (RectBase):
2190         * css/ShadowValue.cpp:
2191         (WebCore::ShadowValue::equals):
2192         (WebCore):
2193         * css/ShadowValue.h:
2194         (ShadowValue):
2195         * css/StylePropertySet.cpp:
2196         (WebCore::StylePropertySet::get4Values):
2197         (WebCore::StylePropertySet::propertyMatches):
2198         * css/WebKitCSSArrayFunctionValue.cpp:
2199         (WebCore::WebKitCSSArrayFunctionValue::equals):
2200         (WebCore):
2201         * css/WebKitCSSArrayFunctionValue.h:
2202         (WebKitCSSArrayFunctionValue):
2203         * css/WebKitCSSFilterValue.cpp:
2204         (WebCore::WebKitCSSFilterValue::equals):
2205         (WebCore):
2206         * css/WebKitCSSFilterValue.h:
2207         (WebKitCSSFilterValue):
2208         * css/WebKitCSSMixFunctionValue.cpp:
2209         (WebCore::WebKitCSSMixFunctionValue::equals):
2210         (WebCore):
2211         * css/WebKitCSSMixFunctionValue.h:
2212         (WebKitCSSMixFunctionValue):
2213         * css/WebKitCSSSVGDocumentValue.cpp:
2214         (WebCore::WebKitCSSSVGDocumentValue::equals):
2215         (WebCore):
2216         * css/WebKitCSSSVGDocumentValue.h:
2217         (WebKitCSSSVGDocumentValue):
2218         * css/WebKitCSSShaderValue.cpp:
2219         (WebCore::WebKitCSSShaderValue::equals):
2220         (WebCore):
2221         * css/WebKitCSSShaderValue.h:
2222         (WebKitCSSShaderValue):
2223         * css/WebKitCSSTransformValue.h:
2224         (WebCore::WebKitCSSTransformValue::equals):
2225         * editing/EditingStyle.cpp:
2226         (WebCore::HTMLAttributeEquivalent::valueIsPresentInStyle):
2227         * svg/SVGColor.cpp:
2228         (WebCore::SVGColor::equals):
2229         (WebCore):
2230         * svg/SVGColor.h:
2231         (SVGColor):
2232         * svg/SVGPaint.cpp:
2233         (WebCore::SVGPaint::equals):
2234         (WebCore):
2235         * svg/SVGPaint.h:
2236         (SVGPaint):
2237
2238 2013-02-11  Pan Deng  <pan.deng@intel.com>
2239
2240         [Web Inspector] Network panel, sort by "transferSize" instead of "resourceSize".
2241         https://bugs.webkit.org/show_bug.cgi?id=109142.
2242
2243         Reviewed by Vsevolod Vlasov.
2244
2245         Sort by "transferSize" as it is the primary rather than "resoureSize".
2246
2247         No new tests.
2248
2249         * inspector/front-end/NetworkPanel.js:
2250         (WebInspector.NetworkDataGridNode.SizeComparator):
2251
2252 2013-02-11  Eugene Klyuchnikov  <eustas@chromium.org>
2253
2254         Web Inspector: [Resources] Prefactorings in DataGrid and CookieTable
2255         https://bugs.webkit.org/show_bug.cgi?id=109141
2256
2257         Reviewed by Vsevolod Vlasov.
2258
2259         1) Make deleteCookie method static and move to WebInspector.Cookie
2260         2) Replace resfreshCallback getter/setter in DataGrid with
2261         constructor parameter
2262
2263         * inspector/front-end/CookieItemsView.js: Adopt changes.
2264         * inspector/front-end/CookieParser.js:
2265         (WebInspector.Cookie.prototype.remove): Moved from CookiesTable.
2266         * inspector/front-end/CookiesTable.js: Adopt changes.
2267         * inspector/front-end/DataGrid.js:
2268         Replace setter with constructor parameter.
2269
2270 2013-02-11  John J. Barton  <johnjbarton@chromium.org>
2271
2272         Web Inspector: Don't throw exceptions in WebInspector.Color
2273         https://bugs.webkit.org/show_bug.cgi?id=104835
2274
2275         Reviewed by Vsevolod Vlasov.
2276
2277         WebInspector.Color.parse() returns a Color from a string, or null;
2278         Ctor calls now call parse();
2279         In the StylesSideBarPane, test null rather than catch(e).
2280
2281         Added case to inspector/styles/styles-invalid-color-values.html
2282
2283         * inspector/front-end/Color.js:
2284         (WebInspector.Color):
2285         (WebInspector.Color.parse):
2286         (WebInspector.Color.fromRGBA):
2287         (WebInspector.Color.fromRGB):
2288         (WebInspector.Color.prototype.toString):
2289         (WebInspector.Color.prototype._parse.this.alpha.set 0):
2290         (WebInspector.Color.prototype._parse.this.nickname.set 2):
2291         (WebInspector.Color.prototype._parse.this.hsla.set 1):
2292         (WebInspector.Color.prototype._parse.this.rgba.set 0):
2293         (WebInspector.Color.prototype._parse.set WebInspector):
2294         (WebInspector.Color.prototype._parse):
2295         * inspector/front-end/Spectrum.js:
2296         (WebInspector.Spectrum.prototype.get color):
2297         * inspector/front-end/StylesSidebarPane.js:
2298
2299 2013-02-11  Andrey Lushnikov  <lushnikov@chromium.org>
2300
2301         Web Inspector: home button behaviour is wrong in DTE
2302         https://bugs.webkit.org/show_bug.cgi?id=109154
2303
2304         Reviewed by Vsevolod Vlasov.
2305
2306         Handle home key shortcut explicitly in TextEditorMainPanel.
2307
2308         New test: inspector/editor/text-editor-home-button.html
2309
2310         * inspector/front-end/DefaultTextEditor.js:
2311         (WebInspector.TextEditorMainPanel.prototype._registerShortcuts):
2312         (WebInspector.TextEditorMainPanel.prototype._handleHomeKey):
2313
2314 2013-02-11  Abhishek Arya  <inferno@chromium.org>
2315
2316         Add ASSERT_WITH_SECURITY_IMPLICATION to detect out of bounds access
2317         https://bugs.webkit.org/show_bug.cgi?id=108981
2318
2319         Reviewed by Eric Seidel.
2320
2321         * Modules/mediastream/RTCStatsResponse.cpp:
2322         (WebCore::RTCStatsResponse::addElement):
2323         (WebCore::RTCStatsResponse::addStatistic):
2324         * Modules/websockets/WebSocketChannel.cpp:
2325         (WebCore::WebSocketChannel::skipBuffer):
2326         * css/CSSCalculationValue.cpp:
2327         (WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression):
2328         (WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression):
2329         * css/WebKitCSSTransformValue.cpp:
2330         (WebCore::transformValueToCssString):
2331         * editing/TextIterator.cpp:
2332         (WebCore::SearchBuffer::search):
2333         * html/HTMLElement.cpp:
2334         (WebCore::parseColorStringWithCrazyLegacyRules):
2335         * html/ImageData.cpp:
2336         (WebCore::ImageData::ImageData):
2337         * html/shadow/DateTimeSymbolicFieldElement.cpp:
2338         (WebCore::DateTimeSymbolicFieldElement::DateTimeSymbolicFieldElement):
2339         * html/track/TextTrackCueList.cpp:
2340         (WebCore::TextTrackCueList::add):
2341         * platform/SharedBuffer.cpp:
2342         (WebCore::SharedBuffer::getSomeData):
2343         * platform/SharedBufferChunkReader.cpp:
2344         (WebCore::SharedBufferChunkReader::nextChunk):
2345         * platform/audio/HRTFDatabase.cpp:
2346         (WebCore::HRTFDatabase::getKernelsFromAzimuthElevation):
2347         * platform/graphics/GlyphPageTreeNode.cpp:
2348         (WebCore::GlyphPageTreeNode::initializePage):
2349         * platform/graphics/Region.cpp:
2350         (WebCore::Region::Shape::segments_end):
2351         * platform/graphics/filters/FEComponentTransfer.cpp:
2352         (WebCore::FEComponentTransfer::getValues):
2353         * platform/graphics/filters/FilterEffect.cpp:
2354         (WebCore::FilterEffect::inputEffect):
2355         * platform/text/TextCodecUTF8.cpp:
2356         (WebCore::TextCodecUTF8::decode):
2357         * platform/text/mac/TextCodecMac.cpp:
2358         (WebCore::TextCodecMac::decode):
2359         * rendering/RenderBlockLineLayout.cpp:
2360         (WebCore::RenderBlock::checkFloatsInCleanLine):
2361         * svg/SVGAnimatedTypeAnimator.h:
2362         (WebCore::SVGAnimatedTypeAnimator::executeAction):
2363         * svg/SVGAnimationElement.cpp:
2364         (WebCore::SVGAnimationElement::calculatePercentForSpline):
2365         * svg/animation/SVGSMILElement.cpp:
2366         (WebCore::SVGSMILElement::findInstanceTime):
2367
2368 2013-02-10  Chris Fleizach  <cfleizach@apple.com>
2369
2370         WebSpeech: Implement basic speaking/finished speaking behavior
2371         https://bugs.webkit.org/show_bug.cgi?id=107135
2372
2373         Reviewed by Sam Weinig.
2374
2375         Implements the basic functionality of speaking utterances.
2376
2377         In the WebCore side, it manages the speech queue the way the spec defines
2378         (that is, new jobs are appended to a queue and wait for other jobs to finish).
2379
2380         On the Mac side, it instantiates a synthesizer and handles the callbacks for when
2381         jobs are finished. It sends those jobs back to WebCore to dispatch the right events.
2382
2383         Test: platform/mac/fast/speechsynthesis/speech-synthesis-speak.html
2384
2385         * Modules/speech/SpeechSynthesis.cpp:
2386         (WebCore::SpeechSynthesis::SpeechSynthesis):
2387         (WebCore::SpeechSynthesis::paused):
2388         (WebCore::SpeechSynthesis::startSpeakingImmediately):
2389         (WebCore::SpeechSynthesis::speak):
2390         (WebCore):
2391         (WebCore::SpeechSynthesis::fireEvent):
2392         (WebCore::SpeechSynthesis::handleSpeakingCompleted):
2393         (WebCore::SpeechSynthesis::didStartSpeaking):
2394         (WebCore::SpeechSynthesis::didFinishSpeaking):
2395         (WebCore::SpeechSynthesis::speakingErrorOccurred):
2396         * Modules/speech/SpeechSynthesis.h:
2397         (WebCore):
2398         (WebCore::SpeechSynthesis::speaking):
2399         (SpeechSynthesis):
2400         * Modules/speech/SpeechSynthesisEvent.cpp:
2401         (WebCore::SpeechSynthesisEvent::create):
2402         (WebCore):
2403         (WebCore::SpeechSynthesisEvent::SpeechSynthesisEvent):
2404         * Modules/speech/SpeechSynthesisEvent.h:
2405         (SpeechSynthesisEvent):
2406         (WebCore::SpeechSynthesisEvent::interfaceName):
2407         * Modules/speech/SpeechSynthesisUtterance.h:
2408         (WebCore::SpeechSynthesisUtterance::startTime):
2409         (WebCore::SpeechSynthesisUtterance::setStartTime):
2410         (SpeechSynthesisUtterance):
2411         * platform/PlatformSpeechSynthesisUtterance.cpp:
2412         (WebCore::PlatformSpeechSynthesisUtterance::PlatformSpeechSynthesisUtterance):
2413         * platform/PlatformSpeechSynthesisUtterance.h:
2414         (PlatformSpeechSynthesisUtterance):
2415         (WebCore::PlatformSpeechSynthesisUtterance::setVolume):
2416         (WebCore::PlatformSpeechSynthesisUtterance::setRate):
2417         (WebCore::PlatformSpeechSynthesisUtterance::setPitch):
2418         (WebCore::PlatformSpeechSynthesisUtterance::startTime):
2419         (WebCore::PlatformSpeechSynthesisUtterance::setStartTime):
2420         (WebCore::PlatformSpeechSynthesisUtterance::client):
2421         * platform/PlatformSpeechSynthesizer.cpp:
2422         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
2423         * platform/PlatformSpeechSynthesizer.h:
2424         (PlatformSpeechSynthesizerClient):
2425         (WebCore::PlatformSpeechSynthesizer::client):
2426         (PlatformSpeechSynthesizer):
2427         * platform/mac/PlatformSpeechSynthesizerMac.mm:
2428         (-[WebSpeechSynthesisWrapper initWithSpeechSynthesizer:WebCore::]):
2429         (-[WebSpeechSynthesisWrapper dealloc]):
2430         (-[WebSpeechSynthesisWrapper convertRateToWPM:]):
2431         (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
2432         (-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
2433         (WebCore::PlatformSpeechSynthesizer::speak):
2434
2435 2013-02-10  Eric Seidel  <eric@webkit.org>
2436
2437         Make the existing HTMLPreloadScanner threading-aware
2438         https://bugs.webkit.org/show_bug.cgi?id=107807
2439
2440         Reviewed by Adam Barth.
2441
2442         The HTMLPreloadScanner and CSSPreloadScanner do a number of things.
2443         CSSPreloadScanner is mostly just a helper class for HTMLPreloadScanner.
2444         HTMLPreloadScanner runs its own copy of the HTMLTokenizer and uses
2445         HTMLTokenizer::updateStateFor to emulate enough of the TreeBuilder
2446         to get a realistic stream of tokens.  It does some additional TreeBuilder
2447         emulation, including tracking template tags and base tags, but mostly
2448         just scans the token stream for start-tags and looks for URLs in them.
2449         It tracks when it has seen a <style> tag and starts sending all character tokens
2450         to the CSSPreloadScanner until a </style> tag is seen.
2451         It also (unfortunately) knows some about the loader guts and how to construct
2452         a proper CachedResourcRequest and issue a preload.
2453
2454         This patch changes the model so that the preload scanners only know how to produce
2455         PreloadRequest objects and append them to a passed-in vector.
2456
2457         This changes the preload-scanner behavior so that preloads are now all issued in one large
2458         batch at the end of scanning, instead of as we hit each resource.  It's possible that
2459         we'll wait to instead check for preload requests more often, at a possible tradeoff
2460         to tokenizing speed.
2461
2462         An alternate approach might be to pass in a preload-delegate of sorts which knew how
2463         to either build a vector, or send requests immediately.  For now the build-a-vector-always
2464         approach seems clean, and does not seem to slow down our PerformanceTest microbenchmarks at least.
2465
2466         This patch has 2 main pieces:
2467         - Remove Document and (and loader) dependencies from HTMLPreloadScanner/CSSPreloadScanner
2468           This is done through introduction of a new HTMLResourcePreloader class which holds
2469           a Document* and knows how to talk to the CachedResourceLoader.
2470         - Clean-up HTMLPreloadScanners token-loop to not be tied to having a Tokenizer.
2471           (On a background thead, the HTMLPreloadScanner won't own the tokenizer, it will just
2472            be passed in tokens and expected to issue loads if necessary.)
2473
2474         This passes all of the LayoutTests using the main thread parser.
2475
2476         This patch does not make the HTMLPreloadScanner 100% ready for threading
2477         (it still uses AtomicString which is currently not-OK on the parser thread)
2478         but it's very close.  Two further (already written) patches will complete this.
2479
2480         * CMakeLists.txt:
2481         * GNUmakefile.list.am:
2482         * Target.pri:
2483         * WebCore.gypi:
2484         * WebCore.vcproj/WebCore.vcproj:
2485         * WebCore.vcxproj/WebCore.vcxproj:
2486         * WebCore.xcodeproj/project.pbxproj:
2487         * html/parser/CSSPreloadScanner.cpp:
2488         (WebCore::CSSPreloadScanner::CSSPreloadScanner):
2489         (WebCore::CSSPreloadScanner::scan):
2490         (WebCore::CSSPreloadScanner::emitRule):
2491         * html/parser/CSSPreloadScanner.h:
2492         (CSSPreloadScanner):
2493         * html/parser/HTMLDocumentParser.cpp:
2494         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
2495         (WebCore::HTMLDocumentParser::pumpTokenizer):
2496         (WebCore::HTMLDocumentParser::insert):
2497         (WebCore::HTMLDocumentParser::append):
2498         (WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan):
2499         * html/parser/HTMLDocumentParser.h:
2500         (HTMLDocumentParser):
2501         * html/parser/HTMLPreloadScanner.cpp:
2502         (WebCore::isStartTag):
2503         (WebCore):
2504         (WebCore::isStartOrEndTag):
2505         (WebCore::PreloadTask::processAttributes):
2506         (WebCore::PreloadTask::charset):
2507         (PreloadTask):
2508         (WebCore::PreloadTask::resourceType):
2509         (WebCore::PreloadTask::shouldPreload):
2510         (WebCore::PreloadTask::createPreloadRequest):
2511         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
2512         (WebCore::HTMLPreloadScanner::scan):
2513         (WebCore::HTMLPreloadScanner::processPossibleTemplateTag):
2514         (WebCore::HTMLPreloadScanner::processPossibleStyleTag):
2515         (WebCore::HTMLPreloadScanner::processPossibleBaseTag):
2516         (WebCore::HTMLPreloadScanner::processToken):
2517         * html/parser/HTMLPreloadScanner.h:
2518         (HTMLPreloadScanner):
2519         * html/parser/HTMLResourcePreloader.cpp: Added.
2520         (WebCore):
2521         (WebCore::isStringSafeToSendToAnotherThread):
2522         (WebCore::PreloadRequest::isSafeToSendToAnotherThread):
2523         (WebCore::PreloadRequest::completeURL):
2524         (WebCore::PreloadRequest::resourceRequest):
2525         (WebCore::HTMLResourcePreloader::preload):
2526         * html/parser/HTMLResourcePreloader.h: Added.
2527         (WebCore):
2528         (PreloadRequest):
2529         (WebCore::PreloadRequest::create):
2530         (WebCore::PreloadRequest::PreloadRequest):
2531         (HTMLResourcePreloader):
2532         (WebCore::HTMLResourcePreloader::HTMLResourcePreloader):
2533         (WebCore::HTMLResourcePreloader::createWeakPtr):
2534         * loader/cache/CachedResourceRequest.h:
2535
2536 2013-02-06  Kentaro Hara  <haraken@chromium.org>
2537
2538         [V8] Rename isolated() to getWorld(), rename worldForEnteredContextIfIsolated() to worldForEnteredContext()
2539         https://bugs.webkit.org/show_bug.cgi?id=109039
2540
2541         Reviewed by Adam Barth.
2542
2543         This is a follow-up patch for r141983.
2544         Rename methods for consistency.
2545
2546         No tests. No change in behavior.
2547
2548         * bindings/v8/DOMDataStore.cpp:
2549         (WebCore::DOMDataStore::current):
2550         * bindings/v8/DOMWrapperWorld.h:
2551         (WebCore::DOMWrapperWorld::getWorld):
2552         * bindings/v8/ScriptController.cpp:
2553         (WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy):
2554         (WebCore::ScriptController::currentWorldContext):
2555         * bindings/v8/V8Binding.h:
2556         (WebCore::worldForEnteredContext):
2557         * bindings/v8/WorldContextHandle.cpp:
2558         (WebCore::WorldContextHandle::WorldContextHandle):
2559         * bindings/v8/custom/V8DocumentCustom.cpp:
2560         (WebCore::wrap):
2561         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
2562         (WebCore::wrap):
2563         * bindings/v8/custom/V8SVGDocumentCustom.cpp:
2564         (WebCore::wrap):
2565         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
2566         (WebCore::V8XMLHttpRequest::constructorCallbackCustom):
2567
2568 2013-02-10  Alexandre Elias  <aelias@chromium.org>
2569
2570         [chromium] Fix Android scrollbar size
2571         https://bugs.webkit.org/show_bug.cgi?id=109374
2572
2573         Reviewed by James Robinson.
2574
2575         This shrinks scrollbars to 3 device-independent pixels (usually 6
2576         physical pixels) and deletes the edge fade. Although the Android
2577         system theme does have an edge fade, it's a much sharper cliff
2578         than we had (against black, the colors go 64 -> 64 -> 52 -> 21 -> 0)
2579         and I can't perceive any difference compared with no fade at all.
2580
2581         No new tests (due for rewrite in a week anyway).
2582
2583         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
2584         (WebCore):
2585         (WebCore::ScrollbarThemeChromiumAndroid::paintThumb):
2586
2587 2013-02-04  Kentaro Hara  <haraken@chromium.org>
2588
2589         [V8] Remove V8GCController::m_edenNodes and make minor DOM GC more precise
2590         https://bugs.webkit.org/show_bug.cgi?id=108579
2591
2592         Reviewed by Adam Barth.
2593
2594         Currently V8GCController::m_edenNodes stores a list of nodes whose
2595         wrappers have been created since the latest GC. The reason why we
2596         needed m_edenNodes is that there was no way to know a list of wrappers
2597         in the new space of V8. By using m_edenNodes, we had been approximating
2598         'wrappers in the new space' by 'wrappers that have been created since
2599         the latest GC'.
2600
2601         Now V8 provides VisitHandlesForPartialDependence(), with which WebKit
2602         can know a list of wrappers in the new space. By using the API, we can
2603         remove V8GCController::m_edenNodes. The benefit is that (1) we no longer
2604         need to keep m_edenNodes and that (2) it enables more precise minor
2605         DOM GC (Remember that m_edenNodes was just an approximation).
2606
2607         Performance benchmark: https://bugs.webkit.org/attachment.cgi?id=185940
2608         The benchmark runs 300 iterations, each of which creates 100000 elements.
2609         The benchmark measures average, min, median, max and stdev of execution times
2610         of the 300 iterations. This will tell us the worst-case overhead of this change.
2611
2612         Before:
2613           mean=59.91ms, min=39ms, median=42ms, max=258ms, stdev=47.48ms
2614
2615         After:
2616           mean=58.75ms, min=35ms, median=41ms, max=250ms, stdev=47.32ms
2617
2618         As shown above, I couldn't observe any performance regression.
2619
2620         No tests. No change in behavior.
2621
2622         * bindings/v8/DOMDataStore.h:
2623         (WebCore::DOMDataStore::setWrapperInObject):
2624         * bindings/v8/DOMWrapperWorld.h:
2625         (DOMWrapperWorld):
2626         (WebCore::DOMWrapperWorld::getWorldWithoutContextCheck):
2627         * bindings/v8/V8Binding.h:
2628         (WebCore):
2629         (WebCore::worldForEnteredContextIfIsolated):
2630         (WebCore::worldForEnteredContextWithoutContextCheck):
2631         * bindings/v8/V8DOMWindowShell.cpp:
2632         (WebCore::V8DOMWindowShell::initializeIfNeeded):
2633         * bindings/v8/V8GCController.cpp:
2634         (WebCore::gcTree):
2635         (WebCore):
2636         (MinorGCWrapperVisitor):
2637         (WebCore::MinorGCWrapperVisitor::MinorGCWrapperVisitor):
2638         (WebCore::MinorGCWrapperVisitor::notifyFinished):
2639         (WebCore::MajorGCWrapperVisitor::MajorGCWrapperVisitor):
2640         (WebCore::V8GCController::gcPrologue):
2641         (WebCore::V8GCController::minorGCPrologue):
2642         (WebCore::V8GCController::majorGCPrologue):
2643         * bindings/v8/V8GCController.h:
2644         (V8GCController):
2645
2646 2013-02-10  Tim Horton  <timothy_horton@apple.com>
2647
2648         REGRESSION (r132422): Page content and scrollbars are incorrectly offset after restoring a page from the page cache
2649         https://bugs.webkit.org/show_bug.cgi?id=109317
2650         <rdar://problem/12649131>
2651
2652         Reviewed by Simon Fraser.
2653
2654         Mark all scrolling that occurs beneath FrameView::layout as programmatic.
2655
2656         Test: platform/mac-wk2/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html
2657
2658         * page/FrameView.cpp:
2659         (WebCore::FrameView::layout):
2660
2661 2013-02-10  Kent Tamura  <tkent@chromium.org>
2662
2663         [Mac] Fix release build failure by recent reverts
2664
2665         * WebCore.exp.in:
2666
2667 2013-02-10  Philippe Normand  <pnormand@igalia.com>
2668
2669         [GStreamer] media/video-controls-fullscreen-volume.html crashes
2670         https://bugs.webkit.org/show_bug.cgi?id=108682
2671
2672         Reviewed by Martin Robinson.
2673
2674         Clean up various signal handlers and avoid bad interaction between
2675         the FullscreenVideoControllerGStreamer and its subclasses,
2676         especially when the platform video window is created.
2677
2678         * platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.cpp:
2679         (WebCore::FullscreenVideoControllerGStreamer::enterFullscreen):
2680         Initialize the window before connecting to the volume/mute
2681         signals. This ensures that the signals won't ever interfere with
2682         an inexisting window.
2683         * platform/graphics/gstreamer/GStreamerGWorld.cpp:
2684         (WebCore::GStreamerGWorld::~GStreamerGWorld): Remove GstBus
2685         synchronous handler function.
2686         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2687         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2688         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
2689         Disconnect from volume/mute signals.
2690         (WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
2691         Keep a trace of volume/mute signal handlers.
2692         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2693         Various forward type declarations to avoid un-necessary header includes.
2694         (MediaPlayerPrivateGStreamerBase):
2695         * platform/graphics/gtk/FullscreenVideoControllerGtk.cpp:
2696         (WebCore::FullscreenVideoControllerGtk::FullscreenVideoControllerGtk):
2697         (WebCore::FullscreenVideoControllerGtk::volumeChanged): Bail out
2698         if volume button hasn't been created yet.
2699         (WebCore::FullscreenVideoControllerGtk::muteChanged): Ditto.
2700
2701 2013-02-10  Andreas Kling  <akling@apple.com>
2702
2703         RenderStyle should use copy-on-write inheritance for NinePieceImage.
2704         <http://webkit.org/b/109366>
2705
2706         Reviewed by Antti Koivisto.
2707
2708         Refactor NinePieceImage to hold a copy-on-write DataRef like other RenderStyle substructures.
2709         This allows us to avoids copying the NinePieceImageData when one RenderStyle inherits from another
2710         but modifies something in the substructure holding the NinePieceImage (typically StyleSurroundData.)
2711
2712         Also made RenderStyle not copy-on-write its StyleSurroundData prematurely when doing a no-op write
2713         to a border-image related value.
2714
2715         1.23 MB progression on Membuster3.
2716
2717         * rendering/style/NinePieceImage.cpp:
2718         (WebCore::defaultData):
2719         (WebCore::NinePieceImage::NinePieceImage):
2720         (WebCore::NinePieceImageData::NinePieceImageData):
2721         (WebCore::NinePieceImageData::operator==):
2722         * rendering/style/NinePieceImage.h:
2723         (WebCore::NinePieceImageData::create):
2724         (WebCore::NinePieceImageData::copy):
2725         (NinePieceImageData):
2726         (NinePieceImage):
2727         (WebCore::NinePieceImage::operator==):
2728         (WebCore::NinePieceImage::operator!=):
2729         (WebCore::NinePieceImage::hasImage):
2730         (WebCore::NinePieceImage::image):
2731         (WebCore::NinePieceImage::setImage):
2732         (WebCore::NinePieceImage::imageSlices):
2733         (WebCore::NinePieceImage::setImageSlices):
2734         (WebCore::NinePieceImage::fill):
2735         (WebCore::NinePieceImage::setFill):
2736         (WebCore::NinePieceImage::borderSlices):
2737         (WebCore::NinePieceImage::setBorderSlices):
2738         (WebCore::NinePieceImage::outset):
2739         (WebCore::NinePieceImage::setOutset):
2740         (WebCore::NinePieceImage::horizontalRule):
2741         (WebCore::NinePieceImage::setHorizontalRule):
2742         (WebCore::NinePieceImage::verticalRule):
2743         (WebCore::NinePieceImage::setVerticalRule):
2744         (WebCore::NinePieceImage::copyImageSlicesFrom):
2745         (WebCore::NinePieceImage::copyBorderSlicesFrom):
2746         (WebCore::NinePieceImage::copyOutsetFrom):
2747         (WebCore::NinePieceImage::copyRepeatFrom):
2748         (WebCore::NinePieceImage::setMaskDefaults):
2749         (WebCore::NinePieceImage::computeOutset):
2750         * rendering/style/RenderStyle.cpp:
2751         (WebCore::RenderStyle::setBorderImageSource):
2752         (WebCore::RenderStyle::setBorderImageSlices):
2753         (WebCore::RenderStyle::setBorderImageWidth):
2754         (WebCore::RenderStyle::setBorderImageOutset):
2755         * rendering/style/RenderStyle.h:
2756
2757 2013-02-10  Kent Tamura  <tkent@chromium.org>
2758
2759         Unreviewed, rolling out r142343.
2760         http://trac.webkit.org/changeset/142343
2761         https://bugs.webkit.org/show_bug.cgi?id=108284
2762
2763         It might make inspector/profiler/selector-profiler-url.html
2764         crashy.
2765
2766         * WebCore.exp.in:
2767         * css/plugIns.css:
2768         (p):
2769         * html/HTMLPlugInElement.cpp:
2770         (WebCore::HTMLPlugInElement::defaultEventHandler):
2771         * html/HTMLPlugInImageElement.cpp:
2772         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
2773         (WebCore::HTMLPlugInImageElement::createRenderer):
2774         (WebCore::HTMLPlugInImageElement::willRecalcStyle):
2775         (WebCore::HTMLPlugInImageElement::updateSnapshot):
2776         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot):
2777         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
2778         * html/HTMLPlugInImageElement.h:
2779         (WebCore):
2780         (HTMLPlugInImageElement):
2781         * page/ChromeClient.h:
2782         (WebCore::ChromeClient::plugInStartLabelImage):
2783         * platform/LocalizedStrings.cpp:
2784         * platform/LocalizedStrings.h:
2785         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
2786         * platform/chromium/LocalizedStringsChromium.cpp:
2787         * platform/efl/LocalizedStringsEfl.cpp:
2788         (WebCore):
2789         * platform/gtk/LocalizedStringsGtk.cpp:
2790         (WebCore):
2791         * platform/qt/LocalizedStringsQt.cpp:
2792         * rendering/RenderSnapshottedPlugIn.cpp:
2793         (WebCore):
2794         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn):
2795         (WebCore::RenderSnapshottedPlugIn::paint):
2796         (WebCore::RenderSnapshottedPlugIn::paintReplaced):
2797         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
2798         (WebCore::RenderSnapshottedPlugIn::paintReplacedSnapshot):
2799         (WebCore::RenderSnapshottedPlugIn::startLabelImage):
2800         (WebCore::RenderSnapshottedPlugIn::paintReplacedSnapshotWithLabel):
2801         (WebCore::RenderSnapshottedPlugIn::getCursor):
2802         (WebCore::RenderSnapshottedPlugIn::handleEvent):
2803         (WebCore::RenderSnapshottedPlugIn::tryToFitStartLabel):
2804         * rendering/RenderSnapshottedPlugIn.h:
2805
2806 2013-02-10  Andreas Kling  <akling@apple.com>
2807
2808         RenderText: Access characters through m_text instead of caching data pointers separately.
2809         <http://webkit.org/b/109357>
2810
2811         Reviewed by Antti Koivisto.
2812
2813         Go through RenderText::m_text.impl() instead of caching the character data pointer.
2814         RenderText should never have a null String in m_text so it's safe to access impl() directly.
2815         We have assertions for this since before.
2816
2817         Removing this pointer shrinks RenderText by 8 bytes, allowing it to fit into a snugger size class.
2818         749 KB progression on Membuster3.
2819
2820         * rendering/RenderText.cpp:
2821         (SameSizeAsRenderText):
2822         (WebCore::RenderText::RenderText):
2823         (WebCore::RenderText::setTextInternal):
2824         * rendering/RenderText.h:
2825         (WebCore::RenderText::is8Bit):
2826         (WebCore::RenderText::characters8):
2827         (WebCore::RenderText::characters16):
2828         (WebCore::RenderText::characterAt):
2829         (WebCore::RenderText::operator[]):
2830         (RenderText):
2831
2832 2013-02-10  Jae Hyun Park  <jae.park08@gmail.com>
2833
2834         Rename ENABLE(GLIB_SUPPORT) to USE(GLIB)
2835         https://bugs.webkit.org/show_bug.cgi?id=104266
2836
2837         Reviewed by Philippe Normand.
2838
2839         Using USE(GLIB) instead of ENABLE(GLIB_SUPPORT) is more consistent with
2840         the existing macro naming conventions.
2841
2842         From Platform.h
2843         USE() - use a particular third-party library or optional OS service
2844         ENABLE() - turn on a specific feature of WebKit
2845
2846         No new tests, no new functionality.
2847
2848         * WebCore.pri:
2849
2850 2013-02-10  Zan Dobersek  <zdobersek@igalia.com>
2851
2852         [GTK] Build errors in TextureMapperShaderProgram.cpp when compiling with Clang
2853         https://bugs.webkit.org/show_bug.cgi?id=109321
2854
2855         Reviewed by Noam Rosenthal.
2856
2857         Clang is reporting errors due to non-constant expressions that cannot be narrowed
2858         from double to float type in initializer list when constructing a matrix of GC3Dfloat
2859         numbers. To avoid this every parameter is passed through an explicit GC3Dfloat constructor.
2860
2861         No new tests - no new functionality.
2862
2863         * platform/graphics/texmap/TextureMapperShaderProgram.cpp:
2864         (WebCore::TextureMapperShaderProgram::setMatrix):
2865
2866 2013-02-10  Philippe Normand  <pnormand@igalia.com>
2867
2868         [GStreamer] audio is muted when playback rate is between 0.8 and 2.0
2869         https://bugs.webkit.org/show_bug.cgi?id=109362
2870
2871         Reviewed by Martin Robinson.
2872
2873         Don't mute sound if the audio pitch is preserved. If this is not
2874         the case mute it if it's too extreme, as the HTML5 spec recommends.
2875
2876         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2877         (WebCore::MediaPlayerPrivateGStreamer::setRate):
2878
2879 2013-02-09  Dominic Mazzoni  <dmazzoni@google.com>
2880
2881         fast/encoding/parser-tests-*.html tests sometimes crash
2882         https://bugs.webkit.org/show_bug.cgi?id=108058
2883
2884         Reviewed by Chris Fleizach.
2885
2886         To avoid calling accessibilityIsIgnored while the render
2887         tree is unstable, call accessibilityIsIgnored in the
2888         notification timer handler, only for childrenChanged
2889         notifications.
2890
2891         This exposed a problem where notifications queued on
2892         objects can fire after the object has been deleted; fix that
2893         by checking the object's id, which is always set to 0 when
2894         removed from the tree.
2895
2896         Covered by existing tests.
2897
2898         * accessibility/AXObjectCache.cpp:
2899         (WebCore::AXObjectCache::childrenChanged):
2900         (WebCore::AXObjectCache::notificationPostTimerFired):
2901
2902 2013-02-09  Eric Carlson  <eric.carlson@apple.com>
2903
2904         [Mac] Do not assume MediaAccessibility framework is installed
2905         https://bugs.webkit.org/show_bug.cgi?id=109365
2906
2907         Reviewed by Sam Weinig.
2908
2909         * page/CaptionUserPreferencesMac.h:
2910         * page/CaptionUserPreferencesMac.mm:
2911         (WebCore::CaptionUserPreferencesMac::userPrefersCaptions): Call the base class if the framework
2912             is not available.
2913         (WebCore::CaptionUserPreferencesMac::setUserPrefersCaptions): Ditto.
2914         (WebCore::CaptionUserPreferencesMac::userHasCaptionPreferences): Ditto.
2915         (WebCore::CaptionUserPreferencesMac::registerForCaptionPreferencesChangedCallbacks): Ditto.
2916         (WebCore::CaptionUserPreferencesMac::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
2917         (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Ditto.
2918         (WebCore::CaptionUserPreferencesMac::captionFontSizeScale): Ditto.
2919         (WebCore::CaptionUserPreferencesMac::setPreferredLanguage): Ditto.
2920         (WebCore::CaptionUserPreferencesMac::preferredLanguages): Ditto.
2921
2922 2013-02-09  Dominic Mazzoni  <dmazzoni@google.com>
2923
2924         AX: move isIgnored caching to AXObject
2925         https://bugs.webkit.org/show_bug.cgi?id=109322
2926
2927         Reviewed by Chris Fleizach.
2928
2929         There's some benefit to caching accessibilityIsIgnored
2930         (using AXComputedObjectAttributeCache) for more than just
2931         AXRenderObject, so move the caching code to AXObject.
2932
2933         AXObject now has a protected virtual method
2934         computeAccessibilityIsIgnored, and all subclasses
2935         override that instead.
2936
2937         No new tests.
2938
2939         * accessibility/AccessibilityImageMapLink.h:
2940         (AccessibilityImageMapLink):
2941         (WebCore::AccessibilityImageMapLink::computeAccessibilityIsIgnored):
2942         * accessibility/AccessibilityList.cpp:
2943         (WebCore::AccessibilityList::computeAccessibilityIsIgnored):
2944         * accessibility/AccessibilityList.h:
2945         (AccessibilityList):
2946         * accessibility/AccessibilityListBox.cpp:
2947         (WebCore::AccessibilityListBox::computeAccessibilityIsIgnored):
2948         * accessibility/AccessibilityListBox.h:
2949         (AccessibilityListBox):
2950         * accessibility/AccessibilityListBoxOption.cpp:
2951         (WebCore::AccessibilityListBoxOption::computeAccessibilityIsIgnored):
2952         * accessibility/AccessibilityListBoxOption.h:
2953         (AccessibilityListBoxOption):
2954         * accessibility/AccessibilityMediaControls.cpp:
2955         (WebCore::AccessibilityMediaControl::computeAccessibilityIsIgnored):
2956         (WebCore::AccessibilityMediaTimeDisplay::computeAccessibilityIsIgnored):
2957         * accessibility/AccessibilityMediaControls.h:
2958         (AccessibilityMediaControl):
2959         (WebCore::AccessibilityMediaControlsContainer::computeAccessibilityIsIgnored):
2960         (AccessibilityMediaTimeDisplay):
2961         * accessibility/AccessibilityMenuList.h:
2962         (WebCore::AccessibilityMenuList::computeAccessibilityIsIgnored):
2963         * accessibility/AccessibilityMenuListOption.cpp:
2964         (WebCore::AccessibilityMenuListOption::computeAccessibilityIsIgnored):
2965         * accessibility/AccessibilityMenuListOption.h:
2966         (AccessibilityMenuListOption):
2967         * accessibility/AccessibilityMenuListPopup.cpp:
2968         (WebCore::AccessibilityMenuListPopup::computeAccessibilityIsIgnored):
2969         * accessibility/AccessibilityMenuListPopup.h:
2970         (AccessibilityMenuListPopup):
2971         * accessibility/AccessibilityNodeObject.cpp:
2972         (WebCore::AccessibilityNodeObject::computeAccessibilityIsIgnored):
2973         * accessibility/AccessibilityNodeObject.h:
2974         (AccessibilityNodeObject):
2975         * accessibility/AccessibilityObject.cpp:
2976         (WebCore::AccessibilityObject::accessibilityIsIgnored):
2977         (WebCore):
2978         * accessibility/AccessibilityObject.h:
2979         (AccessibilityObject):
2980         (WebCore::AccessibilityObject::computeAccessibilityIsIgnored):
2981         * accessibility/AccessibilityProgressIndicator.cpp:
2982         (WebCore::AccessibilityProgressIndicator::computeAccessibilityIsIgnored):
2983         * accessibility/AccessibilityProgressIndicator.h:
2984         (AccessibilityProgressIndicator):
2985         * accessibility/AccessibilityRenderObject.cpp:
2986         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2987         * accessibility/AccessibilityRenderObject.h:
2988         (AccessibilityRenderObject):
2989         * accessibility/AccessibilityScrollView.cpp:
2990         (WebCore::AccessibilityScrollView::computeAccessibilityIsIgnored):
2991         * accessibility/AccessibilityScrollView.h:
2992         (AccessibilityScrollView):
2993         * accessibility/AccessibilityScrollbar.h:
2994         (WebCore::AccessibilityScrollbar::computeAccessibilityIsIgnored):
2995         * accessibility/AccessibilitySlider.cpp:
2996         (WebCore::AccessibilitySlider::computeAccessibilityIsIgnored):
2997         (WebCore::AccessibilitySliderThumb::computeAccessibilityIsIgnored):
2998         * accessibility/AccessibilitySlider.h:
2999         (AccessibilitySlider):
3000         (AccessibilitySliderThumb):
3001         * accessibility/AccessibilitySpinButton.h:
3002         (WebCore::AccessibilitySpinButton::computeAccessibilityIsIgnored):
3003         (WebCore::AccessibilitySpinButtonPart::computeAccessibilityIsIgnored):
3004         * accessibility/AccessibilityTable.cpp:
3005         (WebCore::AccessibilityTable::computeAccessibilityIsIgnored):
3006         * accessibility/AccessibilityTable.h:
3007         (AccessibilityTable):
3008         * accessibility/AccessibilityTableCell.cpp:
3009         (WebCore::AccessibilityTableCell::computeAccessibilityIsIgnored):
3010         * accessibility/AccessibilityTableCell.h:
3011         (AccessibilityTableCell):
3012         * accessibility/AccessibilityTableColumn.cpp:
3013         (WebCore::AccessibilityTableColumn::computeAccessibilityIsIgnored):
3014         * accessibility/AccessibilityTableColumn.h:
3015         (AccessibilityTableColumn):
3016         * accessibility/AccessibilityTableHeaderContainer.cpp:
3017         (WebCore::AccessibilityTableHeaderContainer::computeAccessibilityIsIgnored):
3018         * accessibility/AccessibilityTableHeaderContainer.h:
3019         (AccessibilityTableHeaderContainer):
3020         * accessibility/AccessibilityTableRow.cpp:
3021         (WebCore::AccessibilityTableRow::computeAccessibilityIsIgnored):
3022         * accessibility/AccessibilityTableRow.h:
3023         (AccessibilityTableRow):
3024
3025 2013-02-09  David Farler  <dfarler@apple.com>
3026
3027         Make TestWebKitAPI work for iOS
3028         https://bugs.webkit.org/show_bug.cgi?id=108978
3029
3030         Reviewed by David Kilzer.
3031
3032         Tests already exist - refactor only.
3033
3034         * WebCore.exp.in: Lumped __ZNK7WebCore4KURL7hasPathEv with related methods.
3035         * platform/KURL.cpp: Inlined hasPath() into the header
3036         * platform/KURL.h: Inlined hasPath() into the header
3037
3038 2013-02-09  Adam Barth  <abarth@webkit.org>
3039
3040         Load event fires too early with threaded HTML parser
3041         https://bugs.webkit.org/show_bug.cgi?id=108984
3042
3043         Reviewed by Eric Seidel.
3044
3045         Previously, the DocumentLoader would always be on the stack when the
3046         HTMLDocumentParser was processing data from the network.  The
3047         DocumentLoader would then tell isLoadingInAPISense not to fire the load
3048         event.  Now that we process data asynchronously with the threaded
3049         parser, the DocumentLoader is not always on the stack, which means we
3050         need to delay the load event using the clause that asks the parser
3051         whether it is processing data.
3052
3053         Unfortunately, that clause is fragile because we can check for load
3054         completion while we're switching parsers between the network-created
3055         parser and a script-created parser. To avoid accidentially triggerin
3056         the load event during these "gaps," this patch introduces a counter on
3057         document to record how many parsers are active on the stack.  While
3058         that numer is non-zero, we'll delay the load event. When that number
3059         reaches zero, we'll check for load complete.
3060
3061         That last step is required because the DocumentLoader::finishLoading
3062         method is no longer guarunteed to check for load complete after calling
3063         finish on the parser because the finish operation might complete
3064         asynchronously.
3065
3066         After this patch, the threaded parser passes all but four fast/parser
3067         tests.
3068
3069         * dom/Document.cpp:
3070         (WebCore::Document::Document):
3071         (WebCore::Document::hasActiveParser):
3072         (WebCore):
3073         (WebCore::Document::decrementActiveParserCount):
3074         * dom/Document.h:
3075         (Document):
3076         (WebCore::Document::incrementActiveParserCount):
3077         * html/parser/HTMLDocumentParser.cpp:
3078         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
3079         (WebCore::HTMLDocumentParser::pumpTokenizer):
3080         * html/parser/HTMLParserScheduler.cpp:
3081         (WebCore::ActiveParserSession::ActiveParserSession):
3082         (WebCore):
3083         (WebCore::ActiveParserSession::~ActiveParserSession):
3084         (WebCore::PumpSession::PumpSession):
3085         (WebCore::PumpSession::~PumpSession):
3086         * html/parser/HTMLParserScheduler.h:
3087         (WebCore):
3088         (ActiveParserSession):
3089         (PumpSession):
3090         * loader/DocumentLoader.cpp:
3091         (WebCore::DocumentLoader::isLoadingInAPISense):
3092
3093 2013-02-09  Mike West  <mkwst@chromium.org>
3094
3095         Use IGNORE_EXCEPTION for initialized, but unused, ExceptionCodes.
3096         https://bugs.webkit.org/show_bug.cgi?id=109295
3097
3098         Reviewed by Darin Adler.
3099
3100         The monster patch in http://wkbug.com/108771 missed an entire class of
3101         ignored exceptions. It only dealt with call sites that never initialized
3102         the ExceptionCode variable, on the assumption that only such call sites
3103         would ignore the variable's value.
3104
3105         That was a flawed assumption: a large number of sites that initialize the
3106         ExceptionCode to 0 ignore it regardless. This patch deals with the
3107         almost-as-large set of callsites that initialize the variable, pass it to
3108         a function, and then never touch it again.
3109
3110         * Modules/indexeddb/IDBDatabase.cpp:
3111         (WebCore::IDBDatabase::forceClose):
3112         * accessibility/AccessibilityRenderObject.cpp:
3113         (WebCore::AccessibilityRenderObject::ariaSelectedTextRange):
3114         (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
3115         (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
3116         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
3117         (getSelectionOffsetsForObject):
3118         * accessibility/atk/WebKitAccessibleUtil.cpp:
3119         (selectionBelongsToObject):
3120         * dom/Node.cpp:
3121         (WebCore::Node::textRects):
3122         * editing/DeleteButtonController.cpp:
3123         (WebCore::DeleteButtonController::hide):
3124         * editing/EditingStyle.cpp:
3125         (WebCore::EditingStyle::styleAtSelectionStart):
3126         * editing/Editor.cpp:
3127         (WebCore::Editor::canDeleteRange):
3128         (WebCore::Editor::pasteAsPlainText):
3129         (WebCore::Editor::pasteAsFragment):
3130         (WebCore::Editor::shouldDeleteRange):
3131         (WebCore::Editor::dispatchCPPEvent):
3132         (WebCore::Editor::setComposition):
3133         (WebCore::Editor::advanceToNextMisspelling):
3134         (WebCore::isFrameInRange):
3135         * editing/EditorCommand.cpp:
3136         (WebCore::expandSelectionToGranularity):
3137         * editing/MergeIdenticalElementsCommand.cpp:
3138         (WebCore::MergeIdenticalElementsCommand::doApply):
3139         * editing/SplitElementCommand.cpp:
3140         (WebCore::SplitElementCommand::doUnapply):
3141         * editing/SplitTextNodeCommand.cpp:
3142         (WebCore::SplitTextNodeCommand::doApply):
3143         * editing/TextCheckingHelper.cpp:
3144         (WebCore::expandToParagraphBoundary):
3145         (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
3146         (WebCore::TextCheckingHelper::isUngrammatical):
3147         (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange):
3148         * editing/TextInsertionBaseCommand.cpp:
3149         (WebCore::dispatchBeforeTextInsertedEvent):
3150         (WebCore::canAppendNewLineFeedToSelection):
3151         * editing/TextIterator.cpp:
3152         (WebCore::findPlainText):
3153         * editing/htmlediting.cpp:
3154         (WebCore::extendRangeToWrappingNodes):
3155         (WebCore::isNodeVisiblyContainedWithin):
3156         * editing/visible_units.cpp:
3157         (WebCore::nextBoundary):
3158         * html/FileInputType.cpp:
3159         (WebCore::FileInputType::createShadowSubtree):
3160         * html/HTMLKeygenElement.cpp:
3161         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
3162         * html/HTMLScriptElement.cpp:
3163         (WebCore::HTMLScriptElement::setText):
3164         * html/HTMLTitleElement.cpp:
3165         (WebCore::HTMLTitleElement::setText):
3166         * html/HTMLTrackElement.cpp:
3167         (WebCore::HTMLTrackElement::didCompleteLoad):
3168         * html/RangeInputType.cpp:
3169         (WebCore::RangeInputType::createShadowSubtree):
3170         * html/SearchInputType.cpp:
3171         (WebCore::SearchInputType::createShadowSubtree):
3172         * html/TextFieldInputType.cpp:
3173         (WebCore::TextFieldInputType::createShadowSubtree):
3174         * html/track/TextTrackList.cpp:
3175         (TextTrackList::asyncEventTimerFired):
3176         * inspector/DOMPatchSupport.cpp:
3177         (WebCore::DOMPatchSupport::patchDocument):
3178         * inspector/InspectorDatabaseAgent.cpp:
3179         (WebCore):
3180         * inspector/InspectorFileSystemAgent.cpp:
3181         (WebCore):
3182         * page/DOMSelection.cpp:
3183         (WebCore::DOMSelection::addRange):
3184         * page/DragController.cpp:
3185         (WebCore::DragController::dispatchTextInputEventFor):
3186         * page/EventHandler.cpp:
3187         (WebCore::EventHandler::dispatchMouseEvent):
3188         (WebCore::EventHandler::handleTouchEvent):
3189         * page/FrameActionScheduler.cpp:
3190         (WebCore::EventFrameAction::fire):
3191         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3192         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
3193         * svg/SVGDocument.cpp:
3194         (WebCore::SVGDocument::dispatchZoomEvent):
3195         (WebCore::SVGDocument::dispatchScrollEvent):
3196         * svg/SVGLength.cpp:
3197         (WebCore::SVGLength::SVGLength):
3198         (WebCore::SVGLength::value):
3199         * xml/parser/XMLDocumentParser.cpp:
3200         (WebCore::XMLDocumentParser::exitText):
3201         * xml/parser/XMLDocumentParserQt.cpp:
3202         (WebCore::XMLDocumentParser::parse):
3203         (WebCore::XMLDocumentParser::startDocument):
3204         (WebCore::XMLDocumentParser::parseCharacters):
3205
3206 2013-02-09  Stephen White  <senorblanco@chromium.org>
3207
3208         [skia] Fix memory management in SkiaImageFilterBuilder and friends.
3209         https://bugs.webkit.org/show_bug.cgi?id=109326
3210
3211         Sadly, skia has no official ref-counted pointers, so we must make do
3212         with SkAutoTUnref.
3213
3214         Reviewed by James Robinson.
3215
3216         Correctness covered by existing tests in css3/filters.
3217
3218         * platform/graphics/filters/skia/FEBlendSkia.cpp:
3219         (WebCore::FEBlend::createImageFilter):
3220         * platform/graphics/filters/skia/FEComponentTransferSkia.cpp:
3221         (WebCore::FEComponentTransfer::createImageFilter):
3222         * platform/graphics/filters/skia/FELightingSkia.cpp:
3223         (WebCore::FELighting::createImageFilter):
3224         Adopt refs produced by the build() pass with SkAutoTUnref.
3225         * platform/graphics/filters/skia/SkiaImageFilterBuilder.cpp:
3226         (WebCore::SkiaImageFilterBuilder::~SkiaImageFilterBuilder):
3227         Unref the builder's hashmap effect pointers.
3228         (WebCore::SkiaImageFilterBuilder::build):
3229         Ref the pointer returned to the caller, and use SkAutoTUnref
3230         internally while building the tree.
3231         * platform/graphics/filters/skia/SkiaImageFilterBuilder.h:
3232         (SkiaImageFilterBuilder):
3233         Add a destructor to SkiaImageFilterBuilder.
3234
3235
3236 2013-02-09  Dominic Mazzoni  <dmazzoni@google.com>
3237
3238         AX: Rename AXObject::cachedIsIgnoredValue to lastKnownIsIgnoredValue
3239         https://bugs.webkit.org/show_bug.cgi?id=108238
3240
3241         Reviewed by Chris Fleizach.
3242
3243         Simple refactoring, no new tests.
3244
3245         * accessibility/AXObjectCache.cpp:
3246         (WebCore::AXObjectCache::getOrCreate):
3247         (WebCore::AXObjectCache::childrenChanged):
3248         * accessibility/AccessibilityObject.cpp:
3249         (WebCore::AccessibilityObject::AccessibilityObject):
3250         (WebCore::AccessibilityObject::lastKnownIsIgnoredValue):
3251         (WebCore::AccessibilityObject::setLastKnownIsIgnoredValue):
3252         (WebCore::AccessibilityObject::notifyIfIgnoredValueChanged):
3253         * accessibility/AccessibilityObject.h:
3254         (AccessibilityObject):
3255
3256 2013-02-09  Anton Vayvod  <avayvod@chromium.org>
3257  
3258         [Text Autosizing] Cleanup change: converter the pointer argument to be a reference since
3259         non-null pointer is always expected.
3260         https://bugs.webkit.org/show_bug.cgi?id=109079
3261  
3262         Reviewed by Kenneth Rohde Christiansen.
3263  
3264         Cleanup change, no need to add new tests or modify the existing ones.
3265  
3266         * rendering/TextAutosizer.cpp:
3267  
3268         Changed parameter from a pointer to a reference in the methods below.
3269  
3270         (WebCore::TextAutosizer::processSubtree):
3271         (WebCore::TextAutosizer::processCluster):
3272         (WebCore::TextAutosizer::processContainer):
3273         (WebCore::TextAutosizer::isNarrowDescendant):
3274         (WebCore::TextAutosizer::isWiderDescendant):
3275         (WebCore::TextAutosizer::isAutosizingCluster):
3276         (WebCore::TextAutosizer::clusterShouldBeAutosized):
3277         (WebCore::TextAutosizer::measureDescendantTextWidth):
3278  
3279         * rendering/TextAutosizer.h: updated method prototypes.
3280
3281 2013-02-09  Rafael Brandao  <rafael.lobo@openbossa.org>
3282
3283         [TexMap] Separate classes per file in TextureMapperBackingStore.h
3284         https://bugs.webkit.org/show_bug.cgi?id=109333
3285
3286         Reviewed by Noam Rosenthal.
3287
3288         TextureMapperBackingStore.h had the classes TextureMapperBackingStore,
3289         TextureMapperTiledBackingStore, TextureMapperSurfaceBackingStore and
3290         TextureMapperTile which was quite confusing. Now each one has its
3291         own header and its own source file.
3292
3293         No new tests needed, refactoring only.
3294
3295         * CMakeLists.txt:
3296         * GNUmakefile.list.am:
3297         * Target.pri:
3298         * WebCore.gypi:
3299         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
3300         * platform/graphics/texmap/TextureMapperBackingStore.cpp:
3301         * platform/graphics/texmap/TextureMapperBackingStore.h:
3302         * platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp: Added.
3303         (WebCore):
3304         (WebCore::TextureMapperSurfaceBackingStore::setGraphicsSurface):
3305         (WebCore::TextureMapperSurfaceBackingStore::swapBuffersIfNeeded):
3306         (WebCore::TextureMapperSurfaceBackingStore::texture):
3307         (WebCore::TextureMapperSurfaceBackingStore::paintToTextureMapper):
3308         * platform/graphics/texmap/TextureMapperSurfaceBackingStore.h: Added.
3309         (WebCore):
3310         (TextureMapperSurfaceBackingStore):
3311         (WebCore::TextureMapperSurfaceBackingStore::create):
3312         (WebCore::TextureMapperSurfaceBackingStore::~TextureMapperSurfaceBackingStore):
3313         (WebCore::TextureMapperSurfaceBackingStore::TextureMapperSurfaceBackingStore):
3314         * platform/graphics/texmap/TextureMapperTile.cpp: Added.
3315         (WebCore):
3316         (WebCore::TextureMapperTile::updateContents):
3317         (WebCore::TextureMapperTile::paint):
3318         * platform/graphics/texmap/TextureMapperTile.h: Added.
3319         (WebCore):
3320         (TextureMapperTile):
3321         (WebCore::TextureMapperTile::texture):
3322         (WebCore::TextureMapperTile::rect):
3323         (WebCore::TextureMapperTile::setTexture):
3324         (WebCore::TextureMapperTile::setRect):
3325         (WebCore::TextureMapperTile::~TextureMapperTile):
3326         (WebCore::TextureMapperTile::TextureMapperTile):
3327         * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp: Copied from Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.cpp.
3328         (WebCore):
3329         (WebCore::TextureMapperTiledBackingStore::TextureMapperTiledBackingStore):
3330         (WebCore::TextureMapperTiledBackingStore::updateContentsFromImageIfNeeded):
3331         (WebCore::TextureMapperTiledBackingStore::adjustedTransformForRect):
3332         (WebCore::TextureMapperTiledBackingStore::paintToTextureMapper):
3333         (WebCore::TextureMapperTiledBackingStore::drawBorder):
3334         (WebCore::TextureMapperTiledBackingStore::drawRepaintCounter):
3335         (WebCore::TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded):
3336         (WebCore::TextureMapperTiledBackingStore::updateContents):
3337         (WebCore::TextureMapperTiledBackingStore::texture):
3338         * platform/graphics/texmap/TextureMapperTiledBackingStore.h: Added.
3339         (WebCore):
3340         (TextureMapperTiledBackingStore):
3341         (WebCore::TextureMapperTiledBackingStore::create):
3342         (WebCore::TextureMapperTiledBackingStore::~TextureMapperTiledBackingStore):
3343         (WebCore::TextureMapperTiledBackingStore::setContentsToImage):
3344         (WebCore::TextureMapperTiledBackingStore::rect):
3345         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.h:
3346         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
3347
3348 2013-02-09  Philip Rogers  <pdr@google.com>
3349
3350         Sanitize m_keyTimes for paced value animations
3351         https://bugs.webkit.org/show_bug.cgi?id=108828
3352
3353         Reviewed by Dirk Schulze.
3354
3355         SVG animations with calcMode=paced calculate new m_keyTimes in
3356         SVGAnimationElement::calculateKeyTimesForCalcModePaced() because paced animations do not
3357         specify keyTimes. If an error occurs while calculating m_keyTimes, and there exists
3358         user-specified values, a crash could occur because the user-specified values were not
3359         sanitized.
3360
3361         This change clears user-specified keyTimes before calculating new ones.
3362
3363         Test: svg/animations/animate-keytimes-crash.html
3364
3365         * svg/SVGAnimationElement.cpp:
3366         (WebCore::SVGAnimationElement::calculateKeyTimesForCalcModePaced):
3367
3368 2013-02-09  Eric Seidel  <eric@webkit.org>
3369
3370         Fix TextDocumentParser to play nice with threading
3371         https://bugs.webkit.org/show_bug.cgi?id=109240
3372
3373         Reviewed by Adam Barth.
3374
3375         Before the HTML5 parser re-write the text document parser
3376         was completely custom.  With the HTML5 parser, we just made
3377         the TextDocumentParser use the HTMLDocumentParser with an
3378         artificial script tag.
3379
3380         However, our solution was slightly over-engineered to avoid
3381         lying about the column numbers of the first line of the text document
3382         during parsing. :)
3383
3384         This change makes us use a simpler (and threading-compatible)
3385         solution by just inserting a real "<pre>" tag into the
3386         input stream instead of hacking one together with the treebuilder
3387         and manually setting the Tokenizer state.
3388
3389         fast/parser/empty-text-resource.html covers this case.
3390
3391         * html/parser/TextDocumentParser.cpp:
3392         (WebCore::TextDocumentParser::TextDocumentParser):
3393         (WebCore::TextDocumentParser::insertFakePreElement):
3394
3395 2013-02-09  Kent Tamura  <tkent@chromium.org>
3396
3397         Add missing copyright header
3398         https://bugs.webkit.org/show_bug.cgi?id=107507
3399
3400         * Resources/pagepopups/chromium/calendarPickerChromium.css:
3401         * Resources/pagepopups/chromium/pickerCommonChromium.css:
3402
3403 2013-02-09  Kent Tamura  <tkent@chromium.org>
3404
3405         Fix crash by img[ismap] with content property
3406         https://bugs.webkit.org/show_bug.cgi?id=108702
3407
3408         Reviewed by Adam Barth.
3409
3410         Test: fast/dom/HTMLAnchorElement/anchor-ismap-crash.html
3411
3412         * html/HTMLAnchorElement.cpp:
3413         (WebCore::appendServerMapMousePosition):
3414         Check if the renderer of an img element is RenderImage.
3415
3416 2013-02-09  Mike West  <mkwst@chromium.org>
3417
3418         Drop ExceptionCode from IDB's directionToString and modeToString.
3419         https://bugs.webkit.org/show_bug.cgi?id=109143
3420
3421         Reviewed by Jochen Eisinger.
3422
3423         No caller of either IDBCursor::directionToString or
3424         IDBTransaction::modeToString makes use of the ExceptionCode these
3425         methods require. This patch removes the 'ExceptionCode&' parameter from
3426         both methods and their callsites.
3427
3428         * Modules/indexeddb/IDBCursor.cpp:
3429         (WebCore::IDBCursor::direction):
3430         (WebCore::IDBCursor::directionToString):
3431             Drop the 'ExceptionCode&' parameter, and replace the 'TypeError'
3432             exception previously generated with ASSERT_NOT_REACHED.
3433         * Modules/indexeddb/IDBCursor.h:
3434         * Modules/indexeddb/IDBTransaction.cpp:
3435         (WebCore::IDBTransaction::mode):
3436         (WebCore::IDBTransaction::modeToString):
3437             Drop the 'ExceptionCode&' parameter, and replace the 'TypeError'
3438             exception previously generated with ASSERT_NOT_REACHED.
3439         * Modules/indexeddb/IDBTransaction.h:
3440
3441 2013-02-09  Kondapally Kalyan  <kalyan.kondapally@intel.com>
3442
3443         [EFL][Qt][WebGL] Share the common code between GraphicsSurfaceGLX and X11WindowResources.
3444         https://bugs.webkit.org/show_bug.cgi?id=106666
3445
3446         Reviewed by Kenneth Rohde Christiansen.
3447
3448         Covered by existing WebGL tests.
3449
3450         This patch removes any duplicate code in X11WindowResources and
3451         GraphicsSurfaceGLX. No new functionality is added.
3452
3453         * PlatformEfl.cmake:
3454         * Target.pri:
3455         * platform/graphics/surfaces/egl/EGLConfigSelector.cpp:
3456         (WebCore::EGLConfigSelector::pixmapContextConfig):
3457         * platform/graphics/surfaces/egl/EGLConfigSelector.h:
3458         (EGLConfigSelector):
3459         * platform/graphics/surfaces/egl/EGLSurface.cpp:
3460         (WebCore::EGLWindowTransportSurface::EGLWindowTransportSurface):
3461         (WebCore::EGLWindowTransportSurface::destroy):
3462         (WebCore::EGLWindowTransportSurface::setGeometry):
3463         * platform/graphics/surfaces/egl/EGLSurface.h:
3464         (WebCore):
3465         (EGLWindowTransportSurface):
3466         * platform/graphics/surfaces/glx/GLXConfigSelector.h:
3467         (WebCore::GLXConfigSelector::GLXConfigSelector):
3468         (WebCore::GLXConfigSelector::visualInfo):
3469         (WebCore::GLXConfigSelector::pBufferContextConfig):
3470         (WebCore::GLXConfigSelector::createSurfaceConfig):
3471         (GLXConfigSelector):
3472         * platform/graphics/surfaces/glx/GLXContext.cpp:
3473         (WebCore::initializeARBExtensions):
3474         (WebCore::GLXOffScreenContext::GLXOffScreenContext):
3475         (WebCore::GLXOffScreenContext::initialize):
3476         (WebCore::GLXOffScreenContext::platformReleaseCurrent):
3477         (WebCore::GLXOffScreenContext::freeResources):
3478         * platform/graphics/surfaces/glx/GLXContext.h:
3479         (GLXOffScreenContext):
3480         * platform/graphics/surfaces/glx/GLXSurface.cpp:
3481         (WebCore::GLXTransportSurface::GLXTransportSurface):
3482         (WebCore::GLXTransportSurface::setGeometry):
3483         (WebCore::GLXTransportSurface::destroy):
3484         (WebCore::GLXPBuffer::initialize):
3485         * platform/graphics/surfaces/glx/GLXSurface.h:
3486         (GLXTransportSurface):
3487         (GLXPBuffer):
3488         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
3489         (WebCore):
3490         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
3491         (WebCore::GraphicsSurfacePrivate::initialize):
3492         (GraphicsSurfacePrivate):
3493         (WebCore::GraphicsSurfacePrivate::createSurface):
3494         (WebCore::GraphicsSurfacePrivate::createPixmap):
3495         (WebCore::GraphicsSurfacePrivate::display):
3496         (WebCore::GraphicsSurfacePrivate::flags):
3497         (WebCore::GraphicsSurfacePrivate::clear):
3498         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
3499         No new functionality added. Made changes to take the common code into use.
3500
3501         * platform/graphics/surfaces/glx/X11WindowResources.h: Removed.
3502         * platform/graphics/surfaces/glx/X11Helper.cpp: Renamed from Source/WebCore/platform/graphics/surfaces/glx/X11WindowResources.cpp.
3503         (WebCore):
3504         (WebCore::DisplayConnection::DisplayConnection):
3505         (DisplayConnection):
3506         (WebCore::DisplayConnection::~DisplayConnection):
3507         (WebCore::DisplayConnection::display):
3508         (OffScreenRootWindow):
3509         (WebCore::OffScreenRootWindow::OffScreenRootWindow):
3510         (WebCore::OffScreenRootWindow::~OffScreenRootWindow):
3511         (WebCore::OffScreenRootWindow::rootWindow):
3512         (WebCore::X11Helper::resizeWindow):
3513         (WebCore::X11Helper::createOffScreenWindow):
3514         (WebCore::X11Helper::destroyWindow):
3515         (WebCore::X11Helper::isXRenderExtensionSupported):
3516         (WebCore::X11Helper::nativeDisplay):
3517         (WebCore::X11Helper::offscreenRootWindow):
3518         * platform/graphics/surfaces/glx/X11Helper.h: Added.
3519         (WebCore):
3520         (WebCore::handleXPixmapCreationError):
3521         (X11Helper):
3522         (ScopedXPixmapCreationErrorHandler):
3523         (WebCore::ScopedXPixmapCreationErrorHandler::ScopedXPixmapCreationErrorHandler):
3524         (WebCore::ScopedXPixmapCreationErrorHandler::~ScopedXPixmapCreationErrorHandler):
3525         (WebCore::ScopedXPixmapCreationErrorHandler::isValidOperation):
3526         Moved common code from GraphicsSurfaceGLX to X11Helper.
3527
3528 2013-02-09  Andrey Lushnikov  <lushnikov@chromium.org>
3529
3530         Web Inspector: show whitespace characters in DTE
3531         https://bugs.webkit.org/show_bug.cgi?id=108947
3532
3533         Reviewed by Pavel Feldman.
3534
3535         New test: inspector/editor/text-editor-show-whitespaces.html
3536
3537         Split consecutive whitespace characters into groups of 16, 8, 4, 2 and 1 and
3538         add ::before pseudoclass for this groups which contains necessary
3539         amount of "dots" (u+00b7). Add a setting "Show whitespace" for this
3540         option in "Sources" section of "General" tab.
3541
3542         * English.lproj/localizedStrings.js:
3543         * inspector/front-end/DefaultTextEditor.js:
3544         (WebInspector.TextEditorMainPanel.prototype.wasShown):
3545         (WebInspector.TextEditorMainPanel.prototype.willHide):
3546         (WebInspector.TextEditorMainPanel.prototype._renderRanges):
3547         (WebInspector.TextEditorMainPanel.prototype._renderWhitespaceCharsWithFixedSizeSpans):
3548         (WebInspector.TextEditorMainPanel.prototype._paintLine):
3549         * inspector/front-end/Settings.js:
3550         * inspector/front-end/SettingsScreen.js:
3551         (WebInspector.GenericSettingsTab):
3552         * inspector/front-end/inspectorSyntaxHighlight.css:
3553         (.webkit-whitespace-1::before):
3554         (.webkit-whitespace-2::before):
3555         (.webkit-whitespace-4::before):
3556         (.webkit-whitespace-8::before):
3557         (.webkit-whitespace-16::before):
3558         (.webkit-whitespace::before):
3559
3560 2013-02-08  Eric Carlson  <eric.carlson@apple.com>
3561
3562         [Mac] respect in-band caption color
3563         https://bugs.webkit.org/show_bug.cgi?id=109203
3564
3565         Reviewed by Dean Jackson.
3566
3567         Test: media/track/track-in-band-style.html
3568
3569         * WebCore.xcodeproj/project.pbxproj: Add HTMLDivElement.h to private headers because it is 
3570             included by HTMLTextElement, which is included by HTMLMediaElement.h, which is included 
3571             by files in WebKit/WebKit2.
3572         * html/track/InbandTextTrack.cpp:
3573         (WebCore::InbandTextTrack::addGenericCue): Set cue colors if necessary.
3574
3575         * html/track/TextTrackCue.h:
3576         (WebCore::TextTrackCue::element): New, accessor for the cue element so it can be styled.
3577
3578         * html/track/TextTrackCueGeneric.cpp:
3579         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): Set container and cue background 
3580             color if necessary.
3581         (WebCore::TextTrackCueGeneric::operator==): Compare cue colors.
3582         * html/track/TextTrackCueGeneric.h:
3583         (WebCore::TextTrackCueGeneric::foregroundColor): Add color accessors.
3584         (WebCore::TextTrackCueGeneric::setForegroundColor):
3585         (WebCore::TextTrackCueGeneric::backgroundColor):
3586         (WebCore::TextTrackCueGeneric::setBackgroundColor):
3587
3588         * page/CaptionUserPreferencesMac.mm:
3589         (WebCore::CaptionUserPreferencesMac::registerForCaptionPreferencesChangedCallbacks): Always
3590             regenerate override CSS when an element registers for callbacks.
3591         (WebCore::CaptionUserPreferencesMac::captionsWindowCSS): Drive by fix of "window color" padding.
3592         (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Log the stylesheet generated
3593             for easier debugging.
3594
3595         * platform/graphics/InbandTextTrackPrivateClient.h:
3596         (WebCore::GenericCueData::foregroundColor): Add color getters/setters.
3597         (WebCore::GenericCueData::setForegroundColor):
3598         (WebCore::GenericCueData::backgroundColor):
3599         (WebCore::GenericCueData::setBackgroundColor):
3600
3601         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
3602         (WebCore::makeRGBA32FromARGBCFArray): Initialize a RGBA32 from a CFArray of color values.
3603         (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Process cue colors.
3604
3605 2013-02-08  Benjamin Poulain  <bpoulain@apple.com>
3606
3607         Move workerThreadCount from TestRunner to WebCore Internals
3608         https://bugs.webkit.org/show_bug.cgi?id=109239
3609
3610         Reviewed by Darin Adler.
3611
3612         Add the new read-only property workerThreadCount.
3613
3614         * testing/Internals.cpp:
3615         (WebCore::Internals::workerThreadCount):
3616         (WebCore):
3617         * testing/Internals.h:
3618         (Internals):
3619         * testing/Internals.idl:
3620
3621 2013-02-08  Dean Jackson  <dino@apple.com>
3622
3623         Snapshotted plug-in should use shadow root
3624         https://bugs.webkit.org/show_bug.cgi?id=108284
3625
3626         Reviewed by Simon Fraser.
3627
3628         Take two! This time with updated exports file.
3629
3630         A snapshotted plugin needs to indicate to the user that it can be clicked
3631         to be restarted. Previously this was done with an image that had embedded
3632         text. Instead, we now use an internal shadow root to embed some markup that
3633         will display instructions that can be localised.
3634
3635         The UA stylesheet for plug-ins provides a default styling for the label, which
3636         can be overridden by ports.
3637
3638         In the process, RenderSnapshottedPlugIn no longer inherits from RenderEmbeddedObject,
3639         since it is only responsible for drawing a paused plug-in. The snapshot creation
3640         can work with the default renderer, but a shadow root requires something like
3641         RenderBlock in order to draw its children. We swap from one renderer to another when
3642         necessary either by creating the shadow root or by explicitly detaching and attaching
3643         the plugin element.
3644
3645         Unfortunately this is difficult to test, because the snapshotting requires
3646         time to execute, and also a PluginView to be instantiated.
3647
3648         * WebCore.exp.in: Export the InlineBox interface.
3649
3650         * css/plugIns.css:
3651         (object::-webkit-snapshotted-plugin-content): New rules for a default label style.
3652
3653         * platform/LocalizedStrings.cpp: Make sure all ports have plugin strings, now it is called.
3654         * platform/LocalizedStrings.h:
3655         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
3656         * platform/chromium/LocalizedStringsChromium.cpp:
3657         * platform/efl/LocalizedStringsEfl.cpp:
3658         * platform/gtk/LocalizedStringsGtk.cpp:
3659         * platform/qt/LocalizedStringsQt.cpp:
3660
3661         * html/HTMLPlugInElement.cpp:
3662         (WebCore::HTMLPlugInElement::defaultEventHandler): Take into account the fact
3663         that RenderSnapshottedPlugIn no longer is an embedded object.
3664
3665         * html/HTMLPlugInImageElement.cpp:
3666         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): New default values in constructor.
3667         (WebCore::HTMLPlugInElement::defaultEventHandler): Make sure to call base class.
3668         (WebCore::HTMLPlugInElement::willRecalcStyle): No need to reattach if we're a snapshot.
3669         (WebCore::HTMLPlugInImageElement::createRenderer): If we're showing a snapshot, create such
3670             a renderer, otherwise use the typical plug-in path.
3671         (WebCore::HTMLPlugInImageElement::updateSnapshot): Keep a record of the snapshot, since we'll
3672             need to give it to the renderer.
3673         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Build a subtree that will display a label.
3674         * html/HTMLPlugInImageElement.h:
3675         (HTMLPlugInImageElement): New member variable to record the snapshot image and whether the label
3676             should show immediately.
3677         (WebCore::HTMLPlugInImageElement::swapRendererTimerFired): The callback function triggered when we need
3678             to swap to the Shadow Root.
3679         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): The user has tapped on the snapshot so the plugin
3680             in being recreated. Make sure we reattach so that a plugin renderer will be created.
3681         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Make sure we set the right
3682             displayState for snapshots.
3683         * html/HTMLPlugInImageElement.h:
3684         (HTMLPlugInImageElement): The new methods listed above.
3685         (WebCore::HTMLPlugInImageElement::setShouldShowSnapshotLabelAutomatically): Indicates whether or not
3686             a snapshot should be immediately labeled.
3687
3688         * page/ChromeClient.h: No need for plugInStartLabelImage any more.
3689
3690         * rendering/RenderSnapshottedPlugIn.cpp:
3691         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): New inheritance.
3692         (WebCore::RenderSnapshottedPlugIn::paint): If we're in the background paint phase, render the snapshot image.
3693         (WebCore::RenderSnapshottedPlugIn::paintSnapshotImage): Rename.
3694         (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Rename.
3695         (WebCore::RenderSnapshottedPlugIn::paintSnapshotWithLabel): Rename. No need for label sizes.
3696         (WebCore::RenderSnapshottedPlugIn::getCursor):
3697         (WebCore::RenderSnapshottedPlugIn::handleEvent): The renderer doesn't restart the plug-in any more. Tell the element and it will do it.
3698         * rendering/RenderSnapshottedPlugIn.h:
3699         (RenderSnapshottedPlugIn): New inheritance. Some method renaming.
3700
3701 2013-02-08  Dean Jackson  <dino@apple.com>
3702
3703         Rolling out r142333 and r142337 which broke Mac Release builds.
3704
3705 2013-02-08  Sheriff Bot  <webkit.review.bot@gmail.com>
3706
3707         Unreviewed, rolling out r142337.
3708         http://trac.webkit.org/changeset/142337
3709         https://bugs.webkit.org/show_bug.cgi?id=109339
3710
3711         Breaking Mac release builds (Requested by dino_ on #webkit).
3712
3713         * rendering/RenderSnapshottedPlugIn.h:
3714
3715 2013-02-08  Dean Jackson  <dino@apple.com>
3716
3717         Attempted Mac and GTK build fix after r142333.
3718
3719         * rendering/RenderSnapshottedPlugIn.h: Include InlineBox.h.
3720
3721 2013-02-08  Andy Estes  <aestes@apple.com>
3722
3723         Restore pre-r118852 behavior for EllipsisBox::nodeAtPoint()
3724         https://bugs.webkit.org/show_bug.cgi?id=109277
3725
3726         Reviewed by Simon Fraser.
3727
3728         Test: fast/flexbox/line-clamp-link-after-ellipsis.html
3729
3730         Roll out r118852. Enough time has passed that this can't be done
3731         mechanically, so transcribe the old method definition to current
3732         WebCore interfaces.
3733
3734         * rendering/EllipsisBox.cpp:
3735         (WebCore::EllipsisBox::markupBox): EllipsisBox no longer has
3736         m_markupBox, so break the logic for finding the markup box from
3737         paintMarkupBox() into its own function.
3738         (WebCore::EllipsisBox::paintMarkupBox): Call markupBox().
3739         (WebCore::EllipsisBox::nodeAtPoint): Transcribe the pre-r118852 implementation.
3740         * rendering/EllipsisBox.h:
3741         (EllipsisBox): Declare markupBox().
3742
3743 2013-02-08  Eric Carlson  <eric.carlson@apple.com>
3744
3745         [Mac] In-band closed caption tracks are not always initialized correctly
3746         https://bugs.webkit.org/show_bug.cgi?id=109323
3747
3748         Reviewed by Dean Jackson.
3749
3750         No new tests, this fix makes existing tests less flakey.
3751
3752         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3753         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Create and configure legible output
3754             here instad of in tracksChanged.
3755         (WebCore::MediaPlayerPrivateAVFoundationObjC::setClosedCaptionsVisible): Do nothing in a build with
3756             in-band track support.
3757         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Move legible output creation to 
3758             createAVPlayerItem, don't set look at track media type to see if the movie has captions 
3759             when we have support for in-band captions.
3760
3761 2013-02-08  Dean Jackson  <dino@apple.com>
3762
3763         Snapshotted plug-in should use shadow root
3764         https://bugs.webkit.org/show_bug.cgi?id=108284
3765
3766         Reviewed by Simon Fraser.
3767
3768         A snapshotted plugin needs to indicate to the user that it can be clicked
3769         to be restarted. Previously this was done with an image that had embedded
3770         text. Instead, we now use an internal shadow root to embed some markup that
3771         will display instructions that can be localised.
3772
3773         The UA stylesheet for plug-ins provides a default styling for the label, which
3774         can be overridden by ports.
3775
3776         In the process, RenderSnapshottedPlugIn no longer inherits from RenderEmbeddedObject,
3777         since it is only responsible for drawing a paused plug-in. The snapshot creation
3778         can work with the default renderer, but a shadow root requires something like
3779         RenderBlock in order to draw its children. We swap from one renderer to another when
3780         necessary either by creating the shadow root or by explicitly detaching and attaching
3781         the plugin element.
3782
3783         Unfortunately this is difficult to test, because the snapshotting requires
3784         time to execute, and also a PluginView to be instantiated.
3785
3786         * css/plugIns.css:
3787         (object::-webkit-snapshotted-plugin-content): New rules for a default label style.
3788
3789         * platform/LocalizedStrings.cpp: Make sure all ports have plugin strings, now it is called.
3790         * platform/LocalizedStrings.h:
3791         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
3792         * platform/chromium/LocalizedStringsChromium.cpp:
3793         * platform/efl/LocalizedStringsEfl.cpp:
3794         * platform/gtk/LocalizedStringsGtk.cpp:
3795         * platform/qt/LocalizedStringsQt.cpp:
3796
3797         * html/HTMLPlugInElement.cpp:
3798         (WebCore::HTMLPlugInElement::defaultEventHandler): Take into account the fact
3799         that RenderSnapshottedPlugIn no longer is an embedded object.
3800
3801         * html/HTMLPlugInImageElement.cpp:
3802         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): New default values in constructor.
3803         (WebCore::HTMLPlugInElement::defaultEventHandler): Make sure to call base class.
3804         (WebCore::HTMLPlugInElement::willRecalcStyle): No need to reattach if we're a snapshot.
3805         (WebCore::HTMLPlugInImageElement::createRenderer): If we're showing a snapshot, create such
3806             a renderer, otherwise use the typical plug-in path.
3807         (WebCore::HTMLPlugInImageElement::updateSnapshot): Keep a record of the snapshot, since we'll
3808             need to give it to the renderer.
3809         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Build a subtree that will display a label.
3810         * html/HTMLPlugInImageElement.h:
3811         (HTMLPlugInImageElement): New member variable to record the snapshot image and whether the label
3812             should show immediately.
3813         (WebCore::HTMLPlugInImageElement::swapRendererTimerFired): The callback function triggered when we need
3814             to swap to the Shadow Root.
3815         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): The user has tapped on the snapshot so the plugin
3816             in being recreated. Make sure we reattach so that a plugin renderer will be created.
3817         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Make sure we set the right
3818             displayState for snapshots.
3819         * html/HTMLPlugInImageElement.h:
3820         (HTMLPlugInImageElement): The new methods listed above.
3821         (WebCore::HTMLPlugInImageElement::setShouldShowSnapshotLabelAutomatically): Indicates whether or not
3822             a snapshot should be immediately labeled.
3823
3824         * page/ChromeClient.h: No need for plugInStartLabelImage any more.
3825
3826         * rendering/RenderSnapshottedPlugIn.cpp:
3827         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): New inheritance.
3828         (WebCore::RenderSnapshottedPlugIn::paint): If we're in the background paint phase, render the snapshot image.
3829         (WebCore::RenderSnapshottedPlugIn::paintSnapshotImage): Rename.
3830         (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Rename.
3831         (WebCore::RenderSnapshottedPlugIn::paintSnapshotWithLabel): Rename. No need for label sizes.
3832         (WebCore::RenderSnapshottedPlugIn::getCursor):
3833         (WebCore::RenderSnapshottedPlugIn::handleEvent): The renderer doesn't restart the plug-in any more. Tell the element and it will do it.
3834         * rendering/RenderSnapshottedPlugIn.h:
3835         (RenderSnapshottedPlugIn): New inheritance. Some method renaming.
3836
3837 2013-02-08  Kentaro Hara  <haraken@chromium.org>
3838
3839         {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator should be in FocusEvent.cpp
3840         https://bugs.webkit.org/show_bug.cgi?id=109265
3841
3842         Reviewed by Dimitri Glazkov.
3843
3844         Conventionally we put XXXEventDispatchMediator to XXXEvent.cpp.
3845         We should move {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator to FocusEvent.cpp.
3846
3847         No tests. No change in behavior.
3848
3849         * dom/EventDispatchMediator.cpp:
3850         * dom/EventDispatchMediator.h:
3851         * dom/FocusEvent.cpp:
3852         (WebCore::FocusEventDispatchMediator::create):
3853         (WebCore):
3854         (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
3855         (WebCore::FocusEventDispatchMediator::dispatchEvent):
3856         (WebCore::BlurEventDispatchMediator::create):
3857         (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
3858         (WebCore::BlurEventDispatchMediator::dispatchEvent):
3859         (WebCore::FocusInEventDispatchMediator::create):
3860         (WebCore::FocusInEventDispatchMediator::FocusInEventDispatchMediator):
3861         (WebCore::FocusInEventDispatchMediator::dispatchEvent):
3862         (WebCore::FocusOutEventDispatchMediator::create):
3863         (WebCore::FocusOutEventDispatchMediator::FocusOutEventDispatchMediator):
3864         (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
3865         * dom/FocusEvent.h:
3866         (WebCore):
3867         (FocusEventDispatchMediator):
3868         (BlurEventDispatchMediator):
3869         (FocusInEventDispatchMediator):
3870         (FocusOutEventDispatchMediator):
3871         * dom/UIEvent.cpp:
3872         * dom/UIEvent.h:
3873
3874 2013-02-08  Jer Noble  <jer.noble@apple.com>
3875
3876         Unreviewed build fix. MSVC (and other compilers) need a default: case in switch statement.
3877
3878         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3879         (WebCore::notificationName):
3880
3881 2013-02-08  Jer Noble  <jer.noble@apple.com>
3882
3883         Bring WebKit up to speed with latest Encrypted Media spec.
3884         https://bugs.webkit.org/show_bug.cgi?id=97037
3885
3886         Reviewed by Eric Carlson.
3887
3888         The most recent version of the Encrypted Media Extensions spec breaks functionality out of the
3889         HTMLMediaElement and into new MediaKeys and MediaKeySession classes. Since the CDM functionality
3890         has been pulled out of the media element, we create a proxy CDM class and factory system for
3891         creating specific CDM key system implementations. The spec also breaks out MediaKeyEvent
3892         into distinct event classes, MediaKeyNeededEvent and MediaKeyMessageEvent, for needkey and
3893         keymessage events, respectively.
3894
3895         Tests: media/encrypted-media/encrypted-media-v2-events.html
3896                media/encrypted-media/encrypted-media-v2-syntax.html
3897
3898         CDM is a proxy class (a la MediaPlayer) for a specific CDMPrivateInterface implementation. A CDM
3899         implementation is registered with the CDMFactory and will be created if that implementation supports
3900         the key system passed into the MediaKeys constructor. CDMSession is a pure-virtual interface exposed
3901         by concrete CDMPrivate subclasses.  Its lifetime is owned by MediaKeySession.
3902         * Modules/encryptedmedia/CDM.cpp: Added.
3903         (WebCore::installedCDMFactories): Initialize all the known CDM subtypes. Ports will add CDM implementations here.
3904         (WebCore::CDM::registerCDMFactory): Registers a new CDMFactory using the passed in function pointers.
3905         (WebCore::CDMFactoryForKeySystem): Return the first CDM factory which supports the requested key system.
3906         (WebCore::CDM::supportsKeySystem): Walk the installed CDMs and ask if the given key system is supported.
3907         (WebCore::CDM::supportsKeySystemMIMETypeAndCodec): Ditto, with an additional MIME type and codec string.
3908         (WebCore::CDM::create): Simple constructor wrapper.
3909         (WebCore::CDM::CDM): Simple constructor; calls bestCDMForKeySystem() to create it's private implementation.
3910         (WebCore::CDM::~CDM): Simple destructor.
3911         (WebCore::CDM::createSession): Creates a new CDMSession.
3912         * Modules/encryptedmedia/CDM.h: Added.
3913         (WebCore::CDM::keySystem): Simple accessor for m_keySystem.
3914         (WebCore::CDMSession::CDMSession): Simple constructor.
3915         (WebCore::CDMSession::~CDMSession): Simple destructor.
3916         * Modules/encryptedmedia/CDMPrivate.h: Added.
3917         (WebCore::CDMPrivateInterface::CDMPrivateInterface): Simple constructor.
3918         (WebCore::CDMPrivateInterface::~CDMPrivateInterface): Simple destructor.
3919
3920         The new classes, MediaKeyMessageEvent and MediaKeyNeededEvent, take distinct subsets of the initializers of
3921         the original MediaKeyMessageEvent.
3922         * Modules/encryptedmedia/MediaKeyMessageEvent.cpp: Copied from Source/WebCore/html/MediaKeyEvent.cpp.
3923         (WebCore::MediaKeyMessageEventInit::MediaKeyMessageEventInit): Initializer now only takes message and destinationURL
3924             parameters.
3925         (WebCore::MediaKeyMessageEvent::MediaKeyMessageEvent): Simple constructor.
3926         (WebCore::MediaKeyMessageEvent::~MediaKeyMessageEvent): Simple destructor.
3927         (WebCore::MediaKeyMessageEvent::interfaceName): Standard interfaceName.
3928         * Modules/encryptedmedia/MediaKeyMessageEvent.h: Copied from Source/WebCore/html/MediaKeyEvent.h.
3929         (WebCore::MediaKeyMessageEvent::create): Simple construction wrapper.
3930         (WebCore::MediaKeyMessageEvent::message): Simple accessor for m_message.
3931         (WebCore::MediaKeyMessageEvent::destinationURL): Simple accessor for m_destinationURL.
3932         * Modules/encryptedmedia/MediaKeyMessageEvent.idl: Copied from Source/WebCore/html/MediaKeyEvent.idl.
3933         * Modules/encryptedmedia/MediaKeyNeededEvent.cpp: Copied from Source/WebCore/html/MediaKeyEvent.h.
3934         (WebCore::MediaKeyNeededEventInit::MediaKeyNeededEventInit): Initializer now only takes initData parameter.
3935         (WebCore::MediaKeyNeededEvent::MediaKeyNeededEvent): Simple constructor.
3936         (WebCore::MediaKeyNeededEvent::~MediaKeyNeededEvent): Simple destructor.
3937         (WebCore::MediaKeyNeededEvent::interfaceName): Standard interfaceName.
3938         * Modules/encryptedmedia/MediaKeyNeededEvent.h: Copied from Source/WebCore/html/MediaKeyEvent.h.
3939         (WebCore::MediaKeyNeededEvent::create): Simple construction wrapper.
3940         (WebCore::MediaKeyNeededEvent::initData): Simple accessor for m_initData.
3941         * Modules/encryptedmedia/MediaKeyNeededEvent.idl: Copied from Source/WebCore/html/MediaKeyEvent.idl.
3942
3943         MediaKeySession is a new class that maps keys and key requests to a given session ID:
3944         * Modules/encryptedmedia/MediaKeySession.cpp: Added.
3945         (WebCore::MediaKeySession::create): Simple construction wrapper.
3946         (WebCore::MediaKeySession::MediaKeySession): Simple constructor.
3947         (WebCore::MediaKeySession::~MediaKeySession): Simple destructor; calls close().
3948         (WebCore::MediaKeySession::setError): Simple setter for m_error;
3949         (WebCore::MediaKeySession::close): Tell the CDM to clear any saved session keys.
3950         (WebCore::MediaKeySession::generateKeyRequest): Start a one-shot timer, handled in keyRequestTimerFired.
3951         (WebCore::MediaKeySession::keyRequestTimerFired): Follow the steps in the spec; ask the CDM to generate a key request.
3952         (WebCore::MediaKeySession::addKey): Start a one-shot timer, handled in addKeyTimerFired.
3953         (WebCore::MediaKeySession::addKeyTimerFired): Follow the steps in the spec; provide the key data to the CDM.
3954         * Modules/encryptedmedia/MediaKeySession.h: Added.
3955         (WebCore::MediaKeySession::keySystem): Simple accessor for m_keySystem.
3956         (WebCore::MediaKeySession::sessionId): Simple accessor for m_sessionId.
3957         (WebCore::MediaKeySession::error): Simple accessor for m_error;
3958         * Modules/encryptedmedia/MediaKeySession.idl:
3959
3960         MediaKeySession inherits from EventTarget, and must override the pure virtual functions in that class:
3961         * Modules/encryptedmedia/MediaKeySession.cpp: Added.
3962         (WebCore::MediaKeySession::interfaceName):
3963         * Modules/encryptedmedia/MediaKeySession.h: Added.
3964         (WebCore::MediaKeySession::refEventTarget):
3965         (WebCore::MediaKeySession::derefEventTarget):
3966         (WebCore::MediaKeySession::eventTargetData):
3967         (WebCore::MediaKeySession::ensureEventTargetData):
3968         (WebCore::MediaKeySession::scriptExecutionContext):
3969
3970         MediaKeys is a new class that encapsulates a CDM and a number of key sessions:
3971         * Modules/encryptedmedia/MediaKeys.cpp: Added.
3972         (WebCore::MediaKeys::create): Throw an exception if the key system parameter is unsupported; create a CDM object
3973             and a new MediaKeys session.
3974         (WebCore::MediaKeys::MediaKeys): Simple constructor.
3975         (WebCore::MediaKeys::~MediaKeys): Simple destructor.
3976         (WebCore::MediaKeys::createSession): Follow the spec and create a new key session.
3977         * Modules/encryptedmedia/MediaKeys.h: Added.
3978         * Modules/encryptedmedia/MediaKeys.idl: Copied from Source/WebCore/html/MediaError.idl.
3979
3980         Provide a new interface to HTMLMediaElement for MediaPlayer which does not require a sessionId or a key system:
3981         * html/HTMLMediaElement.cpp:
3982         (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
3983         * platform/graphics/MediaPlayer.cpp:
3984         (WebCore::MediaPlayer::keyNeeded):
3985
3986         MediaKeyError now has a systemCode parameter and member variable.
3987         * html/MediaKeyError.h:
3988         (WebCore::MediaKeyError::create): Take a systemCode parameter with a default (0) value.
3989         (WebCore::MediaKeyError::MediaKeyError): Ditto.
3990         (WebCore::MediaKeyError::systemCode): Simple accessor for m_systemCode.
3991         * html/MediaKeyError.idl:
3992
3993         Add new methods to HTMLMediaElement to support MediaKeys. Support different initializer
3994         for the MediaKeyNeededEvent.
3995         * html/HTMLMediaElement.cpp:
3996         (WebCore::HTMLMediaElement::setMediaKeys): Simple setter for m_mediaKeys.
3997         (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded): This version takes fewer parameters
3998             than the deprecated version.