Web Inspector: Native Memory Instrumentation: fix instrumentation for already instrum...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-01-10  Ilya Tikhonovsky  <loislo@chromium.org>
2
3         Web Inspector: Native Memory Instrumentation: fix instrumentation for already instrumented classes 2/N
4         https://bugs.webkit.org/show_bug.cgi?id=106546
5
6         Reviewed by Vsevolod Vlasov.
7
8         Many nontrivial class members were added into reportMemoryUsage methods.
9
10         * bindings/v8/V8PerIsolateData.cpp:
11         (WebCore::V8PerIsolateData::reportMemoryUsage):
12         * css/CSSMediaRule.cpp:
13         (WebCore::CSSMediaRule::reportMemoryUsage):
14         * css/CSSProperty.cpp:
15         (WebCore::CSSProperty::reportMemoryUsage):
16         * css/CSSStyleSheet.cpp:
17         (WebCore::CSSStyleSheet::reportMemoryUsage):
18         * css/MediaList.cpp:
19         (WebCore::MediaList::reportMemoryUsage):
20         * css/RuleSet.cpp:
21         (WebCore::RuleData::reportMemoryUsage):
22         (WebCore::RuleSet::reportMemoryUsage):
23         (WebCore::RuleSet::RuleSetSelectorPair::reportMemoryUsage):
24         * css/StyleResolver.cpp:
25         (WebCore::StyleResolver::MatchedPropertiesCacheItem::reportMemoryUsage):
26         (WebCore::StyleResolver::reportMemoryUsage):
27         * css/StyleSheetContents.cpp:
28         (WebCore::StyleSheetContents::reportMemoryUsage):
29         * dom/TreeScope.cpp:
30         (WebCore::TreeScope::reportMemoryUsage):
31         * inspector/HeapGraphSerializer.cpp:
32         (WebCore::HeapGraphSerializer::reportMemoryUsage):
33         * inspector/InspectorMemoryAgent.cpp:
34         * inspector/InspectorProfilerAgent.cpp:
35         (WebCore::InspectorProfilerAgent::reportMemoryUsage):
36         * inspector/MemoryInstrumentationImpl.cpp:
37         (WebCore::MemoryInstrumentationClientImpl::reportMemoryUsage):
38         * loader/DocumentLoader.cpp:
39         (WebCore::DocumentLoader::reportMemoryUsage):
40         * loader/FrameLoader.cpp:
41         (WebCore::FrameLoader::reportMemoryUsage):
42         * loader/MainResourceLoader.cpp:
43         (WebCore::MainResourceLoader::reportMemoryUsage):
44         * loader/Prerenderer.cpp:
45         (WebCore::Prerenderer::reportMemoryUsage):
46         * loader/ResourceLoader.cpp:
47         (WebCore::ResourceLoader::reportMemoryUsage):
48         * loader/cache/CachedImage.cpp:
49         (WebCore::CachedImage::reportMemoryUsage):
50         * page/Page.cpp:
51         (WebCore::Page::reportMemoryUsage):
52
53 2013-01-13  Levi Weintraub  <leviw@chromium.org>
54
55         Unreviewed gardening. Rolling out r139537. It broke platforms without sub-pixel layout.
56
57         * dom/Element.cpp:
58         (WebCore::Element::offsetWidth):
59         (WebCore::Element::offsetHeight):
60         (WebCore::Element::clientWidth):
61         (WebCore::Element::clientHeight):
62         * rendering/RenderObject.h:
63         (WebCore::adjustLayoutUnitForAbsoluteZoom):
64         * rendering/style/RenderStyle.h:
65         (WebCore::adjustLayoutUnitForAbsoluteZoom):
66
67 2013-01-13  Dima Gorbik  <dgorbik@apple.com>
68
69         Styling disappears from the cue that's being styled by ::cue pseudo element
70         https://bugs.webkit.org/show_bug.cgi?id=106723
71
72         Reviewed by Antti Koivisto.
73
74         Fixes a regression caused by r138966. Setting a pseudoId in TextTrackCue::updateDisplayTree for m_allDocumentNodes
75         was triggering recalculating styles the next run loop. Now when this was removed we append the WebVTT tree after its children have
76         been marked by markFutureAndPastNodes so that correct styles are set within this append call.
77
78         Test: media/track/track-css-cue-lifetime.html
79
80         * html/track/TextTrackCue.cpp:
81         (WebCore::TextTrackCue::markFutureAndPastNodes): changing the type of the first argument because DocumentFragment is not a subclass
82         of Element.
83         (WebCore::TextTrackCue::updateDisplayTree): appending the WebVTT rendering tree after its children have been marked properly.
84         * html/track/TextTrackCue.h:
85         (TextTrackCue):
86
87 2013-01-12  David Grogan  <dgrogan@chromium.org>
88
89         IndexedDB: Provide LevelDB with IDBEnv instead of Env::Default
90         https://bugs.webkit.org/show_bug.cgi?id=106135
91
92         Reviewed by Tony Chang.
93
94         IDBEnv only changes the name of the histogram where errors are logged.
95
96         * platform/leveldb/LevelDBDatabase.cpp:
97         (WebCore::LevelDBDatabase::destroy):
98         (WebCore::LevelDBDatabase::open):
99         (WebCore::LevelDBDatabase::openInMemory):
100
101 2013-01-12  Gavin Peters  <gavinp@chromium.org>
102
103         Regression(r119759): Heap-use-after-free in webkit_glue::WebURLLoaderImpl::Context::OnReceivedResponse
104         https://bugs.webkit.org/show_bug.cgi?id=103563
105
106         A subresource could receive a body on a 404 if its call to CachedResource::error() resulted in a nested message loop.
107         That caused a crash when data was received, as the Subresource was in the Finished state already. Now when receiving
108         data we ignore these bodies, avoiding the crash.
109
110         Reviewed by Nate Chapin.
111
112         No new tests in WebKit, since it required a nested message loop which isn't present in chromium DumpRender tree.
113         There's a Chrome side browser test, see https://codereview.chromium.org/11778083/
114
115         * loader/SubresourceLoader.cpp:
116         (WebCore::SubresourceLoader::checkForHTTPStatusCodeError):
117
118 2013-01-12  Robert Hogan  <robert@webkit.org>
119
120         Available height should respect min and max height
121         https://bugs.webkit.org/show_bug.cgi?id=106479
122
123         Reviewed by Ojan Vafai.
124         
125         When calculating a relative positioned block's offset as a percentage of its container, respect the min
126         and max height set on the container
127
128         Tests: fast/block/percent-top-respects-max-height.html
129                fast/block/percent-top-respects-min-height.html
130
131         * rendering/RenderBox.cpp:
132         (WebCore::RenderBox::availableLogicalHeight):
133
134 2013-01-12  Victor Carbune  <victor@rosedu.org>
135
136         CC Button doesn't always show up
137         https://bugs.webkit.org/show_bug.cgi?id=106653
138
139         Reviewed by Eric Carlson.
140
141         Added extra checks to existing test.
142
143         * html/shadow/MediaControls.cpp:
144         (WebCore::MediaControls::closedCaptionTracksChanged):
145         Enforced visibility of captions button whenever the track list changes.
146         (WebCore):
147         * html/shadow/MediaControls.h:
148         (MediaControls):
149
150 2013-01-11  Dan Beam  <dbeam@chromium.org>
151
152         [clean up] Remove HTMLFormElement::AutocompleteResultError in favor of more specific Error reasons
153         https://bugs.webkit.org/show_bug.cgi?id=106610
154
155         Reviewed by Darin Fisher.
156
157         No new tests (none needed).
158
159         * html/HTMLFormElement.cpp: 
160         (WebCore::HTMLFormElement::finishRequestAutocomplete): Removed handling of AutocompleteResultError.
161         * html/HTMLFormElement.h: Removed HTMLFormElement::AutocompleteResultError in favor of more specific errors.
162
163 2013-01-10  Filip Pizlo  <fpizlo@apple.com>
164
165         JITThunks should not compile only because of luck
166         https://bugs.webkit.org/show_bug.cgi?id=105696
167
168         Rubber stamped by Sam Weinig.
169
170         All .cpp files that use the JSC internal API must now transitively include
171         Operations.h, and none of the major JSC headers do it for you to avoid
172         circularity. WebCore doesn't have to worry about circularity with JSC, so
173         this changes all of the major WebCore JSC base headers to include
174         Operations.h.
175
176         * bindings/js/BindingState.h:
177         * bindings/js/JSArrayBufferViewHelper.h:
178         * bindings/js/JSCustomXPathNSResolver.h:
179         * bindings/js/JSDOMBinding.h:
180         * bindings/js/JSDOMGlobalObject.h:
181         * bindings/js/JSDictionary.h:
182         * bindings/js/JSMessagePortCustom.h:
183         * bindings/js/JSNodeFilterCondition.h:
184         * bindings/js/ScriptValue.h:
185         * bindings/js/ScriptWrappable.h:
186         * bindings/js/SerializedScriptValue.cpp:
187         * bridge/c/c_utility.h:
188         * bridge/jsc/BridgeJSC.h:
189         * dom/Node.cpp:
190         * html/HTMLCanvasElement.cpp:
191         * html/HTMLImageLoader.cpp:
192         * plugins/efl/PluginViewEfl.cpp:
193         * xml/XMLHttpRequest.cpp:
194
195 2013-01-11  Emil A Eklund  <eae@chromium.org>
196
197         offsetWidth/height incorrect for images when zoomed
198         https://bugs.webkit.org/show_bug.cgi?id=106624
199
200         Reviewed by Levi Weintraub.
201         
202         offsetWidth and height are incorrect for images at certain zoom
203         levels due to flooring the values ones adjusted for zoom.
204         By rounding the value instead we avoid the problem and return
205         the right size.
206
207         Test: fast/images/zoomed-offset-size.html
208
209         * dom/Element.cpp:
210         (WebCore::Element::offsetWidth):
211         (WebCore::Element::offsetHeight):
212         (WebCore::Element::clientWidth):
213         (WebCore::Element::clientHeight):
214         Change to round (as opposed to floor) the zoom adjusted value.
215         
216         * rendering/RenderObject.h:
217         (WebCore::adjustLayoutUnitForAbsoluteZoom):
218         * rendering/style/RenderStyle.h:
219         (WebCore::adjustLayoutUnitForAbsoluteZoom):
220         Add LayoutUnit version of adjustForAbsoluteZoom to avoid float
221         conversion.
222
223 2013-01-11  Ojan Vafai  <ojan@chromium.org>
224
225         Fixed width overrides intrinsic min-width/max-width for text inputs and listboxes
226         https://bugs.webkit.org/show_bug.cgi?id=106675
227
228         Reviewed by Emil A Eklund.
229
230         Implement computeIntrinsicLogicalWidths so that RenderBox::computeLogicalWidthInRegionUsing
231         can get the correct intrinsic sizes instead of the preferred sizes.
232
233         Test: fast/forms/select/listbox-intrinsic-min-width-applies-with-fixed-width.html
234
235         * rendering/RenderListBox.cpp:
236         (WebCore::RenderListBox::computeIntrinsicLogicalWidths):
237         (WebCore):
238         (WebCore::RenderListBox::computePreferredLogicalWidths):
239         * rendering/RenderListBox.h:
240         (RenderListBox):
241         * rendering/RenderTextControl.cpp:
242         (WebCore::RenderTextControl::computeIntrinsicLogicalWidths):
243         (WebCore):
244         (WebCore::RenderTextControl::computePreferredLogicalWidths):
245         * rendering/RenderTextControl.h:
246         (RenderTextControl):
247
248 2013-01-10  Ojan Vafai  <ojan@chromium.org>
249
250         Setting width overrides intrinsic min-width/max-width on flexboxes and their subclasses
251         https://bugs.webkit.org/show_bug.cgi?id=106617
252
253         Reviewed by Tony Chang.
254
255         Override computeIntrinsicLogicalWidths for all RenderFlexibleBox and RenderDeprecatedFlexibleBox
256         classes that override computePreferredLogicalWidths so that RenderBox can use
257         computeIntrinsicLogicalWidths in order to get the correct intrinsic values.
258
259         Tests: css3/flexbox/intrinsic-min-width-applies-with-fixed-width.html
260                fast/flexbox/intrinsic-min-width-applies-with-fixed-width.html
261                fast/forms/select/intrinsic-min-width-applies-with-fixed-width.html
262
263         * rendering/RenderBox.cpp:
264         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
265         fit-content needs to use the intrinsic sizes not the preferred sizes
266         since a fixed width overrides the preferred size.
267         As best I can tell, the sizesLogicalWidthToFitContent codepath can keep
268         using preferred widths, which are considerably faster, since that's only used
269         computing width values. Added a clause to that if-statement to make this more
270         explicit.
271
272         * rendering/RenderDeprecatedFlexibleBox.cpp:
273         (WebCore::RenderDeprecatedFlexibleBox::computeIntrinsicLogicalWidths):
274         (WebCore::RenderDeprecatedFlexibleBox::computePreferredLogicalWidths):
275         * rendering/RenderDeprecatedFlexibleBox.h:
276         (RenderDeprecatedFlexibleBox):
277         * rendering/RenderFlexibleBox.cpp:
278         (WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths):
279         (WebCore):
280         (WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
281         * rendering/RenderFlexibleBox.h:
282         * rendering/RenderMenuList.cpp:
283         (WebCore::RenderMenuList::computeIntrinsicLogicalWidths):
284         (WebCore):
285         (WebCore::RenderMenuList::computePreferredLogicalWidths):
286         * rendering/RenderMenuList.h:
287         (RenderMenuList):
288         * rendering/RenderSlider.cpp:
289         (WebCore::RenderSlider::computeIntrinsicLogicalWidths):
290         (WebCore):
291         (WebCore::RenderSlider::computePreferredLogicalWidths):
292         * rendering/RenderSlider.h:
293         (RenderSlider):
294         No logic changes in any of these computeIntrinsic methods. Just moving
295         the code over from the computePreferred methods.
296
297 2013-01-11  Tony Gentilcore  <tonyg@chromium.org>
298
299         Move HTMLTokenTypes to its own file
300         https://bugs.webkit.org/show_bug.cgi?id=106722
301
302         Reviewed by Levi Weintraub.
303
304         Also mark AtomicHTMLToken ctor as explicit.
305
306         No new tests because no new functionality.
307
308         * GNUmakefile.list.am:
309         * Target.pri:
310         * WebCore.gypi:
311         * WebCore.vcproj/WebCore.vcproj:
312         * WebCore.xcodeproj/project.pbxproj:
313         * html/parser/HTMLToken.h:
314         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
315         * html/parser/HTMLTokenTypes.h: Added.
316         (WebCore):
317         (HTMLTokenTypes):
318         (DoctypeData):
319         (WebCore::HTMLTokenTypes::DoctypeData::DoctypeData):
320
321 2013-01-11  Elliott Sprehn  <esprehn@chromium.org>
322
323         No need to initialize RefPtrs to 0 in ElementRareData
324         https://bugs.webkit.org/show_bug.cgi?id=106717
325
326         Reviewed by Ryosuke Niwa.
327
328         RefPtrs initialize themself to null, so there's no reason
329         to do it manually. This was code leftover from when
330         PseudoElements were stored in bare ptrs instead of in
331         RefPtrs.
332
333         No new tests, just refactoring.
334
335         * dom/ElementRareData.h:
336         (WebCore::ElementRareData::ElementRareData):
337
338 2013-01-11  Huang Dongsung  <luxtella@company100.net>
339
340         [TexMap] Rename current[Transform|Opacity|Filters] in TextureMapperLayer.
341         https://bugs.webkit.org/show_bug.cgi?id=105760
342
343         Reviewed by Noam Rosenthal.
344
345         TextureMapperLayer has two transform members: an original value and a
346         changeable value. The changeable value would be changed by animations.
347         This patch puts 'current' prefix on the changeable value to clarify
348         its purpose. Opacity and filters ditto.
349
350         No new tests. Refactoring only.
351
352         * platform/graphics/texmap/TextureMapperLayer.cpp:
353         (WebCore::TextureMapperLayer::computeTransformsRecursive):
354         (WebCore::TextureMapperLayer::paintSelf):
355         (WebCore::TextureMapperLayer::paintSelfAndChildren):
356         (WebCore::TextureMapperLayer::intermediateSurfaceRect):
357         (WebCore::TextureMapperLayer::shouldPaintToIntermediateSurface):
358         (WebCore::TextureMapperLayer::isVisible):
359         (WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica):
360         (WebCore::TextureMapperLayer::paintRecursive):
361         (WebCore::TextureMapperLayer::flushCompositingStateForThisLayerOnly):
362         (WebCore::TextureMapperLayer::syncAnimations):
363         (WebCore::TextureMapperLayer::setScrollPositionDeltaIfNeeded):
364         * platform/graphics/texmap/TextureMapperLayer.h:
365         (WebCore::TextureMapperLayer::TextureMapperLayer):
366         (TextureMapperLayer):
367         (WebCore::TextureMapperLayer::State::State):
368
369 2013-01-11  Tony Gentilcore  <tonyg@chromium.org>
370
371         Move constructTreeFromHTMLToken into HTMLDocumentParser
372         https://bugs.webkit.org/show_bug.cgi?id=106694
373
374         Reviewed by Adam Barth.
375
376         This way it will sit parallel to a new constructTreeFromCompactHTMLToken method.
377
378         No new tests because no new functionality.
379
380         * html/parser/HTMLDocumentParser.cpp:
381         (WebCore::HTMLDocumentParser::pumpTokenizer):
382         (WebCore::HTMLDocumentParser::constructTreeFromHTMLToken):
383         (WebCore):
384         * html/parser/HTMLDocumentParser.h:
385         * html/parser/HTMLTreeBuilder.cpp:
386         * html/parser/HTMLTreeBuilder.h:
387         (HTMLTreeBuilder):
388
389 2013-01-11  Robert Iannucci  <iannucci@chromium.org>
390
391         Explicitly set msvs_cygwin_shell to true for actions in WebKit
392         https://bugs.webkit.org/show_bug.cgi?id=106706
393
394         Reviewed by Tony Chang.
395
396         Currently, msvs_cygwin_shell is set to 1 by default. This patch
397         explicitly sets it on the actions which will break if msvs_cygwin_shell
398         were set to 0. This is in preparation for changing the default value of
399         msvs_cygwin_shell, which in turn is in preparation of the removal of
400         cygwin as a buld-system requirement.
401
402         Since this change will have no semantic effect, no new tests are
403         required.
404
405         * WebCore.gyp/WebCore.gyp:
406
407 2013-01-11  Joshua Bell  <jsbell@chromium.org>
408
409         IndexedDB: IDBTransaction should manage lifetime of IDBRequests
410         https://bugs.webkit.org/show_bug.cgi?id=106678
411
412         Reviewed by Tony Chang.
413
414         Ensure reference count of IDBRequests don't bounce off zero if there are no script
415         references are while the events are arriving.
416
417         No new tests - no detectable behavior changes.
418
419         * Modules/indexeddb/IDBRequest.cpp:
420         (WebCore::IDBRequest::create): Register with transaction (which now takes a ref) here to...
421         (WebCore::IDBRequest::IDBRequest): ...avoid having to relax adoption requirements here.
422         * Modules/indexeddb/IDBTransaction.cpp: Keep RefPtr<>s to outstanding requests.
423         (WebCore::IDBTransaction::~IDBTransaction):
424         (WebCore::IDBTransaction::abort):
425         (WebCore::IDBTransaction::onAbort):
426         * Modules/indexeddb/IDBTransaction.h:
427
428 2013-01-11  James Simonsen  <simonjam@chromium.org>
429
430         [Resource Timing] XMLHttpRequests should have initiator type 'xmlhttprequest'
431         https://bugs.webkit.org/show_bug.cgi?id=106409
432
433         Reviewed by Nate Chapin.
434
435         The initiator is passed through ThreadableLoaderOptions to the CachedResourceRequest. This is
436         optional, so other users of ThreadableLoader will have the default initiator of 'request'. Note
437         that synchronous XHRs don't show up in the Resource Timing buffer yet.
438
439         Test: http/tests/w3c/webperf/submission/resource-timing/html/test_resource_initiator_types.html
440
441         * loader/DocumentThreadableLoader.cpp:
442         (WebCore::DocumentThreadableLoader::loadRequest):
443         * loader/ThreadableLoader.h:
444         (ThreadableLoaderOptions):
445         * loader/cache/CachedResourceRequestInitiators.cpp:
446         (WebCore::CachedResourceRequestInitiators::CachedResourceRequestInitiators):
447         * loader/cache/CachedResourceRequestInitiators.h:
448         (CachedResourceRequestInitiators):
449         * xml/XMLHttpRequest.cpp:
450         (WebCore::XMLHttpRequest::createRequest):
451
452 2013-01-11  James Simonsen  <simonjam@chromium.org>
453
454         Restore old semantics to webkitRequestAnimationFrame callbacks
455         https://bugs.webkit.org/show_bug.cgi?id=106697
456
457         Reviewed by James Robinson.
458
459         Sites that use GWT <= 2.4 are buggy and rely on Date.now()-like callback values.
460         We'll restore that behavior to the prefixed version of webkitRequestAnimationFrame.
461         requestAnimationFrame will continue to follow the spec.
462
463         Test: fast/animation/request-animation-frame-prefix.html
464
465         * dom/RequestAnimationFrameCallback.h:
466         (RequestAnimationFrameCallback):
467         * dom/ScriptedAnimationController.cpp:
468         (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
469         * page/DOMWindow.cpp:
470         (WebCore::DOMWindow::requestAnimationFrame):
471         (WebCore):
472         (WebCore::DOMWindow::webkitRequestAnimationFrame):
473         * page/DOMWindow.h:
474         (DOMWindow):
475         * page/DOMWindow.idl:
476
477 2013-01-11  Sheriff Bot  <webkit.review.bot@gmail.com>
478
479         Unreviewed, rolling out r139044.
480         http://trac.webkit.org/changeset/139044
481         https://bugs.webkit.org/show_bug.cgi?id=106702
482
483         Caused various scrolling anomolies on Mac with drag and drop
484         (Requested by smfr on #webkit).
485
486         * page/AutoscrollController.cpp:
487         (WebCore::AutoscrollController::AutoscrollController):
488         (WebCore::AutoscrollController::autoscrollTimerFired):
489         * page/AutoscrollController.h:
490         (WebCore):
491         (AutoscrollController):
492         * page/EventHandler.cpp:
493         (WebCore::EventHandler::updateDragAndDrop):
494         * rendering/RenderBox.cpp:
495         (WebCore):
496         (WebCore::RenderBox::autoscroll):
497         * rendering/RenderBox.h:
498         (RenderBox):
499         * rendering/RenderLayer.cpp:
500         (WebCore::RenderLayer::autoscroll):
501         * rendering/RenderLayer.h:
502         (RenderLayer):
503         * rendering/RenderListBox.cpp:
504         (WebCore::RenderListBox::autoscroll):
505         * rendering/RenderListBox.h:
506         (RenderListBox):
507         * rendering/RenderTextControlSingleLine.cpp:
508         (WebCore::RenderTextControlSingleLine::autoscroll):
509         * rendering/RenderTextControlSingleLine.h:
510         (RenderTextControlSingleLine):
511
512 2013-01-11  Rafael Weinstein  <rafaelw@chromium.org>
513
514         Prevent HTMLPreloadScanner from fetching resources inside <template>
515         https://bugs.webkit.org/show_bug.cgi?id=106687
516
517         Reviewed by Adam Barth.
518
519         This patch adds a simple counter to the preload scanner which increments on template start
520         tag and decrements on template element. It only fetchs resources when the counter is at zero
521         (i.e. for elements not contained by a template element).
522
523         Test re-enabled within fast/dom/HTMLTemplateElement/inertContents.html
524
525         * html/parser/HTMLPreloadScanner.cpp:
526         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
527         (WebCore::HTMLPreloadScanner::processToken):
528         * html/parser/HTMLPreloadScanner.h:
529         (HTMLPreloadScanner):
530
531 2013-01-11  Tony Gentilcore  <tonyg@chromium.org>
532
533         We should be able to checkpoint and restore the HTMLTokenizer across threads
534         https://bugs.webkit.org/show_bug.cgi?id=106597
535
536         Based on patch by Adam Barth.
537
538         This has the ability to create a checkpoint any time the parser is blocked on a script.
539         We clear m_appropriateEndTagName after each end tag is flushed so that the ASSERT in
540         canCreateCheckpoint() will pass.
541
542         Reviewed by Adam Barth.
543
544         No new tests because no new functionality.
545
546         * html/parser/HTMLDocumentParser.cpp:
547         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
548         (WebCore::HTMLDocumentParser::pumpTokenizer):
549         * html/parser/HTMLDocumentParser.h:
550         (WebCore):
551         (HTMLDocumentParser):
552         * html/parser/HTMLTokenizer.cpp:
553         (WebCore):
554         (WebCore::HTMLTokenizer::canCreateCheckpoint):
555         (WebCore::HTMLTokenizer::createCheckpoint):
556         (WebCore::HTMLTokenizer::restoreFromCheckpoint):
557         * html/parser/HTMLTokenizer.h:
558         (HTMLTokenizer):
559         (Checkpoint):
560         (WebCore::HTMLTokenizer::Checkpoint::Checkpoint):
561         * xml/parser/MarkupTokenizerBase.h:
562         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::InputStreamPreprocessor):
563         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::skipNextNewLine):
564         (InputStreamPreprocessor):
565         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::reset):
566
567 2013-01-11  Tony Chang  <tony@chromium.org>
568
569         [chromium] Don't regenerate all bindings when any idl file changes
570         https://bugs.webkit.org/show_bug.cgi?id=106604
571
572         Reviewed by Kentaro Hara.
573
574         Currently, every idl file is a dependency of generating the supplemental dependency map
575         and generating bindings is a dependency of the map. This means that touching any idl file
576         causes us to regenerate all the bindings.
577
578         Change it so that generating bindings only depends on the idl files that have Supplemental= in them.
579         We only have 24 idl files with Supplemental (3.7% of the 638 idl files in WebCore) so modifying
580         any of those will cause all bindings to be regenerated.
581
582         If you add or remove a new idl file, you have to rerun gyp which will fix up any dependencies.
583         If you edit an existing file and add Supplemental= to it, you will now need to rerun gyp_{webkit,chromium}.
584         I think that's a reasonable tradeoff since it seems highly unlikely that you would adding Supplemental=
585         to an existing file without renaming it. The bots will always be fine because they always run
586         gyp after updating.
587
588         No new tests, this is a build only change.
589
590         * WebCore.gyp/WebCore.gyp: Remove <(SHARED_INTERMEDIATE_DIR)/supplemental_dependency.tmp, which was causing
591         the full rebuild. The step to generate this file is still a hard dependency so it will still be generated and
592         used by generate-bindings.pl. Also remove <@(webcore_test_support_idl_files). This was saying we should regenerate
593         all bindings if a test idl file changed. That doesn't make sense.
594         * WebCore.gyp/scripts/supplemental_idl_files.py: Added.
595         (DoMain):
596
597 2013-01-11  Alexandru Chiculita  <achicu@adobe.com>
598
599         Element is displayed behind a composited layer when clipping is used on a previous element
600         https://bugs.webkit.org/show_bug.cgi?id=104981
601
602         Reviewed by Simon Fraser.
603
604         RenderLayerCompositor::computeCompositingRequirements uses the local bounding box of the layers to optimize the number of composited 
605         layers that are created. That's needed in order to make sure that composited layers that are displayed behind non-composited
606         layers are correctly promoting the layers in front to be composited. Otherwise the non-composited layers are rendered
607         in the parent composited layer, displaying behind the other composited layers. That might be wrong as the correct paint order might not be
608         preserved.
609
610         In order to make animations work, there's a flag that will disable that optimization. That's because the animations run in the platform
611         layer and the platform layer doesn't know about the layers that are not promoted to composited layers. When the overlapping of the layers
612         is computed it just uses the start or the stop state, but no intermediate states. For that reason, all the 'top' layers in front of animated 
613         elements will become composited.
614
615         When an animation has a clipping rectangle, then we know for sure that the animation is going to be contained inside the clip area, so WebKit 
616         uses the bounding box of the clipping area to detect the overlapping layers, so there's no need to disable the optimization in that case.
617
618         However, if there is a different animation displaying behind the clipping container, we cannot safely disable that optimization anymore. That's
619         because we still don't know what are the intermediate states of that particular animated layer. The bug was that the optimization was re-enabled
620         anyway, even in this particular case.
621
622         In order to fix it, I changed the logic, so that instead of re-enabling the optimization after a clipping container, it will just avoid to propagate 
623         the internal state to the following layers when there's no need to so.
624
625         Note that 3D transforms behave like animations for now and disable the optimization. Because of that some of the existing tests ended up
626         creating more layers than needed. That's because the tests had an overflow area that recreated the issue that this patch fixes, but with
627         3D transforms instead of animations. 3D transforms will be treated in a separate patch.
628
629         Tests: compositing/layer-creation/overlap-animation-clipping.html
630                compositing/layer-creation/overlap-animation-container.html
631
632         * rendering/RenderLayerCompositor.cpp:
633         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
634
635 2013-01-11  Philip Rogers  <pdr@google.com>
636
637         Skip CachedImage::CreateImage if we don't have image data
638         https://bugs.webkit.org/show_bug.cgi?id=106156
639
640         Reviewed by Nate Chapin.
641
642         This patch skips image creation if we do not have image data. This can occur during
643         cache revalidation when the revalidation request (304 not modified) comes back without
644         any content. In this revalidation case, the http spec requires that a mimetype not be set
645         on the response to prevent a cached resource from having a different mimetype
646         from the revalidated resource. Because revalidation requests do not have a mimetype,
647         CachedImage::CreateImage() will fail on SVG images. This patch prevents
648         CachedImage::CreateImage() from being called during revalidation.
649
650         No new tests as there are no observable changes from this patch.
651
652         * loader/cache/CachedImage.cpp:
653         (WebCore::CachedImage::data):
654
655 2013-01-11  Kentaro Hara  <haraken@chromium.org>
656
657         Unreviewed. Rebaselined run-bindings-tests.
658
659         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
660         (WebCore::TestEventConstructorV8Internal::attr1AttrGetter):
661         (WebCore::TestEventConstructorV8Internal::attr2AttrGetter):
662         * bindings/scripts/test/V8/V8TestException.cpp:
663         (WebCore::TestExceptionV8Internal::nameAttrGetter):
664         * bindings/scripts/test/V8/V8TestInterface.cpp:
665         (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrGetter):
666         (WebCore::TestInterfaceV8Internal::supplementalStr1AttrGetter):
667         (WebCore::TestInterfaceV8Internal::supplementalStr2AttrGetter):
668         * bindings/scripts/test/V8/V8TestObj.cpp:
669         (WebCore::TestObjV8Internal::readOnlyStringAttrAttrGetter):
670         (WebCore::TestObjV8Internal::staticStringAttrAttrGetter):
671         (WebCore::TestObjV8Internal::stringAttrAttrGetter):
672         (WebCore::TestObjV8Internal::reflectedStringAttrAttrGetter):
673         (WebCore::TestObjV8Internal::reflectedURLAttrAttrGetter):
674         (WebCore::TestObjV8Internal::reflectedCustomURLAttrAttrGetter):
675         (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrGetter):
676         (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrGetter):
677         (WebCore::TestObjV8Internal::hashAttrGetter):
678         (WebCore::TestObjV8Internal::conditionalMethod1Callback):
679
680 2013-01-11  Levi Weintraub  <leviw@chromium.org>
681
682         RenderGeometryMap and TransformState disagree with sub-pixel layout and translations
683         https://bugs.webkit.org/show_bug.cgi?id=106047
684
685         Reviewed by Simon Fraser.
686
687         Mirror RenderGeometryMap's optimization for integer-translated transforms in TransformState.
688         This avoids the current behavior where the two can disagree on mappings, since RenderGeometryMap
689         pixel-snapped later when a translation occurred between two sub-pixel containers.
690
691         Test: fast/layers/geometry-map-transform-state-translation-mismatch.html
692
693         * platform/graphics/transforms/TransformState.h:
694         (WebCore::TransformState::setQuad): Clear accumulatedOffset when setting a new quad. Note: this
695         implementation only works properly when only tracking a quad.
696         * platform/graphics/transforms/TransformState.cpp:
697         (WebCore::TransformState::applyTransform): apply integral translations to the accumulatedOffset
698         for performance and consistency with RenderGeometryMap.
699
700 2013-01-11  Abhishek Arya  <inferno@chromium.org>
701
702         Heap-use-after-free in WebCore::RenderText::computePreferredLogicalWidths
703         https://bugs.webkit.org/show_bug.cgi?id=95901
704
705         Reviewed by Simon Fraser.
706
707         Prevent re-entrancy of view layout. Loading of SVG document during font load
708         causes it to re-enter layout and blowing the style away from underneath.
709         
710         Test: Go to http://www.speckproducts.com and make sure crash does not happen.
711
712         * dom/Document.cpp:
713         (WebCore::Document::updateLayout):
714
715 2013-01-11  Kentaro Hara  <haraken@chromium.org>
716
717         [V8] Do not create a local handle for a cached v8 string that is returned to V8 immediately
718         https://bugs.webkit.org/show_bug.cgi?id=106557
719
720         Reviewed by Adam Barth.
721
722         Currently we are always creating a local handle for a cached
723         V8 string returned to V8:
724
725           Handle<Value> v8String(StringImpl* impl, Isolate* isolate) {
726             ...;
727             return Local<String>::New(isolate, m_cachedString);
728           }
729
730         However, we don't need to create a local handle in a case
731         where it is guaranteed that no V8 object allocation is conducted
732         before a control flow returns back to V8. In particular, in a case
733         where a cached V8 string is immediately returned to V8, we don't
734         need to create a local handle:
735
736           Handle<Value> xxxxAttrGetter() {
737             ...;
738             return v8String(imp->xxxx(), isolate);  // This can return a persistent handle safely.
739           }
740
741         This patch improves performance of div.id by 9.2%.
742
743         No tests. No change in behavior.
744
745         * bindings/scripts/CodeGeneratorV8.pm:
746         (GenerateNormalAttrGetter):
747         (GenerateCallbackImplementation):
748         (GenerateFunctionCallString):
749         (NativeToJSValue):
750         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
751         (WebCore::TestEventConstructorV8Internal::attr1AttrGetter):
752         (WebCore::TestEventConstructorV8Internal::attr2AttrGetter):
753         * bindings/scripts/test/V8/V8TestException.cpp:
754         (WebCore::TestExceptionV8Internal::nameAttrGetter):
755         * bindings/scripts/test/V8/V8TestInterface.cpp:
756         (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrGetter):
757         (WebCore::TestInterfaceV8Internal::supplementalStr1AttrGetter):
758         (WebCore::TestInterfaceV8Internal::supplementalStr2AttrGetter):
759         * bindings/scripts/test/V8/V8TestObj.cpp:
760         (WebCore::TestObjV8Internal::readOnlyStringAttrAttrGetter):
761         (WebCore::TestObjV8Internal::staticStringAttrAttrGetter):
762         (WebCore::TestObjV8Internal::stringAttrAttrGetter):
763         (WebCore::TestObjV8Internal::reflectedStringAttrAttrGetter):
764         (WebCore::TestObjV8Internal::reflectedURLAttrAttrGetter):
765         (WebCore::TestObjV8Internal::reflectedCustomURLAttrAttrGetter):
766         (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrGetter):
767         (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrGetter):
768         (WebCore::TestObjV8Internal::hashAttrGetter):
769         (WebCore::TestObjV8Internal::conditionalMethod1Callback):
770         * bindings/v8/V8Binding.h:
771         (WebCore::v8String):
772         (WebCore::v8StringOrNull):
773         (WebCore::v8StringOrUndefined):
774         * bindings/v8/V8ValueCache.cpp:
775         (WebCore::StringCache::v8ExternalStringSlow):
776         * bindings/v8/V8ValueCache.h:
777         (WebCore::StringCache::v8ExternalString):
778         (StringCache):
779
780 2013-01-11  Carlos Garcia Campos  <cgarcia@igalia.com>
781
782         Unreviewed. Fix make distcheck.
783
784         * GNUmakefile.list.am: Add missing header files.
785
786 2013-01-11  Xianzhu Wang  <wangxianzhu@chromium.org>
787
788         RenderLayerCompositor should let ScrollingCoordinator update main thread scrolling reasons after change of layers
789         https://bugs.webkit.org/show_bug.cgi?id=105652
790
791         Reviewed by Simon Fraser.
792
793         Let ScrollingCoordinator know the change of ViewportConstrainedNotCompositedReason in time.
794         By the way moved RenderLayerCompositor::FixedPositionLayerNotCompositedReason to RenderLayer::ViewportConstrainedNotCompositedReason.
795
796         Tests: compositing/layer-creation/fixed-position-in-view-dynamic.html
797                compositing/layer-creation/fixed-position-out-of-view-dynamic.html
798
799         * page/scrolling/ScrollingCoordinator.cpp:
800         (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects):
801         (WebCore::ScrollingCoordinator::mainThreadScrollingReasons):
802         (WebCore::ScrollingCoordinator::mainThreadScrollingReasonsAsText):
803         * page/scrolling/ScrollingCoordinator.h:
804         (ScrollingCoordinator):
805         * page/scrolling/mac/ScrollingCoordinatorMac.h:
806         (WebCore::ScrollingCoordinatorMac::hasVisibleSlowRepaintViewportConstrainedObjects):
807         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
808         (WebCore::logThreadedScrollingMode):
809         * rendering/RenderLayer.cpp:
810         (WebCore::RenderLayer::RenderLayer):
811         (WebCore::RenderLayer::paintLayer):
812         * rendering/RenderLayer.h:
813         (RenderLayer): Moved RenderLayerCompositor::FixedPositionLayerNotCompositedReason to here and renamed it to ViewportConstrainedNotCompositedReason.
814         (WebCore::RenderLayer::setViewportConstrainedNotCompositedReason):
815         (WebCore::RenderLayer::viewportConstrainedNotCompositedReason):
816         * rendering/RenderLayerCompositor.cpp:
817         (WebCore::RenderLayerCompositor::updateCompositingLayers):
818         (WebCore::RenderLayerCompositor::updateBacking): Now updates ViewportConstrainedNotCompositedReason here instead of in computeCompositingRequirements before so that the reason is updated in time.
819         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
820         (WebCore::RenderLayerCompositor::needsToBeComposited):
821         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
822         (WebCore::RenderLayerCompositor::reasonForCompositing):
823         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
824         (WebCore::RenderLayerCompositor::reportMemoryUsage):
825         * rendering/RenderLayerCompositor.h:
826         (RenderLayerCompositor):
827
828 2013-01-11  Kenneth Russell  <kbr@google.com>
829
830         [Chromium] WebGL typed array constructor crashes on exception
831         https://bugs.webkit.org/show_bug.cgi?id=106308
832
833         Reviewed by Kentaro Hara.
834
835         Check for empty handles (indicating exception thrown) after calls
836         into V8 VM.
837
838         Added new case from Khronos typed array conformance tests to
839         fast/canvas/webgl/array-unit-tests.html.
840
841         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
842         (WebCore::constructWebGLArray):
843             Check for empty handles after calls into V8 VM.
844
845 2013-01-11  Kentaro Hara  <haraken@chromium.org>
846
847         [V8] Slightly optimize getWrapperFast()
848         https://bugs.webkit.org/show_bug.cgi?id=106667
849
850         Reviewed by Adam Barth.
851
852         This patch improves an if condition in getWrapperFast(),
853         as commented in DOMDataStore.h.
854
855         This patch improves performance of div.firstChild from
856         15.1 ns to 14.0 ns (+7.8%), although I couldn't observe
857         performance improvement in Dromaeo/dom-traverse.
858
859         No tests. No change in behavior.
860
861         * bindings/v8/DOMDataStore.h:
862         (WebCore::DOMDataStore::getWrapperFast):
863
864 2013-01-11  Florin Malita  <fmalita@chromium.org>
865
866         [SVG] Suppress resource rebuilding for unattached and shadow elements
867         https://bugs.webkit.org/show_bug.cgi?id=106664
868
869         Reviewed by Dirk Schulze.
870
871         SVGStyledElement::buildPendingResourcesIfNeeded() can be called while cloning a subtree
872         (as nodes are inserted into the clone, while still detached) or when elements are inserted
873         into the shadow tree. Both of these cases are problematic for SVGUseElement and can trigger
874         indirect recursion in SVGUseElement::buildPendingResource.
875
876         Since shadow and !inDocument() nodes are of no interest to ID dependents (they cannot be
877         found by ID in the document), the patch short-circuits buildPendingResource() for these
878         cases.
879
880         Test: svg/custom/use-rebuild-resources-crash.svg
881
882         * svg/SVGStyledElement.cpp:
883         (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded):
884
885 2013-01-11  Dominic Mazzoni  <dmazzoni@google.com>
886
887         AX: Computed hierarchical level is not consistent with aria-level
888         https://bugs.webkit.org/show_bug.cgi?id=106638
889
890         Reviewed by Chris Fleizach.
891
892         Make hierarchicalLevel computation 1-based to match the aria-level spec.
893
894         Extends an existing test: platform/mac/accessibility/aria-tree.html.
895
896         * accessibility/AccessibilityNodeObject.cpp:
897         (WebCore::AccessibilityNodeObject::hierarchicalLevel):
898         * accessibility/AccessibilityObject.h:
899         (AccessibilityObject):
900         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
901         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
902
903 2013-01-11  Vsevolod Vlasov  <vsevik@chromium.org>
904
905         Web Inspector: Workspace should support several projects and should not have temporary UISourceCodes.
906         https://bugs.webkit.org/show_bug.cgi?id=105856
907
908         Reviewed by Pavel Feldman.
909
910         Workspace now supports several projects with the networkProject being a main one.
911         Replaced temporary UISourceCodes with specific projects (debugger and liveedit).
912         The concept of workspace reset on navigation is now replaced with project reset concept instead.
913         Introduced snippets project (that is not reset on navigation).
914         Script mappings are now reset on GlobalObjectCleared event.
915
916         * inspector/front-end/BreakpointManager.js:
917         (WebInspector.BreakpointManager):
918         (WebInspector.BreakpointManager.prototype._innerSetBreakpoint):
919         (WebInspector.BreakpointManager.prototype._filteredBreakpointLocations):
920         (WebInspector.BreakpointManager.prototype.toggleAllBreakpoints):
921         (WebInspector.BreakpointManager.prototype.removeAllBreakpoints):
922         (WebInspector.BreakpointManager.prototype._projectWillReset.get for):
923         (WebInspector.BreakpointManager.prototype._projectWillReset):
924         * inspector/front-end/CSSStyleModel.js:
925         (WebInspector.CSSStyleModel):
926         (WebInspector.CSSStyleModel.prototype._inspectedURLChanged):
927         (WebInspector.CSSStyleModel.prototype._resetSourceMappings):
928         (WebInspector.CSSStyleModelResourceBinding):
929         (WebInspector.CSSStyleModelResourceBinding.prototype._viaInspectorResourceURL):
930         (WebInspector.CSSStyleModelResourceBinding.prototype._reset):
931         * inspector/front-end/CompilerScriptMapping.js:
932         (WebInspector.CompilerScriptMapping):
933         (WebInspector.CompilerScriptMapping.prototype._debuggerReset):
934         * inspector/front-end/DebuggerScriptMapping.js:
935         * inspector/front-end/DefaultScriptMapping.js:
936         (WebInspector.DefaultScriptMapping):
937         (WebInspector.DefaultScriptMapping.prototype.addScript):
938         (WebInspector.DefaultScriptMapping.prototype._debuggerReset):
939         * inspector/front-end/ExtensionServer.js:
940         (WebInspector.ExtensionServer.prototype._onGetPageResources):
941         * inspector/front-end/FilteredItemSelectionDialog.js:
942         (WebInspector.OpenResourceDialog.show):
943         * inspector/front-end/LiveEditSupport.js:
944         (WebInspector.LiveEditSupport):
945         (WebInspector.LiveEditSupport.prototype.uiSourceCodeForLiveEdit):
946         (WebInspector.LiveEditSupport.prototype._debuggerReset):
947         * inspector/front-end/NetworkUISourceCodeProvider.js:
948         (WebInspector.NetworkUISourceCodeProvider):
949         (WebInspector.NetworkUISourceCodeProvider.prototype._mainFrameNavigated):
950         (WebInspector.NetworkUISourceCodeProvider.prototype._addFile):
951         (WebInspector.NetworkUISourceCodeProvider.prototype._reset):
952         * inspector/front-end/ResourceScriptMapping.js:
953         (WebInspector.ResourceScriptMapping):
954         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeAddedToWorkspace):
955         (WebInspector.ResourceScriptMapping.prototype._debuggerReset):
956         * inspector/front-end/RevisionHistoryView.js:
957         (WebInspector.RevisionHistoryView):
958         (WebInspector.RevisionHistoryView.prototype._projectWillReset):
959         * inspector/front-end/SASSSourceMapping.js:
960         (_bindUISourceCode):
961         * inspector/front-end/ScriptSnippetModel.js:
962         (WebInspector.ScriptSnippetModel):
963         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
964         (WebInspector.ScriptSnippetModel.prototype.reset):
965         * inspector/front-end/ScriptsNavigator.js:
966         * inspector/front-end/ScriptsPanel.js:
967         (WebInspector.ScriptsPanel):
968         (WebInspector.ScriptsPanel.prototype._addUISourceCode):
969         (WebInspector.ScriptsPanel.prototype._uiSourceCodeRemoved):
970         (WebInspector.ScriptsPanel.prototype._removeUISourceCodes):
971         (WebInspector.ScriptsPanel.prototype._debuggerWasDisabled):
972         (WebInspector.ScriptsPanel.prototype._debuggerReset):
973         (WebInspector.ScriptsPanel.prototype._projectWillReset):
974         (WebInspector.ScriptsPanel.prototype.canShowAnchorLocation):
975         (WebInspector.ScriptsPanel.prototype._revealExecutionLine):
976         (WebInspector.ScriptsPanel.prototype.showGoToSourceDialog):
977         * inspector/front-end/SimpleWorkspaceProvider.js:
978         (WebInspector.SimpleWorkspaceProvider):
979         (WebInspector.SimpleWorkspaceProvider.prototype.addFile):
980         (WebInspector.SimpleWorkspaceProvider.prototype.addFileForURL):
981         (WebInspector.SimpleWorkspaceProvider.prototype.reset):
982         * inspector/front-end/StylesSourceMapping.js:
983         (WebInspector.StylesSourceMapping):
984         (WebInspector.StylesSourceMapping.prototype._projectWillReset):
985         * inspector/front-end/TabbedEditorContainer.js:
986         (WebInspector.TabbedEditorContainer.prototype.reset):
987         * inspector/front-end/UISourceCode.js:
988         (WebInspector.UISourceCode.prototype.project):
989         * inspector/front-end/Workspace.js:
990         (WebInspector.WorkspaceController):
991         (WebInspector.WorkspaceController.prototype._inspectedURLChanged):
992         (WebInspector.Project):
993         (WebInspector.Project.prototype.name):
994         (WebInspector.Project.prototype.isServiceProject):
995         (WebInspector.Project.prototype._reset):
996         (WebInspector.Workspace):
997         (WebInspector.Workspace.prototype.uiSourceCodeForURL):
998         (WebInspector.Workspace.prototype.uiSourceCodeForURI):
999         (WebInspector.Workspace.prototype.addProject):
1000         (WebInspector.Workspace.prototype.project):
1001         (WebInspector.Workspace.prototype.projects):
1002         (WebInspector.Workspace.prototype.uiSourceCodes):
1003         (WebInspector.Workspace.prototype.projectForUISourceCode):
1004         (WebInspector.Workspace.prototype.requestFileContent):
1005         (WebInspector.Workspace.prototype.setFileContent):
1006         (WebInspector.Workspace.prototype.searchInFileContent):
1007         * inspector/front-end/inspector.js:
1008         * inspector/front-end/utilities.js:
1009
1010 2013-01-11  Eugene Klyuchnikov  <eustas@chromium.org>
1011
1012         Web Inspector: [Resources] Make grid columns set configurable.
1013         https://bugs.webkit.org/show_bug.cgi?id=105739
1014
1015         Reviewed by Pavel Feldman.
1016
1017         Added context menu on grid header to hide/show grid columns.
1018         Hidden columns set is persisted.
1019
1020         * inspector/front-end/DataGrid.js:
1021         Fixed show/hide behavior, introduced weight control.
1022         * inspector/front-end/NetworkPanel.js:
1023         Added member to track visibility of columns in detailerd mode. Added
1024         context menu for grid header.
1025
1026 2013-01-11  Andras Becsi  <andras.becsi@digia.com>
1027
1028         [Qt] Fix the build if libxslt is not available but libxml2 is
1029         https://bugs.webkit.org/show_bug.cgi?id=106661
1030
1031         Reviewed by Simon Hausmann.
1032
1033         On Linux building the xml parser sources fails if the needed libxslt
1034         dependencies are not installed but libxml2 is.
1035
1036         * WebCore.pri: add libxml2 to pkg-config if not on mac.
1037
1038 2013-01-11  Stephen Chenney  <schenney@chromium.org>
1039         Objects can be re-added to the AXObjectCache during removal
1040         https://bugs.webkit.org/show_bug.cgi?id=104171
1041
1042         The problem occurs when a label's corresponding element is a sibling
1043         that precedes it in the render tree, and the corresponding element is
1044         removed. The corresponding element's AX render object is removed, but
1045         then recreated when accessibilityIsIgnored() invokes correspondingControl()
1046         on the label. The corresponding renderer then has an AX render object
1047         that survives beyond the deleted renderer, leading to invalid memory
1048         accesses.
1049
1050         The solution is to rearrange the calls to delete the renderer's AX
1051         render object only when we are sure it will no longer be required.
1052
1053         Reviewed by Simon Fraser.
1054
1055         Test: accessibility/corresponding-control-deleted-crash.html
1056
1057         * rendering/RenderObject.cpp:
1058         (WebCore::RenderObject::willBeDestroyed): Move the call to remove the
1059         renderer from the AXCache to after the renderer is removed from the
1060         render tree. This means that the AXObject still exists during renderer
1061         removal, as we require.
1062
1063 2013-01-11  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1064
1065         [Qt][WK1] Web Audio support
1066         https://bugs.webkit.org/show_bug.cgi?id=106651
1067
1068         Reviewed by Jocelyn Turcotte.
1069
1070         Convert JavaScript Uint8Array to QByteArray. This conversion is necessary to support testRunner.setAudioData().
1071
1072         * bridge/qt/qt_runtime.cpp:
1073         (JSC::Bindings::isJSUint8Array):
1074         (Bindings):
1075         (JSC::Bindings::valueRealType):
1076         (JSC::Bindings::convertValueToQVariant):
1077
1078 2013-01-11  Anton Vayvod  <avayvod@chromium.org>
1079
1080         Text Autosizing - elements much narrower than its parent autosizing clusters should be autosized separately.
1081         https://bugs.webkit.org/show_bug.cgi?id=105188
1082
1083         Reviewed by Kenneth Rohde Christiansen.
1084
1085         Some blocks of text might be narrower than their parent clusters and should be autosized separately.
1086         This helps with autosizing for the pages implementing the sidebars as a narrow blocks of text with wide margins and
1087         the main content being positioned atop this margin (or vice versa).
1088
1089         * rendering/TextAutosizer.cpp:
1090         (WebCore::TextAutosizer::isContainerAutosizingCluster):
1091
1092             Returns true if the container is more than 200 pixels narrower than its parent cluster's lowest common
1093             ancestor of all the text nodes.
1094
1095 2013-01-11  Andreas Kling  <akling@apple.com>
1096
1097         Remove unused CSSSelector(QualifiedName) constructor.
1098         <http://webkit.org/b/106652>
1099
1100         Reviewed by Antti Koivisto.
1101
1102         * css/CSSSelector.h:
1103         (CSSSelector):
1104
1105 2013-01-11  Zan Dobersek  <zandobersek@gmail.com>
1106
1107         [GTK] Disable the ENABLE_LEGACY_WEB_AUDIO feature define in release builds
1108         https://bugs.webkit.org/show_bug.cgi?id=106577
1109
1110         Reviewed by Philippe Normand.
1111
1112         The Web Audio feature is not enabled in the release builds, so there's
1113         no need to enable the legacy Web Audio API either.
1114
1115         No new tests - no new functionality.
1116
1117         * GNUmakefile.features.am.in:
1118
1119 2013-01-11  Antoine Quint  <graouts@apple.com>
1120
1121         Web Inspector: Option+Click on Node Expander Doesn't Work the First Time
1122         https://bugs.webkit.org/show_bug.cgi?id=66868
1123
1124         Up to now, the TreeElement.prototype.expandRecursively() method would correctly
1125         expand children recursively based on the provided depth, but would not wait to
1126         perform this task until all child nodes had been populated, which means that this
1127         would only work incrementally with one additional level of child nodes being shown
1128         expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy.
1129         
1130         In order to fix this, this patch adds a new optional argument to the DOMAgent's
1131         requestChildNodes() methods to provide the depth at which we want to retrieve children
1132         of a given node. The DOMAgent provides a new .getSubtree() method that calls
1133         requestChildNodes() with the provided depth.
1134
1135         Then in ElementsTreeOutline, we subclass .expandRecursively() to first call DOMAgent's
1136         new .getSubtree() method and then call the default implementation when all nodes
1137         have been retrieved from the backend.
1138
1139         Reviewed by Pavel Feldman.
1140
1141         Tests: inspector-protocol/dom-request-child-nodes-depth.html
1142                inspector/elements/expand-recursively.html
1143
1144         * inspector/Inspector.json: Add the new `depth` parameter to DOM.requestChildNodes().
1145         * inspector/InspectorDOMAgent.cpp:
1146         (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): Add a new optional `depth` parameter
1147         which defaults to 1.
1148         (WebCore::InspectorDOMAgent::requestChildNodes): Add a new optional `depth` parameter
1149         which defaults to 1 and allows -1 as an unbound value.
1150         * inspector/InspectorDOMAgent.h:
1151         (InspectorDOMAgent):
1152         * inspector/front-end/DOMAgent.js:
1153         (WebInspector.DOMNode.prototype.):
1154         (WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what depth
1155         we want to retrieve children of a given node from the backend.
1156         * inspector/front-end/ElementsTreeOutline.js:
1157         (WebInspector.ElementsTreeElement.prototype.expandRecursively): Override default implementation
1158         to first obtain the deepest subtree for the current node so that deep expansion happens as expected.
1159
1160 2013-01-11  Alexander Pavlov  <apavlov@chromium.org>
1161
1162         Web Inspector: [Elements] Search in the DOM tree does not scroll horizontally
1163         https://bugs.webkit.org/show_bug.cgi?id=106648
1164
1165         Reviewed by Vsevolod Vlasov.
1166
1167         Scroll into view the first match in every tree element, if needed.
1168
1169         * inspector/front-end/ElementsPanel.js:
1170         (WebInspector.ElementsPanel.prototype._highlightCurrentSearchResult):
1171
1172 2013-01-11  Andrey Adaikin  <aandrey@chromium.org>
1173
1174         Web Inspector: [Canvas] a minor follow-up to r137262
1175         https://bugs.webkit.org/show_bug.cgi?id=106644
1176
1177         Reviewed by Pavel Feldman.
1178
1179         * inspector/InjectedScriptCanvasModuleSource.js:
1180         (.):
1181
1182 2013-01-11  Kent Tamura  <tkent@chromium.org>
1183
1184         BaseDateAndTimeInputType should not inherit from TextFieldInputType
1185         https://bugs.webkit.org/show_bug.cgi?id=106306
1186
1187         Reviewed by Hajime Morita.
1188
1189         Date/time input types don't need text-field features at all.
1190
1191         No new tests. This should not make any behavior changes except reduction
1192         of memory usage.
1193
1194         * html/BaseDateAndTimeInputType.h:
1195         Inherit InputType instead of TextFieldInputType.
1196         (WebCore::BaseDateAndTimeInputType::BaseDateAndTimeInputType):
1197         (BaseDateAndTimeInputType): Update function declarations.
1198         * html/BaseDateAndTimeInputType.cpp:
1199         Remove handleKeydownEvent and convertFromVisibleValue, which are for
1200         TextFieldInputType.
1201         (WebCore::BaseDateAndTimeInputType::shouldRespectListAttribute):
1202         Added. This is necessary for <datalist> support. TextFieldInputType has
1203         the same code.
1204         (WebCore::BaseDateAndTimeInputType::valueMissing):
1205         Added. This is necessary for validity.valueMissing. TextFieldInputType
1206         has the same code.
1207
1208         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
1209         Remove unnecessary functions which cancel TextFieldInputType behavior.
1210         * html/BaseChooserOnlyDateAndTimeInputType.h:
1211         (BaseChooserOnlyDateAndTimeInputType): Remove declarations for them.
1212
1213         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
1214         Remove unnecessary functions which cancel TextFieldInputType behavior.
1215         * html/BaseMultipleFieldsDateAndTimeInputType.h:
1216         (BaseMultipleFieldsDateAndTimeInputType):
1217         Add SpinButtonOwner interface. We didn't need it because
1218         TextFieldInputType implements it.
1219
1220 2013-01-11  Mary Wu  <mary.wu@torchmobile.com.cn>
1221
1222         [BlackBerry] Enable concatenating headers with same field name
1223         https://bugs.webkit.org/show_bug.cgi?id=106625
1224
1225         Reviewed by Rob Buis.
1226
1227         RFC 2616 specifies that headers could concatenate with comma if they have
1228         same field name. We should enable this if the header allows multiple values.
1229
1230         RIM PR# 275508, internally reviewed by Joe Mason
1231
1232         (WebCore):
1233         (WebCore::isAppendableHeader):
1234         (WebCore::NetworkJob::handleNotifyHeaderReceived):
1235
1236 2013-01-11  Jochen Eisinger  <jochen@chromium.org>
1237
1238         Connect UserGestureIndicator for mousedown and mouseup events
1239         https://bugs.webkit.org/show_bug.cgi?id=105138
1240
1241         Reviewed by Adam Barth.
1242
1243         Ports that consume user gestures to prevent certain types of pop-ups
1244         need to be able to connect mousedown and mouseup events, otherwise, a
1245         single mouse click will allow for opening multiple pop-ups.
1246
1247         Note that a mousedown is not always followed by a mouseup and vice
1248         versa, e.g. when the mousedown results in a context menu being shown, or
1249         something is dragged into the page.
1250
1251         Test: platform/chromium/fast/events/popup-allowed-from-gesture-only-once-two-events.html
1252
1253         * page/EventHandler.cpp:
1254         (WebCore::EventHandler::clear):
1255         (WebCore::EventHandler::handleMousePressEvent):
1256         (WebCore::EventHandler::handleMouseReleaseEvent):
1257         * page/EventHandler.h:
1258
1259 2013-01-11  Eugene Klyuchnikov  <eustas@chromium.org>
1260
1261         Web Inspector: [Resources] "Delete" cookie deletes all cookies with matching name.
1262         https://bugs.webkit.org/show_bug.cgi?id=105633
1263
1264         Reviewed by Pavel Feldman.
1265
1266         "Delete" cookie deletes all cookies with matching name,
1267         ignoring domain and path.
1268
1269         * inspector/Inspector.json: Change argument "domain" to "url"
1270         * inspector/InspectorPageAgent.cpp:
1271         (WebCore::InspectorPageAgent::deleteCookie): Use url to delte cookies.
1272         * inspector/InspectorPageAgent.h: Adopt new signature.
1273         * inspector/front-end/CookieItemsView.js:
1274         (WebInspector.CookieItemsView.prototype._deleteCookie): Ditto.
1275
1276 2013-01-11  KwangYong Choi  <ky0.choi@samsung.com>
1277
1278         [EFL] Fix unused parameter build error
1279         https://bugs.webkit.org/show_bug.cgi?id=106639
1280
1281         Reviewed by Kentaro Hara.
1282
1283         Use UNUSED_PARAM macro to fix build error.
1284
1285         No new tests, no behavior change.
1286
1287         * platform/efl/EflScreenUtilities.cpp:
1288         (WebCore::isUsingEcoreX):
1289         * platform/efl/RenderThemeEfl.cpp:
1290         (WebCore::RenderThemeEfl::supportsDataListUI):
1291
1292 2013-01-11  Pavel Feldman  <pfeldman@chromium.org>
1293
1294         Web Inspector [chromium]: Debugger.globalObjectCleared is not dispatched on reload after renderer swap
1295         https://bugs.webkit.org/show_bug.cgi?id=106555
1296
1297         Reviewed by Vsevolod Vlasov.
1298
1299         Wrong ::enable was made virtual in the InspectorDebuggerAgent.
1300
1301         Test: inspector/debugger/debugger-scripts-reload.html
1302
1303         * inspector/InspectorDebuggerAgent.h:
1304         (InspectorDebuggerAgent):
1305         * inspector/PageDebuggerAgent.cpp:
1306         (WebCore::PageDebuggerAgent::enable):
1307         (WebCore::PageDebuggerAgent::disable):
1308         * inspector/PageDebuggerAgent.h:
1309         (PageDebuggerAgent):
1310
1311 2013-01-11  Vsevolod Vlasov  <vsevik@chromium.org>
1312
1313         Web Inspector: Refactoring, move NetworkWorkspaceProvider to NetworkUISourceCodeProvider.js and rename its parent to SimpleWorkspaceProvider.
1314         https://bugs.webkit.org/show_bug.cgi?id=106635
1315
1316         Reviewed by Pavel Feldman.
1317
1318         * WebCore.gypi:
1319         * WebCore.vcproj/WebCore.vcproj:
1320         * inspector/compile-front-end.py:
1321         * inspector/front-end/DebuggerScriptMapping.js:
1322         (WebInspector.DebuggerScriptMapping):
1323         * inspector/front-end/DefaultScriptMapping.js:
1324         (WebInspector.DefaultScriptMapping):
1325         (WebInspector.DefaultScriptMapping.prototype.addScript):
1326         (WebInspector.DebuggerWorkspaceProvider):
1327         (WebInspector.DebuggerWorkspaceProvider.prototype.addDebuggerFile):
1328         * inspector/front-end/LiveEditSupport.js:
1329         (WebInspector.LiveEditSupport):
1330         (WebInspector.LiveEditSupport.prototype.uiSourceCodeForLiveEdit):
1331         (WebInspector.LiveEditWorkspaceProvider):
1332         (WebInspector.LiveEditWorkspaceProvider.prototype.addLiveEditFile):
1333         * inspector/front-end/NetworkUISourceCodeProvider.js:
1334         (WebInspector.NetworkWorkspaceProvider):
1335         (WebInspector.NetworkWorkspaceProvider.prototype.addNetworkFile):
1336         * inspector/front-end/SimpleWorkspaceProvider.js: Renamed from Source/WebCore/inspector/front-end/NetworkWorkspaceProvider.js.
1337         (WebInspector.SimpleWorkspaceProvider):
1338         (WebInspector.SimpleWorkspaceProvider.uriForURL):
1339         (WebInspector.SimpleWorkspaceProvider.prototype.requestFileContent):
1340         (WebInspector.SimpleWorkspaceProvider.prototype.setFileContent):
1341         (WebInspector.SimpleWorkspaceProvider.prototype.searchInFileContent):
1342         (WebInspector.SimpleWorkspaceProvider.prototype.addFile):
1343         (WebInspector.SimpleWorkspaceProvider.prototype.removeFile):
1344         (WebInspector.SimpleWorkspaceProvider.prototype.uniqueURI):
1345         (WebInspector.SimpleWorkspaceProvider.prototype.reset):
1346         * inspector/front-end/WebKit.qrc:
1347         * inspector/front-end/inspector.html:
1348         * inspector/front-end/inspector.js:
1349
1350 2013-01-10  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1351
1352         On Linux, should be able to get spelling suggestions without selecting the misspelled word
1353         https://bugs.webkit.org/show_bug.cgi?id=103520
1354
1355         Reviewed by Ryosuke Niwa.
1356
1357         Allow to get/insert spelling suggestions without selecting the misspelled word for
1358         Linux WebKit ports. WebCore assumes that the misspelled word has to be selected
1359         to get its suggestions.
1360
1361         In compliance with native application behaviour a new editing policy is introduced,
1362         to do not highlight the misspelled word to just get its guesses.
1363
1364         No new tests, covered by context-menu-suggestions.html.
1365
1366         * WebCore.exp.in:
1367         Remove _ZN7WebCore6Editor21isSelectionMisspelledEv symbol as Mac port doesn't
1368         need it any longer.
1369
1370         * editing/EditingBehavior.h:
1371         (EditingBehavior):
1372         (WebCore::EditingBehavior::shouldAllowSpellingSuggestionsWithoutSelection):
1373         Add a new behavior for Linux, to allow spelling suggestions without selecting
1374         the misspelled word.
1375
1376         * editing/Editor.cpp:
1377         (WebCore::Editor::isContinuousSpellCheckingEnabled):
1378         Add missing const modifier, to use this method in 'misspelledWordAtCaretOrRange() const'.
1379
1380         (WebCore::Editor::misspelledWordAtCaretOrRange):
1381         Allow to check spelling under the caret or selected word.
1382         Does nothing for selection made on the multiple words.
1383
1384         (WebCore::Editor::misspelledSelectionString):
1385         Return the misspelled selection.
1386
1387         (WebCore::Editor::guessesForMisspelledWord):
1388         Remove 'Selection' from method name as it may return guesses without selection.
1389
1390         (WebCore::Editor::guessesForMisspelledOrUngrammatical):
1391         Ditto.
1392
1393         * page/ContextMenuController.cpp:
1394         (WebCore::ContextMenuController::contextMenuItemSelected):
1395         Select the word under caret to meet the conditions from misspelledWordAtCaretOrRange.
1396
1397         (WebCore::ContextMenuController::populate):
1398         Update guessesForMisspelledOrUngrammatical call.
1399
1400 2013-01-10  Hajime Morrita  <morrita@google.com>
1401
1402         https://bugs.webkit.org/show_bug.cgi?id=106283
1403         [Shadow DOM] HTMLContentElement and HTMLShadowElement should be behind SHADOW_DOM
1404
1405         Reviewed by Kentaro Hara.
1406
1407         No new tests. Covered by existing tests.
1408
1409         This change moves <content> and <shadow> behind
1410         ENABLE(SHADOW_DOM). Note that empty stub definitions are remaining
1411         even after this change. They are for minimizing #if/#endif usage
1412         and won't hurt code size.
1413
1414         * WebCore.exp.in:
1415         * html/InputType.cpp:
1416         (WebCore::InputType::destroyShadowSubtree):
1417         * html/shadow/ContentDistributor.cpp:
1418         (WebCore::ContentDistributor::distribute):
1419         * html/shadow/HTMLContentElement.cpp:
1420         (WebCore):
1421         (WebCore::HTMLContentElement::create):
1422         (WebCore::HTMLContentElement::HTMLContentElement):
1423         * html/shadow/HTMLContentElement.h:
1424         (WebCore):
1425         (HTMLContentElement):
1426         * html/shadow/HTMLShadowElement.cpp:
1427         * html/shadow/HTMLShadowElement.h:
1428         (WebCore):
1429         (WebCore::isHTMLShadowElement):
1430         (WebCore::toHTMLShadowElement):
1431         * html/shadow/TextFieldDecorationElement.cpp:
1432         (WebCore::TextFieldDecorationElement::decorate):
1433         * testing/Internals.cpp:
1434         (WebCore::Internals::createContentElement):
1435         (WebCore::Internals::isValidContentSelect):
1436
1437 2013-01-10  Takashi Sakamoto  <tasak@google.com>
1438
1439         Implement CSSGroupingRule for @host @-rules and @supports.
1440         https://bugs.webkit.org/show_bug.cgi?id=106418
1441
1442         Reviewed by Antti Koivisto.
1443
1444         CSSGroupingRule is to share code between CSSMediaRule, CSSSupportsRule
1445         and CSSHostRule. @supports and @host @-rules are dervied from
1446         CSSGroupingRule:
1447         http://www.w3.org/TR/2012/WD-css3-conditional/#the-cssgroupingrule-interface
1448         https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#css-host-rule-interface
1449         Since @media is also derived from CSSGroupingRule and @region has the
1450         same interface as CSSGroupingRule, modify to use CSSGroupingRule:
1451         http://dev.w3.org/csswg/css3-regions/#the-at-region-style-rule
1452
1453         No new tests, because no new feature is implemented.
1454
1455         * CMakeLists.txt:
1456         * GNUmakefile.list.am:
1457         * Target.pri:
1458         * WebCore.gypi:
1459         * WebCore.vcproj/WebCore.vcproj:
1460         * WebCore.xcodeproj/project.pbxproj:
1461         Added CSSGroupingRule.h and CSSGroupingRule.cpp.
1462         * css/CSSAllInOne.cpp:
1463         Modified to include CSSGroupingRule.cpp.
1464         * css/CSSGroupingRule.cpp: Added.
1465         (WebCore):
1466         (WebCore::CSSGroupingRule::CSSGroupingRule):
1467         (WebCore::CSSGroupingRule::~CSSGroupingRule):
1468         (WebCore::CSSGroupingRule::insertRule):
1469         (WebCore::CSSGroupingRule::deleteRule):
1470         (WebCore::CSSGroupingRule::appendCssTextForItems):
1471         (WebCore::CSSGroupingRule::length):
1472         (WebCore::CSSGroupingRule::item):
1473         (WebCore::CSSGroupingRule::cssRules):
1474         (WebCore::CSSGroupingRule::reattach):
1475         (WebCore::CSSGroupingRule::reportMemoryUsage):
1476         These codes are moved from CSSMediaRule and WebKitCSSRegionRule.
1477         * css/CSSGroupingRule.h:
1478         (WebCore):
1479         (CSSGroupingRule):
1480         * css/CSSMediaRule.cpp:
1481         (WebCore::CSSMediaRule::CSSMediaRule):
1482         (WebCore::CSSMediaRule::~CSSMediaRule):
1483         Make CSSMediaRule inherit CSSGroupingRule.
1484         (WebCore::CSSMediaRule::media):
1485         (WebCore::CSSMediaRule::reattach):
1486         Keep the code for updating media queries' CSSOMWrapper.
1487         (WebCore::CSSMediaRule::reportMemoryUsage):
1488         We need to report media queries' CSSOMWrapper memory usage.
1489         (WebCore::CSSMediaRule::mediaQueries):
1490         (WebCore::CSSMediaRule::cssText):
1491         * css/CSSMediaRule.h:
1492         * css/WebKitCSSRegionRule.cpp:
1493         Make WebKitCSSRegionRule inherit CSSGroupingRule.
1494         (WebCore::WebKitCSSRegionRule::WebKitCSSRegionRule):
1495         (WebCore::WebKitCSSRegionRule::cssText):
1496         * css/WebKitCSSRegionRule.h:
1497         * css/StyleRule.h:
1498         Added inlined accessor to obtain StyleRuleMedia* and StyleRuleRegion*
1499         from StyleRuleBlock*.
1500
1501 2012-12-28  Andrey Adaikin  <aandrey@chromium.org>
1502
1503         Web Inspector: [Canvas] add an option to reload the page if there is an uninstrumented canvas
1504         https://bugs.webkit.org/show_bug.cgi?id=105822
1505
1506         Reviewed by Pavel Feldman.
1507
1508         Show in the front-end an option to reload the page if there is an uninstrumented canvas.
1509
1510         * inspector/front-end/CanvasProfileView.js:
1511         (WebInspector.CanvasProfileType):
1512         (WebInspector.CanvasProfileType.prototype.decorationElement):
1513         (WebInspector.CanvasProfileType.prototype._updateDecorationElement):
1514         (WebInspector.CanvasProfileType.prototype._onReloadPageButtonClick):
1515         * inspector/front-end/ProfileLauncherView.js:
1516         (WebInspector.ProfileLauncherView.prototype.addProfileType):
1517         * inspector/front-end/ProfilesPanel.js:
1518         (WebInspector.ProfileType.prototype.decorationElement):
1519
1520 2013-01-10  Dimitri Glazkov  <dglazkov@chromium.org>
1521
1522         The word "selector" is somewhat redundant redundantly used in SelectorChecker.
1523         https://bugs.webkit.org/show_bug.cgi?id=106413
1524
1525         In https://bugs.webkit.org/show_bug.cgi?id=105864, Antti suggested reducing some of the redundant uses of the word
1526         "selector" in SelectorChecker. Here's a start.
1527
1528         Reviewed by Antti Koivisto.
1529
1530         Simple renames, no change in behavior.
1531
1532         * css/SelectorChecker.cpp:
1533         (WebCore::SelectorChecker::match): Renamed.
1534         (WebCore):
1535         (WebCore::SelectorChecker::fastCheck): Ditto,
1536         (WebCore::SelectorChecker::checkOne): Ditto.
1537         * css/SelectorChecker.h:
1538         (SelectorChecker):
1539         * css/StyleResolver.cpp:
1540         (WebCore::StyleResolver::collectMatchingRulesForList): Changed to use new name.
1541         (WebCore::StyleResolver::ruleMatches): Renamed from checkSelector to better match argument and return value.
1542         (WebCore::StyleResolver::checkRegionSelector): Changed to use new names.
1543         * css/StyleResolver.h:
1544         (StyleResolver):
1545         * dom/SelectorQuery.cpp:
1546         (WebCore::SelectorDataList::matches): Ditto.
1547         (WebCore::SelectorDataList::execute): Ditto.
1548         * html/shadow/ContentSelectorQuery.cpp:
1549         (WebCore::ContentSelectorChecker::checkContentSelector): Ditto.
1550
1551 2013-01-10  John J. Barton  <johnjbarton@chromium.org>
1552
1553         Web Inspector: Pass the script url to the script-preprocessor script
1554         https://bugs.webkit.org/show_bug.cgi?id=104384
1555
1556         Reviewed by Pavel Feldman.
1557
1558         Add url argument to the script-preprocessor script in PageAgent.reload()
1559
1560         Test: inspector/debugger/debugger-script-preprocessor.html
1561
1562         * bindings/v8/DebuggerScript.js:
1563         * bindings/v8/ScriptDebugServer.cpp:
1564         (WebCore::ScriptDebugServer::ScriptPreprocessor::ScriptPreprocessor):
1565         (WebCore::ScriptDebugServer::ScriptPreprocessor::preprocessSourceCode):
1566         (WebCore::ScriptDebugServer::handleV8DebugEvent):
1567         * bindings/v8/custom/V8InjectedScriptManager.cpp:
1568         (WebCore::InjectedScriptManager::createInjectedScript):
1569
1570 2013-01-10  Eugene Klyuchnikov  <eustas@chromium.org>
1571
1572         Web Inspector: DataGrid refactoring: make cell editing more generic.
1573         https://bugs.webkit.org/show_bug.cgi?id=105849
1574
1575         Reviewed by Pavel Feldman.
1576
1577         Editing feature has been added to DataGrid to edit localStorage.
1578         Column numbers (0 and 1) are hardcoded.
1579
1580         This patch makes column editing feature more generic: remove hardcoded
1581         colums, take "editable" column property into account.
1582
1583         This patch is a prerequisite for cookie editing.
1584
1585         * inspector/front-end/DOMStorageItemsView.js:
1586         Use meaningful column names.
1587         * inspector/front-end/DataGrid.js:
1588         (WebInspector.DataGrid.prototype._ondblclick): Check column editability.
1589         (WebInspector.DataGrid.prototype._contextMenuInDataTable): Ditto.
1590         (WebInspector.DataGridNode.prototype.createCell):
1591         Supply cell element with column id.
1592         (WebInspector.DataGrid.prototype.columnIdentifierFromNode):
1593         Added utility method.
1594         (WebInspector.DataGrid.prototype._nextEditableColumn): Ditto.
1595         (WebInspector.DataGrid.prototype._keyDown): Calculate editable column.
1596         (WebInspector.DataGrid.prototype._editingCommitted): Ditto.
1597         (WebInspector.DataGrid.prototype._startEditing): Ditto.
1598         (WebInspector.DataGrid.prototype._startEditingColumnOfDataGridNode):
1599         Refined parameter type / name.
1600         (WebInspector.DataGrid.prototype._resizerDragging):
1601         Fix resizer index property names.
1602         (WebInspector.DataGrid.prototype._startResizerDragging): Ditto.
1603         (WebInspector.DataGrid.prototype._positionResizers): Ditto.
1604         * inspector/front-end/NetworkPanel.js:
1605         (WebInspector.NetworkLogView.prototype._updateDividersIfNeeded): Ditto.
1606
1607 2013-01-10  Matt Falkenhagen  <falken@chromium.org>
1608
1609         Elements must be reattached when inserted/removed from top layer
1610         https://bugs.webkit.org/show_bug.cgi?id=105489
1611
1612         Reviewed by Julien Chaffraix.
1613
1614         Ensure a reattach occurs when an element is inserted/removed from top layer, so its renderer can be inserted correctly:
1615         as a child of RenderView in top layer sibling order if it's in the top layer, and in the usual place otherwise.
1616
1617         We previously relied on style recalc to catch when an element is inserted/removed from the top layer, because it
1618         only happens on dialog.show/close which toggle display: none. But that is incorrect because, for example, close()
1619         followed immediately by show() results in no style change.
1620
1621         Tests: fast/dom/HTMLDialogElement/removed-element-is-removed-from-top-layer.html
1622                fast/dom/HTMLDialogElement/top-layer-stacking-correct-order-remove-readd.html
1623
1624         * dom/Element.cpp:
1625         (WebCore::Element::removedFrom): Call Document::removeFromTopLayer to let the element be removed from the top layer vector.
1626         removeFromTopLayer calls Element::setIsInTopLayer(false) itself if needed.
1627         (WebCore::Element::setIsInTopLayer): Ensure a reattach occurs if the element is already attached.
1628
1629 2013-01-10  Shinya Kawanaka  <shinyak@chromium.org>
1630
1631         When a selected node in nested ShadowDOM is deleted, selection have wrong range.
1632         https://bugs.webkit.org/show_bug.cgi?id=106526
1633
1634         Reviewed by Ryosuke Niwa.
1635
1636         Since FrameSelection and htmlediting did not consider nested Shadow DOM, the FrameSelection still selects
1637         removed elements if selected nodes in nested Shadow DOM are removed.
1638
1639         We have to use containsIncludingShadowDOM to handle with nested Shadow DOM correctly.
1640
1641         Test: fast/dom/shadow/selection-in-nested-shadow.html
1642
1643         * editing/FrameSelection.cpp:
1644         (WebCore::removingNodeRemovesPosition):
1645         * editing/htmlediting.cpp:
1646         (WebCore::updatePositionForNodeRemoval):
1647
1648 2013-01-10  Hajime Morrita  <morrita@google.com>
1649
1650         [Shadow DOM] Refactoring: InsertionPoint could simplify its subclass hooks
1651         https://bugs.webkit.org/show_bug.cgi?id=106614
1652
1653         Reviewed by Dimitri Glazkov.
1654
1655         This change simplifies InsertionPoint overrides and give some flexibility to it.
1656
1657         The change
1658
1659         - Removes InsertionPoint::isSelectValid(). now ContentSelectorQuery parses given selector anyway.
1660           Invalid select attribute is handled by newly introduced matchTypeFor() method.
1661         - Introduces InsertionPoint::matchTypeFor() to give a chance each InsertionPoint to decide whether it
1662           accepts the given node as its distribution. Then it lets DetailsSummaryElement adopt it.
1663         - Pulls some HTMLShadowElement overrides up to InsertionPoint so that other upcoming InsertionPoint
1664           subclasses don't need to override them.
1665
1666         No new tests. Refactoring.
1667
1668         * html/HTMLDetailsElement.cpp:
1669         (WebCore::DetailsSummaryElement::DetailsSummaryElement):
1670         - Implemented matchTypeFor() to get rid of HTMLContentElement machinery which is compiled out in the upcoming change.
1671         (DetailsSummaryElement):
1672         * html/shadow/ContentSelectorQuery.cpp:
1673         (WebCore::ContentSelectorQuery::ContentSelectorQuery):
1674         (WebCore::ContentSelectorQuery::matches):
1675         * html/shadow/HTMLContentElement.cpp:
1676         (WebCore::HTMLContentElement::matchTypeFor): Added.
1677         (WebCore):
1678         * html/shadow/HTMLContentElement.h:
1679         (HTMLContentElement):
1680         (WebCore::isHTMLContentElement):
1681         * html/shadow/HTMLShadowElement.cpp:
1682         * html/shadow/HTMLShadowElement.h:
1683         (HTMLShadowElement):
1684         * html/shadow/InsertionPoint.cpp:
1685         (WebCore::InsertionPoint::emptySelectorList): Moved from HTMLShadowElement.
1686         (WebCore):
1687         * html/shadow/InsertionPoint.h:
1688         (WebCore::InsertionPoint::matchTypeFor): Added.
1689         (WebCore::InsertionPoint::selectorList): Moved from HTMLShadowElement.
1690         (InsertionPoint):
1691         * testing/Internals.cpp:
1692         (WebCore::Internals::isValidContentSelect):
1693
1694 2013-01-10  Dean Jackson  <dino@apple.com>
1695
1696         Plugin snapshot label should take device resolution and inset into account
1697         https://bugs.webkit.org/show_bug.cgi?id=106619
1698
1699         Reviewed by Simon Fraser.
1700
1701         * rendering/RenderSnapshottedPlugIn.cpp:
1702         (WebCore::RenderSnapshottedPlugIn::paintLabel): Take into account the inset in the label image.
1703         (WebCore::RenderSnapshottedPlugIn::tryToFitStartLabel): Look at the page's device scale, and adjust the label image accordingly.
1704
1705 2013-01-10  James Robinson  <jamesr@chromium.org>
1706
1707         [chromium] Store scrollable layer's contents size for coordinated scrollable layers
1708         https://bugs.webkit.org/show_bug.cgi?id=106518
1709
1710         Reviewed by Adrienne Walker.
1711
1712         This stores a scrollable layer's contentsSize in the scroll layer's bounds, which is otherwise not useful. This
1713         value is currently calculated based on fragile knowledge of the tree structure immediately beneath a scrollable
1714         layer.
1715
1716         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
1717         (WebCore::ScrollingCoordinatorChromium::frameViewLayoutUpdated):
1718
1719 2013-01-10  Dan Beam  <dbeam@chromium.org>
1720
1721         Implement AutocompleteErrorEvent#reason
1722         https://bugs.webkit.org/show_bug.cgi?id=105568
1723
1724         Reviewed by Adam Barth.
1725
1726         Test: fast/events/constructors/autocomplete-error-event-constructor.html
1727
1728         * WebCore.gypi: Added AutocompleteErrorEvent.idl and AutocompleteErrorEvent.h for chromium port's build.
1729         * dom/AutocompleteErrorEvent.h: Added.
1730         (WebCore): Added new type of error named AutocompleteErrorEvent.
1731         (AutocompleteErrorEventInit): Added init params for AutocompleteErrorEvents (so initEvent() can be used).
1732         (AutocompleteErrorEvent): Added a new error event that inherits from Event but also has a reason for failure.
1733         (WebCore::AutocompleteErrorEvent::create): Factory function to create AutocompleteErrorEvents.
1734         (WebCore::AutocompleteErrorEvent::reason): The reason why a requestAutocomplete() invocation failed. Can be
1735                                                    "disabled", "cancel", or "invalid".
1736         (WebCore::AutocompleteErrorEvent::interfaceName): The name of the event's interface (for event.toString()).
1737         (WebCore::AutocompleteErrorEvent::AutocompleteErrorEvent): Various ways of constructing the error event.
1738         * dom/AutocompleteErrorEvent.idl: Added.
1739         * dom/EventNames.in: Added AutocompleteError to this list, based on REQUEST_AUTOCOMPLETE conditional.
1740         * html/HTMLFormElement.cpp: Updated form elements to dispatch AutocompleteErrorEvents on errors and to give
1741                                     more details (event.reason) when the request fails.
1742         (WebCore::HTMLFormElement::requestAutocomplete): Changed to newly added failure type "disabled".
1743         (WebCore::HTMLFormElement::finishRequestAutocomplete): Changed
1744         * html/HTMLFormElement.h: Added new results (ErrorDisabled, ErrorCancel, ErrorInvalid).
1745         * page/DOMWindow.idl: Added global event constructor for new AutocompleteErrorEvent() style event creation.
1746
1747 2013-01-10  Yong Li  <yoli@rim.com>
1748
1749         HTMLMediaElement::resume() should schedule a load rather than load immediately
1750         https://bugs.webkit.org/show_bug.cgi?id=106587
1751
1752         Reviewed by Eric Carlson.
1753
1754         It is not always safe to start the jobs at the time resume() is called. That is why the jobs are
1755         suspended. It can also be suspended again right after being resumed.
1756
1757         No new tests as there is no visible functional change, also it is a theoretically good-to-have change
1758         that doesn't fix any known cross-platform issue.
1759
1760         * html/HTMLMediaElement.cpp:
1761         (WebCore::HTMLMediaElement::resume): Replace load() with scheduleLoad().
1762
1763 2013-01-10  Adam Barth  <abarth@webkit.org>
1764
1765         Add an ENABLE macro and a WebCore::Setting for the threaded parser
1766         https://bugs.webkit.org/show_bug.cgi?id=106595
1767
1768         Reviewed by Benjamin Poulain.
1769
1770         This patch adds both a WebCore::Setting and an ENABLE macro for the
1771         threaded parser. We plan to keep the ENABLE macro off by default for a
1772         while. The runtime setting will let us more easily conduct A/B
1773         experiments when the time arises.
1774
1775         * page/Settings.in:
1776
1777 2013-01-10  Xianzhu Wang  <wangxianzhu@chromium.org>
1778
1779         Regression(r129944): Heap-use-after-free in WebCore::computeNonFastScrollableRegion
1780         https://bugs.webkit.org/show_bug.cgi?id=99515
1781
1782         Reviewed by Simon Fraser.
1783
1784         The object used-after-freed is a destructed FrameView that is still in the m_scrollableAreas set of the parent FrameView. Actually it has been removed from m_scrollableAreas when setParent(0), but then is added back in updateScrollableAreaSet() because its frameViewParent() is still not 0 (though parent() is already 0).
1785
1786         No new tests. The heap-use-after-free doesn't always cause crash so it can't be stably tested with a test case. Memory analysis tools like asan discovered the heap-use-after-free and verified that the patch can fix the issue.
1787
1788         * page/FrameView.cpp:
1789         (WebCore::FrameView::parentFrameView): Checks if the FrameView has been removed from the parent.
1790
1791 2013-01-10  John Mellor  <johnme@chromium.org>
1792
1793         Fix scale of screen.width, window.outerWidth and @media device-width when page scale not applied in compositor.
1794         https://bugs.webkit.org/show_bug.cgi?id=106460
1795
1796         Reviewed by Kenneth Rohde Christiansen.
1797
1798         screen.width, window.outerWidth and @media device-width should be in
1799         density independent (UI) pixels, not physical screen pixels.
1800
1801         This already works on most ports (including iOS). However Chrome for
1802         Android currently internally sizes its windows in physical screen pixels
1803         instead of density independent pixels, and this leaks through in the
1804         sizes provided to WebCore.
1805
1806         This patch scales these sizes appropriately before they reach JavaScript,
1807         on platforms where the applyPageScaleFactorInCompositor setting is false
1808         (i.e. just Chrome for Android). Once Chrome for Android switches over to
1809         the same coordinate space, the applyPageScaleFactorInCompositor setting
1810         will be removed, along with any code (such as this) that depends on it.
1811
1812         The effect of this patch on Chrome for Android when viewing a page with
1813         a width=device-width viewport on a Galaxy Nexus (720x1280 @ dPR 2) is:
1814             @media device-width      changes from 720 to 360
1815             screen.width             changes from 720 to 360
1816             screen.availWidth        changes from 720 to 360
1817             window.outerWidth        changes from 720 to 360
1818             window.innerWidth                    remains 360 (at overview zoom)
1819             @media width                         remains 360
1820             document.documentElement.clientWidth remains 360
1821             document.documentElement.offsetWidth remains 360
1822             document.documentElement.scrollWidth remains 360
1823             document.body.clientWidth            remains 360
1824             document.body.offsetWidth            remains 360
1825             document.body.scrollWidth            remains 360
1826         And similarly for heights (though they are slightly less than 640, since
1827         toolbars etc. get subtracted from the available height).
1828
1829         No new tests, as applyDeviceScaleFactorInCompositor appears to always be
1830         true in DumpRenderTree, so this situation cannot occur there.
1831
1832         * page/Settings.in:
1833             Added applyDeviceScaleFactorInCompositor setting, which allows
1834             detecting whether we need to normalize the scale.
1835         * platform/chromium/PlatformScreenChromium.cpp:
1836         (WebCore::toUserSpace):
1837             Static function for normalizing screen rect scale.
1838         (WebCore::screenRect):
1839             Uses toUserSpace.
1840         (WebCore::screenAvailableRect):
1841             Uses toUserSpace.
1842         * rendering/TextAutosizer.cpp:
1843         (WebCore::TextAutosizer::processSubtree):
1844             Use applyDeviceScaleFactorInCompositor instead of
1845             applyPageScaleFactorInCompositor, to scale the window rect correctly
1846             on platforms other than Chrome for Android.
1847
1848 2013-01-10  Florin Malita  <fmalita@chromium.org>
1849
1850         Rename GraphicsContext::addRoundedRectClip
1851         https://bugs.webkit.org/show_bug.cgi?id=106581
1852
1853         Reviewed by Simon Fraser.
1854
1855         This patch renames GraphicsContext::addRoundedRectClip to clipRoundedRect for consistency
1856         with the other GC clipping methods.
1857
1858         No new tests: no functional changes.
1859
1860         * WebCore.order:
1861         * platform/graphics/GraphicsContext.cpp:
1862         (WebCore::GraphicsContext::clipRoundedRect):
1863         * platform/graphics/GraphicsContext.h:
1864         (GraphicsContext):
1865         * platform/graphics/skia/GraphicsContextSkia.cpp:
1866         (WebCore::GraphicsContext::clipRoundedRect):
1867         * rendering/RenderBox.cpp:
1868         (WebCore::RenderBox::paintBoxDecorations):
1869         (WebCore::RenderBox::pushContentsClip):
1870         * rendering/RenderBoxModelObject.cpp:
1871         (WebCore::RenderBoxModelObject::clipRoundedInnerRect):
1872         (WebCore::RenderBoxModelObject::paintBorder):
1873         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
1874         * rendering/RenderLayer.cpp:
1875         (WebCore::RenderLayer::clipToRect):
1876         * rendering/RenderThemeChromiumWin.cpp:
1877         (WebCore):
1878         (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
1879         * rendering/RenderThemeMacShared.mm:
1880         (WebCore::RenderThemeMacShared::paintMenuListButtonGradients):
1881         (WebCore::RenderThemeMacShared::paintSliderTrack):
1882         * rendering/RenderThemeSafari.cpp:
1883         (WebCore::RenderThemeSafari::paintMenuListButtonGradients):
1884         (WebCore::RenderThemeSafari::paintSliderTrack):
1885         * rendering/RenderThemeWinCE.cpp:
1886         (WebCore::RenderThemeWinCE::paintSearchFieldCancelButton):
1887
1888 2013-01-10  Tommy Widenflycht  <tommyw@google.com>
1889
1890         MediaStream API: Adding the new id attribute to MediaStream and MediaStreamTrack
1891         https://bugs.webkit.org/show_bug.cgi?id=106564
1892
1893         Reviewed by Adam Barth.
1894
1895         Specification: http://dev.w3.org/2011/webrtc/editor/getusermedia.html
1896         MediaStream looses its label attribute and instead gets an id attribute.
1897         MediaStreamTrack gets an id attribute.
1898
1899         Not testable yet, will add tests in a followup patch.
1900
1901         * Modules/mediastream/MediaStream.h:
1902         (WebCore::MediaStream::label):
1903         (MediaStream):
1904         (WebCore::MediaStream::id):
1905         * Modules/mediastream/MediaStream.idl:
1906         * Modules/mediastream/MediaStreamTrack.cpp:
1907         (WebCore::MediaStreamTrack::id):
1908         (WebCore):
1909         * Modules/mediastream/MediaStreamTrack.h:
1910         * Modules/mediastream/MediaStreamTrack.idl:
1911         * platform/chromium/support/WebMediaStreamComponent.cpp:
1912         (WebKit::WebMediaStreamComponent::initialize):
1913         (WebKit):
1914         (WebKit::WebMediaStreamComponent::isEnabled):
1915         (WebKit::WebMediaStreamComponent::id):
1916         (WebKit::WebMediaStreamComponent::source):
1917         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
1918         (WebKit::WebMediaStreamDescriptor::label):
1919         (WebKit):
1920         (WebKit::WebMediaStreamDescriptor::id):
1921         * platform/mediastream/MediaStreamComponent.h:
1922         (WebCore::MediaStreamComponent::id):
1923         (WebCore::MediaStreamComponent::MediaStreamComponent):
1924         (MediaStreamComponent):
1925         * platform/mediastream/MediaStreamDescriptor.h:
1926         (WebCore::MediaStreamDescriptor::create):
1927         (WebCore::MediaStreamDescriptor::id):
1928         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
1929         (MediaStreamDescriptor):
1930
1931 2013-01-10  Ojan Vafai  <ojan@chromium.org>
1932
1933         Flexboxes incorrectly add the scrollbar width to the intrinsic width of fixed-width items
1934         https://bugs.webkit.org/show_bug.cgi?id=106591
1935
1936         Reviewed by Levi Weintraub.
1937
1938         The scrollbar width should only be added if the width of the flex item
1939         is not fixed.
1940
1941         Test: fast/css/fixed-width-intrinsic-width-excludes-scrollbars.html
1942
1943         * rendering/RenderBlock.cpp:
1944         (WebCore::RenderBlock::computePreferredLogicalWidths):
1945         Use shared helper method. This also happens to fix the vertical
1946         writing-mode case.
1947
1948         * rendering/RenderBox.cpp:
1949         (WebCore::RenderBox::instrinsicScrollbarLogicalWidth):
1950         (WebCore):
1951         * rendering/RenderBox.h:
1952         (RenderBox):
1953         Add a method for determining the scrollbar's contribution to the boxes
1954         intrinsic width.
1955
1956         * rendering/RenderDeprecatedFlexibleBox.cpp:
1957         (WebCore::RenderDeprecatedFlexibleBox::computePreferredLogicalWidths):
1958         * rendering/RenderFlexibleBox.cpp:
1959         (WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
1960         Use shared code for determining the scrollbar width and only add the
1961         width when computing the intrinsic widths.
1962
1963         * rendering/RenderGrid.cpp:
1964         (WebCore::RenderGrid::computePreferredLogicalWidths):\
1965         Just adding a FIXME to account for scrollbar width.
1966
1967 2013-01-10  Nate Chapin  <japhet@chromium.org>
1968
1969         Replace unnecessary null-checks with an assert in MainResourceLoader::continueAfterNavigationPolicy.
1970         https://bugs.webkit.org/show_bug.cgi?id=106476
1971
1972         Reviewed by Alexey Proskuryakov.
1973
1974         * loader/MainResourceLoader.cpp:
1975         (WebCore::MainResourceLoader::continueAfterNavigationPolicy): Null-checks for resourceLoader were
1976             added in an abundance of caution in r139150. Given that we know the load hasn't been cancelled,
1977             resourceLoader can only be null if continueAfterNavigationPolicy() has already been called
1978             before when m_substituteData is valid. continueAfterNavigationPolicy() is only called for redirects,
1979             and SubstituteData doesn't support redirects, so it is correct to assert that resourceLoader is non-null.
1980
1981 2013-01-10  Levi Weintraub  <leviw@chromium.org>
1982
1983         ScrollingCoordinator touch event hit rects aren't converted to proper coordinates when in nested views
1984         https://bugs.webkit.org/show_bug.cgi?id=106383
1985
1986         Reviewed by James Robinson.
1987
1988         ScrollingCoordinator uses clippedOverflowRectForRepaint(0) to generate the bounds for a renderer's hit
1989         testing rect. The rect this returns is in the coordinates of its document. This change converts the
1990         rect to the outermost view's coordinate system using convertToContainingView.
1991
1992         Tests: platform/chromium/fast/events/touch/touch-hit-rects-in-iframe.html
1993
1994         * page/scrolling/ScrollingCoordinator.cpp:
1995         (WebCore::accumulateRendererTouchEventTargetRects):
1996
1997 2013-01-10  Levi Weintraub  <leviw@chromium.org>
1998
1999         Regression(r137939): Heap-use-after-free in WebCore::accumulateDocumentEventTargetRects
2000         https://bugs.webkit.org/show_bug.cgi?id=106454
2001
2002         Reviewed by James Robinson.
2003
2004         Correctly removing child Documents from their parent's tracked touch handler maps when detaching and
2005         when their last touch event handler is removed.
2006
2007         Test: fast/events/touch/nested-document-with-touch-handler-detached-crash.html
2008
2009         * dom/Document.cpp:
2010         (WebCore::Document::detach):
2011         (WebCore::Document::didRemoveEventTargetNode):
2012
2013 2013-01-10  Nate Chapin  <japhet@chromium.org>
2014
2015         REGRESSION(r138222): WebDocumentLoaderMac-related leaks seen on Leaks bot
2016         https://bugs.webkit.org/show_bug.cgi?id=106137
2017
2018         Reviewed by Brady Eidson.
2019
2020         Tested manually by comparing before and after leaks output for WK1-mac.
2021
2022         * loader/MainResourceLoader.cpp:
2023         (WebCore::MainResourceLoader::receivedError): Call dispatchDidFailLoading() if
2024             a SubstituteData load fails or is cancelled. Without this call, load counts
2025             are not balanced on WebDocumentLoaderMac and it is retained forever.
2026         (WebCore::MainResourceLoader::didFinishLoading):
2027
2028 2013-01-10  Robert Kroeger  <rjkroege@chromium.org>
2029
2030         Manually revert http://trac.webkit.org/changeset/136012
2031         https://bugs.webkit.org/show_bug.cgi?id=106580
2032
2033         Reviewed by Dimitri Glazkov.
2034
2035         136012 broke touch-scrolling of an overflow div in an iframe. Revert manually
2036         to work around conflicts.
2037
2038         * page/EventHandler.cpp:
2039         (WebCore::EventHandler::handleWheelEvent):
2040
2041 2013-01-10  Robert Hogan  <robert@webkit.org>
2042
2043         REGRESSION(r136967): margin-top + overflow:hidden causes incorrect layout for internal floated elements
2044         https://bugs.webkit.org/show_bug.cgi?id=106374
2045
2046         Reviewed by David Hyatt.
2047
2048         r136397 treated any self-collapsing block that had a clearance delta as though it was clearing a float, but
2049         blocks that avoid floats can get a clearance delta too. So just ensure there is clearance on the block when deciding
2050         whether we need to add the margin back in before placing the float.
2051
2052         Test: fast/block/margin-collapse/self-collapsing-block-with-overflow-hidden-and-float-child.html
2053
2054         * rendering/RenderBlockLineLayout.cpp:
2055         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
2056
2057 2013-01-10  Alexander Pavlov  <apavlov@chromium.org>
2058
2059         Web Inspector: Color picker in Styles pane shows wrong initial color
2060         https://bugs.webkit.org/show_bug.cgi?id=106567
2061
2062         Reviewed by Pavel Feldman.
2063
2064         The RGB's G value for "crimson" was wrong.
2065
2066         * inspector/front-end/Color.js:
2067
2068 2013-01-10  Tony Chang  <tony@chromium.org>
2069
2070         Speed up supplemental dependency computation
2071         https://bugs.webkit.org/show_bug.cgi?id=106503
2072
2073         Reviewed by Adam Barth.
2074
2075         On my machine, generating supplemental IDL dependencies was taking about 18s
2076         because it has to run the C preprocessor on each IDL file. Avoid this by using
2077         a regular expression to find the Supplemental= value in each IDL file rather than
2078         doing a full parse. Now generating supplemental IDL dependencies is less than a
2079         second.
2080
2081         preprocess-idls.pl used to also check IDL attributes against IDLAttributes.txt.
2082         Move this code to run in generate-bindings.pl. This change revealed that
2083         TestRunner.idl uses PassContext so add that to IDLAttributes.txt.
2084
2085         No new tests, this is a build refactor. EWS bots should be green.
2086
2087         * DerivedSources.make: Remove --idlAttributesFile from preprocess-idls.pl and add it to generate-bindings.pl.
2088         * DerivedSources.pri: Remove --idlAttributesFile from preprocess-idls.pl and add it to generate-bindings.pl.
2089         * GNUmakefile.am: Remove --idlAttributesFile from preprocess-idls.pl and add it to generate-bindings.pl.
2090         * UseJSC.cmake: Remove --idlAttributesFile from preprocess-idls.pl and add it to generate-bindings.pl.
2091         * UseV8.cmake: Remove --idlAttributesFile from preprocess-idls.pl and add it to generate-bindings.pl.
2092         * WebCore.gyp/WebCore.gyp: Remove --idlAttributesFile from preprocess-idls.pl and add it to generate-bindings.pl.
2093         * bindings/scripts/IDLAttributes.txt: Add PassContext needed by TestRunner.idl.
2094         * bindings/scripts/generate-bindings.pl:
2095         (loadIDLAttributes): Moved from preprocess-idls.pl.
2096         (checkIDLAttributes): Moved from preprocess-idls.pl.
2097         (checkIfIDLAttributesExists): Moved from preprocess-idls.pl.
2098         * bindings/scripts/preprocess-idls.pl:
2099         (getSupplementalFromIDLFile): Helper method to get Supplemental=* quickly.
2100
2101 2013-01-10  Max Vujovic  <mvujovic@adobe.com>
2102
2103         [CSS Filters] RenderLayerCompositor::addToOverlapMap should take into account the filters outsets (ie. blur and drop-shadow)
2104         https://bugs.webkit.org/show_bug.cgi?id=94022
2105
2106         Reviewed by Simon Fraser.
2107
2108         When a layer has a filter that moves pixels, we need to add its entire bounds, including its
2109         outsets and children, to the overlap map. The filter can move the children's pixels
2110         anywhere in the layer, so we can't rely on the children's bounds.
2111
2112         Eventually, we should avoid adding children to the overlap map if the parent's bounds used
2113         for overlap testing already include the children. I've added a FIXME for this optimization.
2114
2115         Tests: compositing/filters/sw-layer-overlaps-hw-shadow.html
2116                compositing/filters/sw-nested-shadow-overlaps-hw-nested-shadow.html
2117                compositing/filters/sw-shadow-overlaps-hw-layer.html
2118                compositing/filters/sw-shadow-overlaps-hw-shadow.html
2119
2120         * rendering/RenderLayer.h:
2121         (WebCore::RenderLayer::overlapBounds):
2122             If necessary, return the calculated layer bounds, including the children. Otherwise,
2123             return the localBoundingBox.
2124         (RenderLayer):
2125         (WebCore::RenderLayer::overlapBoundsIncludeChildren):
2126             If the layer has a filter that moves pixels, return true.
2127         * rendering/RenderLayerCompositor.cpp:
2128         (WebCore::RenderLayerCompositor::addToOverlapMap):
2129             Add the overlapBounds instead of the localBoundingBox to the overlap map.
2130         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2131             Use the overlapBounds instead of the localBoundingBox for overlap testing.
2132
2133 2013-01-09  Ojan Vafai  <ojan@chromium.org>
2134
2135         intrinsic min-widths don't override width for file upload controls
2136         https://bugs.webkit.org/show_bug.cgi?id=106517
2137
2138         Reviewed by Tony Chang.
2139
2140         Separate out computing intrinsic width from perferred width so that
2141         we can use the intrinsic width correctly when applying min-width/max-width.
2142         The preferred width is the width used in its container's computation
2143         of its intrinsic width.
2144
2145         This is the first in a series of patches making this work across
2146         the render tree. 
2147
2148         Test: fast/forms/file/intrinsic-min-width-overrides-width.html
2149
2150         * rendering/RenderBox.cpp:
2151         (WebCore::RenderBox::minIntrinsicLogicalWidth):
2152         (WebCore):
2153         (WebCore::RenderBox::maxIntrinsicLogicalWidth):
2154         (WebCore::RenderBox::computeIntrinsicLogicalWidths):
2155         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
2156         * rendering/RenderBox.h:
2157         (RenderBox):
2158         * rendering/RenderFileUploadControl.cpp:
2159         (WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
2160         (WebCore):
2161         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
2162         * rendering/RenderFileUploadControl.h:
2163         (RenderFileUploadControl):
2164
2165 2013-01-10  Victor Carbune  <victor@rosedu.org>
2166
2167         media/video-controls-captions.html fails after fixing https://bugs.webkit.org/show_bug.cgi?id=105536
2168         https://bugs.webkit.org/show_bug.cgi?id=106230
2169
2170         Reviewed by Eric Carlson.
2171
2172         Until Chromium has proper controls for lists of text tracks, the caption button
2173         needs to preserve its functionality.
2174
2175         Updated TestExpectations to reactivate test.
2176
2177         * html/HTMLMediaElement.cpp:
2178         (WebCore::HTMLMediaElement::setClosedCaptionsVisible): Added explicit call to updateTextTrackDisplay.
2179         This enables hiding the tracks immediately.
2180         * html/shadow/MediaControlElements.cpp:
2181         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Added extra check before rendering
2182         that captions should actually be displayed.
2183
2184 2013-01-10  Hajime Morrita  <morrita@google.com>
2185
2186         ComposedShadowTreeWalker shouldn't be exposed to non-ShadowDOM classes
2187         https://bugs.webkit.org/show_bug.cgi?id=106505
2188
2189         Reviewed by Dimitri Glazkov.
2190
2191         This change hides ComposedShadowTreeWalker from non-ShadowDOM classes by
2192
2193         - introducing thin wrapper functions on NodeRenderingTraversal and relacing
2194           CSTW callsites with it,
2195         - replacing ComposedShadowTreeWalker usage with AncestorChainWalker if possible and
2196         - moving AncestorChainWalker to its own file and including it on files
2197           which needs only AncestorChainWalker. This eliminates ComposedShadowTreeWalker.h inclusions.
2198
2199         No new tests. No behavior change.
2200
2201         * CMakeLists.txt:
2202         * GNUmakefile.list.am:
2203         * Target.pri:
2204         * WebCore.gypi:
2205         * WebCore.xcodeproj/project.pbxproj:
2206         * dom/AncestorChainWalker.cpp: Added. Extracted from ComposedShadowTreeWalker.cpp
2207         (WebCore):
2208         (WebCore::AncestorChainWalker::AncestorChainWalker):
2209         (WebCore::AncestorChainWalker::parent):
2210         * dom/AncestorChainWalker.h: Added. Extracted from ComposedShadowTreeWalker.h
2211         (WebCore):
2212         (AncestorChainWalker):
2213         (WebCore::AncestorChainWalker::get):
2214         (WebCore::AncestorChainWalker::crossingInsertionPoint):
2215         * dom/ComposedShadowTreeWalker.cpp:
2216         * dom/ComposedShadowTreeWalker.h:
2217         * dom/DOMAllInOne.cpp:
2218         * dom/ElementShadow.h:
2219         (WebCore::shadowOfParent):
2220         (WebCore):
2221         * dom/EventDispatcher.cpp:
2222         * dom/Node.cpp:
2223         * dom/NodeRenderingTraversal.cpp:
2224         (WebCore::NodeRenderingTraversal::nextInScope):
2225         (NodeRenderingTraversal):
2226         (WebCore::NodeRenderingTraversal::previousInScope): Added.
2227         (WebCore::NodeRenderingTraversal::parentInScope): Added.
2228         (WebCore::NodeRenderingTraversal::lastChildInScope): Added.
2229         * dom/NodeRenderingTraversal.h:
2230         (NodeRenderingTraversal):
2231         * dom/TreeScope.cpp:
2232         * html/HTMLLIElement.cpp:
2233         (WebCore::HTMLLIElement::attach):
2234         * page/EventHandler.cpp:
2235         * page/FocusController.cpp: Replacing CSTW with NRT
2236         (WebCore):
2237         (WebCore::FocusNavigationScope::focusNavigationScopeOf):
2238         (WebCore::FocusController::findNodeWithExactTabIndex):
2239         (WebCore::nextNodeWithGreaterTabIndex):
2240         (WebCore::previousNodeWithLowerTabIndex):
2241         (WebCore::FocusController::nextFocusableNode):
2242         (WebCore::FocusController::previousFocusableNode):
2243
2244 2013-01-10  Zan Dobersek  <zandobersek@gmail.com>
2245
2246         Remove the ENABLE_ANIMATION_API feature define occurences
2247         https://bugs.webkit.org/show_bug.cgi?id=106544
2248
2249         Reviewed by Simon Fraser.
2250
2251         The Animation API code was removed in r137243. The ENABLE_ANIMATION_API
2252         feature define handling still lingers in various build systems and configurations
2253         but is of no use, so it should be removed.
2254
2255         No new tests - no new functionality.
2256
2257         * Configurations/FeatureDefines.xcconfig:
2258         * GNUmakefile.features.am.in:
2259
2260 2013-01-10  Robert Phillips  <robertphillips@chromium.org>
2261
2262         Serialization of Gradients fails when PlatformContextSkia is not bitmap backed
2263         https://bugs.webkit.org/show_bug.cgi?id=106559
2264
2265         Reviewed by Stephen White.
2266
2267         This patch switches over from having platform/Skia improperly
2268         crack open the device to find the bitmap configuration to just
2269         specifying it directly.
2270
2271         No new tests. This bug is Chromium specific and only occurs in a
2272         debugging tool (when serializing to a Skia-specific file format).
2273
2274         * platform/graphics/skia/PlatformContextSkia.cpp:
2275         (WebCore::PlatformContextSkia::createCompatibleDevice):
2276
2277 2013-01-10  Alexander Pavlov  <apavlov@chromium.org>
2278
2279         The "outline-offset" property is not found in the computed style property list
2280         https://bugs.webkit.org/show_bug.cgi?id=106561
2281
2282         Reviewed by Alexis Menard.
2283
2284         Listed CSSPropertyOutlineOffset in the CSSComputedStyleDeclaration's computedProperties[].
2285
2286         Test: fast/css/getComputedStyle/getComputedStyle-outline-offset.html
2287
2288         * css/CSSComputedStyleDeclaration.cpp:
2289
2290 2013-01-10  David Faure  <faure@kde.org>
2291
2292         PluginPackage::freeLibraryTimerFired asserts if plugin got loaded again meanwhile
2293         https://bugs.webkit.org/show_bug.cgi?id=106463
2294
2295         Reviewed by Simon Hausmann.
2296
2297         No new tests, this code path will be tested by bug 106140.
2298
2299         * plugins/PluginPackage.cpp:
2300         (WebCore::PluginPackage::freeLibraryTimerFired): skip unloading if loaded again meanwhile.
2301
2302 2013-01-10  Alexander Pavlov  <apavlov@chromium.org>
2303
2304         CSSParser does not allow the absence of whitespace between "and" and "expression"
2305         https://bugs.webkit.org/show_bug.cgi?id=106458
2306
2307         Reviewed by Antti Koivisto.
2308
2309         The issue was that a construct similar to "and(max-width: 480px)" looks like a function call (token type FUNCTION), even though
2310         it is actually a MEDIA_AND followed by a parenthesized expression.
2311
2312         Test: fast/css/media-rule-no-whitespace.html
2313
2314         * css/CSSParser.cpp:
2315         (WebCore::CSSParser::detectFunctionTypeToken): Return if the detection has been successful.
2316         (WebCore::CSSParser::realLex): Test for media query tokens if function type detection has failed.
2317         * css/CSSParser.h:
2318
2319 2013-01-10  Alexis Menard  <alexis@webkit.org>
2320
2321         ASSERT_NOT_REACHED in StylePropertySet::fontValue when accessing font style property through JS after setting style font size.
2322         https://bugs.webkit.org/show_bug.cgi?id=88866
2323
2324         Reviewed by Alexander Pavlov.
2325
2326         StylePropertySet::fontValue always assumed that it was called using
2327         style.font after a subsequent call which set the shorthand font. The
2328         ASSERT_NOT_REACHED assumed that all longhands of the font shorthand not
2329         set by the shorthand itself were set to initial. While it's true when
2330         we set the font shorthand (i.e all longhands are set to implicit initial)
2331         it is not true when you set the longhands individually. For example setting
2332         font-size will not set other font properties to initial. It is the behavior of all
2333         other shorthands in WebKit. When reconstructing the shorthand other
2334         properties tests whether the value of each longhands is initial or not
2335         (if not then we omit the value, as we should always construct the
2336         shortest shorthand possible) or if the value is set or not (if set then
2337         we include it in the shorthand if not then we omit it). The comment
2338         removed was also talking about invalid font property potentially built
2339         by fontValue(). So far appendFontLonghandValueIfExplicit will always
2340         construct a valid value as it takes care of adding ' ' or '/' when
2341         needed, so the return value is parsable and correct.
2342
2343         Test: fast/css/font-shorthand-from-longhands.html
2344
2345         * css/StylePropertySet.cpp:
2346         (WebCore::StylePropertySet::appendFontLonghandValueIfExplicit):
2347         (WebCore::StylePropertySet::fontValue):
2348         * css/StylePropertySet.h:
2349
2350 2013-01-10  Sheriff Bot  <webkit.review.bot@gmail.com>
2351
2352         Unreviewed, rolling out r139306.
2353         http://trac.webkit.org/changeset/139306
2354         https://bugs.webkit.org/show_bug.cgi?id=106550
2355
2356         it broke inspector-protocol/nmi-webaudio-leak-test.html
2357         (Requested by loislo on #webkit).
2358
2359         * bindings/v8/V8PerIsolateData.cpp:
2360         (WebCore::V8PerIsolateData::reportMemoryUsage):
2361         * css/CSSMediaRule.cpp:
2362         (WebCore::CSSMediaRule::reportMemoryUsage):
2363         * css/CSSProperty.cpp:
2364         (WebCore::CSSProperty::reportMemoryUsage):
2365         * css/CSSStyleSheet.cpp:
2366         (WebCore::CSSStyleSheet::reportMemoryUsage):
2367         * css/MediaList.cpp:
2368         (WebCore::MediaList::reportMemoryUsage):
2369         * css/RuleSet.cpp:
2370         (WebCore::RuleData::reportMemoryUsage):
2371         (WebCore::RuleSet::reportMemoryUsage):
2372         (WebCore::RuleSet::RuleSetSelectorPair::reportMemoryUsage):
2373         * css/StyleResolver.cpp:
2374         (WebCore::StyleResolver::MatchedPropertiesCacheItem::reportMemoryUsage):
2375         (WebCore::StyleResolver::reportMemoryUsage):
2376         * css/StyleSheetContents.cpp:
2377         (WebCore::StyleSheetContents::reportMemoryUsage):
2378         * dom/TreeScope.cpp:
2379         (WebCore::TreeScope::reportMemoryUsage):
2380         * inspector/HeapGraphSerializer.cpp:
2381         (WebCore::HeapGraphSerializer::reportMemoryUsage):
2382         * inspector/InspectorMemoryAgent.cpp:
2383         * inspector/InspectorProfilerAgent.cpp:
2384         (WebCore::InspectorProfilerAgent::reportMemoryUsage):
2385         * inspector/MemoryInstrumentationImpl.cpp:
2386         (WebCore::MemoryInstrumentationClientImpl::reportMemoryUsage):
2387         * loader/DocumentLoader.cpp:
2388         (WebCore::DocumentLoader::reportMemoryUsage):
2389         * loader/FrameLoader.cpp:
2390         (WebCore::FrameLoader::reportMemoryUsage):
2391         * loader/MainResourceLoader.cpp:
2392         (WebCore::MainResourceLoader::reportMemoryUsage):
2393         * loader/Prerenderer.cpp:
2394         (WebCore::Prerenderer::reportMemoryUsage):
2395         * loader/ResourceLoader.cpp:
2396         (WebCore::ResourceLoader::reportMemoryUsage):
2397         * loader/cache/CachedImage.cpp:
2398         (WebCore::CachedImage::reportMemoryUsage):
2399         * page/Page.cpp:
2400         (WebCore::Page::reportMemoryUsage):
2401
2402 2013-01-10  Ilya Tikhonovsky  <loislo@chromium.org>
2403
2404         Web Inspector: Native Memory Instrumentation: fix instrumentation for already instrumented classes 2/N
2405         https://bugs.webkit.org/show_bug.cgi?id=106546
2406
2407         Reviewed by Vsevolod Vlasov.
2408
2409         Many nontrivial class members were instrumented in reportMemoryUsage methods.
2410
2411         * bindings/v8/V8PerIsolateData.cpp:
2412         (WebCore::V8PerIsolateData::reportMemoryUsage):
2413         * css/CSSMediaRule.cpp:
2414         (WebCore::CSSMediaRule::reportMemoryUsage):
2415         * css/CSSProperty.cpp:
2416         (WebCore::CSSProperty::reportMemoryUsage):
2417         * css/CSSStyleSheet.cpp:
2418         (WebCore::CSSStyleSheet::reportMemoryUsage):
2419         * css/MediaList.cpp:
2420         (WebCore::MediaList::reportMemoryUsage):
2421         * css/RuleSet.cpp:
2422         (WebCore::RuleData::reportMemoryUsage):
2423         (WebCore::RuleSet::reportMemoryUsage):
2424         (WebCore::RuleSet::RuleSetSelectorPair::reportMemoryUsage):
2425         * css/StyleResolver.cpp:
2426         (WebCore::StyleResolver::MatchedPropertiesCacheItem::reportMemoryUsage):
2427         (WebCore::StyleResolver::reportMemoryUsage):
2428         * css/StyleSheetContents.cpp:
2429         (WebCore::StyleSheetContents::reportMemoryUsage):
2430         * dom/TreeScope.cpp:
2431         (WebCore::TreeScope::reportMemoryUsage):
2432         * inspector/HeapGraphSerializer.cpp:
2433         (WebCore::HeapGraphSerializer::reportMemoryUsage):
2434         * inspector/InspectorMemoryAgent.cpp:
2435         * inspector/InspectorProfilerAgent.cpp:
2436         (WebCore::InspectorProfilerAgent::reportMemoryUsage):
2437         * inspector/MemoryInstrumentationImpl.cpp:
2438         (WebCore::MemoryInstrumentationClientImpl::reportMemoryUsage):
2439         * loader/DocumentLoader.cpp:
2440         (WebCore::DocumentLoader::reportMemoryUsage):
2441         * loader/FrameLoader.cpp:
2442         (WebCore::FrameLoader::reportMemoryUsage):
2443         * loader/MainResourceLoader.cpp:
2444         (WebCore::MainResourceLoader::reportMemoryUsage):
2445         * loader/Prerenderer.cpp:
2446         (WebCore::Prerenderer::reportMemoryUsage):
2447         * loader/ResourceLoader.cpp:
2448         (WebCore::ResourceLoader::reportMemoryUsage):
2449         * loader/cache/CachedImage.cpp:
2450         (WebCore::CachedImage::reportMemoryUsage):
2451         * page/Page.cpp:
2452         (WebCore::Page::reportMemoryUsage):
2453
2454 2013-01-10  Christophe Dumez  <christophe.dumez@intel.com>
2455
2456         [EFL] Add gstreamer 1.0.5 to jhbuild
2457         https://bugs.webkit.org/show_bug.cgi?id=106178
2458
2459         Reviewed by Laszlo Gombos.
2460
2461         Remove GSTREAMER_INTERFACES_LIBRARIES from EFL
2462         CMake configuration.
2463
2464         No new tests, no behavior change for layout tests.
2465
2466         * PlatformEfl.cmake:
2467
2468 2013-01-09  Christophe Dumez  <christophe.dumez@intel.com>
2469
2470         Unreviewed build fix after r139266.
2471
2472         r139266 broke the debug build of the gstreamer backend due
2473         to a missing header include.
2474
2475         No new tests, no behavior change.
2476
2477         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
2478
2479 2013-01-09  Alec Flett  <alecflett@chromium.org>
2480
2481         IndexedDB: Allow createIndex/createObjectStore to be asynchronous
2482         https://bugs.webkit.org/show_bug.cgi?id=106377
2483
2484         Reviewed by Tony Chang.
2485
2486         Migrate implementations of createIndex/deleteIndex,
2487         createObjectStore/deleteObjectStore over to IDBDatabaseBackendImpl,
2488         so that they can be asynchronous in multi-process ports.
2489
2490         Has the side effect of removing the last consumers of
2491         IDBIndexBackendImpl and IDBObjectStoreBackendImpl. The former
2492         is removed complete and the latter becomes a temporary namespace
2493         pending a further more mechanical code shuffle.
2494
2495         A key refactoring effect is that the IDBDatabaseBackendImpl
2496         now contains the authoritative IDBDatabaseMetadata hierarchy,
2497         and updates to it are consolidated in one place rather than
2498         scattered across a parallel object tree.
2499
2500         No new tests as this is just refactoring.
2501
2502         * Modules/indexeddb/IDBBackingStore.cpp: Simplify objectstore/index loading and propagate errors.
2503         (WebCore::IDBBackingStore::getObjectStores):
2504         (WebCore::IDBBackingStore::getIndexes):
2505         * Modules/indexeddb/IDBBackingStore.h:
2506         (IDBBackingStore):
2507         * Modules/indexeddb/IDBCursorBackendImpl.cpp: Dependency cleanup.
2508         * Modules/indexeddb/IDBCursorBackendImpl.h: Dependency cleanup.
2509         (WebCore):
2510         * Modules/indexeddb/IDBDatabase.cpp: Frontend IDBObjectStores no longer hold onto backend objects.
2511         (WebCore::IDBDatabase::createObjectStore):
2512         (WebCore::IDBDatabase::deleteObjectStore):
2513         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Add all create/deleteIndex operations from IDBIndexBackendImpl.
2514         (WebCore::CreateObjectStoreOperation::create):
2515         (WebCore::CreateObjectStoreOperation::CreateObjectStoreOperation):
2516         (CreateObjectStoreOperation):
2517         (WebCore::DeleteObjectStoreOperation::create):
2518         (WebCore::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
2519         (DeleteObjectStoreOperation):
2520         (WebCore::CreateObjectStoreAbortOperation::create):
2521         (WebCore::CreateObjectStoreAbortOperation::CreateObjectStoreAbortOperation):
2522         (CreateObjectStoreAbortOperation):
2523         (WebCore::DeleteObjectStoreAbortOperation::create):
2524         (WebCore::DeleteObjectStoreAbortOperation::DeleteObjectStoreAbortOperation):
2525         (DeleteObjectStoreAbortOperation):
2526         (CreateIndexOperation):
2527         (WebCore::CreateIndexOperation::create):
2528         (WebCore::CreateIndexOperation::CreateIndexOperation):
2529         (WebCore):
2530         (DeleteIndexOperation):
2531         (WebCore::DeleteIndexOperation::create):
2532         (WebCore::DeleteIndexOperation::DeleteIndexOperation):
2533         (CreateIndexAbortOperation):
2534         (WebCore::CreateIndexAbortOperation::create):
2535         (WebCore::CreateIndexAbortOperation::CreateIndexAbortOperation):
2536         (DeleteIndexAbortOperation):
2537         (WebCore::DeleteIndexAbortOperation::create):
2538         (WebCore::DeleteIndexAbortOperation::DeleteIndexAbortOperation):
2539         (WebCore::GetOperation::GetOperation):
2540         (WebCore::IDBDatabaseBackendImpl::addObjectStore):
2541         (WebCore::IDBDatabaseBackendImpl::removeObjectStore):
2542         (WebCore::IDBDatabaseBackendImpl::addIndex):
2543         (WebCore::IDBDatabaseBackendImpl::removeIndex):
2544         (WebCore::IDBDatabaseBackendImpl::openInternal):
2545         (WebCore::IDBDatabaseBackendImpl::metadata):
2546         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
2547         (WebCore::CreateObjectStoreOperation::perform):
2548         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
2549         (WebCore::IDBDatabaseBackendImpl::createIndex):
2550         (WebCore::CreateIndexOperation::perform):
2551         (WebCore::CreateIndexAbortOperation::perform):
2552         (WebCore::IDBDatabaseBackendImpl::deleteIndex):
2553         (WebCore::DeleteIndexOperation::perform):
2554         (WebCore::DeleteIndexAbortOperation::perform):
2555         (WebCore::IDBDatabaseBackendImpl::get):
2556         (WebCore::IDBDatabaseBackendImpl::put):
2557         (WebCore::IDBDatabaseBackendImpl::setIndexKeys):
2558         (WebCore::IDBDatabaseBackendImpl::count):
2559         (WebCore::DeleteRangeOperation::perform):
2560         (WebCore::DeleteObjectStoreOperation::perform):
2561         (WebCore::IDBDatabaseBackendImpl::deleteDatabaseFinal):
2562         (WebCore::IDBDatabaseBackendImpl::loadObjectStores): Load directly into metadata from backing store.
2563         (WebCore::CreateObjectStoreAbortOperation::perform):
2564         (WebCore::DeleteObjectStoreAbortOperation::perform):
2565         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
2566         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
2567         (WebCore):
2568         (IDBDatabaseBackendImpl):
2569         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
2570         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
2571         * Modules/indexeddb/IDBIndexBackendImpl.cpp: Removed.
2572         * Modules/indexeddb/IDBIndexBackendImpl.h: Removed.
2573         * Modules/indexeddb/IDBObjectStore.cpp:
2574         (WebCore::IDBObjectStore::IDBObjectStore): Frontend IDBIndex objects no longer hold onto backend.
2575         (WebCore::IDBObjectStore::createIndex): 
2576         (WebCore::IDBObjectStore::deleteIndex):
2577         * Modules/indexeddb/IDBObjectStore.h:
2578         (WebCore::IDBObjectStore::create):
2579         (IDBObjectStore):
2580         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2581         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
2582         (WebCore):
2583         (IDBObjectStoreBackendImpl):
2584         * Modules/indexeddb/IDBTransaction.cpp:
2585         (WebCore::IDBTransaction::objectStore):
2586         * Modules/indexeddb/IDBTransaction.h:
2587         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
2588         * Modules/indexeddb/IDBTransactionBackendImpl.h:
2589         (WebCore::IDBTransactionBackendImpl::objectStore):
2590         * WebCore.gypi:
2591         * WebCore.vcproj/WebCore.vcproj:
2592         * WebCore.xcodeproj/project.pbxproj:
2593
2594 2013-01-09  John J. Barton  <johnjbarton@chromium.org>
2595
2596         Web Inspector: Don't throw exceptions when we don't have a callstack
2597         https://bugs.webkit.org/show_bug.cgi?id=104849
2598
2599         Reviewed by Pavel Feldman.
2600
2601         Check array details.callFrames.length before accessing array;
2602
2603         No new tests, but this fix may help us find the cause of 'other' reasons.
2604
2605         * inspector/front-end/ScriptsPanel.js:
2606         (WebInspector.ScriptsPanel.prototype._debuggerPaused):
2607
2608 2013-01-09  Eugene Klyuchnikov  <eustas@chromium.org>
2609
2610         Web Inspector: [Network] Data grid header and content cells are misaligned.
2611         https://bugs.webkit.org/show_bug.cgi?id=105795
2612
2613         Reviewed by Pavel Feldman.
2614
2615         Header and content tables have different width -> same percent values
2616         turn to different cell widths.
2617
2618         * inspector/front-end/DataGrid.js: Add "corner" cell to all rows.
2619         * inspector/front-end/dataGrid.css: Apply "corner" rules to "td" nodes.
2620         (.data-grid .data-container): Remove artificial padding.
2621
2622 2013-01-09  Tien-Ren Chen  <trchen@chromium.org>
2623
2624         Make caret repainting container-aware
2625         https://bugs.webkit.org/show_bug.cgi?id=103955
2626
2627         Reviewed by Simon Fraser.
2628
2629         Only invalidate local rects on the caret's repaint container,
2630         instead of invalidating an absolute rect on the whole view.
2631
2632         Test: fast/repaint/caret-with-transformation.html
2633
2634         * editing/FrameSelection.cpp:
2635         (WebCore::caretRendersInsideNode):
2636         (WebCore::caretRenderer):
2637         (WebCore::FrameSelection::caretRenderer):
2638         (WebCore::DragCaretController::caretRenderer):
2639         (WebCore::repaintCaretForLocalRect):
2640         (WebCore::FrameSelection::recomputeCaretRect):
2641         (WebCore::CaretBase::invalidateCaretRect):
2642         (WebCore::FrameSelection::focusedOrActiveStateChanged):
2643         * editing/FrameSelection.h:
2644         * rendering/RenderView.cpp:
2645         (WebCore::RenderView::repaintSelection):
2646         * rendering/RenderView.h:
2647
2648 2013-01-09  Ryosuke Niwa  <rniwa@webkit.org>
2649
2650         Rebaseline the binding test after r139278.
2651
2652         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2653         (WebCore::JSTestEventTarget::getOwnPropertySlot):
2654
2655 2013-01-09  Ryosuke Niwa  <rniwa@webkit.org>
2656
2657         [JSC] REGRESSION(r135093): A form control with name=length overrides length property on form.elements
2658         https://bugs.webkit.org/show_bug.cgi?id=105775
2659
2660         Reviewed by Sam Weinig.
2661
2662         Fixed the bug by respecting properties on ancestor classes.
2663
2664         Test: fast/dom/collection-length-should-not-be-overridden.html
2665
2666         * bindings/js/JSDOMBinding.h:
2667         (WebCore::getStaticValueSlotEntryWithoutCaching): Added.
2668         * bindings/scripts/CodeGeneratorJS.pm:
2669         (GenerateGetOwnPropertySlotBody): Use getStaticValueSlotEntryWithoutCaching to climb up the class
2670         hierarchy.
2671
2672 2013-01-09  Kondapally Kalyan  <kalyan.kondapally@intel.com>
2673
2674         [EFL] [WebGL] Remove GLX dependencies from X11WindowResources..
2675         https://bugs.webkit.org/show_bug.cgi?id=106319
2676
2677         Reviewed by Kenneth Rohde Christiansen.
2678
2679         This patch removes GLX specific calls from X11WindowResources.
2680         This class is shared by both GLX and EGL implementations.
2681
2682         * platform/graphics/surfaces/glx/GLXSurface.cpp:
2683         (WebCore::GLXTransportSurface::setGeometry):
2684         * platform/graphics/surfaces/glx/X11WindowResources.cpp:
2685         (WebCore::X11OffScreenWindow::reSizeWindow):
2686
2687 2013-01-09  Huang Dongsung  <luxtella@company100.net>
2688
2689         Remove deviceScaleFactor argument in computeMinimumScaleFactorForContentContained().
2690         https://bugs.webkit.org/show_bug.cgi?id=106500
2691
2692         Reviewed by Kenneth Rohde Christiansen.
2693
2694         deviceScaleFactor argument is not used after r139189.
2695
2696         No new tests. Refactoring only.
2697
2698         * dom/ViewportArguments.cpp:
2699         (WebCore::computeMinimumScaleFactorForContentContained):
2700         * dom/ViewportArguments.h:
2701         (WebCore):
2702
2703 2013-01-09  Elliott Sprehn  <esprehn@gmail.com>
2704
2705         Node::containingShadowRoot should be constant time
2706         https://bugs.webkit.org/show_bug.cgi?id=106494
2707
2708         Reviewed by Dimitri Glazkov.
2709
2710         There's no reason to traverse up the tree to find the containing
2711         ShadowRoot when we already know if we're in a ShadowRoot by looking at
2712         the treeScope().
2713
2714         No new tests, just refactoring.
2715
2716         * dom/Node.cpp:
2717         (WebCore::Node::containingShadowRoot):
2718
2719 2013-01-09  Hajime Morrita  <morrita@google.com>
2720
2721         [Shadow DOM] Distribution related code on ElementShadow should be minimized.
2722         https://bugs.webkit.org/show_bug.cgi?id=106294
2723
2724         Reviewed by Dimitri Glazkov.
2725
2726         This change moves ElementShadow::m_selectFeatures,
2727         m_shouldCollectSelectFeatureSet and related methods to
2728         ContentDistributor.
2729
2730         There are also some renaming and small refactorings for better fit
2731         on new place:
2732
2733         - shouldCollectSelectFeatureSet is renamed needsSelectorRuleSet for conciseness.
2734         - setShouldCollectSelectFeatureSet() which used recursion morphed into
2735           iterative willAffectSelector().
2736         - ensureDistributionFromDocument() becomes a static method.
2737
2738         No new tests. Refactoring.
2739
2740         * WebCore.exp.in:
2741         * dom/Element.cpp:
2742         (WebCore::Element::shouldInvalidateDistributionWhenAttributeChanged):
2743         * dom/ElementShadow.cpp:
2744         (WebCore::ElementShadow::addShadowRoot):
2745         (WebCore::ElementShadow::removeAllShadowRoots):
2746         * dom/ElementShadow.h:
2747         (ElementShadow):
2748         (WebCore::ElementShadow::invalidateDistribution):
2749         (WebCore::ElementShadow::ensureDistribution):
2750         (WebCore::ElementShadow::didAffectSelector):
2751         (WebCore::ElementShadow::willAffectSelector):
2752         (WebCore::ElementShadow::containingShadow):
2753         (WebCore):
2754         * html/shadow/ContentDistributor.cpp:
2755         (WebCore::ScopeContentDistribution::registerInsertionPoint):
2756         (WebCore::ScopeContentDistribution::unregisterInsertionPoint):
2757         (WebCore::ContentDistributor::ContentDistributor):
2758         (WebCore::ContentDistributor::ensureDistribution):
2759         (WebCore):
2760         (WebCore::ContentDistributor::ensureDistributionFromDocument):
2761         (WebCore::ContentDistributor::invalidateDistribution):
2762         (WebCore::ContentDistributor::ensureSelectFeatureSet):
2763         (WebCore::ContentDistributor::collectSelectFeatureSetFrom):
2764         (WebCore::ContentDistributor::didAffectSelector):
2765         (WebCore::ContentDistributor::willAffectSelector):
2766         (WebCore::ContentDistributor::didShadowBoundaryChange):
2767         * html/shadow/ContentDistributor.h:
2768         (ScopeContentDistribution):
2769         (WebCore::ContentDistributor::needsSelectFeatureSet):
2770         (WebCore::ContentDistributor::setNeedsSelectFeatureSet):
2771         (ContentDistributor):
2772         (WebCore::ContentDistributor::setValidity):
2773         (WebCore::ContentDistributor::needsInvalidation):
2774         * html/shadow/HTMLContentElement.cpp:
2775         (WebCore::HTMLContentElement::parseAttribute):
2776         * html/shadow/HTMLContentElement.h:
2777         * html/shadow/HTMLShadowElement.cpp:
2778         (WebCore::HTMLShadowElement::olderShadowRoot):
2779         * html/shadow/InsertionPoint.cpp:
2780         (WebCore::InsertionPoint::getDistributedNodes):
2781         (WebCore::InsertionPoint::insertedInto):
2782         (WebCore::InsertionPoint::removedFrom):
2783         * html/shadow/InsertionPoint.h:
2784         (WebCore::InsertionPoint::canAffectSelector):
2785         * testing/Internals.cpp:
2786         (WebCore::Internals::hasSelectorForIdInShadow):
2787         (WebCore::Internals::hasSelectorForClassInShadow):
2788         (WebCore::Internals::hasSelectorForAttributeInShadow):
2789         (WebCore::Internals::hasSelectorForPseudoClassInShadow):
2790
2791 2013-01-09  Shinya Kawanaka  <shinyak@chromium.org>
2792
2793         Assert triggered in SelectorChecker::checkOneSelector when scrollbar (e.g. :horizontal) selector is specified.
2794         https://bugs.webkit.org/show_bug.cgi?id=106414
2795
2796         Reviewed by Dimitri Glazkov.
2797
2798         In SelectorChecker::checkOneSelector, scrollbar related pseudoType (e.g. :horizontal) is not handled anywhere.
2799         This caused ASSERT triggered. We have to check them.
2800
2801         Test: fast/css/scrollbar-crash.html
2802
2803         * css/SelectorChecker.cpp:
2804         (WebCore::SelectorChecker::checkOneSelector):
2805
2806 2013-01-09  Filip Pizlo  <fpizlo@apple.com>
2807
2808         Unreviewed, fix build after http://trac.webkit.org/changeset/139262
2809
2810         * Modules/webaudio/DefaultAudioDestinationNode.cpp:
2811
2812 2013-01-09  Chris Rogers  <crogers@google.com>
2813
2814         Allow live/local audio input to be enabled only when needed
2815         https://bugs.webkit.org/show_bug.cgi?id=106490
2816
2817         Reviewed by Kenneth Russell.
2818         
2819         WebAudio can process live/local audio input using a MediaStreamAudioSourceNode.
2820         But currently the audio back-end is not able to know when/if audio input will be
2821         needed, so it needs to assume the worst and initialize the system to support potential
2822         audio input in all cases.  For some audio back-ends this can end up being less efficient
2823         than initializing for audio output only.  This patch adds the ability for the audio back-end
2824         to be able to initialize itself for audio input later on, only when/if it's needed.
2825
2826         * Modules/webaudio/AudioContext.cpp:
2827         (WebCore::AudioContext::createMediaStreamSource):
2828         * Modules/webaudio/AudioDestinationNode.h:
2829         (AudioDestinationNode):
2830         * Modules/webaudio/DefaultAudioDestinationNode.cpp:
2831         (WebCore::DefaultAudioDestinationNode::DefaultAudioDestinationNode):
2832         (WebCore::DefaultAudioDestinationNode::initialize):
2833         (WebCore::DefaultAudioDestinationNode::uninitialize):
2834         (WebCore::DefaultAudioDestinationNode::createDestination):
2835         (WebCore):
2836         (WebCore::DefaultAudioDestinationNode::enableInput):
2837         * Modules/webaudio/DefaultAudioDestinationNode.h:
2838         (DefaultAudioDestinationNode):
2839         * Modules/webaudio/OfflineAudioDestinationNode.h:
2840         (OfflineAudioDestinationNode):
2841         (WebCore::OfflineAudioDestinationNode::sampleRate):
2842         * platform/audio/AudioDestination.h:
2843         (AudioDestination):
2844         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
2845         (WebCore::AudioDestination::create):
2846         * platform/audio/mac/AudioDestinationMac.cpp:
2847         (WebCore::AudioDestination::create):
2848
2849 2013-01-09  Tim Horton  <timothy_horton@apple.com>
2850
2851         Don't drop to huge tile mode if we're only slow-scrolling because of a page overlay
2852         https://bugs.webkit.org/show_bug.cgi?id=106502
2853         <rdar://problem/12959143>
2854
2855         Reviewed by Simon Fraser.
2856
2857         We only use the MainThreadScrollingReason "ForcedOnMainThread" if WebKit2 installs
2858         a page overlay (TiledCoreAnimationDrawingArea::didInstallPageOverlay), which clients
2859         can cause arbitrarily.
2860
2861         We probably should still use default-sized tiles in this case (this will also
2862         prevent us from falling into gigantic tiles for WebKit2 find-in-page, among other things).
2863
2864         * rendering/RenderLayerBacking.cpp:
2865         (WebCore::RenderLayerBacking::adjustTileCacheCoverage):
2866
2867 2013-01-09  Takashi Sakamoto  <tasak@google.com>
2868
2869         border-radius with box-shadow is not rendered correctly
2870         https://bugs.webkit.org/show_bug.cgi?id=106404
2871
2872         Reviewed by Hajime Morita.
2873
2874         RoundedRect::isRenderable is wrong. So RoundedRect::adjustRadii
2875         is invoked for renderable RoundedRects.
2876
2877         Test: fast/borders/border-radius-with-box-shadow.html
2878
2879         * platform/graphics/RoundedRect.cpp:
2880         (WebCore::RoundedRect::isRenderable):
2881         Have to compare topLeft's height plus bottomLeft's height with
2882         rect's height and to compare topRight's height plus bottomRight's
2883         height with rect's height.
2884
2885 2013-01-09  Joanmarie Diggs  <jdiggs@igalia.com>
2886
2887         [GTK] accessibility/aria-labelledby-overrides-label.html requires a proper baseline
2888         https://bugs.webkit.org/show_bug.cgi?id=105638
2889
2890         Reviewed by Martin Robinson.
2891
2892         The test was failing for two reasons:
2893         - AccessibilityRenderObject::correspondingLabelForControlElement() was
2894           not ignoring the ARIA labelled-by property
2895         - AccessibilityController::accessibleElementById() was not implemented
2896
2897         Because getting an element by ID cannot be done in the UIProcess, the
2898         decision was made to expose the element's ID as an accessible attribute
2899         of the object.
2900
2901         In addition, fixing the bug in AccessibilityRenderObject made it possible
2902         to eliminate the Gtk platform-specific expectations for another test.
2903
2904         No new tests; instead, the failing test was unskipped and a proper baseline
2905         provided.
2906
2907         * accessibility/AccessibilityRenderObject.cpp:
2908         (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement):
2909         Return null for objects where hasTextAlternative() is true.
2910         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2911         (webkitAccessibleGetAttributes): Expose the element's ID as an accessible
2912         attribute.
2913
2914 2013-01-09  Tony Gentilcore  <tonyg@chromium.org>
2915
2916         Remove unused includes from HTMLTreeBuilder
2917         https://bugs.webkit.org/show_bug.cgi?id=106496
2918
2919         Reviewed by Levi Weintraub.
2920
2921         Noticed these while searching HTMLTreeBuilder for non-thread friendly deps.
2922
2923         No new tests because no new functionality.
2924
2925         * html/parser/HTMLTreeBuilder.cpp:
2926
2927 2013-01-09  Max Vujovic  <mvujovic@adobe.com>
2928
2929         [CSS Shaders] Detached identifier after mesh box type is not applied
2930         https://bugs.webkit.org/show_bug.cgi?id=105321
2931
2932         Reviewed by Dean Jackson.
2933
2934         Before this patch, if a "detached" identifier followed a mesh box type identifier, the
2935         detached identifier was not applied. In other words, the mesh would still be attached.
2936
2937         For example:
2938         -webkit-filter: custom(url(...) mix(url(...) normal source-atop), 1 1 border-box detached);
2939
2940         Although the mesh box type is being removed from the Filter Effects spec, for now, we
2941         continue to accept the mesh box type in parsing because of existing content. Eventually,
2942         custom filters will transition to an at-rule syntax, once it is defined.
2943
2944         Test: css3/filters/custom/custom-filter-detached-mesh-with-mesh-box-type.html
2945
2946         * css/CSSParser.cpp:
2947         (WebCore::CSSParser::parseCustomFilter):
2948             In CSSParser, do not add the mesh box type identifier to the list that will be passed to
2949             StyleResolver. StyleResolver is expecting a "detached" identifier in that position and
2950             does not interpret mesh box types.
2951
2952 2013-01-09  Dan Winship  <danw@gnome.org>
2953
2954         [Soup] Handle redirection inside WebKit
2955         https://bugs.webkit.org/show_bug.cgi?id=61122
2956         https://bugs.webkit.org/show_bug.cgi?id=88961
2957
2958         Reviewed by Martin Robinson.
2959
2960         Rather than using libsoup's built-in redirection handling (which
2961         doesn't do everything exactly the way WebKit wants, and can't
2962         handle redirects to non-http URIs anyway), process redirections
2963         ourselves.
2964
2965         No new tests; unskips a few existing tests.
2966
2967         * platform/network/ResourceHandleInternal.h:
2968         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2969         (ResourceHandleInternal):
2970         * platform/network/soup/ResourceError.h:
2971         (ResourceError):
2972         * platform/network/soup/ResourceErrorSoup.cpp:
2973         (WebCore::ResourceError::transportError):
2974         (WebCore):
2975         (WebCore::ResourceError::httpError):
2976         * platform/network/soup/ResourceHandleSoup.cpp:
2977         (WebCore):
2978         (WebCore::gotHeadersCallback):
2979         (WebCore::restartedCallback):
2980         (WebCore::shouldRedirect):
2981         (WebCore::doRedirect):
2982         (WebCore::redirectCloseCallback):
2983         (WebCore::redirectSkipCallback):
2984         (WebCore::cleanupSoupRequestOperation):
2985         (WebCore::sendRequestCallback):
2986         (WebCore::createSoupMessageForHandleAndRequest):
2987         (WebCore::createSoupRequestAndMessageForHandle):
2988         (WebCore::ResourceHandle::start):
2989
2990 2013-01-09  Florin Malita  <fmalita@chromium.org>
2991
2992         [Skia] Implement GraphicsContext::addRoundedRectClip() using SkCanvas::clipRRect()
2993         https://bugs.webkit.org/show_bug.cgi?id=106461
2994
2995         Reviewed by Stephen White.
2996
2997         This patch adds a Skia-specific version of GraphicsContext::addRoundedRectClip() to take
2998         advantage of the SkCanvas::clipRRect() primitive.
2999
3000         As a minor cleanup, the anonymous namespace in GraphicsContextSkia.cpp is extended to cover
3001         all the local helper functions.
3002
3003         No new tests: coverage provided by existing tests.
3004
3005         * platform/graphics/GraphicsContext.cpp:
3006         (WebCore):
3007         * platform/graphics/skia/GraphicsContextSkia.cpp:
3008         (WebCore::GraphicsContext::addRoundedRectClip):
3009         (WebCore):
3010         (WebCore::GraphicsContext::fillRoundedRect):
3011         * platform/graphics/skia/PlatformContextSkia.h:
3012         (WebCore::PlatformContextSkia::clipRRect):
3013         (WebCore):
3014
3015 2013-01-09  Andreas Kling  <akling@apple.com>
3016
3017         SVG-as-image: Throw out cached bitmap renderings after they sit unused for some time.
3018         <http://webkit.org/b/106484>
3019         <rdar://problem/12983216>
3020
3021         Reviewed by Antti Koivisto.
3022
3023         Add a one-shot timer to SVGImageCache to self-clear the bitmap cache 30 seconds after last access.
3024         This prevents us from keeping huge ImageBuffers around in memory for the lifetime of the elements
3025         referencing that particular SVG file. (The ownership model is actually a bit more complicated
3026         but that's irrelevant to this issue.)
3027
3028         10234kB progression on Membuster3.
3029
3030         * svg/graphics/SVGImageCache.cpp:
3031         (WebCore::SVGImageCache::SVGImageCache):
3032         (WebCore::SVGImageCache::~SVGImageCache):
3033         (WebCore::SVGImageCache::clearBitmapCache):
3034         (WebCore::SVGImageCache::cacheClearTimerFired):
3035         (WebCore::SVGImageCache::lookupOrCreateBitmapImageForRenderer):
3036         * svg/graphics/SVGImageCache.h:
3037         (SVGImageCache):
3038
3039 2013-01-09  Alexey Proskuryakov  <ap@apple.com>
3040
3041         Assertion failure in SubresourceLoader::didFail when reloading
3042         https://bugs.webkit.org/show_bug.cgi?id=101416
3043
3044         Reviewed by Nate Chapin.
3045
3046         Test: http/tests/cache/network-error-during-revalidation.html
3047
3048         * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didFail): Handle revalidation.
3049
3050 2013-01-09  Alexandru Chiculita  <achicu@adobe.com>
3051
3052         Assertion Failure in WebCore::RenderLayerCompositor::updateCompositingLayers
3053         https://bugs.webkit.org/show_bug.cgi?id=106419
3054
3055         Reviewed by Simon Fraser.
3056
3057         No new tests added, just un-skipped 3 existing tests.
3058
3059         RenderLayerCompositor::updateCompositingLayers is being called with a pending layout, so computing the
3060         layers at that point would be useless & error-prone as they will be using incorrect layout values. If a layout is pending it means that 
3061         RenderLayerCompositor::updateCompositingLayers would get called again after the pending layout ends, so any values calculated at that point would be
3062         overwritten immediately. This patch removes the old ASSERT and makes it a return instead.
3063
3064         * rendering/RenderLayerCompositor.cpp:
3065         (WebCore::RenderLayerCompositor::updateCompositingLayers):
3066
3067 2013-01-09  Robert Hogan  <robert@webkit.org>
3068
3069         REGRESSION(r111439): Focus ring is rendered incorrectly in fast/inline/continuation-outlines-with-layers.html
3070         https://bugs.webkit.org/show_bug.cgi?id=106064
3071
3072         Reviewed by David Hyatt.
3073
3074         * rendering/RenderBlock.cpp:
3075         (WebCore::RenderBlock::paintObject): 
3076
3077 2013-01-09  Gregg Tavares  <gman@google.com>
3078
3079         Add stub for CanvasProxy
3080         https://bugs.webkit.org/show_bug.cgi?id=106275
3081
3082         Reviewed by Dean Jackson.
3083
3084         No new tests as no new fuctionality exposed.
3085
3086         * CMakeLists.txt:
3087         * DerivedSources.make:
3088         * DerivedSources.pri:
3089         * GNUmakefile.list.am:
3090         * Target.pri:
3091         * WebCore.gypi:
3092         * WebCore.xcodeproj/project.pbxproj:
3093         * html/canvas/CanvasProxy.cpp: Added.
3094         * html/canvas/CanvasProxy.h: Added.
3095         * html/canvas/CanvasProxy.idl: Added.
3096
3097 2013-01-09  Antti Koivisto  <antti@apple.com>
3098
3099         Release FastMalloc thread caches on memory warning
3100         https://bugs.webkit.org/show_bug.cgi?id=106471
3101
3102         Reviewed by Geoff Garen.
3103         
3104         FastMalloc keeps some memory in per-thread caches (currently 2MB each). We currently flush these caches on memory warning 
3105         for the main thread only. We should do it for other WebKit threads that use FastMalloc too.
3106
3107         Call WTF::releaseFastMallocFreeMemory in a bunch of WebCore support threads on memory warning. Unfortunately we don't have 
3108         an uniform way of doing threads so this requires bunch of thread type specific code.
3109         
3110         Looks to be ~1% progression in membuster3 final and maximum numbers.
3111
3112         * platform/mac/MemoryPressureHandlerMac.mm:
3113         (WebCore::MemoryPressureHandler::releaseMemory):
3114         * storage/StorageTask.cpp:
3115         (WebCore::StorageTask::performTask):
3116         * storage/StorageTask.h:
3117         (WebCore::StorageTask::createReleaseFastMallocFreeMemory):
3118         * storage/StorageThread.cpp:
3119         (WebCore::storageThreads):
3120         (WebCore):
3121         (WebCore::StorageThread::StorageThread):
3122         (WebCore::StorageThread::~StorageThread):
3123         (WebCore::StorageThread::releaseFastMallocFreeMemoryInAllThread):
3124         * storage/StorageThread.h:
3125         (StorageThread):
3126         * workers/WorkerThread.cpp:
3127         (WebCore::threadSetMutex):
3128         (WebCore::workerThreads):
3129         (WebCore::WorkerThread::workerThreadCount):
3130         (WebCore::WorkerThread::WorkerThread):
3131         (WebCore::WorkerThread::~WorkerThread):
3132         (WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThread):
3133         (WebCore):
3134         * workers/WorkerThread.h:
3135         (WorkerThread):
3136
3137 2013-01-09  Tony Gentilcore  <tonyg@chromium.org>
3138
3139         REGRESSION(r139141): Assertion failure in WebCore::HTMLConstructionSite::HTMLConstructionSite
3140         https://bugs.webkit.org/show_bug.cgi?id=106412
3141
3142         Reviewed by Darin Adler.
3143
3144         This corrects the assertion added in r139141. The assertion was designed to make sure that we are using the
3145         HTMLDocument class. XHTML documents also use HTMLDocument.
3146
3147         No new tests because no new functionality.
3148
3149         * html/parser/HTMLConstructionSite.cpp:
3150         (WebCore::HTMLConstructionSite::HTMLConstructionSite):
3151
3152 2013-01-08  Ojan Vafai  <ojan@chromium.org>
3153
3154         min-content gets the wrong value if min-width is set on some form controls
3155         https://bugs.webkit.org/show_bug.cgi?id=106389
3156
3157         Reviewed by Tony Chang.
3158
3159         Simplify the logic. The only exposed change in behavior is that
3160         m_minPreferredLogicalWidth gets set to m_maxPreferredLogicalWidth
3161         instead of 0 when min-width is set.
3162
3163         Test: fast/forms/min-content-form-controls.html
3164
3165         * rendering/RenderFileUploadControl.cpp:
3166         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
3167         * rendering/RenderListBox.cpp:
3168         (WebCore::RenderListBox::computePreferredLogicalWidths):
3169         * rendering/RenderMenuList.cpp:
3170         (WebCore::RenderMenuList::computePreferredLogicalWidths):
3171         * rendering/RenderSlider.cpp:
3172         (WebCore::RenderSlider::computePreferredLogicalWidths):
3173         * rendering/RenderTextControl.cpp:
3174         (WebCore::RenderTextControl::computePreferredLogicalWidths):
3175
3176 2013-01-09  Abhishek Arya  <inferno@chromium.org>
3177
3178         Mitigate out-of-bounds access in InlineIterator
3179         https://bugs.webkit.org/show_bug.cgi?id=104812
3180
3181         Reviewed by Levi Weintraub.
3182
3183         Share code between InlineIterator::current and InlineIterator::previousInSameNode,
3184         thereby checking for access outside text renderer's length.
3185
3186         * rendering/InlineIterator.h:
3187         (InlineIterator):
3188         (WebCore::InlineIterator::characterAt):
3189         (WebCore):
3190         (WebCore::InlineIterator::current):
3191         (WebCore::InlineIterator::previousInSameNode):
3192
3193 2013-01-09  Yongjun Zhang  <yongjun_zhang@apple.com>
3194
3195         If ImageLoader's loadEventSender or errorEventSender fires after document is detached, the document will be leaked.
3196
3197         https://bugs.webkit.org/show_bug.cgi?id=106394
3198
3199         Reviewed by Alexey Proskuryakov.
3200
3201         ImageLoader's loadEventSender and errorEventSender schedule event dispatching in separate timers and refs
3202         the Element in updatedHasPendingEvent.  If the Document is detached before either eventSender dispatches,
3203         we would leak the Document since we bail out early in dispatchPendingLoadEvent or dispatchPendingErrorEvent,
3204         without deref-ing the Element itself.
3205
3206         No new tests.  Verified manually by using heap tool to count the living HTMLDocuments.
3207
3208         * loader/ImageLoader.cpp:
3209         (WebCore::ImageLoader::dispatchPendingLoadEvent): also call updatedHasPendingEvent to deref the Element if
3210                     the document is detached.
3211         (WebCore::ImageLoader::dispatchPendingErrorEvent): ditto.
3212
3213 2013-01-09  Dimitri Glazkov  <dglazkov@chromium.org>
3214
3215         Unreviewed, rolling out r139143.
3216         http://trac.webkit.org/changeset/139143
3217         https://bugs.webkit.org/show_bug.cgi?id=106135
3218
3219         Broke Chromium content_browsertests.
3220
3221         * platform/leveldb/LevelDBDatabase.cpp:
3222         (WebCore::LevelDBDatabase::open):
3223         (WebCore::LevelDBDatabase::openInMemory):
3224
3225 2013-01-09  Sam Weinig  <sam@webkit.org>
3226
3227         Add Settings.in and make_settings.pl to the project.
3228
3229         Reviewed by Anders Carlsson.
3230
3231         * WebCore.xcodeproj/project.pbxproj:
3232
3233 2013-01-09  Ojan Vafai  <ojan@chromium.org>
3234
3235         marquee special-case in RenderBlock is not needed
3236         https://bugs.webkit.org/show_bug.cgi?id=106396
3237
3238         Reviewed by Simon Fraser.
3239
3240         This was added in http://trac.webkit.org/changeset/105772. The layout test
3241         in that patch (which is disabled) works and the original site that was broken
3242         also still works.
3243
3244         * rendering/RenderBlock.cpp:
3245         (WebCore::RenderBlock::computePreferredLogicalWidths):
3246
3247 2013-01-09  Tony Chang  <tony@chromium.org>
3248
3249         Automatically generate Settings::unifiedTextCheckerEnabled
3250         https://bugs.webkit.org/show_bug.cgi?id=106382
3251
3252         Reviewed by Adam Barth.
3253
3254         No new tests, no change in behavior. This is covered by existing editing/spelling tests.
3255
3256         * page/Settings.cpp:
3257         (WebCore): Move default value into a global so we can generate the initializer.
3258         (WebCore::Settings::Settings): Remove initializer code that is now generated.
3259         * page/Settings.h:
3260         (Settings): Remove getters and setters.
3261         * page/Settings.in: Add entry to be generated.
3262         * testing/InternalSettings.cpp:
3263         (WebCore::InternalSettings::Backup::Backup): Remove backup since the generated code does this.
3264         (WebCore::InternalSettings::Backup::restoreTo): Remove restore code since the generated code does this.
3265         * testing/InternalSettings.h:
3266         (InternalSettings): Remove member variable.
3267         * testing/InternalSettings.idl: The getter was unused so it's being removed. The setter is now generated.
3268
3269 2013-01-09  Alexis Menard  <alexis@webkit.org>
3270
3271         Implement CSS computed style value for transition shorthand
3272         https://bugs.webkit.org/show_bug.cgi?id=105035
3273
3274         Reviewed by Dean Jackson.
3275
3276         Implement support for query the transition and webkit-transition
3277         shorthand from the computed style.
3278
3279         Test: transitions/transitions-parsing.html
3280
3281         * css/CSSComputedStyleDeclaration.cpp:
3282         (WebCore::createTransitionPropertyValue): Factor the code to create the
3283         correct value into a function to reuse it for the shorthand.
3284         (WebCore::getTransitionPropertyValue):
3285         (WebCore::createTimingFunctionValue): Little refactor, the intermediate
3286         local variables are not needed.
3287         (WebCore::getTimingFunctionValue):
3288         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3289
3290 2013-01-09  Hajime Morrita  <morrita@google.com>
3291
3292         Document::setActiveNode() should be Document::setActiveElement()
3293         https://bugs.webkit.org/show_bug.cgi?id=106437
3294
3295         Reviewed by Ojan Vafai.
3296
3297         No new tests. No functoinal change.
3298
3299         * dom/Document.cpp:
3300         (WebCore::Document::setActiveElement):
3301         (WebCore::Document::updateHoverActiveState):
3302         * dom/Document.h:
3303         (Document):
3304         * rendering/HitTestResult.cpp:
3305         (WebCore::HitTestResult::innerElement):
3306         (WebCore):
3307         * rendering/HitTestResult.h:
3308         (HitTestResult):
3309
3310 2013-01-09  Shinya Kawanaka  <shinyak@chromium.org>
3311
3312         [Shadow DOM]: ShadowRoot has wrong nodeName attribute
3313         https://bugs.webkit.org/show_bug.cgi?id=104995
3314
3315         Reviewed by Dimitri Glazkov.
3316
3317         According to the Shadow DOM spec, ShadowRoot.nodeName should return '#document-fragment' instead of '#shadow-root'.
3318         We remove ShadowRoot::nodeName.
3319
3320         No new tests, covered by existing tests.
3321
3322         * dom/ShadowRoot.cpp:
3323         * dom/ShadowRoot.h:
3324         (ShadowRoot):
3325
3326 2013-01-09  Zoltan Horvath  <zoltan@webkit.org>
3327
3328         [CSS Regions] Selecting text through nested regions causes weird and unclearable selection  
3329         https://bugs.webkit.org/show_bug.cgi?id=105641
3330
3331         Reviewed by David Hyatt.
3332
3333         If you have a region with a nested region inside what is rendered below the base region and you are trying select text
3334         starting from the base region and ending it in the nested region, firstly you got a weird selection, secondly you can't
3335         clear the selection. We could prevent this strange behavior by preventing the selection through different region flows.
3336
3337         Test: fast/regions/selecting-text-through-different-region-flows.html
3338
3339         * rendering/RenderView.cpp:
3340         (WebCore::RenderView::setSelection): Don't allow selection when trying to select different region flows.
3341
3342 2013-01-09  Hugo Parente Lima  <hugo.lima@openbossa.org>
3343
3344         Regression(r138681) : Add HAVE(ACCESSIBILITY) guard to atk files, fix for a fix.
3345         https://bugs.webkit.org/show_bug.cgi?id=106448
3346
3347         Reviewed by Gyuyoung Kim.
3348
3349         Some atk files don't use HAVE(ACCESSIBILITY). It might make build errors when
3350         the macro isn't enabled.
3351
3352         * accessibility/atk/WebKitAccessibleHyperlink.h:
3353         * accessibility/atk/WebKitAccessibleInterfaceAction.h:
3354         * accessibility/atk/WebKitAccessibleInterfaceComponent.h:
3355         * accessibility/atk/WebKitAccessibleInterfaceHypertext.h:
3356
3357 2013-01-09  Chris Fleizach  <cfleizach@apple.com>
3358
3359         AX: native popup buttons should not use textUnderElement for their title
3360         https://bugs.webkit.org/show_bug.cgi?id=106349
3361
3362         Reviewed by Ryosuke Niwa.
3363
3364         Chromium relies on the older title() method to return its title. As a result, we also
3365         need to handle the case of <select> element pop up buttons returning the textUnderElement().
3366
3367         No new tests. Fix existing break.
3368
3369         * accessibility/AccessibilityNodeObject.cpp:
3370         (WebCore::AccessibilityNodeObject::title):
3371
3372 2013-01-09  Jussi Kukkonen  <jussi.kukkonen@intel.com>
3373
3374         IndexedDB: Remove ASSERTs that can't assert but result in compiler warnings
3375         https://bugs.webkit.org/show_bug.cgi?id=106442
3376
3377         Reviewed by Kentaro Hara.
3378
3379         IDBLevelDBCoding::m_metaDataType has been changed to unsigned
3380         so ASSERT(m_metaDataType >= 0) is no longer useful: the compiler
3381         warnings however create build difficulties at least with EFL.
3382
3383         * Modules/indexeddb/IDBLevelDBCoding.cpp:
3384         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::metaDataType):
3385         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::compare):
3386
3387 2012-12-29  Ilya Tikhonovsky  <loislo@chromium.org>
3388
3389         Web Inspector: Native Memory Instrumentation: fix instrumentation for already instrumented classes 1/N
3390         https://bugs.webkit.org/show_bug.cgi?id=106445
3391
3392         Reviewed by Vsevolod Vlasov.
3393
3394         The patch has almost mechanical changes.
3395
3396         * bindings/v8/V8Binding.cpp:
3397         * bindings/v8/V8ValueCache.cpp:
3398         (WTF):
3399         (WebCore::StringCache::reportMemoryUsage):
3400         (WebCore):
3401         * dom/Document.cpp:
3402         (WebCore::Document::reportMemoryUsage):
3403         * dom/DocumentStyleSheetCollection.cpp:
3404         (WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
3405         * dom/ElementRareData.cpp:
3406         (WebCore::ElementRareData::reportMemoryUsage):
3407         * loader/cache/CachedResource.cpp:
3408         (WebCore::CachedResource::reportMemoryUsage):
3409         * page/Frame.cpp:
3410         (WebCore::Frame::reportMemoryUsage):
3411         * page/Page.cpp:
3412         (WebCore::Page::reportMemoryUsage):
3413         * platform/graphics/skia/NativeImageSkia.cpp:
3414         (WebCore::NativeImageSkia::reportMemoryUsage):
3415         * platform/network/FormData.cpp:
3416         (WebCore::FormData::reportMemoryUsage):
3417         (WebCore):
3418         (WebCore::FormDataElement::reportMemoryUsage):
3419         * platform/network/FormData.h:
3420         (FormDataElement):
3421         * rendering/RenderView.cpp:
3422         (WebCore::RenderView::reportMemoryUsage):
3423         * rendering/style/StyleRareNonInheritedData.cpp:
3424         (WebCore::StyleRareNonInheritedData::reportMemoryUsage):
3425
3426 2013-01-09  Florin Malita  <fmalita@chromium.org>
3427
3428         [Skia] Implement GraphicsContext::fillRoundedRect() using SkCanvas::drawRRect()
3429         https://bugs.webkit.org/show_bug.cgi?id=106366
3430
3431         Reviewed by Stephen White.
3432
3433         Skia provides rounded-rect primitives, so we can avoid degrading fillRoundedRect() to
3434         drawPath().
3435
3436         Due to subtle pixel differences (not visually noticeable), switching from drawPath() to
3437         drawRRect() requires rebaselining some of the existing results.
3438
3439         No new tests: coverage provided by existing tests.
3440
3441         * platform/graphics/skia/GraphicsContextSkia.cpp:
3442         (WebCore::GraphicsContext::fillRoundedRect):
3443         * platform/graphics/skia/PlatformContextSkia.h:
3444         (WebCore::PlatformContextSkia::drawRRect):
3445         (WebCore):
3446
3447 2013-01-09  Arnaud Renevier  <a.renevier@sisa.samsung.com>
3448
3449         Web Inspector: cannot undock inspector when window size is too small