[TexMap] Can not do multiple accelerated animations
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-12-07  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2
3         [TexMap] Can not do multiple accelerated animations
4         https://bugs.webkit.org/show_bug.cgi?id=104364
5
6         Reviewed by Kenneth Rohde Christiansen.
7
8         By removing all animations with the same name, it is not possible to animate more than one property accelerated. 
9         Instead only remove any animations with both same name and property.
10
11         Covered by animations/opacity-transform-animation.html.
12
13         * platform/graphics/GraphicsLayerAnimation.cpp:
14         (WebCore::GraphicsLayerAnimations::add):
15         (WebCore::GraphicsLayerAnimations::remove):
16         * platform/graphics/GraphicsLayerAnimation.h:
17         (GraphicsLayerAnimations):
18
19 2012-12-07  Sujin Park  <sujjin.park@gmail.com>
20
21         [EFL] Fix build warning in StyleResolver.cpp using gcc 4.7.2
22         https://bugs.webkit.org/show_bug.cgi?id=104262
23
24         Reviewed by Alexis Menard.
25
26         EFL port treats build warning as compile error and there are
27         maybe-uninitialized when building with gcc 4.7.2.
28         This patch adds default case to resolve a build break.
29
30         * css/StyleResolver.cpp:
31         (WebCore::getFontAndGlyphOrientation):
32
33 2012-12-06  Alexander Pavlov  <apavlov@chromium.org>
34
35         Web Inspector: [Chromium] Ctrl + ']' "Goto right panel" keyboard shortcut doesn't work
36         https://bugs.webkit.org/show_bug.cgi?id=104250
37
38         Reviewed by Pavel Feldman.
39
40         Ignore "keypress" event resulting from a WM_CHAR message emitted by Win7 upon Ctrl + ']' keypress.
41
42         * inspector/front-end/InspectorView.js:
43         (WebInspector.InspectorView.prototype._keyPress): Ignore all events with charCode < 32.
44
45 2012-10-03  Pavel Feldman  <pfeldman@chromium.org>
46
47         Web Inspector: provide a way to reload page with given script preprocessor.
48         https://bugs.webkit.org/show_bug.cgi?id=80992
49
50         Reviewed by Yury Semikhatsky.
51
52         This change introduces a way to inject 'preprocessor' script that would process
53         each JavaScript file before it gets into the VM for compilation. That way inspector
54         can expose capabilities such as assessing code coverage or tracing all the calls.
55
56         Preprocessor script is stored in the page agent where it waits for reload to happen.
57         Upon reload, ScriptDebugServer is using it to patch the script sources.
58
59         
60         Test: inspector/debugger/debugger-script-preprocessor.html
61
62         * bindings/js/ScriptDebugServer.h:
63         (WebCore::ScriptDebugServer::setScriptPreprocessor):
64         (ScriptDebugServer):
65         * bindings/v8/DebuggerScript.js:
66         * bindings/v8/ScriptDebugServer.cpp:
67         (ScriptDebugServer::ScriptPreprocessor):
68         (WebCore::ScriptDebugServer::ScriptPreprocessor::ScriptPreprocessor):
69         (WebCore::ScriptDebugServer::ScriptPreprocessor::preprocessSourceCode):
70         (WebCore::ScriptDebugServer::ScriptPreprocessor::~ScriptPreprocessor):
71         (WebCore):
72         (WebCore::ScriptDebugServer::~ScriptDebugServer):
73         (WebCore::ScriptDebugServer::setScriptSource):
74         (WebCore::ScriptDebugServer::setScriptPreprocessor):
75         (WebCore::ScriptDebugServer::handleV8DebugEvent):
76         * bindings/v8/ScriptDebugServer.h:
77         (ScriptDebugServer):
78         * bindings/v8/custom/V8InjectedScriptManager.cpp:
79         (WebCore::InjectedScriptManager::createInjectedScript):
80         * inspector/Inspector.json:
81         * inspector/InspectorController.cpp:
82         (WebCore::InspectorController::InspectorController):
83         * inspector/InspectorDebuggerAgent.h:
84         (InspectorDebuggerAgent):
85         * inspector/InspectorPageAgent.cpp:
86         (WebCore::InspectorPageAgent::reload):
87         (WebCore::InspectorPageAgent::frameNavigated):
88         * inspector/InspectorPageAgent.h:
89         (WebCore::InspectorPageAgent::page):
90         (WebCore::InspectorPageAgent::scriptPreprocessor):
91         (InspectorPageAgent):
92         * inspector/PageDebuggerAgent.cpp:
93         (WebCore::PageDebuggerAgent::create):
94         (WebCore::PageDebuggerAgent::PageDebuggerAgent):
95         (WebCore::PageDebuggerAgent::startListeningScriptDebugServer):
96         (WebCore::PageDebuggerAgent::stopListeningScriptDebugServer):
97         (WebCore::PageDebuggerAgent::injectedScriptForEval):
98         (WebCore::PageDebuggerAgent::didClearMainFrameWindowObject):
99         (WebCore):
100         * inspector/PageDebuggerAgent.h:
101         (WebCore):
102         (PageDebuggerAgent):
103
104 2012-12-07  Alexander Pavlov  <apavlov@chromium.org>
105
106         Web Inspector: the "Sources" column is always empty in CSS selector profiles
107         https://bugs.webkit.org/show_bug.cgi?id=104225
108
109         Reviewed by Pavel Feldman.
110
111         r112923 and preceding changesets modified the CSSOM wrapper creation for StyleRules in a way
112         that would not specify the parent CSSStyleSheet for the CSSStyleRules created. Instead,
113         styleResolver->ensureFullCSSOMWrapperForInspector(rule) is now used to make sure the CSSStyleRule
114         has a valid parent CSSStyleSheet.
115
116         Test: inspector/profiler/selector-profiler-url.html
117
118         * css/StyleResolver.cpp:
119         (WebCore::StyleResolver::collectMatchingRulesForList):
120         (WebCore::StyleResolver::applyProperties):
121         * inspector/InspectorInstrumentation.cpp:
122         (WebCore):
123         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
124         (WebCore::InspectorInstrumentation::willProcessRuleImpl):
125         * inspector/InspectorInstrumentation.h:
126         (WebCore):
127         (InspectorInstrumentation):
128         (WebCore::InspectorInstrumentation::willMatchRule):
129         (WebCore::InspectorInstrumentation::willProcessRule):
130
131 2012-12-05  Antonio Gomes  <a1.gomes@sisa.samsung.com>
132
133         Rework bug 97927 to not depend on RenderLayer::allowsScrolling
134         https://bugs.webkit.org/show_bug.cgi?id=103999
135
136         Reviewed by James Robinson.
137
138         Patch makes it possible for methods like
139         RenderLayer::{updateScrollbarsAfterLayout,updateScrollbarsAfterStyleChange}
140         to not depend on RenderLayer::allowsScrolling to determine if a layer should
141         be added or removed from its FrameView's ScrollableArea set.
142
143         Following the same logic, the patch also fixes RenderBox::canBeScrolledAndHasScrollableArea
144         method to take into account the box' scroll allowance in a given direction only
145         when it overflows. This allows simplifying custom methods like InRegionScrollerPrivate::canScrollRenderBox
146         (@WebKit/blackberry/Api/InRegionScroller.cpp).
147
148         The naming pattern for the newly added methods were chosen to keep the consistency
149         with the existing ones, in the same class.
150
151         No new test: it is already covered by ScrollingCoordinatorChromiumTest.clippedBodyTest.
152
153         * rendering/RenderBox.cpp:
154         (WebCore::RenderBox::canBeScrolledAndHasScrollableArea):
155         * rendering/RenderBox.h:
156         (RenderBox):
157         (WebCore::RenderBox::hasScrollableOverflowX):
158         (WebCore::RenderBox::hasScrollableOverflowY):
159         * rendering/RenderLayer.cpp:
160         (WebCore::RenderLayer::hasScrollableHorizontalOverflow):
161         (WebCore):
162         (WebCore::RenderLayer::hasScrollableVerticalOverflow):
163         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
164         (WebCore::RenderLayer::updateScrollbarsAfterStyleChange):
165         * rendering/RenderLayer.h:
166         (RenderLayer):
167
168 2012-12-07  Max Feil  <mfeil@rim.com>
169
170         [BlackBerry] make "isVideo" information available to platform media player
171         https://bugs.webkit.org/show_bug.cgi?id=104334
172
173         Reviewed by Rob Buis.
174
175         The platform player needs to know whether the element is <video>
176         or <audio>, so it can make certain decisions before metadata
177         is ready. This is part of a performance optimization refactor
178         which does not change functionality so no new tests are required.
179
180         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
181         (WebCore::MediaPlayerPrivate::load):
182
183 2012-12-07  Kondapally Kalyan  <kalyan.kondapally@intel.com>
184
185         [EFL] [AC] Implement ImageExtractor::extractImage in GraphicsContext3DEfl.
186         https://bugs.webkit.org/show_bug.cgi?id=104271.
187
188         Reviewed by Kenneth Rohde Christiansen.
189
190         This patch implements ImageExtractor::extractImage in GraphicsContext3DEfl.
191
192         Covered by existing tests.
193
194         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
195         (WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor):
196         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
197
198 2012-12-06  Carlos Garcia Campos  <cgarcia@igalia.com>
199
200         Use always the order iterator from data member in RenderFlexibleBox
201         https://bugs.webkit.org/show_bug.cgi?id=104112
202
203         Reviewed by Tony Chang.
204
205         Some methods receive it as parameter and others use the data
206         member.
207
208         * rendering/RenderFlexibleBox.cpp:
209         (WebCore::RenderFlexibleBox::layoutBlock):
210         (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems):
211         (WebCore::RenderFlexibleBox::layoutFlexItems):
212         (WebCore::RenderFlexibleBox::computeNextFlexLine):
213         (WebCore::RenderFlexibleBox::alignFlexLines):
214         (WebCore::RenderFlexibleBox::alignChildren):
215         (WebCore::RenderFlexibleBox::flipForRightToLeftColumn):
216         (WebCore::RenderFlexibleBox::flipForWrapReverse):
217         * rendering/RenderFlexibleBox.h:
218
219 2012-12-07  Kent Tamura  <tkent@chromium.org>
220
221         Improve confusing code in BaseMultipleFieldsDateAndTimeInputType
222         https://bugs.webkit.org/show_bug.cgi?id=104353
223
224         Reviewed by Kentaro Hara.
225
226         This doesn't change any behavior because call sites of
227         isEditControlOwnerDisabled and isEditControlOwnerReadOnly treat them
228         similarly.
229
230         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
231         (WebCore::BaseMultipleFieldsDateAndTimeInputType::isEditControlOwnerDisabled):
232         Checks element()->disabled, not readOnly.
233         (WebCore::BaseMultipleFieldsDateAndTimeInputType::isEditControlOwnerReadOnly):
234         Checks element()->readOnly, not disabled.
235
236 2012-12-07  Jon Lee  <jonlee@apple.com>
237
238         Build fix.
239
240         * plugins/PlugInOriginHash.cpp:
241         (WebCore::PlugInOriginHash::hash):
242
243 2012-12-04  Jon Lee  <jonlee@apple.com>
244
245         Add PlugInOriginHash
246         https://bugs.webkit.org/show_bug.cgi?id=103655
247         <rdar://problem/12778949>
248
249         Reviewed by Alexey Proskuryakov.
250
251         Add the concept of plug-in origin hashes, which are based on a combination of the base domains of the
252         page's main frame and the plug-in, and the plug-in MIME type.
253
254         * plugins/PlugInOriginHash.cpp: Added.
255         (WebCore::addCaseFoldedCharacters): Add the case-folded string to the hash.
256         (WebCore::PlugInOriginHash::hash): The hash is based on the concatenation of the page's host, the plug-in
257         URL's host, and the MIME type. We use StringHasher to get all 32-bits of the hash, since using StringImpl's hash
258         masks out 8 of the hash bits to make room for bit flags.
259         * plugins/PlugInOriginHash.h: Added.
260
261         * CMakeLists.txt:
262         * GNUmakefile.list.am:
263         * Target.pri:
264         * WebCore.gypi:
265         * WebCore.vcproj/WebCore.vcproj:
266         * WebCore.xcodeproj/project.pbxproj:
267
268 2012-12-06  Kent Tamura  <tkent@chromium.org>
269
270         Refactoring: Clean up placeholder attribute usage
271         https://bugs.webkit.org/show_bug.cgi?id=104337
272
273         Reviewed by Kentaro Hara.
274
275         No new tests. This doesn't change any behavior.
276
277         * html/HTMLInputElement.cpp: Remove placeholder and setPlacehodler.
278         * html/HTMLInputElement.h: Ditto.
279         * html/HTMLTextFormControlElement.cpp:
280         (WebCore::HTMLTextFormControlElement::strippedPlaceholder):
281         We can use fastGetAttribute for placeholder.
282         (WebCore::HTMLTextFormControlElement::isPlaceholderEmpty):
283         Ditto.
284
285 2012-12-06  Kent Tamura  <tkent@chromium.org>
286
287         Refactoring: Rename HTMLFormControlElement::required to isRequired
288         https://bugs.webkit.org/show_bug.cgi?id=104336
289
290         Reviewed by Kentaro Hara.
291
292         m_required should be m_isRequired, and required() should be
293         isRequired. It's safe to rename them because HTML*Element::required IDL
294         attributes are [Reflected].
295         http://www.webkit.org/coding/coding-style.html#names-bool
296
297         * accessibility/AccessibilityNodeObject.cpp:
298         (WebCore::AccessibilityNodeObject::isRequired):
299         * css/StyleResolver.cpp:
300         (WebCore::StyleResolver::canShareStyleWithControl):
301         * dom/CheckedRadioButtons.cpp:
302         (WebCore::RadioButtonGroup::add):
303         (WebCore::RadioButtonGroup::requiredAttributeChanged):
304         (WebCore::RadioButtonGroup::remove):
305         * html/CheckboxInputType.cpp:
306         (WebCore::CheckboxInputType::valueMissing):
307         * html/FileInputType.cpp:
308         (WebCore::FileInputType::valueMissing):
309         * html/HTMLFormControlElement.cpp:
310         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
311         (WebCore::HTMLFormControlElement::parseAttribute):
312         (WebCore::HTMLFormControlElement::isRequired):
313         * html/HTMLFormControlElement.h:
314         (HTMLFormControlElement):
315         * html/HTMLInputElement.cpp:
316         (WebCore::HTMLInputElement::isRequiredFormControl):
317         (WebCore::HTMLInputElement::setupDateTimeChooserParameters):
318         * html/HTMLSelectElement.cpp:
319         (WebCore::HTMLSelectElement::valueMissing):
320         (WebCore::HTMLSelectElement::isRequiredFormControl):
321         * html/HTMLTextAreaElement.h:
322         (WebCore::HTMLTextAreaElement::isRequiredFormControl):
323         * html/TextFieldInputType.cpp:
324         (WebCore::TextFieldInputType::valueMissing):
325
326 2012-12-06  Hajime Morrita  <morrita@google.com>
327
328         [Shadow DOM] Implement Element::shadowRoot with prefix
329         https://bugs.webkit.org/show_bug.cgi?id=102912
330
331         Reviewed by Dimitri Glazkov.
332
333         - Added Element::shadowRoot() which return the youngest author shadow root.
334         - Renamed existing Node::shadowRoot() to containingShadowRoot() to avoid name shadowing.
335           The name shadowRoot() is confusing anyway so this is good opportunity to rename it.
336
337         Test: fast/dom/shadow/shadow-aware-shadow-root.html
338
339         * css/SelectorChecker.cpp:
340         (WebCore::SelectorChecker::checkSelector):
341         * css/StyleScopeResolver.cpp:
342         (WebCore::StyleScopeResolver::scopeFor):
343         (WebCore::StyleScopeResolver::addHostRule):
344         * dom/Element.cpp:
345         (WebCore::Element::shadowRoot):
346         (WebCore):
347         * dom/Element.h:
348         (Element):
349         * dom/Element.idl:
350         * dom/ElementShadow.cpp:
351         (WebCore::ElementShadow::setShouldCollectSelectFeatureSet):
352         * dom/Node.cpp:
353         (WebCore::Node::rendererIsEditable):
354         (WebCore::Node::shadowHost):
355         (WebCore::Node::shadowAncestorNode):
356         (WebCore::Node::containingShadowRoot):
357         * dom/Node.h:
358         (Node):
359         * dom/Range.cpp:
360         (WebCore::Range::shadowRoot):
361         * dom/ShadowRoot.cpp:
362         (WebCore::ShadowRoot::insertedInto):
363         (WebCore::ShadowRoot::removedFrom):
364         * dom/ShadowRoot.h:
365         (WebCore::ShadowRoot::isAccessible):
366         * editing/TextIterator.cpp:
367         (WebCore::TextIterator::handleReplacedElement):
368         * editing/htmlediting.cpp:
369         (WebCore::indexForVisiblePosition):
370         * html/HTMLStyleElement.cpp:
371         (WebCore::HTMLStyleElement::scopedAttributeChanged):
372         (WebCore::HTMLStyleElement::registerWithScopingNode):
373         (WebCore::HTMLStyleElement::removedFrom):
374         * html/shadow/ContentDistributor.cpp:
375         (WebCore::ContentDistributor::distribute):
376         * html/shadow/HTMLContentElement.cpp:
377         (WebCore::HTMLContentElement::parseAttribute):
378         (WebCore::HTMLContentElement::insertedInto):
379         (WebCore::HTMLContentElement::removedFrom):
380         * html/shadow/HTMLShadowElement.cpp:
381         (WebCore::HTMLShadowElement::insertedInto):
382         (WebCore::HTMLShadowElement::removedFrom):
383         * html/shadow/InsertionPoint.cpp:
384         (WebCore::InsertionPoint::attach):
385         (WebCore::InsertionPoint::detach):
386         (WebCore::InsertionPoint::isActive):
387         (WebCore::InsertionPoint::childrenChanged):
388         (WebCore::InsertionPoint::insertedInto):
389         (WebCore::InsertionPoint::removedFrom):
390         (WebCore::InsertionPoint::setResetStyleInheritance):
391         * page/EventHandler.cpp:
392         (WebCore::instanceAssociatedWithShadowTreeElement):
393         * svg/SVGElement.cpp:
394         (WebCore::SVGElement::correspondingElement):
395         (WebCore::collectInstancesForSVGElement):
396
397 2012-12-06  Michael Pruett  <michael@68k.org>
398
399         IndexedDB: Replace int64 with int64_t
400         https://bugs.webkit.org/show_bug.cgi?id=104338
401
402         Reviewed by Kentaro Hara.
403
404         Cleaning up coding inconsistencies, no change in behavior.
405
406         Tests: storage/indexeddb/*
407
408         * Modules/indexeddb/IDBFactory.cpp:
409         (WebCore::IDBFactory::openInternal):
410
411 2012-12-06  James Simonsen  <simonjam@chromium.org>
412
413         [Resource Timing] Allow detailed timing on same origin sites
414         https://bugs.webkit.org/show_bug.cgi?id=104328
415
416         Reviewed by Tony Gentilcore.
417
418         This block was lost when I moved it to PerformanceResourceTiming.cpp.
419
420         Test: http/tests/w3c/webperf/submission/resource-timing/html/test_resource_attribute_order.html
421
422         * page/PerformanceResourceTiming.cpp:
423         (WebCore::passesTimingAllowCheck):
424
425 2012-12-06  Rick Byers  <rbyers@chromium.org>
426
427         CSS cursor property should support webkit-image-set
428         https://bugs.webkit.org/show_bug.cgi?id=99493
429
430         Reviewed by Beth Dakin.
431
432         Add support for image scale factors attached to custom mouse cursor images
433         behind ENABLE(MOUSE_CURSOR_SCALE).
434
435         This required refactoring CSSCursorImageValue to derive directly from
436         CSSValue since it can contain either a CSSImageValue or a CSSImageSetValue.
437         If it contains an image-set, then we can plumb directly through to the
438         CSSImageSetValue.  If it contains an image, then either we can plumb directly
439         through to the CSSImageValue, or if the URL represents an SVG cursor we have
440         to intercept the image loading in order to substitute the actual SVG image URL
441         and do the appropriate lifetime management.
442
443         Tests: fast/css/cursor-parsing-image-set.html
444                fast/events/mouse-cursor-image-set.html
445
446         * Configurations/FeatureDefines.xcconfig: Add ENABLE_MOUSE_CURSOR_SCALE - disabled
447         * GNUmakefile.features.am: ditto
448         * css/CSSCursorImageValue.cpp: Refactor to inherit directly from CSSValue and support image sets
449         (WebCore::CSSCursorImageValue::CSSCursorImageValue):
450         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
451         (WebCore::CSSCursorImageValue::customCssText):
452         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
453         (WebCore::CSSCursorImageValue::cachedImage):
454         (WebCore::CSSCursorImageValue::cachedOrPendingImage):
455         (WebCore::CSSCursorImageValue::isSVGCursor):
456         (WebCore::CSSCursorImageValue::cachedImageURL):
457         (WebCore::CSSCursorImageValue::clearCachedImage):
458         (WebCore::CSSCursorImageValue::reportDescendantMemoryUsage):
459         * css/CSSCursorImageValue.h: Remove cursor-specific hacks
460         (WebCore::CSSCursorImageValue::create):
461         (CSSCursorImageValue):
462         * css/CSSImageValue.cpp:
463         (WebCore::CSSImageValue::cachedImage):
464         * css/CSSImageValue.h:
465         (CSSImageValue):
466         * css/CSSParser.cpp:
467         (WebCore::CSSParser::parseValue): Parse cursor(-webkit-image-set(...)) rules
468         * css/CSSValue.h:
469         (WebCore::CSSValue::isImageValue):
470         * css/StyleBuilder.cpp:
471         (WebCore::ApplyPropertyCursor::applyValue):
472         * css/StyleResolver.cpp: Hook up new CSSCursorImageValue support since it can't be handled like other images any more.
473         (WebCore::StyleResolver::styleImage):
474         (WebCore::StyleResolver::cursorOrPendingFromValue):
475         (WebCore::StyleResolver::loadPendingImage):
476         * css/StyleResolver.h:
477         (StyleResolver):
478         * page/EventHandler.cpp:
479         (WebCore::EventHandler::selectCursor): Handle StyleCachedImageSet images and plumb scale factor through
480         * platform/Cursor.cpp:
481         (WebCore::Cursor::Cursor): Add imageScaleFactor
482         * platform/Cursor.h: Add imageScaleFactor
483         (Cursor):
484         (WebCore::Cursor::imageScaleFactor):
485         * platform/chromium/CursorChromium.cpp: Add imageScaleFactor
486         (WebCore::Cursor::Cursor):
487         (WebCore::Cursor::operator=):
488         * rendering/style/CursorData.h: Clarify hotspot units
489         (CursorData):
490         * rendering/style/StyleCachedImage.h:
491         (StyleCachedImage::cachedImage): Override new virtual.
492         * rendering/style/StyleCachedImageSet.h:
493         (StyleCachedImageSet::cachedImage): Override new virtual.
494         * rendering/style/StyleImage.h:
495         (StyleImage::cachedImage): Add new virtual method to avoid lots of casts and typechecks.
496         * rendering/style/StylePendingImage.h: Add CSSCursorImageValue support
497         (WebCore::StylePendingImage::cssCursorImageValue):
498         * testing/Internals.cpp:
499         (WebCore::Internals::getCurrentCursorInfo): Print non-identity scale factors for testing
500
501 2012-12-06  Hayato Ito  <hayato@chromium.org>
502
503         Event's relatedTarget re-targeting does not occur for manually fired mouse events created by event.initMouseEvent().
504         https://bugs.webkit.org/show_bug.cgi?id=102681
505
506         Reviewed by Dimitri Glazkov.
507
508         Make sure that event's relatedTarget re-targeting occurs for mouse
509         events created by event.initMouseEvent().  Since user-generated
510         mouse events can have a relatedTarget which is same to the target
511         node, the algorithm which calculates event's ancestors is also
512         updated so that ancestors are not shrunk wrongly.
513
514         Test: fast/events/dispatch-synthetic-mouseevent.html
515               fast/dom/shadow/shadow-dom-event-dispatching.html
516
517         * dom/EventDispatcher.cpp:
518         (WebCore::EventRelatedTargetAdjuster::adjust):
519         * dom/MouseEvent.cpp:
520         (WebCore::MouseEventDispatchMediator::create):
521         (WebCore::MouseEventDispatchMediator::MouseEventDispatchMediator):
522         (WebCore::MouseEventDispatchMediator::dispatchEvent):
523         * dom/MouseEvent.h:
524         (WebCore::MouseEventDispatchMediator::isSyntheticMouseEvent):
525         (MouseEventDispatchMediator):
526         * dom/Node.cpp:
527         (WebCore::Node::dispatchEvent):
528
529 2012-12-06  Kunihiko Sakamoto  <ksakamoto@chromium.org>
530
531         Disabled file input box stops a certain other div from being rendered
532         https://bugs.webkit.org/show_bug.cgi?id=104226
533
534         Reviewed by Dimitri Glazkov.
535
536         The bug was caused by setNeedsStyleRecalc() call during style recalculation,
537         which resulted in inconsistent ChildNeedsStyleRecalc flags in DOM tree.
538
539         When reattach of file input happens during style recalculation,
540         RenderFileUploadControl::updateFromElement() is called from attach().
541         It may change the disabled state of the upload button in its shadow tree,
542         but it triggers style recalculation.
543
544         This patch solves this issue by setting disabled state of the upload button in
545         FileInputType::disabledAttributeChanged instead of RenderFileUploadControl.
546
547         Test: fast/forms/file/sibling-of-disabled-file-input.html
548
549         * html/FileInputType.cpp:
550         (WebCore::FileInputType::disabledAttributeChanged): Added.
551         * html/FileInputType.h:
552         (FileInputType): Declare disabledAttributeChanged.
553         * rendering/RenderFileUploadControl.cpp:
554         (WebCore::RenderFileUploadControl::updateFromElement): Remove call to button->setDisabled().
555
556 2012-12-06  Dominic Cooney  <dominicc@chromium.org>
557
558         Element.pseudo property should be prefixed
559         https://bugs.webkit.org/show_bug.cgi?id=104060
560
561         Reviewed by Hajime Morita.
562
563         Other Shadow DOM properties are prefixed; pseudo should be too.
564
565         Covered by updated tests in fast/dom/shadow.
566
567         * dom/Element.idl:
568
569 2012-12-06  Andrei Bucur  <abucur@adobe.com>
570
571         [CSS Regions] Remove the sanitize mechanism from LineFragmentationData
572         https://bugs.webkit.org/show_bug.cgi?id=104234
573
574         Reviewed by David Hyatt.
575
576         Remove previous work that ensured an invalid region is never returned by the containingRegion getter. After r136793 the blocks always
577         relayout children if the region chain changes. This means the sanitize() method is only necessary when all the regions are removed.
578         This case is treated separately in layoutInlineChildren.
579
580         Tests: no new functionality, no bug fixed.
581
582         * rendering/RenderBlock.cpp:
583         (WebCore::RenderBlock::lineWidthForPaginatedLineChanged):
584         * rendering/RenderBlockLineLayout.cpp:
585         (WebCore::RenderBlock::layoutInlineChildren):
586         * rendering/RootInlineBox.cpp:
587         (WebCore::RootInlineBox::containingRegion):
588         (WebCore):
589         (WebCore::RootInlineBox::setContainingRegion):
590         * rendering/RootInlineBox.h:
591         (RootInlineBox):
592         (WebCore::RootInlineBox::LineFragmentationData::LineFragmentationData):
593         (LineFragmentationData):
594
595 2012-12-06  Kenneth Russell  <kbr@google.com>
596
597         Associate URLs with GraphicsContext3D instances created for WebGL
598         https://bugs.webkit.org/show_bug.cgi?id=103793
599
600         Reviewed by Adam Barth.
601
602         Pass down the URL of the topmost frame's document creating the
603         WebGL context to the platform layer through
604         GraphicsContext3D::Attributes.
605
606         Not feasible to write a layout test for this change; has no
607         user-visible effect. Tested manually with failure injection in
608         Chromium port.
609
610         * html/canvas/WebGLRenderingContext.cpp:
611         (WebCore):
612         (WebCore::WebGLRenderingContext::create):
613             Pass top document's URL in context creation attributes.
614         * platform/chromium/support/GraphicsContext3DChromium.cpp:
615         (WebCore::GraphicsContext3D::create):
616             Pass URL through WebKit API.
617         * platform/graphics/GraphicsContext3D.h:
618         (Attributes):
619             Add top document's URL to context creation attributes.
620
621 2012-12-06  Philip Rogers  <pdr@google.com>
622
623         Unify SVG's animation and target tracking systems.
624         https://bugs.webkit.org/show_bug.cgi?id=102655
625
626         Reviewed by Dirk Schulze.
627
628         This patch unifies our animation target tracking system and regular target tracking system.
629         This simplifies the code, fixes a bug, and cleans up a historically security-sensitive area.
630
631         Background: When <use>, <mpath>, <animate>, etc. reference another element using
632         xlink:href="#id", we need to track when #id changes to #otherId, when #id is removed, etc.
633         This bookkeeping of element -> target is done in SVGDocumentExtensions. Additionally, when
634         a target changes that causes layout (e.g., rect.x is changed), all dependent elements with
635         renderers are notified (<animate> has no renderer and will not use this).
636
637         Previously, xlink:href changes were lazily resolved when targetElement() was called, target
638         changes were tracked using the animation tracking framework, and pending targets did not
639         work (e.g., <animate xlink:href="#p"><!--animate is now pending #p --><rect id="p"/>).
640
641         After this patch, we no longer lazily resolve targetElement() but instead change it when
642         our xlink:href attribute changes. Instead of using the animation tracking framework in
643         SVGDocumentExtensions, we now use the regular target tracking framework. Lastly, by using
644         the regular target tracking framework we are able to hook into the pending resource handling
645         which fixes a bug (see the test).
646
647         A test has been added to test that the order of animation elements does not matter. A second
648         test has been added to show we do not regress a pending-while-pending case.
649
650         Tests: svg/animations/svg-animation-order.html
651                svg/custom/svg-pending-twice.html
652
653         * svg/SVGAnimateElement.cpp:
654         (WebCore::SVGAnimateElement::setTargetElement):
655
656             setTargetElement and setAttributeName now work similarly. When the corresponding attribute
657             changes, we update our internal state (target or attributeName) and save it instead of
658             looking these values up on each iteration.
659
660         (WebCore::SVGAnimateElement::setAttributeName):
661         (WebCore):
662         (WebCore::SVGAnimateElement::resetAnimatedPropertyType):
663         * svg/SVGAnimateElement.h:
664         (SVGAnimateElement):
665         * svg/SVGAnimationElement.cpp:
666         (WebCore::SVGAnimationElement::setAttributeType):
667         (WebCore::SVGAnimationElement::setTargetElement):
668         (WebCore::SVGAnimationElement::setAttributeName):
669         * svg/SVGAnimationElement.h:
670         (SVGAnimationElement):
671         * svg/SVGDocumentExtensions.cpp:
672         (WebCore::SVGDocumentExtensions::~SVGDocumentExtensions):
673         (WebCore):
674         * svg/SVGDocumentExtensions.h:
675         (SVGDocumentExtensions):
676         * svg/SVGElement.cpp:
677         (WebCore::SVGElement::~SVGElement):
678         (WebCore::SVGElement::removedFrom):
679         (WebCore::SVGElement::attributeChanged):
680         * svg/SVGElementInstance.cpp:
681         (WebCore::SVGElementInstance::invalidateAllInstancesOfElement):
682
683             This can be removed after r131631 landed.
684
685         * svg/SVGMPathElement.cpp:
686         (WebCore::SVGMPathElement::buildPendingResource):
687         * svg/SVGTextPathElement.cpp:
688         (WebCore::SVGTextPathElement::buildPendingResource):
689
690             A bug was discovered in review with our resource tracking in a pending-while-pending
691             case. SVGMpathElement and SVGTextPathElement have been updated to fix this as well.
692
693         * svg/animation/SVGSMILElement.cpp:
694
695             The changes in SVGSMILElement should look very similar to SVGFEImageElement,
696             SVGMPathElement, etc. The idea is to build pending resources when added or
697             removed from the document, or when the href attribute changes.
698
699         (WebCore::SVGSMILElement::~SVGSMILElement):
700         (WebCore):
701         (WebCore::SVGSMILElement::clearResourceReferences):
702         (WebCore::SVGSMILElement::buildPendingResource):
703         (WebCore::SVGSMILElement::insertedInto):
704         (WebCore::SVGSMILElement::removedFrom):
705         (WebCore::SVGSMILElement::svgAttributeChanged):
706         (WebCore::SVGSMILElement::setAttributeName):
707         (WebCore::SVGSMILElement::setTargetElement):
708         * svg/animation/SVGSMILElement.h:
709         (WebCore):
710         (WebCore::SVGSMILElement::targetElement):
711         (SVGSMILElement):
712
713 2012-12-06  Jon Lee  <jonlee@apple.com>
714
715         Retry snapshots if they are too empty
716         https://bugs.webkit.org/show_bug.cgi?id=104174
717         <rdar://problem/12820146>
718
719         Reviewed by Simon Fraser.
720
721         * html/HTMLPlugInImageElement.cpp:
722         (WebCore::HTMLPlugInImageElement::updateSnapshot): Change the state machine check so that even
723         when the plug-in is displaying a snapshot, the snapshot can still be updated. This allows for the
724         retries to be drawn.
725
726 2012-12-06  Adam Klein  <adamk@chromium.org>
727
728         [HTMLTemplateElement] make content readonly and cloneNode(deep) clone content
729         https://bugs.webkit.org/show_bug.cgi?id=104181
730
731         Reviewed by Adam Barth.
732
733         Note that this patch also adds IDL attributes/custom code to tie the lifetime
734         of the content DocumentFragment wrapper to the lifetime of the template element wrapper
735         via a hidden JS property.
736
737         Based on a patch by Rafael Weinstein.
738
739         Test: fast/dom/HTMLTemplateElement/contentWrappers.html
740
741         * DerivedSources.cpp:
742         * Target.pri:
743         * UseJSC.cmake:
744         * WebCore.gypi:
745         * WebCore.xcodeproj/project.pbxproj:
746         * bindings/js/JSBindingsAllInOne.cpp:
747         * bindings/js/JSHTMLTemplateElementCustom.cpp: Copied from Source/WebCore/html/HTMLTemplateElement.idl.
748         (WebCore):
749         (WebCore::JSHTMLTemplateElement::content):
750         * bindings/scripts/CodeGeneratorV8.pm: Add support for new V8CacheAttributeForGC attribute.
751         * dom/Element.h:
752         (Element): Annotate cloneNode() with OVERRIDE
753         * html/HTMLTemplateElement.cpp:
754         (WebCore::HTMLTemplateElement::cloneNode):
755         * html/HTMLTemplateElement.h:
756         (HTMLTemplateElement): override cloneNode
757         * html/HTMLTemplateElement.idl: Make content readonly and add custom attributes.
758
759 2012-12-06  Brent Fulgham  <bfulgham@webkit.org>
760
761         [Windows, WinCairo] Unreviewed build correction.
762
763         Exclude 'DocumentSharedObjectPool.cpp' from build, since it is
764         built as part of DOMAllInOne.cpp.  The build (besides wasting
765         time) generates a bunch of build warnings for duplicate symbols.
766
767         * WebCore.vcproj/WebCore.vcproj: Mark DocumentSharedObjectPool.cpp
768         to not build independently of DOMAllInOne.cpp.
769
770 2012-12-06  David Grogan  <dgrogan@chromium.org>
771
772         IndexedDB: Abort transactions because of leveldb errors part 4
773         https://bugs.webkit.org/show_bug.cgi?id=103964
774
775         Reviewed by Tony Chang.
776
777         deleteDatabase, open, and deleteObjectStore will now fire more aborts
778         and errors in case of leveldb problems
779
780         * Modules/indexeddb/IDBBackingStore.cpp:
781         (WebCore::getVarInt): Make return value indicate leveldb error.
782         (WebCore::getString): ditto.
783         (WebCore::IDBBackingStore::getIDBDatabaseMetaData):
784         Change return value to indicate leveldb error.
785
786         (WebCore::IDBBackingStore::deleteDatabase):
787         Already had the desired return value semantics. As a consumer of
788         getIDBDatabaseMetadata, will return an error (causing an abort) more
789         often.
790
791         (WebCore::IDBBackingStore::deleteObjectStore):
792         Needed return value change. Will return error to DatabaseBackend to
793         indicate leveldb problems.
794
795         * Modules/indexeddb/IDBBackingStore.h:
796         (IDBBackingStore):
797         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
798         (WebCore::IDBDatabaseBackendImpl::openInternal):
799         Pass leveldb errors up to callers, who already handle internal errors.
800
801         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::perform):
802         Abort transaction if there were leveldb problems deleting an object
803         store.
804
805 2012-12-06  David Grogan  <dgrogan@chromium.org>
806
807         IndexedDB: Add webkitErrorMessage to IDBTransaction
808         https://bugs.webkit.org/show_bug.cgi?id=104199
809
810         Reviewed by Tony Chang.
811
812         Don't drop error messages on the floor.
813
814         Expose an error message on IDBTransaction to give developers more
815         information than the opaque error code currently available. This is
816         exactly what is done in IDBRequest. 
817
818         Tests - transaction-error.html
819
820         * Modules/indexeddb/IDBDatabaseError.h:
821         (WebCore::IDBDatabaseError::create):
822         * Modules/indexeddb/IDBRequest.cpp:
823         (WebCore::IDBRequest::dispatchEvent):
824         (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
825         * Modules/indexeddb/IDBTransaction.cpp:
826         (WebCore::IDBTransaction::setError):
827         (WebCore):
828         (WebCore::IDBTransaction::webkitErrorMessage):
829         (WebCore::IDBTransaction::onAbort):
830         * Modules/indexeddb/IDBTransaction.h:
831         (IDBTransaction):
832         * Modules/indexeddb/IDBTransaction.idl:
833
834 2012-12-06  Alexander Shalamov  <alexander.shalamov@intel.com>
835
836         XMLHttpRequest Content-Type should be taken from Blob type
837         https://bugs.webkit.org/show_bug.cgi?id=99983
838
839         Reviewed by Alexey Proskuryakov.
840
841         Fix XMLHttpRequest::send(Blob*) method, so that the Content-Type is set according to W3C specification.
842         http://www.w3.org/TR/XMLHttpRequest/#the-send-method
843
844         Added test that check if content type is set correctly when blob object is sent.
845
846         Test: http/tests/xmlhttprequest/post-blob-content-type.html
847
848         * xml/XMLHttpRequest.cpp:
849         (WebCore::XMLHttpRequest::send):
850             Set correct MIME type for Blob objects.
851         * WebCore.vcproj/WebCore.vcproj:
852             Added ParsedContentType to project file.
853
854 2012-12-06  Min Qin  <qinmin@chromium.org>
855
856         Make LazyDecodingPixelRef inherit from skia::LazyPixelRef so that cc thread can access it
857         https://bugs.webkit.org/show_bug.cgi?id=103555
858
859         Reviewed by Stephen White.
860
861         Expose LazyDecodingPixelRef to the cc thread by inheriting from skia::LazyPixelRef.
862         No test added for now as impl side paiting is still WIP.
863
864         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
865         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
866         (WebCore::LazyDecodingPixelRef::PrepareToDecode):
867         (WebCore):
868         (WebCore::LazyDecodingPixelRef::Decode):
869         * platform/graphics/chromium/LazyDecodingPixelRef.h:
870         (LazyDecodingPixelRef):
871
872 2012-12-06  Kentaro Hara  <haraken@chromium.org>
873
874         [V8] Make an Isolate mandatory in v8UnsignedInteger()
875         https://bugs.webkit.org/show_bug.cgi?id=104235
876
877         Reviewed by Adam Barth.
878
879         No tests. No change in behavior.
880
881         * bindings/v8/ArrayValue.cpp:
882         (WebCore::ArrayValue::get):
883         * bindings/v8/V8Binding.h:
884         (WebCore::v8UnsignedInteger):
885         * bindings/v8/V8LazyEventListener.cpp:
886         (WebCore::V8LazyEventListener::prepareListenerObject):
887
888 2012-12-06  David Hyatt  <hyatt@apple.com>
889
890         [New Multicolumn] Add requiresBalancing booleans to track which column sets need to rebalance.
891         https://bugs.webkit.org/show_bug.cgi?id=104297
892
893         Reviewed by Simon Fraser.
894
895         Add requiresBalancing booleans to RenderMultiColumnBlock and RenderMultiColumnSet. For now the former is just propagated
896         to the latter, but eventually RenderMultiColumnSets will have a notion of balancing that has to be independent of the
897         owning block (e.g., maybe only the last set rebalances, or maybe only a set that contains the content between two forced
898         breaks wants to rebalance, etc.).
899
900         * rendering/RenderMultiColumnBlock.cpp:
901         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
902         (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
903         (WebCore::RenderMultiColumnBlock::ensureColumnSets):
904         * rendering/RenderMultiColumnBlock.h:
905         (WebCore::RenderMultiColumnBlock::requiresBalancing):
906         (RenderMultiColumnBlock):
907         * rendering/RenderMultiColumnSet.cpp:
908         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
909         * rendering/RenderMultiColumnSet.h:
910         (WebCore::RenderMultiColumnSet::requiresBalancing):
911         (WebCore::RenderMultiColumnSet::setRequiresBalancing):
912         (RenderMultiColumnSet):
913         (WebCore::toRenderMultiColumnSet):
914         (WebCore):
915
916 2012-12-06  Sheriff Bot  <webkit.review.bot@gmail.com>
917
918         Unreviewed, rolling out r136871.
919         http://trac.webkit.org/changeset/136871
920         https://bugs.webkit.org/show_bug.cgi?id=104293
921
922         crashes on bots and memory leaks (Requested by esprehn on
923         #webkit).
924
925         * dom/Document.h:
926         (WebCore::Node::treeScope):
927         * dom/Element.cpp:
928         (WebCore::Element::createRareData):
929         * dom/ElementRareData.h:
930         (ElementRareData):
931         (WebCore::ElementRareData::ElementRareData):
932         * dom/Node.cpp:
933         (WebCore::Node::setTreeScope):
934         (WebCore::Node::ensureRareData):
935         (WebCore::Node::createRareData):
936         (WebCore::Node::clearRareData):
937         * dom/Node.h:
938         (WebCore::NodeRareDataBase::~NodeRareDataBase):
939         (WebCore::NodeRareDataBase::NodeRareDataBase):
940         (NodeRareDataBase):
941         (WebCore::Node::renderer):
942         (WebCore::Node::setRenderer):
943         (Node):
944         (WebCore::Node::hasRareData):
945         * dom/NodeRareData.h:
946         (WebCore::NodeRareData::NodeRareData):
947         (NodeRareData):
948
949 2012-12-06  Adam Klein  <adamk@chromium.org>
950
951         Remove non-v8 binding files from WebCore.gypi
952         https://bugs.webkit.org/show_bug.cgi?id=104288
953
954         Reviewed by Adam Barth.
955
956         Since the gyp build is only used by the Chromium project,
957         there's no need for cpp, gobject, objc, or jsc bindings
958         in these build files.
959
960         * WebCore.gypi:
961
962 2012-12-06  Tony Chang  <tony@chromium.org>
963
964         REGRESSION(r135082): Restore the ability to insert author level style sheets from script
965         https://bugs.webkit.org/show_bug.cgi?id=104042
966
967         Reviewed by Antti Koivisto.
968
969         Add DocumentStyleSheetCollection::addAuthorSheet so embedders can allow scripts
970         to insert author level styles. Expose the method to window.interals for testing.
971
972         Test: userscripts/insert-stylesheets.html
973
974         * WebCore.exp.in: Update exports for Internals.cpp.
975         * WebCore.order: Update exports for Internals.cpp.
976         * dom/DocumentStyleSheetCollection.cpp:
977         (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
978         (WebCore::DocumentStyleSheetCollection::addAuthorSheet): Add the stylesheet and force a style recalc.
979         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets): Include author level styles.
980         (WebCore::DocumentStyleSheetCollection::reportMemoryUsage): Include author styles.
981         * dom/DocumentStyleSheetCollection.h:
982         (WebCore::DocumentStyleSheetCollection::documentAuthorStyleSheets): Accessor.
983         (DocumentStyleSheetCollection): Keep track of author styles added by script.
984         * testing/Internals.cpp:
985         (WebCore::Internals::insertAuthorCSS): Testing addAuthorSheet.
986         (WebCore::Internals::insertUserCSS): Testing addUserSheet.
987         * testing/Internals.h:
988         * testing/Internals.idl: Add addAuthorSheet and addUserSheet.
989
990 2012-12-06  Elliott Sprehn  <esprehn@gmail.com>
991
992         Create only NodeRareDataBase when setting TreeScope
993         https://bugs.webkit.org/show_bug.cgi?id=104202
994
995         Reviewed by Dimitri Glazkov.
996
997         Move many fields from NodeRareData into NodeRareDataBase and rename it
998         UncommonNodeData and add a flag to determine if a UncommonNodeData is
999         actually a full NodeRareData instance. By moving fields up from NodeRareData
1000         we ensure that this new flag in the base class doesn't make NodeRareData
1001         grow in size.
1002
1003         We then make setting the tree scope only allocate the UncommonNodeData
1004         instead of creating the full NodeRareData or ElementRareData. This is
1005         important because when putting nodes into ShadowRoot or any descendant
1006         we must associate the node with a tree scope which adds rare data to the
1007         node making NodeRareData and ElementRareData not very rare.
1008
1009         On 64bit, this reduces the overhead per element from 136 bytes to
1010         32 bytes for a 76% savings, and on other nodes from 64 bytes to 32 bytes
1011         for a 50% savings.
1012
1013         No new tests, no change in behavior.
1014
1015         * dom/Document.h:
1016         (WebCore::Node::treeScope):
1017         * dom/Element.cpp:
1018         (WebCore::Element::createRareData):
1019         * dom/ElementRareData.h:
1020         (ElementRareData):
1021         (WebCore::ElementRareData::ElementRareData):
1022         * dom/Node.cpp:
1023         (WebCore::Node::setTreeScope):
1024         (WebCore::Node::ensureRareData):
1025         (WebCore::Node::createRareData):
1026         (WebCore::Node::clearRareData):
1027         * dom/Node.h:
1028         (WebCore::UncommonNodeData::create):
1029         (UncommonNodeData):
1030         (WebCore::UncommonNodeData::~UncommonNodeData):
1031         (WebCore::UncommonNodeData::isNodeRareData):
1032         (WebCore::UncommonNodeData::UncommonNodeData):
1033         (WebCore::Node::renderer):
1034         (WebCore::Node::setRenderer):
1035         (Node):
1036         (WebCore::Node::hasRareData):
1037         (WebCore::Node::hasUncommonNodeData):
1038         * dom/NodeRareData.h:
1039         (WebCore::NodeRareData::NodeRareData):
1040         (NodeRareData):
1041
1042 2012-12-06  Joshua Bell  <jsbell@chromium.org>
1043
1044         IndexedDB: Remove IDBDatabaseException.idl
1045         https://bugs.webkit.org/show_bug.cgi?id=102961
1046
1047         Reviewed by Adam Barth.
1048
1049         Delete the IDL and references to it. No longer needed as a enum member
1050         in the autogenerated ExceptionCodeDescription.h so removed from the ".in"
1051         file; only direct references are retained in the autogenerated cpp file.
1052
1053         Ideally the code generator would handle these new-style DOMExceptions,
1054         but we don't have any other examples yet to know what pattern to follow.
1055
1056         No new tests - just removing dead code.
1057
1058         * CMakeLists.txt:
1059         * DerivedSources.cpp:
1060         * DerivedSources.make:
1061         * DerivedSources.pri:
1062         * GNUmakefile.list.am:
1063         * Modules/indexeddb/IDBDatabaseException.idl: Removed.
1064         * WebCore.gypi:
1065         * WebCore.vcproj/WebCore.vcproj:
1066         * WebCore.xcodeproj/project.pbxproj:
1067         * dom/DOMExceptions.in:
1068         * dom/make_dom_exceptions.pl:
1069         (generateImplementation):
1070
1071 2012-12-06  Andreas Kling  <akling@apple.com>
1072
1073         [Mac] Drain the CSSValuePool on memory pressure.
1074         <http://webkit.org/b/104274>
1075
1076         Reviewed by Antti Koivisto.
1077
1078         Add a drain() mechanism to CSSValuePool and call it when we're under memory pressure.
1079
1080         * WebCore.xcodeproj/project.pbxproj:
1081         * css/CSSValuePool.cpp:
1082         (WebCore::CSSValuePool::drain):
1083         * css/CSSValuePool.h:
1084         * platform/mac/MemoryPressureHandlerMac.mm:
1085         (WebCore::MemoryPressureHandler::releaseMemory):
1086
1087 2012-12-05  Adam Klein  <adamk@chromium.org>
1088
1089         Remove gyp config for incomplete and unused Apple Mac gyp build
1090         https://bugs.webkit.org/show_bug.cgi?id=104068
1091
1092         Reviewed by Adam Barth.
1093
1094         As part of the removal, move some files to the proper sections
1095         of the gypi file.
1096
1097         * WebCore.gyp/WebCore.gyp:
1098         * WebCore.gypi:
1099
1100 2012-12-06  Hans Muller  <hmuller@adobe.com>
1101
1102         [CSS Exclusions] Add support for computing the first included interval position.
1103         https://bugs.webkit.org/show_bug.cgi?id=103327
1104
1105         Reviewed by Levi Weintraub.
1106
1107         If the first "word" in a line doesn't fit within the shape-inside when lineTop
1108         is the top of the shape's logical bounding box, adjust lineTop downwards to where
1109         the word fits.  Currently only rounded rectangle shapes are supported.
1110
1111         Added ExclusionShape::firstIncludedIntervalLogicalTop(). The new virtual method
1112         computes the topmost/leftmost location where a line segment with the specified
1113         minLogicalIntervalSize will fit within the exclusion shape and returns the
1114         corresponding logical Y coordinate.  The result is additionally constrained to
1115         be at or below minLogicalIntervalTop. If the segment will not fit anywhere within
1116         the shape, then false is returned.
1117
1118         During layout, minLogicalIntervalTop is the nominal top of the line being laid
1119         out within the exclusion shape.
1120
1121         RenderBlock::layoutRunsAndFloatsInRange() now calls a new ExclusionShapeInsideInfo
1122         method, adjustLogicalLineTop(), which uses firstIncludedIntervalLogicalTop() to
1123         decide if the logical top of the line has to be moved downwards, for the first
1124         word to fit within the exclusion shape.
1125
1126         Tests: fast/exclusions/shape-inside/shape-inside-rounded-rectangle-fit-001.html
1127                fast/exclusions/shape-inside/shape-inside-rounded-rectangle-fit-002.html
1128
1129         * rendering/ExclusionPolygon.cpp:
1130         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): This is a stub implementation.
1131         * rendering/ExclusionPolygon.h:
1132         * rendering/ExclusionRectangle.cpp:
1133         (WebCore::ellipseXIntercept): Added spaces to conform to webkit style and to be consistent with ellipseYIntercept()
1134         (WebCore::ellipseYIntercept): Compute an ellipse's Y intercept for an X coordinate.
1135         (WebCore::ExclusionRectangle::firstIncludedIntervalLogicalTop): See the description above.
1136         * rendering/ExclusionRectangle.h:
1137         * rendering/ExclusionShape.h:
1138         (ExclusionShape):
1139         (WebCore::ExclusionShape::logicalTopForMinY): Internal to logical coordinate conversion.
1140         * rendering/ExclusionShapeInsideInfo.cpp:
1141         (WebCore::ExclusionShapeInsideInfo::adjustLogicalLineTop): A new method that updates m_lineTop with firstIncludedIntervalPosition().
1142         * rendering/ExclusionShapeInsideInfo.h:
1143         (ExclusionShapeInsideInfo):
1144         (WebCore::ExclusionShapeInsideInfo::logicalLineTop): This is just a cover for the private m_lineTop field.
1145         * rendering/RenderBlockLineLayout.cpp:
1146         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Added code that restarts the layout loop if it's necessary to adjust the line's logicalTop.
1147         (WebCore::RenderBlock::restartLayoutRunsAndFloatsInRange): Factored newly common code into this helper function.
1148
1149 2012-12-06  Ryosuke Niwa  <rniwa@webkit.org>
1150
1151         Use ownerNode() instead of base() in HTMLCollection
1152         https://bugs.webkit.org/show_bug.cgi?id=104244
1153
1154         Reviewed by Adam Barth.
1155
1156         Use ownerNode() instead of base() in HTMLCollection to match LiveNodeList.
1157         Notice that the definition of base(), which this patch removes, is "return ownerNode()".
1158
1159         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
1160         (WebCore::getNamedItems):
1161         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
1162         (WebCore::JSHTMLOptionsCollection::indexSetter):
1163         (WebCore::JSHTMLOptionsCollection::remove):
1164         * bindings/scripts/CodeGeneratorJS.pm:
1165         (GenerateImplementation):
1166         * bindings/scripts/CodeGeneratorV8.pm:
1167         (GenerateOpaqueRootForGC):
1168         * bindings/scripts/IDLAttributes.txt:
1169         * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp:
1170         (WebCore::getNamedItems):
1171         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
1172         (WebCore::V8HTMLOptionsCollection::removeCallback):
1173         (WebCore::V8HTMLOptionsCollection::indexedPropertySetter):
1174         * dom/WebKitNamedFlow.cpp:
1175         (WebCore::WebKitNamedFlow::ownerNode):
1176         * dom/WebKitNamedFlow.h:
1177         (WebKitNamedFlow):
1178         * dom/WebKitNamedFlow.idl:
1179         * html/HTMLAllCollection.idl:
1180         * html/HTMLCollection.h:
1181         (HTMLCollection):
1182         * html/HTMLCollection.idl:
1183         * html/HTMLFormControlsCollection.cpp:
1184         (WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
1185         (WebCore::HTMLFormControlsCollection::create):
1186         (WebCore::HTMLFormControlsCollection::formControlElements):
1187         (WebCore::HTMLFormControlsCollection::formImageElements):
1188         (WebCore::HTMLFormControlsCollection::namedItem):
1189         (WebCore::HTMLFormControlsCollection::updateNameCache):
1190         * html/HTMLFormControlsCollection.idl:
1191         * html/HTMLNameCollection.cpp:
1192         (WebCore::HTMLNameCollection::~HTMLNameCollection):
1193         (WebCore::HTMLNameCollection::virtualItemAfter):
1194         * html/HTMLOptionsCollection.cpp:
1195         (WebCore::HTMLOptionsCollection::add):
1196         (WebCore::HTMLOptionsCollection::remove):
1197         (WebCore::HTMLOptionsCollection::selectedIndex):
1198         (WebCore::HTMLOptionsCollection::setSelectedIndex):
1199         (WebCore::HTMLOptionsCollection::setLength):
1200         * html/HTMLOptionsCollection.idl:
1201         * html/HTMLPropertiesCollection.cpp:
1202         (WebCore::HTMLPropertiesCollection::updateRefElements):
1203         (WebCore::HTMLPropertiesCollection::namedItem):
1204         * html/HTMLTableRowsCollection.cpp:
1205         (WebCore::HTMLTableRowsCollection::virtualItemAfter):
1206
1207 2012-12-06  Tommy Widenflycht  <tommyw@google.com>
1208
1209         Speech Recognition API: Change the error code to a string on SpeechRecognitionError
1210         https://bugs.webkit.org/show_bug.cgi?id=104254
1211
1212         Reviewed by Adam Barth.
1213
1214         SpeechRecognitionError::code (numeric value) has been changed to SpeechRecognitionError::error (string)
1215         in the latest specification.
1216
1217         http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#speechreco-error
1218
1219         Existing tests modified to cover this patch.
1220
1221         * Modules/speech/SpeechRecognitionError.cpp:
1222         (WebCore::ErrorCodeToString):
1223         (WebCore):
1224         (WebCore::SpeechRecognitionError::create):
1225         (WebCore::SpeechRecognitionError::SpeechRecognitionError):
1226         * Modules/speech/SpeechRecognitionError.h:
1227         (SpeechRecognitionErrorInit):
1228         (WebCore::SpeechRecognitionError::error):
1229         (SpeechRecognitionError):
1230         * Modules/speech/SpeechRecognitionError.idl:
1231
1232 2012-12-06  Stephen Chenney  <schenney@chromium.org>
1233
1234         SVG <use> element inside an svg-as-image fails
1235         https://bugs.webkit.org/show_bug.cgi?id=104007
1236
1237         Reviewed by Eric Seidel.
1238
1239         Upon redraw, SVGImage calls layout on the document it is drawing into
1240         the image if the image, provided it believes the redraw does not need
1241         to be delayed. Unfortunately, when an SVG <use> element is modified
1242         (by animation, say) and regenerates its shadow tree, the destructors
1243         invoke redraw, causing the SVGImage to call layout on something that
1244         is in the process of being deleted. That's bad.
1245
1246         This change causes SVGImage to always delay the redraw. It is the most robust
1247         way to protect against this problem, as there may be any number of
1248         ways to cause this issue (a node being deleted in an svg-as-image
1249         target) and this protects against them all.
1250
1251         The test case crashes in Asan Chromium.
1252
1253         Test: svg/as-image/animated-use-as-image-crash.html
1254
1255         * svg/graphics/SVGImageCache.cpp:
1256         (WebCore::SVGImageCache::imageContentChanged): Always redraw on the timer.
1257
1258 2012-12-06  Antoine Quint  <graouts@apple.com>
1259
1260         TextTrack's .cues not ordered correctly when two cues have the same .startTime
1261         https://bugs.webkit.org/show_bug.cgi?id=103266
1262
1263         Reviewed by Eric Carlson.
1264
1265         Adding a new method TextTrackCueList::updateCueIndex() to update the list of
1266         cues after changing the .startTime or .endTime of a TextTrackCue. I elected to
1267         add a new method to TextTrackCueList rather than calling remove() and then add()
1268         on the list from TextTrack::cueDidChange() so that the nature of the operation
1269         is abstracted and we can easily change the way we keep the cue list sorted at
1270         a later time should we choose to.
1271
1272         * html/track/TextTrack.cpp:
1273         (WebCore::TextTrack::cueDidChange):
1274         * html/track/TextTrackCueList.cpp:
1275         (WebCore::TextTrackCueList::updateCueIndex):
1276         (WebCore):
1277         * html/track/TextTrackCueList.h:
1278         (TextTrackCueList):
1279
1280 2012-12-06  Andras Becsi  <andras.becsi@digia.com>
1281
1282         [Qt][Mac] Fix libxslt and libxml2 config tests
1283         https://bugs.webkit.org/show_bug.cgi?id=104164
1284
1285         Reviewed by Simon Hausmann.
1286
1287         Since libxml2 is a dependency for libxslt and is not used
1288         standalone the configurations for it should also depend on
1289         whether XSLT is enabled.
1290         Also avoid using pkg-config on Mac, instead use direct
1291         include paths and add needed libraries to the linker.
1292
1293         No new tests needed.
1294
1295         * WebCore.pri:
1296
1297 2012-12-06  Shinya Kawanaka  <shinyak@chromium.org>
1298
1299         Internals.getElementByIdInShadowRoot is nonsense now.
1300         https://bugs.webkit.org/show_bug.cgi?id=104241
1301
1302         Reviewed by Kent Tamura.
1303
1304         Since we have ShadowRoot.getElementById() now, we don't need Internals.getElementByIdInShadowRoot, which is
1305         the same functionality of ShadowRoot.getElementById().
1306
1307         Test: fast/dom/shadow/get-element-by-id-in-shadow-root.html
1308
1309         * WebCore.exp.in:
1310         * testing/Internals.cpp:
1311         * testing/Internals.h:
1312         (Internals):
1313         * testing/Internals.idl:
1314
1315 2012-12-06  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1316
1317         [EFL] Active texture state gets corrupted after updating graphics surface contents.
1318         https://bugs.webkit.org/show_bug.cgi?id=104248.
1319
1320         Reviewed by Kenneth Rohde Christiansen.
1321
1322         GraphicsContext3DPrivate::copyToGraphicsSurface() doesn't restore the previously bound texture
1323         after copying texture contents. This corrupts the texture state.
1324
1325         Existing Tests should cover this.
1326
1327         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
1328         (GraphicsContext3DPrivate::copyToGraphicsSurface):
1329         * platform/graphics/opengl/GLPlatformSurface.cpp:
1330         (WebCore::GLPlatformSurface::updateContents):
1331         * platform/graphics/opengl/GLPlatformSurface.h:
1332         (GLPlatformSurface):
1333
1334 2012-12-06  Alexander Pavlov  <apavlov@chromium.org>
1335
1336         Web Inspector: Goto panel shortcuts and description are reversed
1337         https://bugs.webkit.org/show_bug.cgi?id=103988
1338
1339         Reviewed by Pavel Feldman.
1340
1341         Swap the square brackets in the shortcuts.
1342
1343         * inspector/front-end/inspector.js:
1344         (WebInspector._registerShortcuts):
1345
1346 2012-12-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1347
1348         Unreviewed, rolling out r136818.
1349         http://trac.webkit.org/changeset/136818
1350         https://bugs.webkit.org/show_bug.cgi?id=104249
1351
1352         simulatedClick does not work as per #chrmium irc. (Requested
1353         by hayato on #webkit).
1354
1355         * dom/EventDispatcher.cpp:
1356         (WebCore::EventRelatedTargetAdjuster::adjust):
1357         * dom/MouseEvent.cpp:
1358         (WebCore::MouseEventDispatchMediator::create):
1359         (WebCore::MouseEventDispatchMediator::MouseEventDispatchMediator):
1360         (WebCore::MouseEventDispatchMediator::dispatchEvent):
1361         * dom/MouseEvent.h:
1362         (MouseEventDispatchMediator):
1363         * dom/Node.cpp:
1364         (WebCore::Node::dispatchEvent):
1365
1366 2012-12-06  Ulan Degenbaev  <ulan@chromium.org>
1367
1368         [v8] Fix hidden property name of V8ArrayBufferView flag.
1369         https://bugs.webkit.org/show_bug.cgi?id=104099
1370
1371         Reviewed by Kentaro Hara.
1372
1373         Fix hidden property name of V8ArrayBufferView hidden copy method.
1374
1375         * bindings/v8/V8HiddenPropertyName.h:
1376         (WebCore):
1377         * bindings/v8/custom/V8ArrayBufferViewCustom.cpp:
1378         (WebCore::getHiddenCopyMethod):
1379         (WebCore::installHiddenCopyMethod):
1380
1381 2012-12-06  Kentaro Hara  <haraken@chromium.org>
1382
1383         Unreviewed. Fixed a wrong comment landed in r136822.
1384
1385         * bindings/v8/V8Binding.h:
1386         (WebCore):
1387
1388 2012-12-05  Kentaro Hara  <haraken@chromium.org>
1389
1390         [V8] Implement deprecatedV8String()
1391         https://bugs.webkit.org/show_bug.cgi?id=104230
1392
1393         Reviewed by Adam Barth.
1394
1395         To make an Isolate mandatory in v8String(), we implement
1396         deprecatedV8String() for call sites that don't have
1397         an Isolate. Eventually we want to kill the method though.
1398
1399         No tests. No change in behavior.
1400
1401         * bindings/scripts/test/V8/V8TestCallback.cpp:
1402         (WebCore::V8TestCallback::callbackWithClass2Param):
1403         * bindings/v8/Dictionary.cpp:
1404         (WebCore::Dictionary::getKey):
1405         * bindings/v8/IDBBindingUtilities.cpp:
1406         (WebCore::get):
1407         (WebCore::set):
1408         * bindings/v8/JavaScriptCallFrame.cpp:
1409         (WebCore::JavaScriptCallFrame::evaluate):
1410         * bindings/v8/ScriptController.cpp:
1411         (WebCore::ScriptController::compileAndRunScript):
1412         (WebCore::ScriptController::bindToWindowObject):
1413         (WebCore::ScriptController::disableEval):
1414         * bindings/v8/ScriptDebugServer.cpp:
1415         (WebCore::ScriptDebugServer::setBreakpoint):
1416         (WebCore::ScriptDebugServer::removeBreakpoint):
1417         (WebCore::ScriptDebugServer::setScriptSource):
1418         (WebCore::ScriptDebugServer::ensureDebuggerScriptCompiled):
1419         (WebCore::ScriptDebugServer::compileScript):
1420         * bindings/v8/ScriptFunctionCall.cpp:
1421         (WebCore::ScriptCallArgumentHandler::appendArgument):
1422         (WebCore::ScriptFunctionCall::call):
1423         (WebCore::ScriptFunctionCall::construct):
1424         * bindings/v8/ScriptProfiler.cpp:
1425         (WebCore::ScriptProfiler::start):
1426         (WebCore::ScriptProfiler::stop):
1427         (WebCore::ScriptProfiler::takeHeapSnapshot):
1428         * bindings/v8/ScriptSourceCode.cpp:
1429         (WebCore::ScriptSourceCode::compileScript):
1430         * bindings/v8/V8Binding.h:
1431         (WebCore):
1432         (WebCore::deprecatedV8String):
1433         * bindings/v8/V8DOMWindowShell.cpp:
1434         (WebCore::V8DOMWindowShell::initializeIfNeeded):
1435         (WebCore::V8DOMWindowShell::namedItemAdded):
1436         (WebCore::V8DOMWindowShell::namedItemRemoved):
1437         * bindings/v8/V8LazyEventListener.cpp:
1438         (WebCore::V8LazyEventListener::prepareListenerObject):
1439         * bindings/v8/V8WindowErrorHandler.cpp:
1440         (WebCore::V8WindowErrorHandler::callListenerFunction):
1441         * bindings/v8/V8WorkerContextErrorHandler.cpp:
1442         (WebCore::V8WorkerContextErrorHandler::callListenerFunction):
1443         * bindings/v8/WorkerScriptController.cpp:
1444         (WebCore::WorkerScriptController::evaluate):
1445         * bindings/v8/custom/V8ArrayBufferViewCustom.cpp:
1446         (WebCore::installHiddenCopyMethod):
1447         (WebCore::copyElements):
1448         * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
1449         (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
1450         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
1451         (WebCore::V8InjectedScriptHost::getEventListenersCallback):
1452         * bindings/v8/custom/V8InjectedScriptManager.cpp:
1453         (WebCore::InjectedScriptManager::createInjectedScript):
1454         * bindings/v8/custom/V8MessageEventCustom.cpp:
1455         (WebCore::V8MessageEvent::dataAccessorGetter):
1456         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
1457         (WebCore::toV8Object):
1458         (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback):
1459
1460 2012-12-06  Keishi Hattori  <keishi@webkit.org>
1461
1462         Page popup should align to the right when the anchor element is rtl
1463         https://bugs.webkit.org/show_bug.cgi?id=104219
1464
1465         Reviewed by Kent Tamura.
1466
1467         Page popup should align to the right edge of the anchor element when the anchor element is rtl.
1468
1469         No new tests. Mock page popup can't test popup window position.
1470
1471         * Resources/pagepopups/pickerCommon.js:
1472         (_adjustWindowRectHorizontally): Align to the right edge when anchor element is rtl. Removed some redundant lines.
1473         (setWindowRect): If the window is hidden we want to move first then resize so the popup doesn't flicker.
1474         (isWindowHidden): Returns true if the window is hidden using hideWindow().
1475
1476 2012-12-06  Kentaro Hara  <haraken@chromium.org>
1477
1478         [V8] Make an Isolate mandatory for v8StringOrNull() and v8StringOrUndefined()
1479         https://bugs.webkit.org/show_bug.cgi?id=104213
1480
1481         Reviewed by Adam Barth.
1482
1483         All call sites of v8StringOrNull() and v8StringOrUndefined() have an Isolate.
1484
1485         No tests. No change in behavior.
1486
1487         * bindings/v8/V8Binding.h:
1488         (WebCore::v8StringOrNull):
1489         (WebCore::v8StringOrUndefined):
1490
1491 2012-12-05  Kentaro Hara  <haraken@chromium.org>
1492
1493         [V8] Implement deprecatedV8Integer(int i)
1494         https://bugs.webkit.org/show_bug.cgi?id=104220
1495
1496         Reviewed by Adam Barth.
1497
1498         To make an Isolate mandatory in v8Integer(), we implement
1499         deprecatedV8Integer(int i) for call sites that don't have
1500         an Isolate. Eventually we want to kill deprecatedV8Integer(int i).
1501
1502         No new tests. No change in behavior.
1503
1504         * bindings/v8/Dictionary.cpp:
1505         (WebCore::Dictionary::get):
1506         * bindings/v8/NPV8Object.cpp:
1507         (_NPN_Enumerate):
1508         * bindings/v8/PageScriptDebugServer.cpp:
1509         (WebCore::PageScriptDebugServer::addListener):
1510         * bindings/v8/ScriptDebugServer.cpp:
1511         (WebCore::ScriptDebugServer::setBreakpoint):
1512         (WebCore::ScriptDebugServer::compileScript):
1513         * bindings/v8/ScriptSourceCode.cpp:
1514         (WebCore::ScriptSourceCode::compileScript):
1515         * bindings/v8/V8Binding.h:
1516         (WebCore):
1517         (WebCore::deprecatedV8Integer):
1518         * bindings/v8/V8DOMConfiguration.cpp:
1519         (WebCore::V8DOMConfiguration::batchConfigureConstants):
1520         * bindings/v8/V8NPUtils.cpp:
1521         (WebCore::convertNPVariantToV8Object):
1522         * bindings/v8/V8Utilities.cpp:
1523         (WebCore::createHiddenDependency):
1524         (WebCore::removeHiddenDependency):
1525         * bindings/v8/V8WindowErrorHandler.cpp:
1526         (WebCore::V8WindowErrorHandler::callListenerFunction):
1527         * bindings/v8/V8WorkerContextErrorHandler.cpp:
1528         (WebCore::V8WorkerContextErrorHandler::callListenerFunction):
1529         * bindings/v8/WorkerScriptDebugServer.cpp:
1530         (WebCore::WorkerScriptDebugServer::addListener):
1531         * bindings/v8/custom/V8MutationCallbackCustom.cpp:
1532         (WebCore::V8MutationCallback::handleEvent):
1533
1534 2012-12-06  Hayato Ito  <hayato@chromium.org>
1535
1536         Event's relatedTarget re-targeting does not occur for manually fired mouse events created by event.initMouseEvent().
1537         https://bugs.webkit.org/show_bug.cgi?id=102681
1538
1539         Reviewed by Dimitri Glazkov.
1540
1541         Make sure that event's relatedTarget re-targeting occurs for mouse
1542         events created by event.initMouseEvent().  Since user-generated
1543         mouse events can have a relatedTarget which is same to the target
1544         node, the algorithm which calculates event's ancestors is also
1545         updated so that ancestors are not shrunk wrongly.
1546
1547         Test: fast/events/dispatch-synthetic-mouseevent.html
1548               fast/dom/shadow/shadow-dom-event-dispatching.html
1549
1550         * dom/EventDispatcher.cpp:
1551         (WebCore::EventRelatedTargetAdjuster::adjust):
1552         * dom/MouseEvent.cpp:
1553         (WebCore::MouseEventDispatchMediator::create):
1554         (WebCore::MouseEventDispatchMediator::MouseEventDispatchMediator):
1555         (WebCore::MouseEventDispatchMediator::dispatchEvent):
1556         * dom/MouseEvent.h:
1557         (WebCore::MouseEventDispatchMediator::isSyntheticMouseEvent):
1558         (MouseEventDispatchMediator):
1559         * dom/Node.cpp:
1560         (WebCore::Node::dispatchEvent):
1561
1562 2012-12-06  Michael Pruett  <michael@68k.org>
1563
1564         [JSC] Check whether property is an array before attempting conversion to array in JSDictionary
1565         https://bugs.webkit.org/show_bug.cgi?id=96614
1566
1567         Reviewed by Kentaro Hara.
1568
1569         JSDictionary should check whether the property being accessed in get()
1570         is an array before attempting to convert the value to an array.
1571
1572         Previously calling get() with a result type of Vector<String> when
1573         the named property could not be converted to an array would generate
1574         an exception.
1575
1576         Tests: storage/indexeddb/*
1577
1578         * bindings/js/JSDictionary.cpp:
1579         (WebCore::JSDictionary::convertValue):
1580         * bindings/js/JSDictionary.h:
1581         (WebCore::JSDictionary::tryGetPropertyAndResult):
1582
1583 2012-12-05  Kentaro Hara  <haraken@chromium.org>
1584
1585         [V8] Pass Isolate to toDOMStringList()
1586         https://bugs.webkit.org/show_bug.cgi?id=104224
1587
1588         Reviewed by Adam Barth.
1589
1590         No tests. No change in behavior.
1591
1592         * bindings/scripts/CodeGeneratorV8.pm:
1593         (JSValueToNative):
1594         * bindings/scripts/test/V8/V8TestObj.cpp:
1595         (WebCore::TestObjV8Internal::overloadedMethod6Callback):
1596         (WebCore::TestObjV8Internal::overloadedMethod7Callback):
1597         (WebCore::TestObjV8Internal::overloadedMethod9Callback):
1598         (WebCore::TestObjV8Internal::stringArrayFunctionCallback):
1599         * bindings/v8/V8Binding.cpp:
1600         (WebCore::toDOMStringList):
1601         * bindings/v8/V8Binding.h:
1602         (WebCore):
1603
1604 2012-12-06  Kentaro Hara  <haraken@chromium.org>
1605
1606         Remove JSDependentRetained.h and V8DependentRetained.h
1607         https://bugs.webkit.org/show_bug.cgi?id=104232
1608
1609         Reviewed by Adam Barth.
1610
1611         Although (JS|V8)DependentRetained.h were introduced for MutationObservers,
1612         they are not going to be used (See the discussion in bug 95519).
1613         We can remove them.
1614
1615         No tests. No change in behavior.
1616
1617         * GNUmakefile.list.am:
1618         * WebCore.gypi:
1619         * WebCore.vcproj/WebCore.vcproj:
1620         * WebCore.xcodeproj/project.pbxproj:
1621         * bindings/js/JSDependentRetained.h: Removed.
1622         * bindings/v8/V8DependentRetained.h: Removed.
1623         * bindings/v8/V8PerIsolateData.cpp:
1624         (WebCore::V8PerIsolateData::V8PerIsolateData):
1625         * bindings/v8/V8PerIsolateData.h:
1626         (V8PerIsolateData):
1627
1628 2012-12-06  Kentaro Hara  <haraken@chromium.org>
1629
1630         [V8] Replace v8String("symbol") with v8::String::NewSymbol("symbol")
1631         https://bugs.webkit.org/show_bug.cgi?id=104209
1632
1633         Reviewed by Adam Barth.
1634
1635         V8 can look up symbols faster than strings.
1636
1637         No tests. No change in behavior.
1638
1639         * bindings/v8/JavaScriptCallFrame.cpp:
1640         (WebCore::JavaScriptCallFrame::caller):
1641         (WebCore::JavaScriptCallFrame::sourceID):
1642         (WebCore::JavaScriptCallFrame::line):
1643         (WebCore::JavaScriptCallFrame::column):
1644         (WebCore::JavaScriptCallFrame::functionName):
1645         (WebCore::JavaScriptCallFrame::scopeChain):
1646         (WebCore::JavaScriptCallFrame::scopeType):
1647         (WebCore::JavaScriptCallFrame::thisObject):
1648         (WebCore::JavaScriptCallFrame::evaluate):
1649         (WebCore::JavaScriptCallFrame::restart):
1650         * bindings/v8/V8ThrowException.cpp:
1651         (WebCore::domExceptionStackGetter):
1652         (WebCore::domExceptionStackSetter):
1653         (WebCore::V8ThrowException::setDOMException):
1654         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
1655         (WebCore::V8InspectorFrontendHost::platformCallback):
1656         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
1657         (WebCore::V8JavaScriptCallFrame::typeAccessorGetter):
1658
1659 2012-12-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1660
1661         Unreviewed, rolling out r136784 and r136802.
1662         http://trac.webkit.org/changeset/136784
1663         http://trac.webkit.org/changeset/136802
1664         https://bugs.webkit.org/show_bug.cgi?id=104231
1665
1666         breaks chromium canary (Requested by morrita on #webkit).
1667
1668         * WebCore.gyp/WebCore.gyp:
1669         * WebCore.gypi:
1670         * platform/chromium/PlatformThemeChromiumLinux.cpp: Added.
1671         (WebCore):
1672         (WebCore::PlatformThemeChromiumLinux::setScrollbarColors):
1673         (WebCore::clamp):
1674         (WebCore::PlatformThemeChromiumLinux::saturateAndBrighten):
1675         (WebCore::PlatformThemeChromiumLinux::outlineColor):
1676         (WebCore::PlatformThemeChromiumLinux::paintArrowButton):
1677         * platform/chromium/PlatformThemeChromiumLinux.h: Added.
1678         (WebCore):
1679         (PlatformThemeChromiumLinux):
1680         (WebCore::PlatformThemeChromiumLinux::thumbInactiveColor):
1681         (WebCore::PlatformThemeChromiumLinux::thumbActiveColor):
1682         (WebCore::PlatformThemeChromiumLinux::trackColor):
1683         (WebCore::PlatformThemeChromiumLinux::PlatformThemeChromiumLinux):
1684         * platform/chromium/ScrollbarThemeChromiumLinux.cpp: Added.
1685         (WebCore):
1686         (WebCore::ScrollbarTheme::nativeTheme):
1687         (WebCore::ScrollbarThemeChromiumLinux::scrollbarThickness):
1688         (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece):
1689         (WebCore::ScrollbarThemeChromiumLinux::paintButton):
1690         (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
1691         (WebCore::ScrollbarThemeChromiumLinux::shouldCenterOnThumb):
1692         (WebCore::ScrollbarThemeChromiumLinux::buttonSize):
1693         (WebCore::ScrollbarThemeChromiumLinux::minimumThumbLength):
1694         * platform/chromium/ScrollbarThemeChromiumLinux.h: Added.
1695         (ScrollbarThemeChromiumLinux):
1696         * rendering/RenderThemeChromiumAndroid.cpp:
1697         (WebCore::RenderThemeChromiumAndroid::extraDefaultStyleSheet):
1698         * rendering/RenderThemeChromiumAndroid.h:
1699         * rendering/RenderThemeChromiumLinux.cpp: Added.
1700         (WebCore):
1701         (WebCore::getWebThemeState):
1702         (WebCore::RenderThemeChromiumLinux::create):
1703         (WebCore::RenderTheme::themeForPage):
1704         (WebCore::RenderThemeChromiumLinux::RenderThemeChromiumLinux):
1705         (WebCore::RenderThemeChromiumLinux::~RenderThemeChromiumLinux):
1706         (WebCore::RenderThemeChromiumLinux::systemColor):
1707         (WebCore::RenderThemeChromiumLinux::extraDefaultStyleSheet):
1708         (WebCore::RenderThemeChromiumLinux::controlSupportsTints):
1709         (WebCore::RenderThemeChromiumLinux::activeListBoxSelectionBackgroundColor):
1710         (WebCore::RenderThemeChromiumLinux::activeListBoxSelectionForegroundColor):
1711         (WebCore::RenderThemeChromiumLinux::inactiveListBoxSelectionBackgroundColor):
1712         (WebCore::RenderThemeChromiumLinux::inactiveListBoxSelectionForegroundColor):
1713         (WebCore::RenderThemeChromiumLinux::platformActiveSelectionBackgroundColor):
1714         (WebCore::RenderThemeChromiumLinux::platformInactiveSelectionBackgroundColor):
1715         (WebCore::RenderThemeChromiumLinux::platformActiveSelectionForegroundColor):
1716         (WebCore::RenderThemeChromiumLinux::platformInactiveSelectionForegroundColor):
1717         (WebCore::RenderThemeChromiumLinux::sliderTickSize):
1718         (WebCore::RenderThemeChromiumLinux::sliderTickOffsetFromTrackCenter):
1719         (WebCore::RenderThemeChromiumLinux::adjustSliderThumbSize):
1720         (WebCore::RenderThemeChromiumLinux::supportsControlTints):
1721         (WebCore::RenderThemeChromiumLinux::setCaretBlinkInterval):
1722         (WebCore::RenderThemeChromiumLinux::caretBlinkIntervalInternal):
1723         (WebCore::RenderThemeChromiumLinux::setSelectionColors):
1724         (WebCore::RenderThemeChromiumLinux::paintCheckbox):
1725         (WebCore::RenderThemeChromiumLinux::setCheckboxSize):
1726         (WebCore::RenderThemeChromiumLinux::paintRadio):
1727         (WebCore::RenderThemeChromiumLinux::setRadioSize):
1728         (WebCore::RenderThemeChromiumLinux::paintButton):
1729         (WebCore::RenderThemeChromiumLinux::paintTextField):
1730         (WebCore::RenderThemeChromiumLinux::paintMenuList):
1731         (WebCore::RenderThemeChromiumLinux::paintSliderTrack):
1732         (WebCore::RenderThemeChromiumLinux::paintSliderThumb):
1733         (WebCore::RenderThemeChromiumLinux::adjustInnerSpinButtonStyle):
1734         (WebCore::RenderThemeChromiumLinux::paintInnerSpinButton):
1735         (WebCore::RenderThemeChromiumLinux::paintProgressBar):
1736         (WebCore::RenderThemeChromiumLinux::shouldOpenPickerWithF4Key):
1737         * rendering/RenderThemeChromiumLinux.h: Added.
1738         (WebCore):
1739         (RenderThemeChromiumLinux):
1740
1741 2012-12-05  Sankeerth V S  <sankeerth.vs@samsung.com>
1742
1743         Web Inspector: Title of "Record Timeline" status button on "Timeline
1744         Panel" should reflect the recording state.
1745         https://bugs.webkit.org/show_bug.cgi?id=104108
1746
1747         Reviewed by Alexander Pavlov.
1748
1749         Title should be toggled between "Record"/"Stop" to reflect current
1750         state of the Status bar button.
1751
1752         No new tests as UI related change.
1753
1754         * inspector/front-end/TimelinePanel.js:
1755         (WebInspector.TimelinePanel.prototype.get _toggleTimelineButtonClicked):
1756
1757 2012-12-03  Kent Tamura  <tkent@chromium.org>
1758
1759         INPUT_MULTIPLE_FIELDS_UI doesn't show digits well in RTL locales
1760         https://bugs.webkit.org/show_bug.cgi?id=103869
1761
1762         Reviewed by Hajime Morita.
1763
1764         We need to use display:inline elements to wrap sub-fields and static
1765         text in DateTimeEditElement children to apply the Unicode Bidi
1766         Algorithm.
1767
1768         Because we can't use display:inline-block for them, we can't specify
1769         min-width CSS property for them. We stop using customStyleForRenderer of
1770         sub-fields to specify each of their widths, and use
1771         customStyleForRenderer of DateTimeEditElement to specify the total
1772         required width. A sub-field width shrink and grow so that the width fits
1773         to the field value, and a DateTimeEditElement doesn't.
1774
1775         No new tests. Coverred by existing tests, especially
1776         fast/forms/datetime/datetime-appearance-l10n.html shows "23:59"
1777         correctly.
1778
1779         * css/html.css:
1780         (input::-webkit-datetime-edit-year-field):
1781         - Make this display:inline to apply the Unicode Bidi Algorithm.
1782         - Use padding instead of margin because of ease of width computation.
1783           Also, the focus apparance gets better by padding.
1784         - Don't allow to specify font property here because of ease of width
1785           computation.
1786         - Remove text-align:center. It doesn't work for display:inline.
1787         (input::-webkit-datetime-edit-text):
1788         - Make this display:inline to apply the Unicode Bidi Algorithm.
1789         - Don't allow to specify font property here because of ease of width
1790           computation.
1791
1792         * html/shadow/DateTimeEditElement.h:
1793         (DateTimeEditElement): Declare customStyleForRenderer.
1794         * html/shadow/DateTimeEditElement.cpp:
1795         (WebCore::DateTimeEditElement::DateTimeEditElement):
1796         Enable customStyleForRenderer.
1797         (WebCore::DateTimeEditElement::customStyleForRenderer):
1798         Compute required width with a font for this element and child maximum
1799         widths, and set it to min-width style.
1800         The resultant width value can be inaccurate if a page author specifies
1801         padding, border, margin, etc. to ::-webkit-datetime-edit-*-field or
1802         ::-webkit-datetime-edit-text. In such case, the page author should specify
1803         wider width to <input>.
1804
1805         * dom/Element.h:
1806         (Element): Add isDateTimeFieldElement to do static_cast<DateTimeFieldElement> safely.
1807         * dom/Element.cpp:
1808         (WebCore::Element::isDateTimeFieldElement): Added.
1809
1810         * html/shadow/DateTimeFieldElement.h:
1811         (DateTimeFieldElement): Declare isDateTimeFieldElement and maximumWidth.
1812         * html/shadow/DateTimeFieldElement.cpp:
1813         (WebCore::DateTimeFieldElement::isDateTimeFieldElement):
1814         Added. Returns true.
1815         (WebCore::DateTimeFieldElement::maximumWidth):
1816         Added. Returns padding width.
1817
1818         * html/shadow/DateTimeSymbolicFieldElement.h:
1819         (DateTimeSymbolicFieldElement):
1820         Remove customStyleForRenderer, and declare maximumWidth.
1821         * html/shadow/DateTimeSymbolicFieldElement.cpp:
1822         (WebCore::DateTimeSymbolicFieldElement::DateTimeSymbolicFieldElement):
1823         Disable customStyleForRenderer.
1824         (WebCore::DateTimeSymbolicFieldElement::maximumWidth):
1825         Added. Returns the expected maximum width with the specified font.
1826
1827         * html/shadow/DateTimeNumericFieldElement.h:
1828         (DateTimeNumericFieldElement):
1829         Remove customStyleForRenderer, declare maximumWidth, and make m_placeholder
1830         non-const because it is updated in the constructor.
1831         * html/shadow/DateTimeNumericFieldElement.cpp:
1832         (WebCore::DateTimeNumericFieldElement::DateTimeNumericFieldElement):
1833         Disable customStyleForRenderer.
1834         If a numeric value for this field is LTR and the whole direction is RTL,
1835         wrap the placeholder string with left-to-right-mark and
1836         right-to-left-mark so that it is handled as LTR. Without this,
1837         sub-fields order would be changed when the content of a field is changed
1838         from a placeholder to a numeric value.
1839         (WebCore::DateTimeNumericFieldElement::maximumWidth):
1840         Added. Returns the expected maximum width with the specified font.
1841
1842 2012-12-05  Kent Tamura  <tkent@chromium.org>
1843
1844         INPUT_MULTIPLE_FIELDS_UI: The hour, am/pm, millisecond fields should support read-only state correctly
1845         https://bugs.webkit.org/show_bug.cgi?id=104210
1846
1847         Reviewed by Kentaro Hara.
1848
1849         1. The hour, am/pm, and millisecond fields should have CSS rules for
1850            [readonly]. They should be gray when they are read-only.
1851         2. The am/pm field should reject to set an empty value like other
1852            numeric fields do.
1853
1854         Tests: Add test cases to fast/forms/time/time-appearance-basic.html.
1855
1856         * css/html.css: merge existing readonly rules, and add ampm, hour, and
1857         millisecond pseudo classes.
1858         * html/shadow/DateTimeSymbolicFieldElement.cpp:
1859         (WebCore::DateTimeSymbolicFieldElement::setEmptyValue):
1860         Reject to set empty value if it is read-only.
1861
1862 2012-12-05  Dan Beam  <dbeam@chromium.org>
1863
1864         HTMLFormElement#requestAutocomplete() should require a user action
1865         https://bugs.webkit.org/show_bug.cgi?id=102320
1866
1867         Reviewed by Kent Tamura.
1868
1869         This patch dispatches an autocompleteerror when HTMLFormElement::requestAutocomplete() is called while not processing
1870         a user gesture.
1871
1872         * fast/forms/form-request-autocomplete.html is updated.
1873
1874         * html/HTMLFormElement.cpp:
1875         (WebCore::HTMLFormElement::requestAutocomplete):
1876
1877         Asynchronously dispatch an autocomplete error when not processing a user action when
1878         HTMLFormElement#requestAutocomplete() is invoked.
1879
1880 2012-12-05  Kentaro Hara  <haraken@chromium.org>
1881
1882         [V8] Optimize v8StringOrNull() and v8StringOrUndefined()
1883         https://bugs.webkit.org/show_bug.cgi?id=104206
1884
1885         Reviewed by Adam Barth.
1886
1887         Currently v8StringOrNull() and v8StringOrUndefined() are checking
1888         a null string twice. It is redundant.
1889
1890         [div.localName]
1891         Before this patch: 20.03 ns
1892         After this patch:  19.34 ns
1893
1894         * bindings/v8/V8Binding.h:
1895         (WebCore::v8StringOrNull):
1896         (WebCore::v8StringOrUndefined):
1897
1898 2012-12-05  Kentaro Hara  <haraken@chromium.org>
1899
1900         [V8] Optimize v8String() for uninitialized DOM attributes
1901         https://bugs.webkit.org/show_bug.cgi?id=104205
1902
1903         Reviewed by Adam Barth.
1904
1905         This patch makes uninitialized div.lang, div.title etc 6.3% faster.
1906
1907         [div.lang]
1908         Before this patch: 12.6 ns
1909         After this patch:  11.8 ns
1910
1911         * bindings/v8/V8Binding.h:
1912         (WebCore::v8String):
1913
1914 2012-12-05  Kentaro Hara  <haraken@chromium.org>
1915
1916         [V8] Remove addImplicitReferencesForNodeWithEventListeners()
1917         https://bugs.webkit.org/show_bug.cgi?id=104203
1918
1919         Reviewed by Adam Barth.
1920
1921         We can use opaqueRootForGC() instead. By this change, we can remove
1922         all AddImplicitReferences() from V8 bindings.
1923
1924         Tests: fast/dom/gc-image-element.html
1925                fast/dom/gc-image-element-2.html
1926                fast/dom/inline-event-attributes-lookup-removed.html
1927
1928         * bindings/v8/V8GCController.cpp:
1929
1930 2012-12-05  Andrei Bucur  <abucur@adobe.com>
1931
1932         [CSS Regions] Blocks don't relayout children if the width of a region changes
1933         https://bugs.webkit.org/show_bug.cgi?id=103993
1934
1935         Reviewed by David Hyatt.
1936
1937         After r135750 lines are no longer invalidating when regions change width. This is happening because the detection for the width change was being done
1938         only at line layout time. This patch moves the line relayout decision to the containing block by setting the relayoutChildren flag if the block
1939         has no region chain attached.
1940
1941         Tests: fast/regions/region-width-change-relayout-1.html
1942                fast/regions/region-width-change-relayout-2.html
1943                fast/regions/region-width-change-relayout-3.html
1944
1945         * rendering/RenderFlowThread.cpp:
1946         (WebCore::RenderFlowThread::logicalWidthChangedInRegions):
1947
1948 2012-12-05  Kihong Kwon  <kihong.kwon@samsung.com>
1949
1950         Parameter event need to covert to RefPtr in the DeviceController::dispatchDeviceEvent
1951         https://bugs.webkit.org/show_bug.cgi?id=104201
1952
1953         Reviewed by Laszlo Gombos.
1954
1955         Parameter 'event' need to covert to RefPtr in the DeviceController::dispatchDeviceEvent.
1956         This can make crash sometimes.
1957
1958         No new tests. Covered by existing layout tests.
1959
1960         * page/DeviceController.cpp:
1961         (WebCore::DeviceController::dispatchDeviceEvent):
1962
1963 2012-12-05  Halton Huo  <halton.huo@intel.com>
1964
1965         [CMake] Unify coding style for CMake files
1966         https://bugs.webkit.org/show_bug.cgi?id=103605
1967
1968         Reviewed by Laszlo Gombos.
1969
1970         Update cmake files(.cmake, CMakeLists.txt) with following style rules:
1971         1. Indentation
1972         1.1 Use spaces, not tabs.
1973         1.2 Four spaces as indent.
1974         2. Spacing
1975         2.1 Place one space between control statements and their parentheses.
1976             For eg, if (), else (), elseif (), endif (), foreach (),
1977             endforeach (), while (), endwhile (), break ().
1978         2.2 Do not place spaces between function and macro statements and
1979             their parentheses. For eg, macro(), endmacro(), function(),
1980             endfunction().
1981         2.3 Do not place spaces between a command or function or macro and its
1982             parentheses, or between a parenthesis and its content. For eg,
1983             message("testing") not message( "testing") or message ("testing" )
1984         2.4 No space at line ending.
1985         3. Lowercase when call commands macros and functions. For eg,
1986            add_executable() not ADD_EXECUTABLE(), set() not SET().
1987
1988         * CMakeLists.txt:
1989         * PlatformBlackBerry.cmake:
1990         * PlatformEfl.cmake:
1991         * PlatformWinCE.cmake:
1992         * UseJSC.cmake:
1993         * UseV8.cmake:
1994
1995 2012-12-05  Kentaro Hara  <haraken@chromium.org>
1996
1997         [V8] Remove unused property names from V8HiddenPropertyName
1998         https://bugs.webkit.org/show_bug.cgi?id=104194
1999
2000         Reviewed by Adam Barth.
2001
2002         We can remove unused property names from V8HiddenPropertyName.
2003
2004         No tests. No change in behavior.
2005
2006         * bindings/v8/V8HiddenPropertyName.h:
2007         (WebCore):
2008
2009 2012-12-05  Greg Billock  <gbillock@google.com>
2010
2011         Add runtime enable for web intents.
2012         https://bugs.webkit.org/show_bug.cgi?id=103669
2013
2014         Reviewed by Adam Barth.
2015
2016         Make web intents Javascript API enabled by a runtime setting.
2017
2018         * Modules/intents/DOMWindowIntents.idl:
2019         * Modules/intents/NavigatorIntents.idl:
2020         * bindings/generic/RuntimeEnabledFeatures.cpp:
2021         (WebCore):
2022         * bindings/generic/RuntimeEnabledFeatures.h:
2023         (RuntimeEnabledFeatures):
2024         (WebCore::RuntimeEnabledFeatures::webkitStartActivityEnabled):
2025         (WebCore::RuntimeEnabledFeatures::webkitIntentEnabled):
2026         (WebCore::RuntimeEnabledFeatures::webKitIntentEnabled):
2027         (WebCore::RuntimeEnabledFeatures::setWebIntentsEnabled):
2028
2029 2012-12-05  Scott Violet  <sky@chromium.org>
2030
2031         [chromium] Remove linux theme related files and switch to default
2032         https://bugs.webkit.org/show_bug.cgi?id=103897
2033
2034         Reviewed by Tony Chang.
2035
2036         Linux related theme files are now named Default.
2037
2038         No new tests, code cleanup.
2039
2040         * WebCore.gyp/WebCore.gyp: Update files
2041         * WebCore.gypi: Update files
2042         * platform/chromium/PlatformThemeChromiumLinux.cpp: Removed.
2043         * platform/chromium/PlatformThemeChromiumLinux.h: Removed.
2044         * platform/chromium/ScrollbarThemeChromiumLinux.cpp: Removed.
2045         * platform/chromium/ScrollbarThemeChromiumLinux.h: Removed.
2046         * rendering/RenderThemeChromiumAndroid.cpp:
2047         (WebCore::RenderThemeChromiumAndroid::extraDefaultStyleSheet): Linux->Default
2048         * rendering/RenderThemeChromiumAndroid.h: Change superclass
2049         * rendering/RenderThemeChromiumLinux.cpp: Removed.
2050         * rendering/RenderThemeChromiumLinux.h: Removed.
2051
2052 2012-12-05  Joshua Bell  <jsbell@chromium.org>
2053
2054         IndexedDB: Allow multiple transactions to interleave request execution
2055         https://bugs.webkit.org/show_bug.cgi?id=97570
2056
2057         Reviewed by Tony Chang.
2058
2059         Implement spec logic for allowing read-only transactions, and read-write transactions
2060         with non-overlapping scopes, to run concurrently. Transactions all still run in the
2061         same thread with tasks triggered via timers, so tasks and the underlying database
2062         operations are interleaved rather than truly parallelized.
2063
2064         Within IDBTransactionCoordinator, rename started->queued, running->started to match
2065         spec terminology and clear up confusion.
2066
2067         Test: storage/indexeddb/transaction-coordination-across-databases.html
2068               storage/indexeddb/transaction-coordination-within-database.html
2069               storage/indexeddb/transaction-readwrite-exclusive.html
2070               storage/indexeddb/transaction-scope-sequencing.html
2071               storage/indexeddb/transaction-starvation.html
2072
2073         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Use IDBTransaction::Mode enum
2074         (WebCore::IDBDatabaseBackendImpl::createTransaction):
2075         * Modules/indexeddb/IDBDatabaseBackendImpl.h: Ditto.
2076         (IDBDatabaseBackendImpl):
2077         * Modules/indexeddb/IDBDatabaseBackendInterface.h: Ditto.
2078         (IDBDatabaseBackendInterface):
2079         * Modules/indexeddb/IDBTransactionBackendImpl.cpp: Convert scope as a HashSet for
2080         fast intersecting.
2081         (WebCore::IDBTransactionBackendImpl::create):
2082         (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
2083         * Modules/indexeddb/IDBTransactionBackendImpl.h:
2084         (IDBTransactionBackendImpl):
2085         (WebCore::IDBTransactionBackendImpl::mode):
2086         (WebCore::IDBTransactionBackendImpl::scope):
2087         * Modules/indexeddb/IDBTransactionCoordinator.cpp: Spec logic goes here.
2088         (WebCore::IDBTransactionCoordinator::processStartedTransactions): Extend this
2089         method to test all plausibly runnable transactions.
2090         (WebCore):
2091         (WebCore::IDBTransactionCoordinator::canRunTransaction): Test to see if one
2092         particular transaction can be run.
2093         (WebCore::IDBTransactionCoordinator::doScopesOverlap): Do a quick intersection
2094         test between transaction scopes.
2095         * Modules/indexeddb/IDBTransactionCoordinator.h:
2096         (IDBTransactionCoordinator):
2097
2098 2012-12-05  No'am Rosenthal  <noam@webkit.org>
2099
2100         Coordinated Graphics: Enable support for setContentsToBackgroundColor
2101         https://bugs.webkit.org/show_bug.cgi?id=104128
2102
2103         Reviewed by Kenneth Rohde Christiansen.
2104
2105         Enable background color in GraphicsLayerTextureMapper, and paint it using TextureMapper::drawSolidColor.
2106         Once https://bugs.webkit.org/show_bug.cgi?id=103786 is enabled, this would enable Qt/GTK/EFL to directly
2107         composite colors that only have a background color, without having to create a backing store for them.
2108         This would eliminate the memory usage for those layers, reduce the time needed for them to draw into the
2109         backing store and upload the texture, and in the future allow direct compositing of things other than
2110         background colors.
2111
2112         Compositing tests cover this, but are still skipped for ports using coordinated graphics. 
2113         See https://bugs.webkit.org/show_bug.cgi?id=104129.
2114
2115         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2116         (WebCore::GraphicsLayerTextureMapper::setContentsToBackgroundColor):
2117         (WebCore::GraphicsLayerTextureMapper::backgroundColor):
2118             Maintain a backgroundColor member variable in GraphicsLayerTextureMapper
2119
2120         * platform/graphics/texmap/TextureMapperGL.cpp:
2121         (WebCore::TextureMapperGL::drawSolidColor):
2122             TextureMapperGL::drawSolidColor should allow blending when the solid color has alpha.
2123
2124         * platform/graphics/texmap/TextureMapperLayer.cpp:
2125         (WebCore::TextureMapperLayer::paintSelf):
2126         (WebCore::TextureMapperLayer::flushCompositingStateSelf):
2127         * platform/graphics/texmap/TextureMapperLayer.h:
2128         (State):
2129
2130 2012-12-05  Kentaro Hara  <haraken@chromium.org>
2131
2132         Unreviewed, rolling out r136481.
2133         http://trac.webkit.org/changeset/136481
2134         https://bugs.webkit.org/show_bug.cgi?id=103868
2135
2136         it might have regressed dom_perf/CloneNodes (See bug 104177)
2137
2138         * dom/ContainerNodeAlgorithms.h:
2139         (ChildNodeInsertionNotifier):
2140         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument):
2141         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
2142         (WebCore::ChildNodeInsertionNotifier::notify):
2143
2144 2012-12-05  David Grogan  <dgrogan@chromium.org>
2145
2146         IndexedDB: Abort transactions because of leveldb errors part 3
2147         https://bugs.webkit.org/show_bug.cgi?id=103960
2148
2149         Reviewed by Tony Chang.
2150
2151         Transactions are aborted when there are leveldb problems creating
2152         indexes on an object store with existing data or when adding data to an
2153         objectstore that has indexes.
2154
2155         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2156         (WebCore):
2157         (WebCore::makeIndexWriters):
2158         (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
2159         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::perform):
2160
2161 2012-12-05  Simon Fraser  <simon.fraser@apple.com>
2162
2163         Fix some repaint/paintCounter confusion, and reset it when getting layers out of the layer pool
2164         https://bugs.webkit.org/show_bug.cgi?id=104180
2165
2166         Reviewed by Tim Horton.
2167
2168         Layers retrieved from the LayerPool by TileCache need to have their
2169         repaint counters reset, otherwise the scroll performance logging gets
2170         confused.
2171         
2172         Also, the counter counts paints, not repaints (invalidations), so
2173         rename it accordingly.
2174
2175         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2176         (WebCore::ScrollingTreeScrollingNodeMac::logExposedUnfilledArea): Whitespace fix.
2177         * platform/graphics/GraphicsLayer.h:
2178         * platform/graphics/ca/mac/TileCache.mm:
2179         (WebCore::TileCache::blankPixelCountForTiles):
2180         (WebCore::TileCache::createTileLayer):
2181         (WebCore::TileCache::drawRepaintCounter):
2182         * platform/graphics/ca/mac/WebTileLayer.h:
2183         * platform/graphics/ca/mac/WebTileLayer.mm:
2184         (-[WebTileLayer resetPaintCount]):
2185         (-[WebTileLayer incrementPaintCount]):
2186         (-[WebTileLayer paintCount]):
2187         (-[WebTileLayer logFilledFreshTile]):
2188
2189 2012-12-05  Oliver Hunt  <oliver@apple.com>
2190
2191         Empty parse cache when receiving a low memory warning
2192         https://bugs.webkit.org/show_bug.cgi?id=104161
2193
2194         Reviewed by Filip Pizlo.
2195
2196         Use new discardAllCode() function on the global data, rather than
2197         directly interacting with the heap.
2198
2199         * bindings/js/GCController.cpp:
2200         (WebCore::GCController::discardAllCompiledCode):
2201
2202 2012-12-05  Dan Bernstein  <mitz@apple.com>
2203
2204         Text decorations are rotated when text-combine takes effect
2205         https://bugs.webkit.org/show_bug.cgi?id=104172
2206
2207         Reviewed by Dave Hyatt.
2208
2209         Test: fast/text/decorations-with-text-combine.html
2210
2211         * rendering/InlineTextBox.cpp:
2212         (WebCore::InlineTextBox::paint): Applied a rotation to the graphics context when painting
2213         the text decorations for combined text.
2214
2215 2012-12-05  Justin Novosad  <junov@google.com>
2216
2217         [skia] Improve performance of GraphicsContext::createCompatibleBuffer by using SkDevice:createCompatibleDevice
2218         https://bugs.webkit.org/show_bug.cgi?id=103896
2219
2220         Reviewed by Stephen White.
2221
2222         Refactored GraphicsContext::createCompatibleBuffer (platform common
2223         code) to use platform-specific implementations provided by ImageBuffer.
2224         There is no change in behavior for non-skia ports. The skia
2225         implementation uses skia'a own createCompatibleDevice implementation,
2226         which offers several performance benefits:
2227         1. For accelerated contexts, the backing store may be allocated from
2228         the scratch texture pool, which minimizes texture allocation and
2229         deallocation overhead.
2230         2. The backing store will not be initially cleared if it is known
2231         in advance that fully opaque contents will be drawn into the buffer.
2232         3. For non-accelerated contexts, if the backing store is flagged as
2233         opaque, faster blitter loop implementations will be used for drawing
2234         the buffer contents into other buffers. (e.g. generated opaque gradient
2235         fills)
2236
2237         No new tests: covered by existing layout tests 
2238
2239         * platform/graphics/Generator.h:
2240         (Generator):
2241         Added hasAlpha method so that it can be used by GeneratorGeneratedImage
2242         * platform/graphics/GeneratorGeneratedImage.cpp:
2243         (WebCore::GeneratorGeneratedImage::drawPattern):
2244         Passing m_generator->hasAlpha() to createCompatibleBuffer in order to
2245         take advantage of optimizations that apply to opaque buffers.
2246         * platform/graphics/Gradient.h:
2247         (Gradient):
2248         Made hasAlpha virtual so that it now overrides Generator::hasAlpha
2249         * platform/graphics/GraphicsContext.cpp:
2250         (WebCore::GraphicsContext::createCompatibleBuffer):
2251         Refactored to use platform-specific implementation
2252         * platform/graphics/GraphicsContext.h:
2253         * platform/graphics/ImageBuffer.cpp:
2254         (WebCore::createCompatibleBuffer):
2255         Non-skia implementation. Mimics old
2256         GraphicsContext::createCompatibleBuffer
2257         * platform/graphics/ImageBuffer.h:
2258         (ImageBuffer):
2259         New skia-specific constructor
2260         * platform/graphics/skia/ImageBufferSkia.cpp:
2261         (WebCore::ImageBuffer::createCompatibleBuffer):
2262         (WebCore::ImageBuffer::ImageBuffer):
2263         * platform/graphics/skia/PlatformContextSkia.cpp:
2264         (WebCore::PlatformContextSkia::createCompatibleDevice):
2265         (WebCore):
2266         * platform/graphics/skia/PlatformContextSkia.h:
2267         (PlatformContextSkia):
2268
2269 2012-12-05  Alexis Menard  <alexis@webkit.org>
2270
2271         REGRESSION (r136683): css3/calc/background-position-parsing.html failing on EFL Linux 64-bit Debug WK2
2272         https://bugs.webkit.org/show_bug.cgi?id=104131
2273
2274         Reviewed by Antti Koivisto.
2275
2276         css3/calc/background-position-parsing.html assert in debug because we
2277         call CSSParser::validUnit multiple times in a row. The problem was with
2278         validUnit which check calc() values and save the result inside
2279         m_parsedCalculation for later usage. validUnit expects you to
2280         use m_parsedCalculation therefore calling validUnit again with
2281         m_parsedCalculation being set asserts. As parseFillBackgroundPosition
2282         just want to check wether the current value is maybe valid for
2283         background-position we can just relax the check to allow either the
2284         valid keywords or any other units (we will anyway filter the incorrect
2285         values later in the parsing). The most important check at this point
2286         for the shorthand is the validity of the keyword.
2287
2288         No new tests : the assert was covered by css3/calc/background-position-parsing.html.
2289
2290         * css/CSSParser.cpp:
2291         (WebCore::CSSParser::isPotentialPositionValue):
2292         (WebCore::CSSParser::parseFillBackgroundPosition):
2293         * css/CSSParser.h:
2294
2295 2012-12-05  Stephen White  <senorblanco@chromium.org>
2296
2297         Unreviewed, rolling out r136735.
2298         http://trac.webkit.org/changeset/136735
2299         https://bugs.webkit.org/show_bug.cgi?id=102699
2300
2301         Broke Chrome/Win build.
2302
2303         * platform/chromium/PlatformSupport.h:
2304         (PlatformSupport):
2305         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
2306         (WebCore::ScrollbarThemeChromiumWin::paintTrackPiece):
2307         (WebCore::ScrollbarThemeChromiumWin::paintButton):
2308         (WebCore::ScrollbarThemeChromiumWin::paintThumb):
2309         * rendering/RenderThemeChromiumWin.cpp:
2310         (WebCore):
2311         (WebCore::RenderThemeChromiumWin::paintButton):
2312         (WebCore::RenderThemeChromiumWin::paintSliderTrack):
2313         (WebCore::RenderThemeChromiumWin::paintSliderThumb):
2314         (WebCore::RenderThemeChromiumWin::paintMenuList):
2315         (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
2316         (WebCore::RenderThemeChromiumWin::paintInnerSpinButton):
2317         (WebCore::RenderThemeChromiumWin::paintProgressBar):
2318
2319 2012-12-05  Jun Jiang  <jun.a.jiang@intel.com>
2320
2321         WebGL: use pointer to the source data for Image directly in texImage2D and texSubImage2D to avoid memory copy if no conversion is needed
2322         https://bugs.webkit.org/show_bug.cgi?id=103885
2323
2324         Reviewed by Kenneth Russell.
2325
2326         In texImage2D() and texSubImage2D(), there is a redundant memory copy from Image data to the intermediate vector when no conversion is needed. If the Image resource can be locked properly, it is better to use the pointer to the image source directly and hence avoid the memory copy and improve the performance. 
2327
2328         Already covered by current tests.
2329
2330         * html/canvas/WebGLRenderingContext.cpp:
2331         (WebCore):
2332         (WebCore::WebGLRenderingContext::texImage2DBase):
2333         (WebCore::WebGLRenderingContext::texImage2DImpl):
2334         (WebCore::WebGLRenderingContext::texSubImage2DBase):
2335         (WebCore::WebGLRenderingContext::texSubImage2DImpl):
2336         * html/canvas/WebGLRenderingContext.h:
2337         (WebGLRenderingContext):
2338         * platform/graphics/GraphicsContext3D.h:
2339         (ImageExtractor):
2340
2341 2012-12-05  Elliott Sprehn  <esprehn@chromium.org>
2342
2343         Add infrastructure for :before and :after in DOM
2344         https://bugs.webkit.org/show_bug.cgi?id=103705
2345
2346         Reviewed by Eric Seidel.
2347
2348         Add all infrastructure for reimplementing generated content :before and
2349         :after as DOM Elements. Now ElementRareData has two pointers to PseudoElements
2350         for the generated content and Node has methods for traversing the tree
2351         including generated content.
2352
2353         This will allow the generated content to be treated as real nodes instead
2354         of anonymous and take part in the usual recalcStyle and attach flow which
2355         fixes many bugs and vastly simplifies the ifecycle of generated content.
2356
2357         Instead of attempting to land both the infrastructure and enable it at
2358         the same time which has proven problematic due to how drastic this change
2359         is, this patch contains only the support code so a much smaller future
2360         patch can be used to switch it on.
2361
2362         No new behavior, this is just the infrastructure.
2363
2364         * CMakeLists.txt:
2365         * GNUmakefile.list.am:
2366         * Target.pri:
2367         * WebCore.gypi:
2368         * WebCore.vcproj/WebCore.vcproj:
2369         * WebCore.xcodeproj/project.pbxproj:
2370         * dom/DOMAllInOne.cpp:
2371         * dom/Element.cpp:
2372         (WebCore::Element::~Element):
2373         (WebCore::Element::detach):
2374         (WebCore::Element::updatePseudoElement):
2375         (WebCore::Element::createPseudoElementIfNeeded):
2376         (WebCore::Element::beforePseudoElement):
2377         (WebCore::Element::afterPseudoElement):
2378         * dom/Element.h:
2379         (Element):
2380         * dom/ElementRareData.h:
2381         (ElementRareData):
2382         (WebCore::ElementRareData::ElementRareData):
2383         (WebCore::ElementRareData::~ElementRareData):
2384         (WebCore::ElementRareData::setPseudoElement):
2385         (WebCore::ElementRareData::pseudoElement):
2386         (WebCore::ElementRareData::releasePseudoElement):
2387         * dom/Node.cpp:
2388         (WebCore::Node::pseudoAwarePreviousSibling):
2389         (WebCore::Node::pseudoAwareNextSibling):
2390         (WebCore::Node::rendererIsEditable):
2391         (WebCore::checkAcceptChild):
2392         * dom/Node.h:
2393         (Node):
2394         (WebCore::Node::isPseudoElement):
2395         (WebCore::Node::isBeforePseudoElement):
2396         (WebCore::Node::isAfterPseudoElement):
2397         (WebCore::Node::pseudoId):
2398         (WebCore::Node::customPseudoId):
2399         * dom/NodeRenderingContext.cpp:
2400         (WebCore::NodeRenderingContext::nextRenderer):
2401         (WebCore::NodeRenderingContext::previousRenderer):
2402         * dom/Position.cpp:
2403         (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
2404         * dom/PseudoElement.cpp: Added.
2405         (WebCore::pseudoElementTagName):
2406         (WebCore::PseudoElement::PseudoElement):
2407         (WebCore::PseudoElement::customStyleForRenderer):
2408         (WebCore::PseudoElement::attach):
2409         (WebCore::PseudoElement::rendererIsNeeded):
2410         (WebCore::PseudoElement::updateChildStyle):
2411         (WebCore::PseudoElement::didRecalcStyle):
2412         * dom/PseudoElement.h: Added.
2413         (PseudoElement):
2414         (WebCore::PseudoElement::create):
2415         (WebCore::pseudoElementIsNeeded):
2416         * editing/visible_units.cpp:
2417         (WebCore::logicallyPreviousBox):
2418         (WebCore::logicallyNextBox):
2419         (WebCore::startPositionForLine):
2420         (WebCore::endPositionForLine):
2421         * page/animation/AnimationController.cpp:
2422         (WebCore::AnimationController::updateAnimations):
2423         * rendering/HitTestResult.cpp:
2424         (WebCore::HitTestResult::setInnerNode):
2425         (WebCore::HitTestResult::setInnerNonSharedNode):
2426         * rendering/RenderBlock.cpp:
2427         (WebCore::RenderBlock::isSelectionRoot):
2428         (WebCore::RenderBlock::renderName):
2429         * rendering/RenderCounter.cpp:
2430         (WebCore::RenderCounter::originalText):
2431         * rendering/RenderDeprecatedFlexibleBox.cpp:
2432         (WebCore::RenderDeprecatedFlexibleBox::renderName):
2433         * rendering/RenderInline.cpp:
2434         (WebCore::RenderInline::renderName):
2435         * rendering/RenderMultiColumnBlock.cpp:
2436         (WebCore::RenderMultiColumnBlock::renderName):
2437         * rendering/RenderObject.cpp:
2438         (WebCore::RenderObject::createObject):
2439         (WebCore::RenderObject::setPseudoStyle):
2440         (WebCore::RenderObject::createVisiblePosition):
2441         * rendering/RenderObject.h:
2442         (WebCore::RenderObject::isPseudoElement):
2443         (RenderObject):
2444         (WebCore::RenderObject::generatingNode):
2445         * rendering/RenderTableCell.h:
2446         (WebCore::RenderTableCell::renderName):
2447         * rendering/RenderTableRow.h:
2448         (WebCore::RenderTableRow::renderName):
2449         * rendering/RenderTableSection.h:
2450         (WebCore::RenderTableSection::renderName):
2451         * rendering/RenderTreeAsText.cpp:
2452         (WebCore::RenderTreeAsText::writeRenderObject):
2453         * rendering/style/ContentData.cpp:
2454         (WebCore::ImageContentData::createRenderer):
2455         (WebCore::TextContentData::createRenderer):
2456         (WebCore::CounterContentData::createRenderer):
2457         (WebCore::QuoteContentData::createRenderer):
2458
2459 2012-12-05  Justin Novosad  <junov@google.com>
2460
2461         Use of uninitialized variable in WebCore::RenderBox::paintFillLayers
2462         https://bugs.webkit.org/show_bug.cgi?id=104154
2463
2464         Reviewed by Stephen White.
2465
2466         Method FillLayer::clipOccludesNextLayers performs an internal
2467         initialization when called on the first layer of a list of layers.
2468         Without this initialization, calls to clipOccludesNextLayers on
2469         subsequent layers will use uninitialized data.  In some cases, the
2470         call to clipOccludesNextLayers was being short-circuited in
2471         RenderBox::paintFillLayers. 
2472         Fix: Predicate was permuted to ensure that clipOccludesNextLayers
2473         is never short-circuited.
2474         
2475         Test: fast/backgrounds/size/contain-and-cover-zoomed.html
2476         Running with valgrind reveals the error.
2477
2478         * rendering/RenderBox.cpp:
2479         (WebCore::RenderBox::paintFillLayers):
2480
2481 2012-12-05  Elliott Sprehn  <esprehn@gmail.com>
2482
2483         Encapsulate ElementRareData for possible future sharing
2484         https://bugs.webkit.org/show_bug.cgi?id=103948
2485
2486         Reviewed by Eric Seidel.
2487
2488         Encapsulate ElementRareData and make all access go through getters and
2489         setters. This is already true for NodeRareData, but ElementRareData
2490         had many places where people directly access it.
2491
2492         This the first step in possible future sharing of ElementRareData
2493         instances across nodes. All nodes in a shadow tree have rare data to
2494         store the TreeScope, but in most cases all they have is the TreeScope!
2495         Instead of making every node in a shadow subtree have rare data
2496         and use lots of memory we could just share a single instance of rare data
2497         and only allocate a unique one on modification. Encapsulation lets us
2498         assert about mutations on shared instances.
2499
2500         * dom/Element.cpp:
2501         (WebCore::Element::~Element):
2502         (WebCore::Element::attributes):
2503         (WebCore::Element::shadow):
2504         (WebCore::Element::ensureShadow):
2505         (WebCore::Element::minimumSizeForResizing):
2506         (WebCore::Element::setMinimumSizeForResizing):
2507         (WebCore::Element::computedStyle):
2508         (WebCore::Element::classList):
2509         (WebCore::Element::optionalClassList):
2510         (WebCore::Element::dataset):
2511         (WebCore::Element::hasNamedNodeMap):
2512         (WebCore::Element::savedLayerScrollOffset):
2513         (WebCore::Element::setSavedLayerScrollOffset):
2514         * dom/ElementRareData.cpp:
2515         (WebCore::ElementRareData::reportMemoryUsage):
2516         * dom/ElementRareData.h:
2517         (WebCore::ElementRareData::needsFocusAppearanceUpdateSoonAfterAttach):
2518         (WebCore::ElementRareData::setNeedsFocusAppearanceUpdateSoonAfterAttach):
2519         (ElementRareData):
2520         (WebCore::ElementRareData::styleAffectedByEmpty):
2521         (WebCore::ElementRareData::setStyleAffectedByEmpty):
2522         (WebCore::ElementRareData::isInCanvasSubtree):
2523         (WebCore::ElementRareData::setIsInCanvasSubtree):
2524         (WebCore::ElementRareData::containsFullScreenElement):
2525         (WebCore::ElementRareData::setContainsFullScreenElement):
2526         (WebCore::ElementRareData::isInTopLayer):
2527         (WebCore::ElementRareData::setIsInTopLayer):
2528         (WebCore::ElementRareData::childrenAffectedByHover):
2529         (WebCore::ElementRareData::setChildrenAffectedByHover):
2530         (WebCore::ElementRareData::childrenAffectedByActive):
2531         (WebCore::ElementRareData::setChildrenAffectedByActive):
2532         (WebCore::ElementRareData::childrenAffectedByDrag):
2533         (WebCore::ElementRareData::setChildrenAffectedByDrag):
2534         (WebCore::ElementRareData::childrenAffectedByFirstChildRules):
2535         (WebCore::ElementRareData::setChildrenAffectedByFirstChildRules):
2536         (WebCore::ElementRareData::childrenAffectedByLastChildRules):
2537         (WebCore::ElementRareData::setChildrenAffectedByLastChildRules):
2538         (WebCore::ElementRareData::childrenAffectedByDirectAdjacentRules):
2539         (WebCore::ElementRareData::setChildrenAffectedByDirectAdjacentRules):
2540         (WebCore::ElementRareData::childrenAffectedByForwardPositionalRules):
2541         (WebCore::ElementRareData::setChildrenAffectedByForwardPositionalRules):
2542         (WebCore::ElementRareData::childrenAffectedByBackwardPositionalRules):
2543         (WebCore::ElementRareData::setChildrenAffectedByBackwardPositionalRules):
2544         (WebCore::ElementRareData::childIndex):
2545         (WebCore::ElementRareData::setChildIndex):
2546         (WebCore::ElementRareData::shadow):
2547         (WebCore::ElementRareData::setShadow):
2548         (WebCore::ElementRareData::attributeMap):
2549         (WebCore::ElementRareData::setAttributeMap):
2550         (WebCore::ElementRareData::computedStyle):
2551         (WebCore::ElementRareData::setComputedStyle):
2552         (WebCore::ElementRareData::classList):
2553         (WebCore::ElementRareData::setClassList):
2554         (WebCore::ElementRareData::dataset):
2555         (WebCore::ElementRareData::setDataset):
2556         (WebCore::ElementRareData::minimumSizeForResizing):
2557         (WebCore::ElementRareData::setMinimumSizeForResizing):
2558         (WebCore::ElementRareData::savedLayerScrollOffset):
2559         (WebCore::ElementRareData::setSavedLayerScrollOffset):
2560         (WebCore::ElementRareData::resetComputedStyle):
2561         * dom/NodeRareData.h:
2562         (NodeRareData):
2563
2564 2012-12-05  Mark Pilgrim  <pilgrim@chromium.org>
2565
2566         [Chromium][Win] Remove theme-related functions from PlatformSupport
2567         https://bugs.webkit.org/show_bug.cgi?id=102699
2568
2569         Reviewed by Adam Barth.
2570
2571         Call theme engine directly instead of going through
2572         PlatformSupport. Part of a refactoring series. See tracking bug 82948.
2573
2574         * platform/chromium/PlatformSupport.h:
2575         (PlatformSupport):
2576         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
2577         (WebCore::ScrollbarThemeChromiumWin::paintTrackPiece):
2578         (WebCore::ScrollbarThemeChromiumWin::paintButton):
2579         * rendering/RenderThemeChromiumWin.cpp:
2580         (WebCore):
2581         (WebCore::RenderThemeChromiumWin::paintButton):
2582         (WebCore::RenderThemeChromiumWin::paintSliderTrack):
2583         (WebCore::RenderThemeChromiumWin::paintSliderThumb):
2584         (WebCore::RenderThemeChromiumWin::paintMenuList):
2585         (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
2586         (WebCore::RenderThemeChromiumWin::paintInnerSpinButton):
2587         (WebCore::RenderThemeChromiumWin::paintProgressBar):
2588
2589 2012-12-05  Stephen White  <senorblanco@chromium.org>
2590
2591         Unreviewed, rolling out r136609.
2592         http://trac.webkit.org/changeset/136609
2593         https://bugs.webkit.org/show_bug.cgi?id=103793
2594
2595         Breaking Chrome/Mac Debug builds.
2596
2597         * html/canvas/WebGLRenderingContext.cpp:
2598         (WebCore):
2599         (WebCore::WebGLRenderingContext::create):
2600         * platform/chromium/support/GraphicsContext3DChromium.cpp:
2601         (WebCore::GraphicsContext3D::create):
2602         * platform/graphics/GraphicsContext3D.h:
2603         (Attributes):
2604
2605 2012-12-05  Bear Travis  <betravis@adobe.com>
2606
2607         [CSS Exclusions] Enable shape-inside for multiple-segment polygons
2608         https://bugs.webkit.org/show_bug.cgi?id=91878
2609
2610         Reviewed by David Hyatt.
2611
2612         Patch adding support for multiple-segment polygons for shape-insides from
2613         the CSS Exclusions specification. The layout code has been modified to first
2614         support dividing text into multiple segments per line, and then to lay out
2615         multiple segments per line box.
2616
2617         Tests:  fast/exclusions/shape-inside/shape-inside-multiple-segments-001.html
2618                 fast/exclusions/shape-inside/shape-inside-multiple-segments-002.html
2619                 fast/exclusions/shape-inside/shape-inside-multiple-segments-003.html
2620                 fast/exclusions/shape-inside/shape-inside-multiple-segments-004.html
2621
2622         * platform/text/BidiResolver.h:
2623         (WebCore::BidiCharacterRun::BidiCharacterRun):
2624         (BidiCharacterRun): Added a 'startsSegment' bitfield to track whether a
2625         run begins a new segment. The field is here, rather than in BidiRun, in
2626         order to save space. See Bug 100173.
2627         * rendering/BidiRun.h:
2628         (WebCore::BidiRun::BidiRun):
2629         (BidiRun): Set the initial value for 'startsSegment'.
2630         * rendering/ExclusionShapeInsideInfo.cpp:
2631         (WebCore::ExclusionShapeInsideInfo::computeSegmentsForLine): Clear the
2632         segment ranges when computing segments for a new line.
2633         * rendering/ExclusionShapeInsideInfo.h:
2634         (LineSegmentRange): Added a new type to track segment offsets.
2635         (WebCore::ExclusionShapeInsideInfo::segmentRanges): Added a getter for
2636         the line segment ranges vector.
2637         * rendering/InlineFlowBox.cpp:
2638         (WebCore::InlineFlowBox::placeBoxesInInlineDirection): Modified to call
2639         a refactored box placement algorithm that takes a beginning and end position.
2640         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection): Similar to the
2641         placeBoxes method, but takes an end position that may occur before the end
2642         of the line.
2643         * rendering/RenderBlock.cpp:
2644         (WebCore::RenderBlock::exclusionShapeInsideInfo): Factored out calls
2645         to ExclusionShapeInsideInfo to the .cpp file, as ExclusionShapeInsideInfo
2646         requires InlineIterator.h, which would create a circular dependency in
2647         ExclusionShapeInsideInfo.h.
2648         * rendering/RenderBlock.h:
2649         (WebCore::RenderBlock::exclusionShapeInsideInfo): Modified to call
2650         exclusionShapeInsideInfo to be non-inline.
2651         * rendering/RenderBlockLineLayout.cpp:
2652         (WebCore::LineWidth::LineWidth): LineWidth now uses the number of computed
2653         segmentRanges to determine which LineSegment to use when calculating width.
2654         (WebCore::RenderBlock::createLineBoxes): Now takes a boolean to determine
2655         whether or not it can share the same parentBox as its siblings (segments
2656         must be able to position themselves separately in the RootInlineBox).
2657         (WebCore::RenderBlock::constructLine):
2658         (WebCore::computeExpansionForJustifiedText): Do include runs that start new
2659         segments when calculating justification for the current segment.
2660         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Modified to
2661         use the computeInlineDirectionPositionsForSegment, which can position
2662         multiple segments of text per line.
2663         (WebCore::RenderBlock::computeInlineDirectionPositionsForSegment): Positions
2664         the given segment of text and calculates its layout offsets.
2665         (WebCore::constructBidiRuns): Modified some variables from 'endOfLine' to 'endOfSegment'.
2666         (WebCore::constructBidiRunsForLine): Construct the bidi runs for each segment in
2667         the given line.
2668         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Call constructBidiRunsForLine.
2669         (WebCore::RenderBlock::LineBreaker::nextLineBreak): Moved the line breaking code
2670         to break segments, with nextLineBreak iterating over segment breaks for the entire line.
2671         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak): Calculates how much text a
2672         segment can hold. This code was originally in nextLineBreak.
2673
2674 2012-12-05  Stephen White  <senorblanco@chromium.org>
2675
2676         Unreviewed, rolling out r136630.
2677         http://trac.webkit.org/changeset/136630
2678         https://bugs.webkit.org/show_bug.cgi?id=103555
2679
2680         It's breaking Chrome/Win Debug builds.
2681
2682         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
2683         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
2684         * platform/graphics/chromium/LazyDecodingPixelRef.h:
2685         (LazyDecodingPixelRef):
2686
2687 2012-12-05  Andreas Kling  <akling@apple.com>
2688
2689         REGRESSION(r136615): Incorrect style sharing in view-source documents.
2690         <http://webkit.org/b/104089>
2691
2692         Reviewed by Antti Koivisto.
2693
2694         Make sure we collect feature data about the default view-source style sheet before evaluating
2695         style sharing candidates, otherwise it won't know which class selectors to care about.
2696
2697         * css/StyleResolver.cpp:
2698         (WebCore::StyleResolver::collectFeatures):
2699
2700 2012-12-05  Mike West  <mkwst@chromium.org>
2701
2702         Stop generating call stacks inside ContentSecurityPolicy
2703         https://bugs.webkit.org/show_bug.cgi?id=104126
2704
2705         Reviewed by Yury Semikhatsky.
2706
2707         Now that bug 100650 has made it possible for ConsoleMessage to generate
2708         call stacks, we can remove the stack being generated in
2709         ContentSecurityPolicy::logToConsole. We need the ScriptState*, however,
2710         so this patch makes it possible to pipe it through addConsoleMessage
2711         down into the guts of the inspector.
2712
2713         This patch also removes an unused addConsoleMessage variant from
2714         ScriptExecutionContext, which should have been removed from the patch to
2715         100650 before landing it. My bad.
2716
2717         * dom/Document.cpp:
2718         (WebCore::Document::addMessage):
2719         * dom/Document.h:
2720         (Document):
2721             Accept a ScriptState* parameter in Document::addMessage, and pass it
2722             through to Console::addMessage.
2723         * dom/ScriptExecutionContext.cpp:
2724         (WebCore::ScriptExecutionContext::addConsoleMessage):
2725         * dom/ScriptExecutionContext.h:
2726         (ScriptExecutionContext):
2727             Accept a ScriptState* parameter in Document::addMessage, and pass it
2728             through to ScriptExecutionContext::addMessage. Also, remove an unused
2729             variant of ScriptExecutionContext::addConsoleMessage that accepted
2730             only a call stack in addition to the basics.
2731         * inspector/ConsoleMessage.cpp:
2732         (WebCore::ConsoleMessage::ConsoleMessage):
2733         * inspector/ConsoleMessage.h:
2734         (ConsoleMessage):
2735             Accept a ScriptState* and pass it into autogenerateMetadata for
2736             call stack generational goodness.
2737         * inspector/InspectorConsoleAgent.cpp:
2738         (WebCore::InspectorConsoleAgent::addMessageToConsole):
2739             Accept a ScriptState* and pass it into addConsoleMessage.
2740         (WebCore::InspectorConsoleAgent::didFinishXHRLoading):
2741         (WebCore::InspectorConsoleAgent::didReceiveResponse):
2742         (WebCore::InspectorConsoleAgent::didFailLoading):
2743             Add an empty ScriptState parameter to the addConsoleMessage call.
2744         * inspector/InspectorConsoleAgent.h:
2745         (InspectorConsoleAgent):
2746         * inspector/InspectorConsoleInstrumentation.h:
2747         (WebCore::InspectorInstrumentation::addMessageToConsole):
2748         * inspector/InspectorInstrumentation.cpp:
2749         (WebCore):
2750         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
2751         * inspector/InspectorInstrumentation.h:
2752         (InspectorInstrumentation):
2753         * page/Console.cpp:
2754         (WebCore::Console::addMessage):
2755         * page/Console.h:
2756         (Console):
2757             Pipe ScriptState through the intermediate classes.
2758         * page/ContentSecurityPolicy.cpp:
2759         (WebCore::ContentSecurityPolicy::logToConsole):
2760             Drop call stack generation, and pass ScriptState* into addConsoleMessage.
2761         * workers/WorkerContext.cpp:
2762         (WebCore::WorkerContext::addConsoleMessage):
2763         (WebCore::WorkerContext::addMessage):
2764         (WebCore::WorkerContext::addMessageToWorkerConsole):
2765         * workers/WorkerContext.h:
2766         (WorkerContext):
2767             Accept ScriptState* and pass it into addMessageToConsole.
2768
2769 2012-12-05  Rafael Weinstein  <rafaelw@chromium.org>
2770
2771         DOMImplementation.createDocument should call appendChild rather than parserAppendChild to add docType and documentElement
2772         https://bugs.webkit.org/show_bug.cgi?id=104040
2773
2774         Reviewed by Ojan Vafai.
2775
2776         createDocument now calls appendChild.
2777
2778         No new tests (no observable changes).
2779
2780         * dom/ContainerNode.cpp:
2781         (WebCore::ContainerNode::parserAppendChild):
2782         * dom/DOMImplementation.cpp:
2783         (WebCore::DOMImplementation::createDocument):
2784
2785 2012-12-05  Alec Flett  <alecflett@chromium.org>
2786
2787         IndexedDB: Stub out transaction-backend methods
2788         https://bugs.webkit.org/show_bug.cgi?id=103921
2789
2790         Reviewed by Dimitri Glazkov.
2791
2792         In preparation for a refactoring. Legacy methods 
2793         will be removed in https://bugs.webkit.org/show_bug.cgi?id=103923.
2794
2795         No new tests, just adding unused methods for refactoring.
2796
2797         * Modules/indexeddb/IDBCallbacks.h:
2798         (WebCore::IDBCallbacks::onUpgradeNeeded):
2799         * Modules/indexeddb/IDBDatabase.cpp:
2800         (WebCore::IDBDatabase::onAbort):
2801         (WebCore):
2802         (WebCore::IDBDatabase::onComplete):
2803         * Modules/indexeddb/IDBDatabase.h:
2804         (IDBDatabase):
2805         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2806         (WebCore::IDBDatabaseBackendImpl::createTransaction):
2807         (WebCore):
2808         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
2809         (IDBDatabaseBackendImpl):
2810         (WebCore::IDBDatabaseBackendImpl::commit):
2811         (WebCore::IDBDatabaseBackendImpl::abort):
2812         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
2813         (IDBDatabaseBackendInterface):
2814         * Modules/indexeddb/IDBDatabaseCallbacks.h:
2815         (IDBDatabaseCallbacks):
2816         * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
2817         (WebCore::IDBDatabaseCallbacksImpl::onAbort):
2818         (WebCore):
2819         (WebCore::IDBDatabaseCallbacksImpl::onComplete):
2820         * Modules/indexeddb/IDBDatabaseCallbacksImpl.h:
2821         (IDBDatabaseCallbacksImpl):
2822         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
2823         (WebCore::IDBFactoryBackendImpl::open):
2824         * Modules/indexeddb/IDBFactoryBackendImpl.h:
2825         (WebCore::IDBFactoryBackendImpl::open):
2826         (IDBFactoryBackendImpl):
2827         * Modules/indexeddb/IDBFactoryBackendInterface.h:
2828         (IDBFactoryBackendInterface):
2829         * Modules/indexeddb/IDBOpenDBRequest.cpp:
2830         (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
2831         (WebCore):
2832         * Modules/indexeddb/IDBOpenDBRequest.h:
2833         (IDBOpenDBRequest):
2834         * Modules/indexeddb/IDBTransactionBackendInterface.h:
2835         (WebCore):
2836         * Modules/indexeddb/IDBTransactionCoordinator.h:
2837
2838 2012-11-27  Alec Flett  <alecflett@chromium.org>
2839
2840         IndexedDB: remove IDBDatabaseBackendInterface::transaction()
2841         https://bugs.webkit.org/show_bug.cgi?id=102733
2842
2843         Reviewed by Darin Fisher.
2844
2845         Part 3 of a refactor, remove the old transaction() method.
2846
2847         No new tests as this is just post-refactor cleanup.
2848
2849         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
2850         (IDBDatabaseBackendInterface):
2851
2852 2012-12-05  Robert Hogan  <robert@webkit.org>
2853
2854         REGRESSION(r126683): Table cell are getting borders when the style doesn't mention any
2855         https://bugs.webkit.org/show_bug.cgi?id=101677
2856
2857         Reviewed by Julien Chaffraix.
2858
2859         The bordercolor attribute on a cell or row has no effect on FF and Opera, even when the parent
2860         table has a border attribute. IE displays the bordercolor of the cell and row in all cases except when
2861         the parent has no border attribute. WebKit's old behaviour (before r126683) was to display the
2862         bordercolor of the row but not the cells (I don't think this behaviour was particularly deliberate). No
2863         browser displays the bordercolor for a col or tbody element.
2864
2865         Bring WebKit into line with Opera and FF by ignoring the bordercolor attribute on cells, rows, cols, rowgroups, and
2866         colgroups in all cases, regardless of whether the table has a border or not.
2867
2868         Test: fast/table/td-bordercolor-attribute.html
2869
2870         * html/HTMLTablePartElement.cpp:
2871         (WebCore::HTMLTablePartElement::isPresentationAttribute):
2872         (WebCore::HTMLTablePartElement::collectStyleForPresentationAttribute):
2873
2874 2012-12-05  Krzysztof Czech  <k.czech@samsung.com>
2875
2876         [EFL][WK2] Introduce WebKit-EFL to Assistive Technologies
2877         https://bugs.webkit.org/show_bug.cgi?id=104000
2878
2879         Reviewed by Chris Fleizach.
2880
2881         Introduce Webkit-EFL so that Assistive Technologies can distinguish it.
2882
2883         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2884         (webkitAccessibleGetAttributes):
2885
2886 2012-12-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2887
2888         Remove unneeded WTF prefix from WTF types in RenderFlexibleBox
2889         https://bugs.webkit.org/show_bug.cgi?id=104109
2890
2891         Reviewed by Eric Seidel.
2892
2893         WTF prefix is not needed because WTF headers have a using
2894         statement at the end of the file.
2895
2896         * rendering/RenderFlexibleBox.cpp:
2897         (WebCore::RenderFlexibleBox::layoutBlock):
2898         (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems):
2899         (WebCore::RenderFlexibleBox::layoutFlexItems):
2900         (WebCore::RenderFlexibleBox::freezeViolations):
2901         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
2902         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
2903         (WebCore::RenderFlexibleBox::alignFlexLines):
2904         (WebCore::RenderFlexibleBox::alignChildren):
2905         (WebCore::RenderFlexibleBox::flipForWrapReverse):
2906         * rendering/RenderFlexibleBox.h:
2907
2908 2012-12-05  Andras Becsi  <andras.becsi@digia.com>
2909
2910         Fix compilation for Qt5.0.0 stable branch.
2911         https://bugs.webkit.org/show_bug.cgi?id=103870
2912
2913         Reviewed by Simon Hausmann.
2914
2915         This is a squashed patch consisting of patches by multiple authors.
2916
2917         Fixed use of to-be-removed compatibility functions in QWindow
2918         Patch by Samuel Rødal <samuel.rodal@digia.com>
2919
2920         Build fix. No new tests needed.
2921
2922         * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp:
2923         (FullScreenVideoWindow::FullScreenVideoWindow):
2924         (PlatformVideoWindow::PlatformVideoWindow):
2925
2926 2012-12-05  John J. Barton  <johnjbarton@chromium.org>
2927
2928         Web Inspector: more robust treeoutline.findTreeElement
2929         https://bugs.webkit.org/show_bug.cgi?id=103911
2930
2931         Reviewed by Vsevolod Vlasov.
2932
2933         Non-recursive algorithm to populate the treeoutline given an DOMNode
2934         as representedObject. Walk up the parents from the desired object
2935         until we find one that is currently represented in the treeoutline 
2936         cache. Then walk down, putting children in the cache until we get 
2937         to the desired object again. 
2938         With Pavel Feldeman <pfeldman@chromium.org>
2939
2940         No new tests, refactoring, no new function
2941
2942        * inspector/front-end/treeoutline.js:
2943         (TreeOutline.prototype.findTreeElement):
2944
2945 2012-12-05  Alexander Shalamov  <alexander.shalamov@intel.com>
2946
2947         [EFL][GTK] List value response headers are not handled in RespourceResponse (libsoup specific)
2948         https://bugs.webkit.org/show_bug.cgi?id=95181
2949
2950         Reviewed by Martin Robinson.
2951
2952         When list-value response headers are received, they are handled as single
2953         value headers. This patch fixes incorrect behavior. New test was added to
2954         verify list-value header handling.
2955
2956         Test: http/tests/xmlhttprequest/xmlhttprequest-test-custom-headers.html
2957
2958         * platform/network/soup/ResourceResponseSoup.cpp:
2959         (WebCore::ResourceResponse::updateFromSoupMessage):
2960
2961 2012-12-05  Pavel Feldman  <pfeldman@chromium.org>
2962
2963         Web Inspector: Don't include error message text in the editor buffer.
2964         https://bugs.webkit.org/show_bug.cgi?id=103932
2965
2966         Reviewed by Alexander Pavlov.
2967
2968         Skip entire decoration content when collecting dirty regions.
2969         
2970         * inspector/front-end/DefaultTextEditor.js:
2971         (WebInspector.TextEditorMainPanel.prototype._collectLinesFromDOM):
2972
2973 2012-12-05  Joshua Bell  <jsbell@chromium.org>
2974
2975         IndexedDB: Replace use of ScriptExecutionContext::Task (Part 2)
2976         https://bugs.webkit.org/show_bug.cgi?id=103931
2977
2978         Reviewed by Tony Chang.
2979
2980         Actually drop use of ScriptExecutionContext::Task and remove incorrect usage of
2981         ThreadSafeRefCounted<>. Define a new IDBTransactionBackendImpl::Operation base class
2982         for operations; storage of per-operation data becomes explicit.
2983
2984         No new tests - just a refactor.
2985
2986         * Modules/indexeddb/IDBCallbacks.h: Remove bogus "ThreadSafe"
2987         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
2988         (WebCore::IDBCursorBackendImpl::CursorIterationOperation::create):
2989         (IDBCursorBackendImpl::CursorIterationOperation):
2990         (WebCore::IDBCursorBackendImpl::CursorIterationOperation::CursorIterationOperation):
2991         (WebCore::IDBCursorBackendImpl::CursorAdvanceOperation::create):
2992         (IDBCursorBackendImpl::CursorAdvanceOperation):
2993         (WebCore::IDBCursorBackendImpl::CursorAdvanceOperation::CursorAdvanceOperation):
2994         (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::create):
2995         (IDBCursorBackendImpl::CursorPrefetchIterationOperation):
2996         (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::CursorPrefetchIterationOperation):
2997         (WebCore::IDBCursorBackendImpl::CursorAdvanceOperation::perform):
2998         (WebCore::IDBCursorBackendImpl::CursorIterationOperation::perform):
2999         (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::perform):
3000         * Modules/indexeddb/IDBCursorBackendInterface.h: Remove bogus "ThreadSafe"
3001         * Modules/indexeddb/IDBDatabase.cpp:
3002         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3003         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::create):
3004         (IDBDatabaseBackendImpl::CreateObjectStoreOperation):
3005         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::CreateObjectStoreOperation):
3006         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::create):
3007         (IDBDatabaseBackendImpl::DeleteObjectStoreOperation):
3008         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
3009         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::create):
3010         (IDBDatabaseBackendImpl::VersionChangeOperation):
3011         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::VersionChangeOperation):
3012         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation::create):
3013         (IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation):
3014         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation::CreateObjectStoreAbortOperation):
3015         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation::create):
3016         (IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation):
3017         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation::DeleteObjectStoreAbortOperation):
3018         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::create):
3019         (IDBDatabaseBackendImpl::VersionChangeAbortOperation):
3020         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::VersionChangeAbortOperation):
3021         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
3022         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::perform):
3023         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
3024         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::perform):
3025         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
3026         (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
3027         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation::perform):
3028         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation::perform):
3029         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
3030         * Modules/indexeddb/IDBDatabaseBackendInterface.h: Remove bogus "ThreadSafe"
3031         * Modules/indexeddb/IDBDatabaseCallbacks.h: Remove bogus "ThreadSafe"
3032         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
3033         * Modules/indexeddb/IDBFactoryBackendInterface.h: Remove bogus "ThreadSafe"
3034         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
3035         (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::create):
3036         (IDBIndexBackendImpl::OpenIndexCursorOperation):
3037         (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::OpenIndexCursorOperation):
3038         (WebCore::IDBIndexBackendImpl::IndexCountOperation::create):
3039         (IDBIndexBackendImpl::IndexCountOperation):
3040         (WebCore::IDBIndexBackendImpl::IndexCountOperation::IndexCountOperation):
3041         (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::create):
3042         (IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation):
3043         (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::IndexReferencedValueRetrievalOperation):
3044         (WebCore::IDBIndexBackendImpl::IndexValueRetrievalOperation::create):
3045         (IDBIndexBackendImpl::IndexValueRetrievalOperation):
3046         (WebCore::IDBIndexBackendImpl::IndexValueRetrievalOperation::IndexValueRetrievalOperation):
3047         (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::perform):
3048         (WebCore::IDBIndexBackendImpl::openCursor):
3049         (WebCore::IDBIndexBackendImpl::openKeyCursor):
3050         (WebCore::IDBIndexBackendImpl::IndexCountOperation::perform):
3051         (WebCore::IDBIndexBackendImpl::count):
3052         (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::perform):
3053         (WebCore::IDBIndexBackendImpl::IndexValueRetrievalOperation::perform):
3054         (WebCore::IDBIndexBackendImpl::get):
3055         (WebCore::IDBIndexBackendImpl::getKey):
3056         * Modules/indexeddb/IDBIndexBackendInterface.h: Remove bogus "ThreadSafe"
3057         * Modules/indexeddb/IDBKey.h: Remove bogus "ThreadSafe"
3058         (IDBKey):
3059         * Modules/indexeddb/IDBKeyRange.h: Remove bogus "ThreadSafe"
3060         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
3061         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::create):
3062         (IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation):
3063         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::ObjectStoreRetrievalOperation):
3064         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::create):
3065         (IDBObjectStoreBackendImpl::ObjectStoreStorageOperation):
3066         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::ObjectStoreStorageOperation):
3067         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation::create):
3068         (IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation):
3069         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation::ObjectStoreIndexesReadyOperation):
3070         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation::create):
3071         (IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation):
3072         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation::ObjectStoreDeletionOperation):
3073         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreClearOperation::create):
3074         (IDBObjectStoreBackendImpl::ObjectStoreClearOperation):
3075         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreClearOperation::ObjectStoreClearOperation):
3076         (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::create):
3077         (IDBObjectStoreBackendImpl::CreateIndexOperation):
3078         (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::CreateIndexOperation):
3079         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexOperation::create):
3080         (IDBObjectStoreBackendImpl::DeleteIndexOperation):
3081         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexOperation::DeleteIndexOperation):
3082         (WebCore::IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation::create):
3083         (IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation):
3084         (WebCore::IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation::OpenObjectStoreCursorOperation):
3085         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreCountOperation::create):
3086         (IDBObjectStoreBackendImpl::ObjectStoreCountOperation):
3087         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreCountOperation::ObjectStoreCountOperation):
3088         (WebCore::IDBObjectStoreBackendImpl::CreateIndexAbortOperation::create):
3089         (IDBObjectStoreBackendImpl::CreateIndexAbortOperation):
3090         (WebCore::IDBObjectStoreBackendImpl::CreateIndexAbortOperation::CreateIndexAbortOperation):
3091         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexAbortOperation::create):
3092         (IDBObjectStoreBackendImpl::DeleteIndexAbortOperation):
3093         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexAbortOperation::DeleteIndexAbortOperation):
3094         (WebCore::IDBObjectStoreBackendImpl::get):
3095         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::perform):
3096         (WebCore::IDBObjectStoreBackendImpl::put):
3097         (WebCore):
3098         (WebCore::IDBObjectStoreBackendImpl::setIndexesReady):
3099         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation::perform):
3100         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::perform):
3101         (WebCore::IDBObjectStoreBackendImpl::deleteFunction):
3102         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation::perform):
3103         (WebCore::IDBObjectStoreBackendImpl::clear):
3104         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreClearOperation::perform):
3105         (WebCore::IDBObjectStoreBackendImpl::createIndex):
3106         (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::perform):
3107         (WebCore::IDBObjectStoreBackendImpl::deleteIndex):
3108         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexOperation::perform):
3109         (WebCore::IDBObjectStoreBackendImpl::openCursor):
3110         (WebCore::IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation::perform):
3111         (WebCore::IDBObjectStoreBackendImpl::count):
3112         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreCountOperation::perform):
3113         (WebCore::IDBObjectStoreBackendImpl::CreateIndexAbortOperation::perform):
3114         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexAbortOperation::perform):
3115         * Modules/indexeddb/IDBObjectStoreBackendInterface.h: Remove bogus "ThreadSafe"
3116         * Modules/indexeddb/IDBRequest.h: Remove bogus "ThreadSafe"
3117         (IDBRequest):
3118         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
3119         (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl): Appease RefPtr<> adoption strictness.
3120         (WebCore::IDBTransactionBackendImpl::scheduleTask):
3121         (WebCore::IDBTransactionBackendImpl::abort):
3122         (WebCore::IDBTransactionBackendImpl::taskTimerFired):
3123         * Modules/indexeddb/IDBTransactionBackendImpl.h:
3124         (Operation):
3125         (WebCore::IDBTransactionBackendImpl::Operation::~Operation):
3126         (IDBTransactionBackendImpl):
3127         (WebCore::IDBTransactionBackendImpl::scheduleTask):
3128         * Modules/indexeddb/IDBTransactionBackendInterface.h: Remove bogus "ThreadSafe"
3129
3130 2012-12-05  Noel Gordon  <noel.gordon@gmail.com>
3131
3132         ENABLE(IMAGE_DECODER_DOWN_SAMPLING): Don't swizzle decode down sampled images
3133         https://bugs.webkit.org/show_bug.cgi?id=103856
3134
3135         Reviewed by Yong Li.
3136
3137         For ports using ENABLE(IMAGE_DECODER_DOWN_SAMPLING), turbo swizzle decodes provide
3138         no speed-up when the decoded image will be down sampled because the data must pass
3139         through the buffer.setRGBA() slow path. That is not the swizzled path. Instead use
3140         JCS_RGB decodes to clarify the output color space handling in outputScanlines().
3141
3142         No new tests. Covered by existing JPEG decoding tests.
3143
3144         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
3145         (WebCore::JPEGImageReader::decode): libjpeg-turbo swizzle decodes provides no real
3146         speed-up if the image will be down sampled. Revert to using JCS_RGA in this case.
3147         (WebCore::setPixel): Remove the libjpeg-turbo JCS_EXT_BGRA and JCS_EXT_RGBA cases.
3148         (WebCore::JPEGImageDecoder::outputScanlines): ditto.
3149         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
3150         (WebCore::JPEGImageDecoder::willDownSample): Return true if image down sampling 
3151         will be applied to the decoded image (m_scaled). Note: the willDownSample() return
3152         value is valid only after setSize() has been called: add an ASSERT for that.
3153
3154 2012-12-05  Michael Pruett  <michael@68k.org>
3155
3156         IndexedDB: Implement IndexedDB bindings for JSC
3157         https://bugs.webkit.org/show_bug.cgi?id=103484
3158
3159         Reviewed by Kentaro Hara.
3160
3161         IndexedDB is currently implemented only for V8. This change adds
3162         the bindings necessary for IndexedDB to work with JSC. With this
3163         patch, IndexedDB for JSC passes 112 out of the 196 layout tests in
3164         storage/indexeddb. IndexedDB is still not enabled for any JSC port.
3165
3166         Tests: storage/indexeddb/*
3167
3168         * CMakeLists.txt:
3169         * GNUmakefile.list.am:
3170         * Modules/indexeddb/IDBOpenDBRequest.idl:
3171         * Modules/indexeddb/IDBVersionChangeRequest.idl:
3172         * UseJSC.cmake:
3173         * WebCore.xcodeproj/project.pbxproj:
3174         * bindings/js/DOMRequestState.h: Added to match bindings/v8/DOMRequestState.h.
3175         (WebCore):
3176         (DOMRequestState):
3177         (WebCore::DOMRequestState::DOMRequestState):
3178         (WebCore::DOMRequestState::clear):
3179         (Scope):
3180         (WebCore::DOMRequestState::Scope::Scope):
3181         (WebCore::DOMRequestState::exec):
3182         * bindings/js/IDBBindingUtilities.cpp: Add utility functions matching those in bindings/v8/IDBBindingUtilities.cpp.
3183         (WebCore::get):
3184         (WebCore):
3185         (WebCore::canSet):
3186         (WebCore::set):
3187         (WebCore::createIDBKeyFromValue):
3188         (WebCore::getNthValueOnKeyPath):
3189         (WebCore::createIDBKeyFromScriptValueAndKeyPath):
3190         (WebCore::ensureNthValueOnKeyPath):
3191         (WebCore::canInjectNthValueOnKeyPath):
3192         (WebCore::injectIDBKeyIntoScriptValue):
3193         (WebCore::canInjectIDBKeyIntoScriptValue):
3194         (WebCore::deserializeIDBValue):
3195         (WebCore::idbKeyToScriptValue):
3196         * bindings/js/IDBBindingUtilities.h: Add utility functions matching those in bindings/v8/IDBBindingUtilities.h.
3197         (WebCore):
3198         * bindings/js/JSIDBAnyCustom.cpp:
3199         (WebCore::toJS):
3200         * bindings/js/JSIDBKeyCustom.cpp:
3201         (WebCore::toJS):
3202         * bindings/js/JSIDBVersionChangeRequestCustom.cpp: Removed.
3203
3204 2012-12-05  Antoine Quint  <graouts@apple.com>
3205
3206         TextTrackCue's .endTime property should fire a TypeError when NaN is assigned
3207         https://bugs.webkit.org/show_bug.cgi?id=103413
3208
3209         Reviewed by Eric Carlson.
3210
3211         Check whether the new time passed to setStartTime() and setEndTime() is none of NaN or Infinity,
3212         otherwise throwing a TypeError.
3213         
3214         Thanks to this fix, we're no longer skipping media/track/opera/interfaces/TextTrackCue/endTime.html and
3215         media/track/opera/interfaces/TextTrackCue/startTime.html.
3216
3217         * html/track/TextTrackCue.cpp:
3218         (WebCore::TextTrackCue::setStartTime):
3219         (WebCore::TextTrackCue::setEndTime):
3220         * html/track/TextTrackCue.h:
3221         (TextTrackCue):
3222         * html/track/TextTrackCue.idl:
3223
3224 2012-12-05  Alexis Menard  <alexis@webkit.org>
3225
3226         [CSS3 Backgrounds and Borders] Allow the CSS3 background position offset for background shorthand.
3227         https://bugs.webkit.org/show_bug.cgi?id=104014
3228
3229         Reviewed by Dirk Schulze.
3230
3231         Add the support of the new <position> type if set from within the
3232         background shorthand. The patch just modify the way we count the values
3233         of the current context by checking wether we encounter a comma (it is
3234         then the next background layer), or if we encounter a '/' (which is in the
3235         background shorthand context the background-size) or any value that is
3236         not a valid background-position keyword or length (which means we are
3237         already parsing the next property of the background shorthand).
3238
3239         Tests: LayoutTests/fast/backgrounds/background-position-parsing-2.html
3240         has been modified to cover this use case.
3241
3242         * css/CSSParser.cpp:
3243         (WebCore::CSSParser::isPositionValue):
3244         (WebCore):
3245         (WebCore::CSSParser::parseFillBackgroundPosition):
3246         (WebCore::CSSParser::parseFillProperty):
3247         * css/CSSParser.h:
3248
3249 2012-12-05  Elliott Sprehn  <esprehn@gmail.com>
3250
3251         ShadowRoot should recalcStyle for itself
3252         https://bugs.webkit.org/show_bug.cgi?id=103933
3253
3254         Reviewed by Hajime Morita.
3255
3256         ShadowRoot should support recalcStyle just like Element instead of
3257         having the code inside ElementShadow. This was once the case and
3258         the dead method prototype for recalcShadowTreeStyle is still in
3259         ShadowRoot.h.
3260
3261         No new tests, just refactoring.
3262
3263         * dom/ElementShadow.cpp:
3264         (WebCore::ElementShadow::recalcStyle):
3265         * dom/ShadowRoot.cpp:
3266         (WebCore::ShadowRoot::recalcStyle):
3267         * dom/ShadowRoot.h:
3268
3269 2012-12-05  Keishi Hattori  <keishi@webkit.org>
3270
3271         Fix text direction in datalist popup for time controls
3272         https://bugs.webkit.org/show_bug.cgi?id=103853
3273
3274         Reviewed by Kent Tamura.
3275
3276         The datalist entry value should be displayed with the same text direction as the date/time format.
3277
3278         Tests: platform/chromium/fast/forms/suggestion-picker/datetime-suggestion-picker-appearance-locale-hebrew.html
3279                platform/chromium/fast/forms/suggestion-picker/datetimelocal-suggestion-picker-appearance-locale-hebrew.html
3280                platform/chromium/fast/forms/suggestion-picker/time-suggestion-picker-appearance-locale-hebrew.html
3281
3282         * Resources/pagepopups/calendarPicker.js: Renamed isCalendarRTL to isLocaleRTL.
3283         (CalendarPicker.prototype._layout):
3284         (CalendarPicker.prototype.fixWindowSize):
3285         (DaysTable.prototype._handleKey):
3286         (MonthPickerDaysTable.prototype._handleKey):
3287         (WeekPickerDaysTable.prototype._handleKey):
3288         * Resources/pagepopups/suggestionPicker.css:
3289         (.suggestion-list-entry .title): Title should have the same text direction as the locale.
3290         (.locale-rtl .suggestion-list-entry .title):
3291         * Resources/pagepopups/suggestionPicker.js:
3292         (SuggestionPicker.prototype._layout): Add locale-rtl class if the isLocaleRTL is true.
3293
3294 2012-12-05  Keishi Hattori  <keishi@webkit.org>
3295
3296         Fix flickering when hiding page popup
3297         https://bugs.webkit.org/show_bug.cgi?id=104100
3298
3299         Reviewed by Kent Tamura.
3300
3301         Moving the page popup while hiding was causing flickering in some environments.
3302
3303         No new tests. Can't reproduce in layout test.
3304
3305         * Resources/pagepopups/pickerCommon.js:
3306         (hideWindow): Don't move and just resize.
3307
3308 2012-12-05  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3309
3310         [Qt] Don't rely on QMimeDatabase for essential MIME types
3311         https://bugs.webkit.org/show_bug.cgi?id=103865
3312
3313         Based on patch by Pierre Rossi.
3314         Reviewed by Jocelyn Turcotte.
3315
3316         Extend the short static list to also include MIME types essential to WebKit,
3317         and detect these first before checking the system mimedatabase.
3318
3319         * platform/qt/MIMETypeRegistryQt.cpp:
3320         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
3321         (WebCore::MIMETypeRegistry::getMIMETypeForPath):
3322
3323 2012-12-05  Zoltan Herczeg  <zherczeg@webkit.org>
3324
3325         Optimize ColorMatrix filter
3326         https://bugs.webkit.org/show_bug.cgi?id=103728
3327
3328         Reviewed by Dirk Schulze.
3329
3330         ColorMatrix filter recalculates several constants for
3331         every pixel. It is enough to do these calculations only
3332         once during the initialization. Style issues also fixed.
3333
3334         Existing tests cover this feature.
3335
3336         * platform/graphics/filters/FEColorMatrix.cpp:
3337         (WebCore::matrix):
3338         (WebCore::saturateAndHueRotate):
3339         (WebCore::effectType):
3340
3341 2012-12-05  Carlos Garcia Campos  <cgarcia@igalia.com>
3342
3343         Flex item auto margins in the cross direction should safe center
3344         https://bugs.webkit.org/show_bug.cgi?id=103919
3345
3346         Reviewed by Ojan Vafai.
3347
3348         Do not apply auto margins for cross axis if there's no alignment
3349         space available.
3350
3351         Test: css3/flexbox/flex-flow-auto-margins-no-available-space.html
3352
3353         * rendering/RenderFlexibleBox.cpp:
3354         (WebCore::RenderFlexibleBox::alignChildren): Make sure we pass a
3355         positive value for availableAlignmentSpace to
3356         updateAutoMarginsInCrossAxis().
3357
3358 2012-12-05  Mike West  <mkwst@chromium.org>
3359
3360         Web Inspector: Autogenerate stack traces and line numbers when possible.
3361         https://bugs.webkit.org/show_bug.cgi?id=100650
3362
3363         Reviewed by Yury Semikhatsky.
3364
3365         Console messages generated in WebCore generally are asked to do a bit of
3366         work in order to provide a developer with a detailed report. We ask the
3367         caller to either generate stack traces, or pass in a url/line number
3368         pair, which can be a bit of work. Predictably, most callers don't pass
3369         in what we'd like to see.
3370
3371         This patch creates a new, simpler console message generation API that we
3372         expect most call sites to use. Source, type, level, and message are
3373         required, and an optional request ID can be passed in. Everything else
3374         will be autogenerated inside ConsoleMessage when appropriate.
3375
3376         In a subsequent patch, we expect to be able to trim down more of the
3377         external call sites (ContentSecurityPolicy springs to mind) in order to
3378         further consolidate the external interface. Simple is good.
3379
3380         * Modules/websockets/WebSocket.cpp:
3381         (WebCore::WebSocket::connect):
3382         * Modules/websockets/WebSocketChannel.cpp:
3383         (WebCore::WebSocketChannel::didFailSocketStream):
3384             Drop the now-redundant URL parameter from various WebSocket errors.
3385         * css/MediaList.cpp:
3386         (WebCore::addResolutionWarningMessageToConsole):
3387             Switch to Document::addConsoleMessage, which means that we can move
3388             line-number generation out of MediaList.
3389         * dom/Document.cpp:
3390         (WebCore::Document::logExceptionToConsole):
3391             Use the long-form 'addMessage()' rather than the public interface.
3392         (WebCore::Document::processHttpEquiv):
3393             Drop the URL parameter, as it's now autogenerated.
3394         (WebCore::Document::addConsoleMessage):
3395         (WebCore):
3396         * dom/Document.h:
3397         (Document):
3398             Override the pure virtual method on ScriptExecutionContext, and pass
3399             the call through to the new Console::addMessage, which accepts a
3400             pointer to the Document in order to do line-number generation.
3401         * dom/ScriptExecutionContext.h:
3402         (ScriptExecutionContext):
3403             Add a pure virtual variant of addConsoleMessage which accepts only
3404             bare minimum data, and expects autogeneration of the rest.
3405             Additionally, ensure that the other variants always have either a
3406             URL/line number, or a stack trace.
3407         * dom/ViewportArguments.cpp:
3408         (WebCore::reportViewportWarning):
3409             Drop line numbers and URLs from Viewport warnings. We can generate
3410             these now.
3411         * html/HTMLFormElement.cpp:
3412         (WebCore::HTMLFormElement::validateInteractively):
3413             Drop the URL from form autofocus warnings
3414         * html/HTMLIFrameElement.cpp:
3415         (WebCore::HTMLIFrameElement::parseAttribute):
3416             Drop the URL and line from sandbox attribute warnings.
3417         * html/canvas/WebGLRenderingContext.cpp:
3418         (WebCore):
3419         (WebCore::WebGLRenderingContext::printWarningToConsole):
3420             Drop the URL from WebGL warnings.
3421         * inspector/ConsoleMessage.cpp:
3422         (WebCore::ConsoleMessage::ConsoleMessage):
3423             Call 'autogenerateMetadata' to ensure that a stack trace is
3424             generated if one isn't provided. Create a new constructor that
3425             accepts a ScriptState/ScriptArguments pair, and use it for console
3426             API calls.
3427         (WebCore):
3428         (WebCore::ConsoleMessage::autogenerateMetadata):
3429             Generate a stack trace given whatever information we've got.
3430         * inspector/ConsoleMessage.h:
3431         (ConsoleMessage):
3432             Create a new constructor that accepts a ScriptState/ScriptArguments
3433             pair, and use it for console API calls.
3434         * inspector/InspectorConsoleAgent.cpp:
3435         (WebCore::InspectorConsoleAgent::enable):
3436             Use the short-form ConsoleMessage constructor.
3437         (WebCore::InspectorConsoleAgent::addMessageToConsole):
3438             Use the stack-only constructor, or the ScriptState
3439             constructor, as appropriate.
3440