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