d404b2d961df55714ab9457f2d8cb78cd1235110
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-01-23  Thiago Marcos P. Santos  <tmpsantos@gmail.com>
2
3         Fixed typo in exception messages
4         https://bugs.webkit.org/show_bug.cgi?id=76710
5
6         Reviewed by Alexey Proskuryakov.
7
8         * dom/DOMCoreException.cpp:
9         * fileapi/FileException.cpp:
10         * storage/SQLTransaction.cpp:
11         (WebCore::SQLTransaction::openTransactionAndPreflight):
12         (WebCore::SQLTransaction::postflightAndCommit):
13         * xml/XMLHttpRequestException.cpp:
14
15 2012-01-18  David Levin  <levin@chromium.org>
16
17         Allow delayed DC allocation in HWndDC.
18         https://bugs.webkit.org/show_bug.cgi?id=76737
19
20         Reviewed by Adam Roben.
21
22         No new functionality exposed so no new tests.
23
24         * platform/win/HWndDC.h: Changed this slightly to allow
25         for allocating a window DC after the initial creation since
26         this pattern occurrs in several places so this makes it easy to
27         replace them in an upcoming change.
28         (WebCore::HWndDC::HWndDC):
29         (WebCore::HWndDC::~HWndDC):
30         (WebCore::HWndDC::setHWnd):
31         (WebCore::HWndDC::clear):
32
33 2012-01-23  Arko Saha  <nghq36@motorola.com>
34
35         MicroData: Compilation error while building Webkit with --microdata.
36         https://bugs.webkit.org/show_bug.cgi?id=76703
37
38         Reviewed by Hajime Morita.
39
40         * dom/MicroDataItemList.cpp:
41         (WebCore::MicroDataItemList::MicroDataItemList):
42         (WebCore::MicroDataItemList::~MicroDataItemList):
43         * dom/MicroDataItemList.h:
44         * dom/NodeRareData.h:
45         (WebCore::NodeRareData::properties):
46         * html/HTMLPropertiesCollection.cpp:
47         (WebCore::HTMLPropertiesCollection::create):
48         (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
49         * html/HTMLPropertiesCollection.h:
50
51 2012-01-13  David Levin  <levin@chromium.org>
52
53         [chromium] Convert uses of GetDC to HWndDC.
54         https://bugs.webkit.org/show_bug.cgi?id=76290
55
56         Reviewed by Dmitry Titov.
57
58         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
59         (WebCore::createFontIndirectAndGetWinName):
60         (WebCore::fontContainsCharacter):
61         (WebCore::FontCache::getLastResortFallbackFont):
62         (WebCore::FontCache::getTraitsInFamily):
63         * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
64         (WebCore::FontPlatformData::scriptFontProperties):
65         * platform/graphics/chromium/FontUtilsChromiumWin.cpp:
66         (WebCore::FontMap::getAscent):
67         (WebCore::FontMap::getSpaceGlyph):
68         * platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp:
69         (WebCore::fillBMPGlyphs):
70         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
71         (WebCore::SimpleFontData::platformInit):
72         (WebCore::SimpleFontData::determinePitch):
73         (WebCore::SimpleFontData::platformWidthForGlyph):
74         * platform/graphics/chromium/UniscribeHelper.cpp:
75         (WebCore::UniscribeHelper::EnsureCachedDCCreated):
76         * rendering/RenderThemeChromiumWin.cpp:
77         (WebCore::systemFontSize):
78         (WebCore::pointsToPixels):
79
80 2012-01-23  Joe Thomas  <joethomas@motorola.com>
81
82         https://bugs.webkit.org/show_bug.cgi?id=75799
83         Calling intersectsNode on a detached range should throw.
84
85         INVALID_STATE_ERR exception should be thrown if intersectsNode is called on a detached Range.
86
87         Reviewed by Darin Adler.
88
89         Test: fast/dom/Range/range-intersectsNode-exception.html
90
91         * dom/Range.cpp:
92         (WebCore::Range::intersectsNode): Throwing INVALID_STATE_ERR exception if the range is detached.
93
94 2012-01-23  Daniel Cheng  <dcheng@chromium.org>
95
96         Convert DataTransferItem/DataTransferItemList back into an interface class
97         https://bugs.webkit.org/show_bug.cgi?id=76856
98
99         When Qt implemented the DataTransferItemList, a lot of logic was moved into the shared
100         classes since Chromium/Qt happened to implement it the same way. Now that I want to do some
101         refactoring/cleanup work to better implement DataTransferItemList in Chromium, we won't
102         share the same data anymore so it doesn't make sense to keep that code in a common location.
103
104         Reviewed by David Levin.
105
106         Covered by existing tests.
107
108         * CMakeLists.txt:
109         * GNUmakefile.list.am:
110         * Target.pri:
111         * WebCore.gypi:
112         * WebCore.vcproj/WebCore.vcproj:
113         * WebCore.xcodeproj/project.pbxproj:
114         * dom/DataTransferItem.cpp:
115         * dom/DataTransferItem.h:
116         * dom/DataTransferItemList.cpp: Removed.
117         * dom/DataTransferItemList.h:
118         * platform/chromium/ClipboardChromium.cpp:
119         (WebCore::ClipboardChromium::mayUpdateItems):
120         * platform/chromium/DataTransferItemChromium.cpp:
121         (WebCore::DataTransferItemChromium::create):
122         (WebCore::DataTransferItemChromium::DataTransferItemChromium):
123         (WebCore::DataTransferItemChromium::getAsString):
124         (WebCore::DataTransferItemChromium::getAsFile):
125         (WebCore::DataTransferItemChromium::clipboardChromium):
126         * platform/chromium/DataTransferItemChromium.h:
127         (WebCore::DataTransferItemChromium::kind):
128         (WebCore::DataTransferItemChromium::type):
129         * platform/chromium/DataTransferItemListChromium.cpp:
130         (WebCore::DataTransferItemListChromium::DataTransferItemListChromium):
131         * platform/chromium/DataTransferItemListChromium.h:
132         * platform/qt/DataTransferItemListQt.cpp:
133         (WebCore::DataTransferItemListQt::DataTransferItemListQt):
134         (WebCore::DataTransferItemListQt::length):
135         (WebCore::DataTransferItemListQt::item):
136         (WebCore::DataTransferItemListQt::deleteItem):
137         (WebCore::DataTransferItemListQt::clear):
138         (WebCore::DataTransferItemListQt::add):
139         * platform/qt/DataTransferItemListQt.h:
140         * platform/qt/DataTransferItemQt.cpp:
141         (WebCore::DataTransferItemQt::create):
142         (WebCore::DataTransferItemQt::DataTransferItemQt):
143         (WebCore::DataTransferItemQt::getAsString):
144         (WebCore::DataTransferItemQt::getAsFile):
145         * platform/qt/DataTransferItemQt.h:
146         (WebCore::DataTransferItemQt::kind):
147         (WebCore::DataTransferItemQt::type):
148
149 2012-01-23  Andreas Kling  <awesomekling@apple.com>
150
151         Unreviewed buildfix for ENABLE(MUTATION_OBSERVERS) following r105642.
152
153         * css/CSSMutableStyleDeclaration.cpp:
154
155 2012-01-23  Philip Rogers  <pdr@google.com>
156
157         Update uniteIfNonZero to use isZero.
158         https://bugs.webkit.org/show_bug.cgi?id=76637
159
160         Reviewed by Darin Adler.
161
162         No new tests. (I found no existing codepath that would be affected by
163         this change but I think this change is still valuable in preventing
164         future bugs.)
165
166         * platform/graphics/FloatRect.cpp:
167         (WebCore::FloatRect::uniteIfNonZero):
168
169         The following change is a minor followup to
170         https://bugs.webkit.org/show_bug.cgi?id=76177#c12 and is not directly
171         related to the rest of this patch.
172         * rendering/svg/SVGRenderSupport.cpp:
173         (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
174
175 2012-01-23  Antti Koivisto  <antti@apple.com>
176
177         Eliminate CSSElementStyleDeclaration
178         https://bugs.webkit.org/show_bug.cgi?id=76848
179
180         Reviewed by Andreas Kling.
181
182         CSSElementStyleDeclaration has little functionality. It can merge with CSSMutableStyleDeclaration simplifying the code.
183         
184         Having an element parent is mutually exclusive with having a css rule parent. We can keep them in a union. This also
185         shrinks all inline style declarations by one pointer.
186
187         * CMakeLists.txt:
188         * GNUmakefile.list.am:
189         * Target.pri:
190         * WebCore.gypi:
191         * WebCore.vcproj/WebCore.vcproj:
192         * WebCore.xcodeproj/project.pbxproj:
193         * bindings/js/JSDOMBinding.h:
194         (WebCore::root):
195         * css/CSSAllInOne.cpp:
196         * css/CSSElementStyleDeclaration.cpp: Removed.
197         * css/CSSElementStyleDeclaration.h: Removed.
198         * css/CSSMutableStyleDeclaration.cpp:
199         (WebCore::CSSMutableStyleDeclaration::setNeedsStyleRecalc):
200         * css/CSSMutableStyleDeclaration.h:
201         (WebCore::CSSMutableStyleDeclaration::createInline):
202         (WebCore::CSSMutableStyleDeclaration::createForSVGFontFaceElement):
203         (WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration):
204         * css/CSSStyleDeclaration.cpp:
205         (WebCore::CSSStyleDeclaration::CSSStyleDeclaration):
206         (WebCore::CSSStyleDeclaration::parentStyleSheet):
207         
208             Merge the CSSElementStyleDeclaration::styleSheet() logic here.
209         
210         * css/CSSStyleDeclaration.h:
211         (WebCore::CSSStyleDeclaration::parentRule):
212         (WebCore::CSSStyleDeclaration::clearParentRule):
213         (WebCore::CSSStyleDeclaration::parentElement):
214         (WebCore::CSSStyleDeclaration::clearParentElement):
215         * css/CSSStyleRule.cpp:
216         (WebCore::CSSStyleRule::setSelectorText):
217         
218             CSSStyleRule's style declaration can't have isElementStyleDeclaration set, the dead code can be removed.
219             This is asserted in setDeclaration() and again implicitly in the destructor (by clearParentRule()).
220         
221         * dom/StyledElement.cpp:
222         (WebCore::StyledElement::createInlineStyleDecl):
223         (WebCore::StyledElement::destroyInlineStyleDecl):
224         (WebCore::StyledElement::ensureInlineStyleDecl):
225         (WebCore::StyledElement::copyNonAttributeProperties):
226         * dom/StyledElement.h:
227         (WebCore::StyledElement::inlineStyleDecl):
228         * editing/ApplyStyleCommand.cpp:
229         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
230         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
231         * editing/DeleteButtonController.cpp:
232         (WebCore::DeleteButtonController::createDeletionUI):
233         * html/ValidationMessage.cpp:
234         (WebCore::adjustBubblePosition):
235         * html/shadow/MediaControlElements.cpp:
236         (WebCore::MediaControlPanelElement::setPosition):
237         (WebCore::MediaControlPanelElement::resetPosition):
238         (WebCore::MediaControlPanelElement::makeOpaque):
239         (WebCore::MediaControlPanelElement::makeTransparent):
240         * html/shadow/SliderThumbElement.cpp:
241         (WebCore::TrackLimiterElement::create):
242         * svg/SVGFontFaceElement.cpp:
243         (WebCore::SVGFontFaceElement::SVGFontFaceElement):
244
245 2012-01-23  Benjamin Poulain  <bpoulain@apple.com>
246
247         Use OVERRIDE for PopupMenuClient's implementations
248         https://bugs.webkit.org/show_bug.cgi?id=76774
249
250         Reviewed by Darin Adler.
251
252         * rendering/RenderMenuList.h: Also sort the methods to the same
253         order as PopupMenuClient.
254         * rendering/RenderTextControlSingleLine.h:
255
256 2012-01-23  Xianzhu Wang  <wangxianzhu@chromium.org>
257
258         Basic enhancements to StringBuilder
259         https://bugs.webkit.org/show_bug.cgi?id=67081
260
261         These changes are because we explicitly disallowed StringBuilder's
262         copy constructor and assignment operator, and the change of return
263         type of StringBuilder::toString().
264
265         Reviewed by Darin Adler.
266
267         No new tests. All layout tests and unit tests should run as before.
268
269         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
270         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::setUpCookiesForQuickTime):
271         * svg/SVGPathStringBuilder.h:
272         (WebCore::SVGPathStringBuilder::cleanup):
273
274 2012-01-23  W. James MacLean  <wjmaclean@chromium.org>
275
276         [chromium] Add WebSolidColorLayer interface to draw non-textured color layers from Aura.
277         https://bugs.webkit.org/show_bug.cgi?id=75732
278
279         Reviewed by James Robinson.
280
281         Add WebSolidColorLayer to paint solid-color layers without a backing texture.
282
283         Test: unit test for CCSolidColorLayerImpl.
284
285         * WebCore.gypi:
286         * platform/graphics/chromium/SolidColorLayerChromium.cpp: Added.
287         (WebCore::SolidColorLayerChromium::createCCLayerImpl):
288         (WebCore::SolidColorLayerChromium::create):
289         (WebCore::SolidColorLayerChromium::SolidColorLayerChromium):
290         (WebCore::SolidColorLayerChromium::~SolidColorLayerChromium):
291         * platform/graphics/chromium/SolidColorLayerChromium.h: Added.
292         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp: Added.
293         (WebCore::CCSolidColorLayerImpl::CCSolidColorLayerImpl):
294         (WebCore::CCSolidColorLayerImpl::~CCSolidColorLayerImpl):
295         (WebCore::CCSolidColorLayerImpl::quadTransform):
296         (WebCore::CCSolidColorLayerImpl::appendQuads):
297         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h: Added.
298         (WebCore::CCSolidColorLayerImpl::create):
299         (WebCore::CCSolidColorLayerImpl::layerTypeAsString):
300
301 2012-01-23  Antti Koivisto  <antti@apple.com>
302
303         Attempt to fix Qt build.
304     
305         Not reviewed.
306
307         * css/CSSElementStyleDeclaration.cpp:
308         * css/CSSElementStyleDeclaration.h:
309         (WebCore::CSSElementStyleDeclaration::createForSVGFontFaceElement):
310
311 2012-01-23  Andreas Kling  <awesomekling@apple.com>
312
313         Move m_rootEditableElementForSelectionOnMouseDown off of HTMLAnchorElement.
314         <http://webkit.org/b/76833>
315
316         Reviewed by Antti Koivisto.
317
318         Move HTMLAnchorElement::m_rootEditableElementForSelectionOnMouseDown to a rare
319         data-style hashmap, effectively shrinking HTMLAnchorElement by one CPU word.
320
321         The pointer is only used during interactive event handling, so it shouldn't have
322         any noticeable effects on web performance.
323
324         This reduces memory consumption by 256 kB (on 64-bit) when viewing the full
325         HTML5 spec at <http://whatwg.org/c>.
326
327         * html/HTMLAnchorElement.cpp:
328         (WebCore::HTMLAnchorElement::HTMLAnchorElement):
329         (WebCore::HTMLAnchorElement::~HTMLAnchorElement):
330         (WebCore::HTMLAnchorElement::defaultEventHandler):
331         (WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType):
332         (WebCore::rootEditableElementMap):
333         (WebCore::HTMLAnchorElement::rootEditableElementForSelectionOnMouseDown):
334         (WebCore::HTMLAnchorElement::setRootEditableElementForSelectionOnMouseDown):
335         * html/HTMLAnchorElement.h:
336
337 2012-01-23  Antti Koivisto  <antti@apple.com>
338
339         Eliminate CSSElementStyleDeclaration subclasses
340         https://bugs.webkit.org/show_bug.cgi?id=76827
341
342         Reviewed by Andreas Kling.
343
344         CSSInlineStyleDeclaration and FontFaceStyleDeclaration serve no real purpose.
345
346         * GNUmakefile.list.am:
347         * Target.pri:
348         * WebCore.gypi:
349         * WebCore.vcproj/WebCore.vcproj:
350         * WebCore.xcodeproj/project.pbxproj:
351         * css/CSSElementStyleDeclaration.cpp:
352         (WebCore::CSSElementStyleDeclaration::createForSVGFontFaceElement):
353         (WebCore::CSSElementStyleDeclaration::styleSheet):
354         * css/CSSElementStyleDeclaration.h:
355         (WebCore::CSSElementStyleDeclaration::createInline):
356         (WebCore::toCSSElementStyleDeclaration):
357         * css/CSSInlineStyleDeclaration.h: Removed.
358         * css/CSSMutableStyleDeclaration.cpp:
359         * dom/StyledElement.cpp:
360         (WebCore::StyledElement::createInlineStyleDecl):
361         (WebCore::StyledElement::ensureInlineStyleDecl):
362         (WebCore::StyledElement::copyNonAttributeProperties):
363         * dom/StyledElement.h:
364         (WebCore::StyledElement::inlineStyleDecl):
365         * editing/ApplyStyleCommand.cpp:
366         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
367         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
368         * editing/DeleteButtonController.cpp:
369         (WebCore::DeleteButtonController::createDeletionUI):
370         * html/ValidationMessage.cpp:
371         (WebCore::adjustBubblePosition):
372         * html/shadow/MediaControlElements.cpp:
373         (WebCore::MediaControlPanelElement::setPosition):
374         (WebCore::MediaControlPanelElement::resetPosition):
375         (WebCore::MediaControlPanelElement::makeOpaque):
376         (WebCore::MediaControlPanelElement::makeTransparent):
377         * html/shadow/SliderThumbElement.cpp:
378         (WebCore::TrackLimiterElement::create):
379         * svg/SVGFontFaceElement.cpp:
380         (WebCore::SVGFontFaceElement::SVGFontFaceElement):
381
382 2012-01-23  Pavel Feldman  <pfeldman@google.com>
383
384         Not reviewed: annotate inspector's js so that it compiled.
385
386         * inspector/front-end/ElementsTreeOutline.js:
387         * inspector/front-end/TextPrompt.js:
388         (WebInspector.TextPrompt.SuggestBox.prototype.upKeyPressed):
389         (WebInspector.TextPrompt.SuggestBox.prototype.downKeyPressed):
390
391 2012-01-23  Philippe Normand  <pnormand@igalia.com>
392
393         [GStreamer] fix WebAudio build after r105431
394         https://bugs.webkit.org/show_bug.cgi?id=76819
395
396         Reviewed by Martin Robinson.
397
398         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
399         (WebCore::copyGstreamerBuffersToAudioChannel): Use mutableData()
400         when copying.
401         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
402         (webKitWebAudioSrcLoop): Drop constness when setting the buffer
403         data pointer.
404
405 2012-01-23  Pavel Feldman  <pfeldman@google.com>
406
407         Web Inspector: add touch events to the event listeners list.
408         https://bugs.webkit.org/show_bug.cgi?id=76830
409
410         Reviewed by Yury Semikhatsky.
411
412         * English.lproj/localizedStrings.js:
413         * inspector/InjectedScriptSource.js:
414         (.):
415         * inspector/front-end/BreakpointsSidebarPane.js:
416         (WebInspector.EventListenerBreakpointsSidebarPane):
417
418 2012-01-23  Pavel Feldman  <pfeldman@google.com>
419
420         Web Inspector: inspector close button is missing in the dock-to-right mode.
421         https://bugs.webkit.org/show_bug.cgi?id=76829
422
423         Reviewed by Timothy Hatcher.
424
425         * inspector/front-end/inspector.js:
426         (WebInspector.set attached):
427         (WebInspector.get _setCompactMode):
428
429 2012-01-23  Vsevolod Vlasov  <vsevik@chromium.org>
430
431         Web Inspector: IndexedDBModel should keep track of requests sent to the backend.
432         https://bugs.webkit.org/show_bug.cgi?id=76705
433
434         Reviewed by Pavel Feldman.
435
436         * inspector/Inspector.json:
437         * inspector/InspectorIndexedDBAgent.cpp:
438         (WebCore::InspectorIndexedDBAgent::requestDatabaseNamesForFrame):
439         * inspector/InspectorIndexedDBAgent.h:
440         * inspector/front-end/IndexedDBModel.js:
441         (WebInspector.IndexedDBModel):
442         (WebInspector.IndexedDBModel.prototype._frameDetached):
443         (WebInspector.IndexedDBModel.prototype._reset):
444         (WebInspector.IndexedDBModel.prototype._loadDatabaseNamesForFrame):
445         (WebInspector.IndexedDBRequestManager):
446         (WebInspector.IndexedDBRequestManager.prototype.requestDatabaseNamesForFrame.innerCallback):
447         (WebInspector.IndexedDBRequestManager.prototype.requestDatabaseNamesForFrame):
448         (WebInspector.IndexedDBRequestManager.prototype._databaseNamesLoaded):
449         (WebInspector.IndexedDBRequestManager.prototype._requestId):
450         (WebInspector.IndexedDBRequestManager.prototype._frameDetached):
451         (WebInspector.IndexedDBRequestManager.prototype._reset):
452         (WebInspector.IndexedDBRequestManager.DatabasesForFrameRequest):
453         (WebInspector.IndexedDBDispatcher):
454         (WebInspector.IndexedDBDispatcher.prototype.databaseNamesLoaded):
455
456 2012-01-23  Pavel Feldman  <pfeldman@google.com>
457
458         Web Inspector: Inspecting an element inside an iframe no longer works
459         https://bugs.webkit.org/show_bug.cgi?id=76808
460
461         Reviewed by Timothy Hatcher.
462
463         Test: http/tests/inspector/inspect-element.html
464
465         * inspector/InspectorDOMAgent.cpp:
466         (WebCore::InspectorDOMAgent::innerParentNode):
467         * inspector/front-end/DOMAgent.js:
468         (WebInspector.DOMNode.prototype.getChildNodes.mycallback):
469         (WebInspector.DOMNode.prototype.getChildNodes):
470         (WebInspector.DOMNode.prototype._setChildrenPayload):
471         * inspector/front-end/ElementsTreeOutline.js:
472         (WebInspector.ElementsTreeOutline.prototype._selectedNodeChanged):
473
474 2012-01-23  Andrey Kosyakov  <caseq@chromium.org>
475
476         Web Inspector: response.bodySize in HAR is invalid (negative) for cached resources
477         https://bugs.webkit.org/show_bug.cgi?id=76823
478
479         Reviewed by Yury Semikhatsky.
480
481         - fix response.bodySize for cached resources;
482         Also some drive-by fixes:
483         - pretty-print HAR when exported
484         - proper annotation for JSON.stringify()
485         - de-obfuscate a piece of code in TimelinePanel
486
487         * inspector/front-end/HAREntry.js:
488         (WebInspector.HAREntry.prototype.get responseBodySize):
489         * inspector/front-end/NetworkPanel.js:
490         (WebInspector.NetworkLogView.prototype._exportAll):
491         (WebInspector.NetworkLogView.prototype._exportResource):
492
493 2012-01-23  Mario Sanchez Prada  <msanchez@igalia.com>
494
495         [GTK] Refactor GTK's accessibilitity code to be more modular
496         https://bugs.webkit.org/show_bug.cgi?id=76783
497
498         Reviewed by Martin Robinson.
499
500         New files for the implementation of the AtkAction interface,
501         containing the related code from WebKitAccessibleWrapperAtk.cpp.
502
503         * accessibility/gtk/WebKitAccessibleInterfaceAction.cpp: Added.
504         (core):
505         (webkitAccessibleActionInterfaceInit):
506         (webkitAccessibleActionDoAction):
507         (webkitAccessibleActionGetNActions):
508         (webkitAccessibleActionGetDescription):
509         (webkitAccessibleActionGetKeybinding):
510         (webkitAccessibleActionGetName):
511         * accessibility/gtk/WebKitAccessibleInterfaceAction.h: Added.
512
513         * accessibility/gtk/WebKitAccessibleWrapperAtk.cpp: Remove code
514         related to the implementation of the AtkAction interface.
515
516         Add new files to build files.
517
518         * GNUmakefile.list.am: Add WebKitAccessibleInterfaceAction.[h|cpp].
519         * WebCore.gypi: Ditto.
520
521 2012-01-23  Nikolas Zimmermann  <nzimmermann@rim.com>
522
523         SVG animation repaint issue with image and dynamic clipPath
524         https://bugs.webkit.org/show_bug.cgi?id=76559
525
526         Reviewed by Zoltan Herczeg.
527
528         Based on patch by Kelly Norton <knorton@google.com>. I extended the patch
529         to correctly handle relative length resolution as well.
530
531         RenderSVGImage doesn't react on setNeedsBoundariesUpdate() calls
532         and thus fails to update its boundaries in some cases.
533
534         The logic is also inconsistent, compared to the other renderers.
535         Fix that properly, by reusing the method used in RenderSVGViewportContainer.
536         Call calculateImageViewport() immediately, after initializing the LayoutRepainter.
537         Previously we resolved the image viewport in RenderSVGImage::updateFromElement. This is
538         wrong, as it queries the frameRect() of the RenderSVGRoot in a state, where the renderer
539         still needs layout, leading to wrong results.
540
541         I turned Kellys manual testcase into a predictable test, see svg/repaint/image-with-clip-path.svg
542         Relative sized image handling is tested in svg/custom/relative-sized-image.xhtml now.
543
544         Tests: svg/custom/relative-sized-image.xhtml
545                svg/repaint/image-with-clip-path.svg
546
547         * rendering/svg/RenderSVGImage.cpp:
548         (WebCore::RenderSVGImage::RenderSVGImage):
549         (WebCore::RenderSVGImage::updateImageViewport):
550         (WebCore::RenderSVGImage::layout):
551         * rendering/svg/RenderSVGImage.h:
552         (WebCore::RenderSVGImage::setNeedsBoundariesUpdate):
553         * svg/SVGImageElement.cpp:
554         (WebCore::SVGImageElement::svgAttributeChanged):
555
556 2012-01-23  Nikolas Zimmermann  <nzimmermann@rim.com>
557
558         <feImage> has problems referencing local elements
559         https://bugs.webkit.org/show_bug.cgi?id=76800
560
561         Reviewed by Zoltan Herczeg.
562
563         <feImage> referencing local elements are currently rendered into an ImageBuffer
564         by SVGFEImageElement, using the local coordinates of the referenced renderer.
565
566         This approach is buggy and should be avoided, by moving the rendering fully
567         into SVGFEImage, which takes care of respecting the correct transformations.
568
569         This fixes <feImage> + local references, which currently breaks two tests in trunk.
570         Covered by existing tests.
571
572         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
573         (WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion):
574         * svg/SVGFEImageElement.cpp:
575         (WebCore::SVGFEImageElement::build):
576         * svg/graphics/filters/SVGFEImage.cpp:
577         (WebCore::FEImage::FEImage):
578         (WebCore::FEImage::createWithImage):
579         (WebCore::FEImage::createWithIRIReference):
580         (WebCore::FEImage::determineAbsolutePaintRect):
581         (WebCore::FEImage::referencedRenderer):
582         (WebCore::FEImage::platformApplySoftware):
583         (WebCore::FEImage::externalRepresentation):
584         * svg/graphics/filters/SVGFEImage.h:
585         (WebCore::FEImage::~FEImage):
586         * svg/graphics/filters/SVGFilter.h:
587         (WebCore::SVGFilter::absoluteTransform):
588
589 2012-01-23  Nikolas Zimmermann  <nzimmermann@rim.com>
590
591         Not reviewed. Fix Mac build, by exporting a new symbol.
592
593         * WebCore.exp.in:
594
595 2012-01-23  Mario Sanchez Prada  <msanchez@igalia.com>
596
597         [GTK] Refactor GTK's accessibilitity code to be more modular
598         https://bugs.webkit.org/show_bug.cgi?id=76783
599
600         Reviewed by Martin Robinson.
601
602         Move common function returnString() from the wrapper and
603         hyperlink implementations to a new utility file.
604
605         * accessibility/gtk/WebKitAccessibleUtil.cpp: Added.
606         (returnString): Taken from WebKitAccessibleWrapperAtk.cpp and
607         WebKitAccessibleHyperlink.cpp
608         * accessibility/gtk/WebKitAccessibleUtil.h: Added.
609
610         * accessibility/gtk/WebKitAccessibleHyperlink.cpp: Remove local
611         implementation of returnString.
612         * accessibility/gtk/WebKitAccessibleWrapperAtk.cpp: Ditto.
613
614         Add new files to build files.
615
616         * GNUmakefile.list.am: Add WebKitAccessibleUtil.[h|cpp].
617         * WebCore.gypi: Ditto.
618
619 2012-01-23  Mario Sanchez Prada  <msanchez@igalia.com>
620
621         [GTK] Refactor GTK's accessibilitity code to be more modular
622         https://bugs.webkit.org/show_bug.cgi?id=76783
623
624         Reviewed by Martin Robinson.
625
626         Fix typo in class struct (parent class field had the wrong type),
627         fix coding style issues and update date in headers.
628
629         * accessibility/gtk/WebKitAccessibleHyperlink.cpp:
630         * accessibility/gtk/WebKitAccessibleHyperlink.h:
631
632 2012-01-23  Mario Sanchez Prada  <msanchez@igalia.com>
633
634         [GTK] Refactor GTK's accessibilitity code to be more modular
635         https://bugs.webkit.org/show_bug.cgi?id=76783
636
637         Reviewed by Martin Robinson.
638
639         Rename WebKitAccessible's public functions to follow WebKit's
640         coding style and update callers.
641
642         * accessibility/gtk/WebKitAccessibleWrapperAtk.cpp:
643         (webkitAccessibleNew): Renamed from webkit_accessible_new.
644         (webkitAccessibleGetAccessibilityObject): Likewise.
645         (webkitAccessibleDetach):Likewise.
646         (webkitAccessibleGetFocusedElement): Likewise.
647         * accessibility/gtk/WebKitAccessibleWrapperAtk.h:
648
649         Update calls to WebKitAccessible's public functions.
650
651         * accessibility/gtk/AXObjectCacheAtk.cpp:
652         (WebCore::AXObjectCache::detachWrapper): Update call.
653         (WebCore::AXObjectCache::attachWrapper): Ditto.
654         * accessibility/gtk/WebKitAccessibleHyperlink.cpp:
655         (core): Update call.
656
657 2012-01-19  Kenichi Ishibashi  <bashi@chromium.org>
658
659         WebKit fails IETC composition event types
660         https://bugs.webkit.org/show_bug.cgi?id=76690
661
662         Reviewed by Ryosuke Niwa.
663
664         Dispatches at least one compositionupdate event.
665         The spec(*) says that a composition session includes one or more
666         compositionupdate event(s).
667         Other major browsers (Firefox and IE) don't populate the data attribute
668         of the compositionstart event, but we set the given text in the data
669         attribute to minimize the effect of this change.
670
671         (*) http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-compositionevents
672
673         Updated existing test: fast/fast/events/ime-composition-events-001.html.
674
675         * editing/Editor.cpp:
676         (WebCore::Editor::setComposition):
677
678 2012-01-22  Mario Sanchez Prada  <msanchez@igalia.com>
679
680         [GTK] Refactor GTK's accessibilitity code to be more modular
681         https://bugs.webkit.org/show_bug.cgi?id=76783
682
683         Reviewed by Martin Robinson.
684
685         Rename the file for the ATK AccessibilityObject wrapper to be more
686         coherent with the rest of the files in the same directory.
687
688         * accessibility/gtk/WebKitAccessibleWrapperAtk.cpp: Renamed from
689         Source/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp.
690         (fallbackObject):
691         (returnString):
692         (core):
693         (webkit_accessible_get_name):
694         (webkit_accessible_get_description):
695         (setAtkRelationSetFromCoreObject):
696         (isRootObject):
697         (atkParentOfRootObject):
698         (webkit_accessible_get_parent):
699         (getNChildrenForTable):
700         (webkit_accessible_get_n_children):
701         (getChildForTable):
702         (webkit_accessible_ref_child):
703         (getIndexInParentForCellInRow):
704         (webkit_accessible_get_index_in_parent):
705         (addAttributeToSet):
706         (webkit_accessible_get_attributes):
707         (atkRole):
708         (webkit_accessible_get_role):
709         (selectionBelongsToObject):
710         (isTextWithCaret):
711         (setAtkStateSetFromCoreObject):
712         (webkit_accessible_ref_state_set):
713         (webkit_accessible_ref_relation_set):
714         (webkit_accessible_init):
715         (webkit_accessible_finalize):
716         (webkit_accessible_class_init):
717         (webkit_accessible_get_type):
718         (webkit_accessible_action_do_action):
719         (webkit_accessible_action_get_n_actions):
720         (webkit_accessible_action_get_description):
721         (webkit_accessible_action_get_keybinding):
722         (webkit_accessible_action_get_name):
723         (atk_action_interface_init):
724         (listObjectForSelection):
725         (optionFromList):
726         (optionFromSelection):
727         (webkit_accessible_selection_add_selection):
728         (webkit_accessible_selection_clear_selection):
729         (webkit_accessible_selection_ref_selection):
730         (webkit_accessible_selection_get_selection_count):
731         (webkit_accessible_selection_is_child_selected):
732         (webkit_accessible_selection_remove_selection):
733         (webkit_accessible_selection_select_all_selection):
734         (atk_selection_interface_init):
735         (utf8Substr):
736         (convertUniCharToUTF8):
737         (textForRenderer):
738         (textForObject):
739         (webkit_accessible_text_get_text):
740         (getGailTextUtilForAtk):
741         (getPangoLayoutForAtk):
742         (webkit_accessible_text_get_text_after_offset):
743         (webkit_accessible_text_get_text_at_offset):
744         (webkit_accessible_text_get_text_before_offset):
745         (webkit_accessible_text_get_character_at_offset):
746         (webkit_accessible_text_get_caret_offset):
747         (baselinePositionForRenderObject):
748         (getAttributeSetForAccessibilityObject):
749         (compareAttribute):
750         (attributeSetDifference):
751         (accessibilityObjectLength):
752         (getAccessibilityObjectForOffset):
753         (getRunAttributesFromAccesibilityObject):
754         (webkit_accessible_text_get_run_attributes):
755         (webkit_accessible_text_get_default_attributes):
756         (textExtents):
757         (webkit_accessible_text_get_character_extents):
758         (webkit_accessible_text_get_range_extents):
759         (webkit_accessible_text_get_character_count):
760         (webkit_accessible_text_get_offset_at_point):
761         (getSelectionOffsetsForObject):
762         (webkit_accessible_text_get_n_selections):
763         (webkit_accessible_text_get_selection):
764         (webkit_accessible_text_add_selection):
765         (webkit_accessible_text_set_selection):
766         (webkit_accessible_text_remove_selection):
767         (webkit_accessible_text_set_caret_offset):
768         (atk_text_interface_init):
769         (webkit_accessible_editable_text_set_run_attributes):
770         (webkit_accessible_editable_text_set_text_contents):
771         (webkit_accessible_editable_text_insert_text):
772         (webkit_accessible_editable_text_copy_text):
773         (webkit_accessible_editable_text_cut_text):
774         (webkit_accessible_editable_text_delete_text):
775         (webkit_accessible_editable_text_paste_text):
776         (atk_editable_text_interface_init):
777         (contentsToAtk):
778         (atkToContents):
779         (webkit_accessible_component_ref_accessible_at_point):
780         (webkit_accessible_component_get_extents):
781         (webkit_accessible_component_grab_focus):
782         (atk_component_interface_init):
783         (webkit_accessible_image_get_image_position):
784         (webkit_accessible_image_get_image_description):
785         (webkit_accessible_image_get_image_size):
786         (atk_image_interface_init):
787         (cell):
788         (cellIndex):
789         (cellAtIndex):
790         (webkit_accessible_table_ref_at):
791         (webkit_accessible_table_get_index_at):
792         (webkit_accessible_table_get_column_at_index):
793         (webkit_accessible_table_get_row_at_index):
794         (webkit_accessible_table_get_n_columns):
795         (webkit_accessible_table_get_n_rows):
796         (webkit_accessible_table_get_column_extent_at):
797         (webkit_accessible_table_get_row_extent_at):
798         (webkit_accessible_table_get_column_header):
799         (webkit_accessible_table_get_row_header):
800         (webkit_accessible_table_get_caption):
801         (webkit_accessible_table_get_column_description):
802         (webkit_accessible_table_get_row_description):
803         (atk_table_interface_init):
804         (webkitAccessibleHypertextGetLink):
805         (webkitAccessibleHypertextGetNLinks):
806         (webkitAccessibleHypertextGetLinkIndex):
807         (atkHypertextInterfaceInit):
808         (webkitAccessibleHyperlinkImplGetHyperlink):
809         (atkHyperlinkImplInterfaceInit):
810         (documentAttributeValue):
811         (webkit_accessible_document_get_attribute_value):
812         (webkit_accessible_document_get_attributes):
813         (webkit_accessible_document_get_locale):
814         (atk_document_interface_init):
815         (webkitAccessibleValueGetCurrentValue):
816         (webkitAccessibleValueGetMaximumValue):
817         (webkitAccessibleValueGetMinimumValue):
818         (webkitAccessibleValueSetCurrentValue):
819         (webkitAccessibleValueGetMinimumIncrement):
820         (atkValueInterfaceInit):
821         (GetAtkInterfaceTypeFromWAIType):
822         (getInterfaceMaskFromObject):
823         (getUniqueAccessibilityTypeName):
824         (getAccessibilityTypeFromObject):
825         (webkit_accessible_new):
826         (webkit_accessible_get_accessibility_object):
827         (webkit_accessible_detach):
828         (webkit_accessible_get_focused_element):
829         (objectFocusedAndCaretOffsetUnignored):
830         * accessibility/gtk/WebKitAccessibleWrapperAtk.h: Renamed from
831         Source/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.h.
832
833         Update the include for the AccessibilityObject wrapper header.
834
835         * accessibility/gtk/AXObjectCacheAtk.cpp: Update include.
836         * accessibility/gtk/WebKitAccessibleHyperlink.cpp: Ditto.
837         * accessibility/gtk/WebKitAccessibleHyperlink.h: Ditto.
838         * editing/gtk/FrameSelectionGtk.cpp:
839
840         Update filename for the ATK wrapper in build files.
841
842         * GNUmakefile.list.am: Updated.
843         * WebCore.gypi: Updated.
844
845 2012-01-20  Pavel Feldman  <pfeldman@google.com>
846
847         Web Inspector: PageAgent.open() dosen't belong to the protocol.
848         https://bugs.webkit.org/show_bug.cgi?id=74790
849
850         Reviewed by Yury Semikhatsky.
851
852         * inspector/Inspector.json:
853         * inspector/InspectorFrontendClient.h:
854         * inspector/InspectorFrontendClientLocal.cpp:
855         (WebCore::InspectorFrontendClientLocal::openInNewTab):
856         * inspector/InspectorFrontendClientLocal.h:
857         * inspector/InspectorFrontendHost.cpp:
858         (WebCore::InspectorFrontendHost::openInNewTab):
859         * inspector/InspectorFrontendHost.h:
860         * inspector/InspectorFrontendHost.idl:
861         * inspector/InspectorPageAgent.cpp:
862         (WebCore::InspectorPageAgent::navigate):
863         * inspector/InspectorPageAgent.h:
864         * inspector/front-end/ImageView.js:
865         (WebInspector.ImageView.prototype._openInNewTab):
866         * inspector/front-end/InspectorFrontendHostStub.js:
867         (.WebInspector.InspectorFrontendHostStub.prototype.openInNewTab):
868         * inspector/front-end/NetworkPanel.js:
869         (WebInspector.NetworkDataGridNode.prototype._openInNewTab):
870         * inspector/front-end/ResourcesPanel.js:
871         (WebInspector.FrameResourceTreeElement.prototype.ondblclick):
872         * inspector/front-end/inspector.js:
873         (WebInspector.openResource):
874
875 2012-01-23  Ilya Tikhonovsky  <loislo@chromium.org>
876
877         Web Inspector: DetailedHeapSnapshot: Replace the list of retainers with the expandable tree (to get rid of cycles)
878         https://bugs.webkit.org/show_bug.cgi?id=76813
879
880         Reviewed by Pavel Feldman.
881
882         * English.lproj/localizedStrings.js:
883         * inspector/front-end/DetailedHeapshotGridNodes.js:
884         (WebInspector.HeapSnapshotObjectNode):
885         * inspector/front-end/DetailedHeapshotView.js:
886         (WebInspector.HeapSnapshotContainmentDataGrid.prototype.setDataSource):
887         (WebInspector.HeapSnapshotRetainmentDataGrid):
888         (WebInspector.HeapSnapshotRetainmentDataGrid.prototype.reset):
889         (WebInspector.DetailedHeapshotView.prototype._startRetainersHeaderDragging):
890         * inspector/front-end/HeapSnapshot.js:
891         (WebInspector.HeapSnapshot.prototype.createRetainingEdgesProvider):
892         (WebInspector.HeapSnapshotEdgesProvider):
893         * inspector/front-end/HeapSnapshotProxy.js:
894         (WebInspector.HeapSnapshotProxy.prototype.createEdgesProvider):
895         (WebInspector.HeapSnapshotProxy.prototype.createRetainingEdgesProvider):
896
897 2012-01-20  Andrey Kosyakov  <caseq@chromium.org>
898
899         Web Inspector: HAR pageref attributes are wrong and inconsistent with pages array
900         https://bugs.webkit.org/show_bug.cgi?id=76398
901
902         Reviewed by Pavel Feldman.
903
904         - introduce a notion of LoadPage;
905         - move page load times to LoadPage;
906         - associate network resources with LoadPage;
907         - export pages for all available resoruces to HAR, not just the last page;
908         - use page ids, not document URLs in HAR entries to refer to pages;
909         - use page URL as a title field of a HAR page;
910
911         * inspector/front-end/AuditsPanel.js:
912         (WebInspector.AuditsPanel):
913         * inspector/front-end/HAREntry.js:
914         (WebInspector.HAREntry.prototype.build):
915         (WebInspector.HAREntry.prototype.get responseCompression):
916         (WebInspector.HARLog.prototype._buildPages):
917         (WebInspector.HARLog.prototype._convertPage):
918         (WebInspector.HARLog.prototype._pageEventTime):
919         * inspector/front-end/NetworkLog.js:
920         (WebInspector.NetworkLog):
921         (WebInspector.NetworkLog.prototype._mainFrameNavigated):
922         (WebInspector.NetworkLog.prototype._onResourceStarted):
923         (WebInspector.Page):
924         (WebInspector.Page.prototype.get id):
925         (WebInspector.Page.prototype.get url):
926         (WebInspector.Page.prototype.get contentLoadTime):
927         (WebInspector.Page.prototype.set contentLoadTime):
928         (WebInspector.Page.prototype.get loadTime):
929         (WebInspector.Page.prototype.set loadTime):
930         (WebInspector.Page.prototype.get startTime):
931         (WebInspector.Page.prototype._bindResource):
932         * inspector/front-end/NetworkManager.js:
933         (WebInspector.NetworkDispatcher.prototype.requestServedFromMemoryCache):
934         * inspector/front-end/Resource.js:
935         (WebInspector.Resource.prototype.get page):
936         (WebInspector.Resource.prototype.set page):
937         * inspector/front-end/ResourceTreeModel.js:
938         (WebInspector.ResourceTreeFrame):
939         (WebInspector.ResourceTreeFrame.prototype.get page):
940         (WebInspector.PageDispatcher.prototype.domContentEventFired):
941         (WebInspector.PageDispatcher.prototype.loadEventFired):
942
943 2012-01-22  Mario Sanchez Prada  <msanchez@igalia.com>
944
945         [GTK] ATK text-caret-moved and text-selection-changed events not being emitted
946         https://bugs.webkit.org/show_bug.cgi?id=76069
947
948         Reviewed by Martin Robinson.
949
950         Fix bug introduced with patch for Bug 72830.
951
952         * accessibility/AccessibilityObject.cpp:
953         (WebCore::AccessibilityObject::isDescendantOfObject): New function,
954         to check if an accessibility object is a descendant of other object.
955         (WebCore::AccessibilityObject::isAncestorOfObject): New function,
956         to check if an accessibility object is an ancestor of other object.
957         * accessibility/AccessibilityObject.h:
958
959         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
960         (webkit_accessible_text_get_caret_offset): Make sure to pass the
961         right reference object to objectFocusedAndCaretOffsetUnignored.
962         (objectFocusedAndCaretOffsetUnignored): Use positionBeforeNode
963         instead of firstPositionInNode for calculating the begining of the
964         range used to calculate the offsets. Ensure that the reference
965         object is never a descendant of the actual object being returned.
966
967         * editing/gtk/FrameSelectionGtk.cpp:
968         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
969         Pass the right accessibility object associated with the current
970         selection to objectFocusedAndCaretOffsetUnignored.
971
972 2012-01-21  David Reveman  <reveman@chromium.org>
973
974         [Chromium] Incremental texture updates are not atomic.
975         https://bugs.webkit.org/show_bug.cgi?id=72672
976
977         Reviewed by Adam Barth.
978
979         Use a new set of textures for each commit when incremental
980         texture updates are enabled.
981
982         This patch is tested by the following unit test:
983         - CCLayerTreeHostTestAtomicCommit.runMultiThread
984
985         * platform/graphics/chromium/ManagedTexture.cpp:
986         (WebCore::ManagedTexture::ManagedTexture):
987         (WebCore::ManagedTexture::steal):
988         * platform/graphics/chromium/ManagedTexture.h:
989         * platform/graphics/chromium/TiledLayerChromium.cpp:
990         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
991         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
992         (WebCore::CCLayerTreeHost::initialize):
993         (WebCore::CCLayerTreeHost::commitComplete):
994         (WebCore::CCLayerTreeHost::deleteTextureAfterCommit):
995         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
996         (WebCore::CCSettings::CCSettings):
997         * platform/graphics/chromium/cc/CCProxy.h:
998         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
999         (WebCore::CCSingleThreadProxy::partialTextureUpdateCapability):
1000         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1001         (WebCore::CCThreadProxy::scheduledActionUpdateMoreResources):
1002         (WebCore::CCThreadProxy::partialTextureUpdateCapability):
1003         * platform/graphics/chromium/cc/CCThreadProxy.h:
1004
1005 2012-01-21  Pablo Flouret  <pablof@motorola.com>
1006
1007         Add .url attribute alongside .URL in EventSource and WebSocket to comply with the specs but not break existing usage.
1008         https://bugs.webkit.org/show_bug.cgi?id=40899
1009
1010         Reviewed by Adam Barth.
1011
1012         Tests: fast/eventsource/eventsource-url-attribute.html
1013                http/tests/websocket/tests/hixie76/url-attribute.html
1014                http/tests/websocket/tests/hybi/url-attribute.html
1015
1016         * page/EventSource.idl:
1017         * websockets/WebSocket.idl:
1018
1019 2012-01-21  Sheriff Bot  <webkit.review.bot@gmail.com>
1020
1021         Unreviewed, rolling out r105564.
1022         http://trac.webkit.org/changeset/105564
1023         https://bugs.webkit.org/show_bug.cgi?id=76792
1024
1025         Does not compile on Chromium Mac (Requested by abarth on
1026         #webkit).
1027
1028         * platform/graphics/chromium/ManagedTexture.cpp:
1029         * platform/graphics/chromium/ManagedTexture.h:
1030         * platform/graphics/chromium/TiledLayerChromium.cpp:
1031         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
1032         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1033         (WebCore::CCLayerTreeHost::initialize):
1034         (WebCore::CCLayerTreeHost::commitComplete):
1035         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1036         (WebCore::CCSettings::CCSettings):
1037         * platform/graphics/chromium/cc/CCProxy.h:
1038         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
1039         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1040         (WebCore::CCThreadProxy::scheduledActionUpdateMoreResources):
1041         * platform/graphics/chromium/cc/CCThreadProxy.h:
1042
1043 2012-01-20  Chris Marrin  <cmarrin@apple.com>
1044
1045         Implement hardware accelerated Brightness and contrast filters
1046         https://bugs.webkit.org/show_bug.cgi?id=75521
1047         https://bugs.webkit.org/show_bug.cgi?id=76719
1048
1049         Reviewed by Simon Fraser.
1050
1051         Implemented hardware accelerated brightness and contrast filters. This also fixes
1052         the bug where grayscale filter was accidentally never getting hardware accelerated.
1053         It also complies with proposed spec changes for the brightness filter to be additive 
1054         rather than multiplicative, according to https://bugs.webkit.org/show_bug.cgi?id=76719. 
1055         Had to make both fixes in the same patch because I had to change the allowed brightness
1056         values for the hardware version, so I had to change the software version as well.
1057
1058         Tests: css3/filters/effect-brightness-hw.html
1059                css3/filters/effect-contrast-hw.html
1060
1061         * css/CSSParser.cpp:
1062         (WebCore::CSSParser::parseBuiltinFilterArguments):
1063         * css/CSSStyleSelector.cpp:
1064         (WebCore::CSSStyleSelector::createFilterOperations):
1065         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1066         (PlatformCALayer::setFilters):
1067         (PlatformCALayer::filtersCanBeComposited):
1068         * rendering/FilterEffectRenderer.cpp:
1069         (WebCore::FilterEffectRenderer::build):
1070
1071 2012-01-21  Nikolas Zimmermann  <nzimmermann@rim.com>
1072
1073         <feImage> ignores preserveAspectRatio="none"
1074         https://bugs.webkit.org/show_bug.cgi?id=76780
1075
1076         Reviewed by Antti Koivisto.
1077
1078         preserveAspectRatio="none" was ignored in SVGFEImage. It always called transformRect() w/o checking
1079         whether it was supposed to transform the rect or not - move code from RenderSVGImage right into
1080         transformRect(), to do nothing if preserveAspectRatio="none" was given.
1081
1082         Test: svg/filters/feImage-preserveAspectratio.svg
1083
1084         * rendering/svg/RenderSVGImage.cpp:
1085         (WebCore::RenderSVGImage::paint):
1086         * svg/SVGPreserveAspectRatio.cpp:
1087         (WebCore::SVGPreserveAspectRatio::transformRect):
1088
1089 2012-01-21  Jochen Eisinger  <jochen@chromium.org>
1090
1091         history.replaceState should update the HistoryItem to use a GET method if previously non-GET (POST)
1092         https://bugs.webkit.org/show_bug.cgi?id=76721
1093
1094         Reviewed by Mihai Parparita.
1095
1096         Tests: http/tests/history/replacestate-post-to-get-2.html
1097                http/tests/history/replacestate-post-to-get.html
1098
1099         * loader/HistoryController.cpp:
1100         (WebCore::HistoryController::replaceState):
1101
1102 2012-01-21  Florin Malita  <fmalita@google.com>
1103
1104         Null dereference in SVGDocumentExtensions::removePendingResource when updating <use>'s href
1105         https://bugs.webkit.org/show_bug.cgi?id=69284
1106
1107         Reviewed by Nikolas Zimmermann.
1108
1109         Test: svg/custom/use-crash-pending-resource.svg
1110
1111         The crash is caused by assumptions in SVGUseElement that xlink:href is the only
1112         pending resource. This patch adds support for dealing with multiple pending resources.
1113
1114         * rendering/svg/RenderSVGResourceContainer.cpp:
1115         (WebCore::RenderSVGResourceContainer::registerResource):
1116         * svg/SVGDocumentExtensions.cpp:
1117         (WebCore::SVGDocumentExtensions::hasPendingResource):
1118         (WebCore::SVGDocumentExtensions::isElementPendingResources):
1119         (WebCore::SVGDocumentExtensions::isElementPendingResource):
1120         (WebCore::SVGDocumentExtensions::removePendingResourceForElement):
1121         * svg/SVGDocumentExtensions.h:
1122         * svg/SVGStyledElement.cpp:
1123         (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded):
1124         (WebCore::SVGStyledElement::clearHasPendingResourcesIfPossible):
1125         Renamed SVGDocumentExtensions::hasPendingResources -> Renamed SVGDocumentExtensions::hasPendingResource.
1126         Renamed SVGDocumentExtensions::isElementInPendingResources -> SVGDocumentExtensions::isElementPendingResources.
1127         Added support for querying and removing pending resources for a specific element.
1128
1129         * svg/SVGUseElement.cpp:
1130         (WebCore::SVGUseElement::svgAttributeChanged):
1131         (WebCore::SVGUseElement::buildPendingResource):
1132         Refactored to support multiple pending resources.
1133
1134 2012-01-21  Stephen Chenney  <schenney@chromium.org>
1135
1136         REGRESSION (Safari 5.0.5 - ToT): crash in SVG test http://dev.w3.org/SVG/profiles/1.1F2/test/harness/htmlObjectApproved/animate-elem-39-t.html
1137         https://bugs.webkit.org/show_bug.cgi?id=64671
1138
1139         Reviewed by Nikolas Zimmermann.
1140
1141         No new tests. This change is to fix crashes in existing tests.
1142
1143         * svg/animation/SVGSMILElement.cpp:
1144         (WebCore::SVGSMILElement::beginListChanged): If the new begin time is
1145         later than the current end time, and the event time is also after then
1146         end time (but we have not yet updated to that time) and the animation
1147         is active, we need to make the animation inactive explicitly.
1148
1149 2012-01-21  Benjamin Poulain  <bpoulain@apple.com>
1150
1151         PopupMenuClient::multiple() should be const
1152         https://bugs.webkit.org/show_bug.cgi?id=76771
1153
1154         Reviewed by Kent Tamura.
1155
1156         * platform/PopupMenuClient.h:
1157         (WebCore::PopupMenuClient::multiple):
1158         * rendering/RenderMenuList.cpp:
1159         (WebCore::RenderMenuList::multiple):
1160         * rendering/RenderMenuList.h:
1161
1162 2012-01-20  Mark Pilgrim  <pilgrim@chromium.org>
1163
1164         Switch indexeddb to use supplemental IDL for DOMWindow
1165         https://bugs.webkit.org/show_bug.cgi?id=76723
1166
1167         Reviewed by Adam Barth.
1168
1169         No new tests required, all existing tests pass.
1170
1171         * Modules/indexeddb: Added.
1172         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp: Added. webkitIndexedDB() method previously in DOMWindow.cpp
1173         (WebCore::DOMWindowIndexedDatabase::DOMWindowIndexedDatabase):
1174         (WebCore::DOMWindowIndexedDatabase::~DOMWindowIndexedDatabase):
1175         (WebCore::DOMWindowIndexedDatabase::webkitIndexedDB):
1176         * Modules/indexeddb/DOMWindowIndexedDatabase.h: Added.
1177         * Modules/indexeddb/DOMWindowIndexedDatabase.idl: Added. attributes previously in DOMWindow.idl
1178         * WebCore.gyp/WebCore.gyp: add Modules/indexeddb/ directory
1179         * WebCore.gypi: add Modules/indexeddb/*
1180         * page/DOMWindow.cpp: remove webkitIndexedDB() method, add accessor methods for m_idbFactory
1181         (WebCore::DOMWindow::getIDBFactory):
1182         (WebCore::DOMWindow::setIDBFactory):
1183         * page/DOMWindow.h:
1184         * page/DOMWindow.idl:
1185
1186 2012-01-20  David Levin  <levin@chromium.org>
1187
1188         Allow isContextThread to be called while in ~ScriptExecutionContext.
1189         https://bugs.webkit.org/show_bug.cgi?id=76756
1190
1191         Reviewed by Adam Barth.
1192
1193         It is possible for objects to get torn down or get called from ~ScriptExecutionContext
1194         and in turn call isContextThread. The resulting behavior is undefined. This change defines
1195         the behavior. I don't know of any places that do this but I have a test that is rarely
1196         failing due to isContextThread being false. This is my best guess as to why, and I
1197         don't see a reason to try to avoid calling isContextThread at this point.
1198
1199         No new functionality exposed so no new tests.
1200
1201         * dom/ScriptExecutionContext.h:
1202         (WebCore::ScriptExecutionContext::isContextThread):
1203
1204 2012-01-20  Alexandre Elias  <aelias@google.com>
1205
1206         [chromium] Write unit tests for compositor-thread zooming
1207         https://bugs.webkit.org/show_bug.cgi?id=71529
1208
1209         Reviewed by James Robinson.
1210
1211         Add unit tests for pinch zoom and page scale animation.  Includes
1212         small cleanups in CCLayerTreeHostImpl for testability.
1213
1214         * platform/graphics/chromium/cc/CCInputHandler.h:
1215         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1216         (WebCore::CCLayerTreeHostImpl::startPageScaleAnimation):
1217         (WebCore::CCLayerTreeHostImpl::setViewportSize):
1218         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1219
1220 2012-01-20  David Reveman  <reveman@chromium.org>
1221
1222         [Chromium] Incremental texture updates are not atomic.
1223         https://bugs.webkit.org/show_bug.cgi?id=72672
1224
1225         Reviewed by James Robinson.
1226
1227         Use a new set of textures for each commit when incremental
1228         texture updates are enabled.
1229
1230         This patch is tested by the following unit test:
1231         - CCLayerTreeHostTestAtomicCommit.runMultiThread
1232
1233         * platform/graphics/chromium/ManagedTexture.cpp:
1234         (WebCore::ManagedTexture::ManagedTexture):
1235         (WebCore::ManagedTexture::steal):
1236         * platform/graphics/chromium/ManagedTexture.h:
1237         * platform/graphics/chromium/TiledLayerChromium.cpp:
1238         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
1239         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1240         (WebCore::CCLayerTreeHost::initialize):
1241         (WebCore::CCLayerTreeHost::commitComplete):
1242         (WebCore::CCLayerTreeHost::deleteTextureAfterCommit):
1243         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1244         (WebCore::CCSettings::CCSettings):
1245         * platform/graphics/chromium/cc/CCProxy.h:
1246         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
1247         (WebCore::CCSingleThreadProxy::partialTextureUpdateCapability):
1248         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1249         (WebCore::CCThreadProxy::scheduledActionUpdateMoreResources):
1250         (WebCore::CCThreadProxy::partialTextureUpdateCapability):
1251         * platform/graphics/chromium/cc/CCThreadProxy.h:
1252
1253 2012-01-20  Chris Rogers  <crogers@google.com>
1254
1255         De-zippering incorrectly snaps to target gain
1256         https://bugs.webkit.org/show_bug.cgi?id=76741
1257
1258         Reviewed by Kenneth Russell.
1259
1260         * platform/audio/AudioBus.cpp:
1261
1262 2012-01-20  Dana Jansens  <danakj@chromium.org>
1263
1264         [chromium] Partially filled pixels do not occlude pixels below them.
1265         https://bugs.webkit.org/show_bug.cgi?id=76658
1266
1267         Reviewed by James Robinson.
1268
1269         Test: compositing/culling/tile-occlusion-boundaries.html
1270
1271         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
1272         (WebCore::enclosedIntRect):
1273         (WebCore::CCQuadCuller::cullOccludedQuads):
1274
1275 2012-01-20  Ami Fischman  <fischman@chromium.org>
1276
1277         Small cleanup of {get,put}CurrentFrame for  WebMediaPlayerClientImpl/CCVideoLayerImpl.
1278         https://bugs.webkit.org/show_bug.cgi?id=76332
1279
1280         Reviewed by James Robinson.
1281
1282         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
1283         (WebCore::CCVideoLayerImpl::draw):
1284
1285 2012-01-20  Brady Eidson  <beidson@apple.com>
1286
1287         <rdar://problem/9328684> and https://bugs.webkit.org/show_bug.cgi?id=62764
1288         Frequent crashes due to null frame below ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache
1289
1290         Reviewed by Sam Weinig.
1291
1292         No way to reproduce without special malloc debugging and that doesn't even reproduce on all platforms.  So still no test.
1293
1294         * loader/DocumentLoader.cpp:
1295         (WebCore::DocumentLoader::detachFromFrame): Protect m_frame for the duration of this method.
1296
1297 2012-01-20  Alexey Proskuryakov  <ap@apple.com>
1298
1299         WebCore should not send invalid URLs to client createWindow methods.
1300         https://bugs.webkit.org/show_bug.cgi?id=39017
1301
1302         Unreviewed test fix.
1303
1304         * page/DOMWindow.cpp: (WebCore::DOMWindow::createWindow): Let empty URLs through.
1305
1306 2012-01-20  Sam Weinig  <sam@webkit.org>
1307
1308         Make WebCore RunLoop work for WebKit1
1309         https://bugs.webkit.org/show_bug.cgi?id=76739
1310
1311         Reviewed by Anders Carlsson.
1312
1313         * platform/RunLoop.cpp:
1314         Specialize RunLoop initialization for Mac, where it can happen on any thread.
1315         
1316         * platform/RunLoop.h:
1317         Add RunLoop constructor that takes a CFRunLoopRef on the mac for initializing
1318         the main thread.
1319
1320         * platform/mac/RunLoopMac.mm:
1321         (WebCore::RunLoop::initializeMainRunLoop):
1322         Add new implementation that can work from any thread (and multiple threads at the
1323         same time if necessary).
1324
1325         (WebCore::RunLoop::current):
1326         Treat the main thread specially, not storing it in thread specific data.
1327
1328         (WebCore::RunLoop::main):
1329         Copy main accessor since it needs access to the file static.
1330
1331         (WebCore::RunLoop::RunLoop):
1332         Add constructor which takes a CFRunLoopRef.
1333
1334 2012-01-20  Tim Horton  <timothy_horton@apple.com>
1335
1336         Crash in RenderSVGResourceContainer::markAllClientsForInvalidation
1337         https://bugs.webkit.org/show_bug.cgi?id=76606
1338         <rdar://problem/10720970>
1339
1340         Reviewed by Dirk Schulze.
1341
1342         Notify SVGResourcesCache and superclass when RenderSVGInline is about
1343         to be destroyed, preventing a crash.
1344
1345         Test: svg/custom/crash-inline-container-client.html
1346
1347         * rendering/svg/RenderSVGInline.cpp:
1348         (WebCore::RenderSVGInline::willBeDestroyed):
1349         * rendering/svg/RenderSVGInline.h:
1350
1351 2012-01-20  Alexey Proskuryakov  <ap@apple.com>
1352
1353         WebCore should not send invalid URLs to client createWindow methods.
1354         https://bugs.webkit.org/show_bug.cgi?id=39017
1355
1356         Reviewed by Sam Weinig.
1357
1358         Test: fast/dom/window/open-invalid-url.html
1359
1360         * page/DOMWindow.cpp: (WebCore::DOMWindow::createWindow): Bail out early for invalid URLs.
1361
1362 2012-01-20  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1363
1364         Remove unused variable in RenderReplaced after r105513
1365         https://bugs.webkit.org/show_bug.cgi?id=76742
1366
1367         Reviewed by Daniel Bates.
1368
1369         * rendering/RenderReplaced.cpp:
1370         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
1371         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
1372
1373 2012-01-20  Jonathan Backer  <backer@chromium.org>
1374
1375         [chromium] Plumb damage from accelerated canvas 2D.
1376         https://bugs.webkit.org/show_bug.cgi?id=76728
1377
1378         Reviewed by Kenneth Russell.
1379
1380         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
1381         (WebCore::Canvas2DLayerChromium::contentChanged):
1382
1383 2012-01-20  Julien Chaffraix  <jchaffraix@webkit.org>
1384
1385         Crash in RenderTable::borderBefore
1386         https://bugs.webkit.org/show_bug.cgi?id=75215
1387
1388         Reviewed by David Hyatt.
1389
1390         Test: fast/table/crash-beforeBorder-dirty-section.html
1391
1392         This is a regression from r97661 that added some calls to get the object's borders but tables are a
1393         special case and they may need to recompute some sections' pointers.
1394
1395         The whole sections' pointers lazy recomputation logic is unfortunately far from being bullet proof and
1396         this change is only a mitigation for the current crash.
1397
1398         * rendering/RenderTable.cpp:
1399         (WebCore::RenderTable::borderBefore):
1400         (WebCore::RenderTable::borderAfter):
1401         Make sure we recompute our sections. The change was made here to avoid hitting the
1402         path used inside the table code (ie outerBorder{Before|After}) that shouldn't be
1403         affected.
1404
1405         * rendering/RenderTable.h:
1406         (WebCore::RenderTable::topSection):
1407         Added an ASSERT to catch more bad use in the future.
1408
1409 2012-01-20  Marc-Andre Decoste  <mad@chromium.org>
1410
1411         Add proper offset to position right click to simulate a context menu invocation.
1412         https://bugs.webkit.org/show_bug.cgi?id=76421
1413
1414         Reviewed by Ojan Vafai.
1415
1416         Manual tests only because DRT doesn't support context menu key.
1417
1418         * page/EventHandler.cpp:
1419         (WebCore::EventHandler::sendContextMenuEventForKey):
1420
1421 2012-01-20  Sheriff Bot  <webkit.review.bot@gmail.com>
1422
1423         Unreviewed, rolling out r105426.
1424         http://trac.webkit.org/changeset/105426
1425         https://bugs.webkit.org/show_bug.cgi?id=76726
1426
1427         Might have caused a 20% regression in the PLT (Requested by
1428         abarth|gardener on #webkit).
1429
1430         * rendering/RenderObject.h:
1431         (WebCore::RenderObject::style):
1432
1433 2012-01-20  Sadrul Habib Chowdhury  <sadrul@chromium.org>
1434
1435         [chromium] Revert a couple of changes in fileapi/ that break tests in chromeos.
1436         https://bugs.webkit.org/show_bug.cgi?id=76718
1437
1438         Reviewed by Darin Fisher.
1439
1440         * fileapi/BlobURL.cpp:
1441         (WebCore::BlobURL::getIdentifier):
1442         (WebCore::BlobURL::createBlobURL):
1443         * fileapi/BlobURL.h:
1444         (WebCore::BlobURL::blobProtocol):
1445         * fileapi/DOMFileSystemBase.cpp:
1446         (WebCore::DOMFileSystemBase::crackFileSystemURL):
1447         * fileapi/DOMFileSystemBase.h:
1448         * fileapi/EntryBase.cpp:
1449         (WebCore::EntryBase::toURL):
1450         * fileapi/FileWriter.cpp:
1451         (WebCore::FileWriter::write):
1452         (WebCore::FileWriter::truncate):
1453         * page/DOMWindow.cpp:
1454         (WebCore::DOMWindow::webkitRequestFileSystem):
1455         * page/DOMWindow.h:
1456         * platform/AsyncFileSystem.cpp:
1457         * platform/AsyncFileSystem.h:
1458         * workers/WorkerContext.cpp:
1459         (WebCore::WorkerContext::webkitRequestFileSystem):
1460         (WebCore::WorkerContext::webkitRequestFileSystemSync):
1461
1462 2012-01-20  Tim Dresser  <tdresser@chromium.org>
1463
1464         Refactor canvas drawing to be more data driven
1465         https://bugs.webkit.org/show_bug.cgi?id=76635
1466
1467         CCCanvasLayerImpl no longer handles drawing itself, but produces a list of CCCanvasDrawQuads.
1468         These quads are then drawn by LayerRendererChromium.
1469
1470         This is a refactor, so no new tests were added.
1471
1472         Reviewed by James Robinson.
1473
1474         * platform/graphics/chromium/LayerRendererChromium.cpp:
1475         (WebCore::LayerRendererChromium::drawCanvasQuad):
1476         * platform/graphics/chromium/cc/CCCanvasDrawQuad.cpp:
1477         (WebCore::CCCanvasDrawQuad::create):
1478         (WebCore::CCCanvasDrawQuad::CCCanvasDrawQuad):
1479         * platform/graphics/chromium/cc/CCCanvasDrawQuad.h:
1480         (WebCore::CCCanvasDrawQuad::textureId):
1481         (WebCore::CCCanvasDrawQuad::hasAlpha):
1482         (WebCore::CCCanvasDrawQuad::premultipliedAlpha):
1483         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
1484         (WebCore::CCCanvasLayerImpl::appendQuads):
1485         * platform/graphics/chromium/cc/CCCanvasLayerImpl.h:
1486
1487 2012-01-19  Abhishek Arya  <inferno@chromium.org>
1488
1489         Crash in xsltParseGlobalVariable.
1490         https://bugs.webkit.org/show_bug.cgi?id=75978
1491
1492         Reviewed by Andreas Kling.
1493
1494         The code missed to reset the stylesheet pointer after we fail
1495         to compile the XSLT stylesheet. As a result, the stylesheet gets
1496         reused with a removed document in the next transformToFragment call.
1497
1498         Test: fast/xsl/xslt-transform-to-fragment-crash.html
1499
1500         * xml/XSLTProcessorLibxslt.cpp:
1501         (WebCore::XSLTProcessor::transformToString):
1502
1503 2012-01-20  Nikolas Zimmermann  <nzimmermann@rim.com>
1504
1505         REGRESSION (r98852): apple.com navigation bar is broken under full-page zoom
1506         https://bugs.webkit.org/show_bug.cgi?id=76249
1507
1508         Reviewed by Andreas Kling.
1509
1510         Fix regression with full-page zoom & border-image. paintNinePieceImage() expects local, unzoomed coordinates.
1511         Restore the behaviour as it was before r98852, fixing the regression.
1512
1513         Test: fast/borders/scaled-border-image.html
1514
1515         * rendering/RenderBoxModelObject.cpp:
1516         (WebCore::RenderBoxModelObject::paintNinePieceImage):
1517
1518 2012-01-20  Mihnea Ovidenie  <mihnea@adobe.com>
1519
1520         [CSSRegion]Expose DOM interface for WebKitCSSRegionRule
1521         https://bugs.webkit.org/show_bug.cgi?id=73985
1522
1523         Reviewed by Antti Koivisto.
1524
1525         Start by exposing the interface and the cssRules attribute of type CSSRuleList.
1526         Test: fast/regions/webkit-region-rule.html
1527
1528         * CMakeLists.txt:
1529         * DerivedSources.cpp:
1530         * DerivedSources.make:
1531         * DerivedSources.pri:
1532         * GNUmakefile.list.am:
1533         * WebCore.gypi:
1534         * WebCore.vcproj/WebCore.vcproj:
1535         * WebCore.xcodeproj/project.pbxproj:
1536         * bindings/js/JSCSSRuleCustom.cpp:
1537         (WebCore::toJS):
1538         * bindings/objc/DOMCSS.mm:
1539         (kitClass):
1540         * bindings/v8/custom/V8CSSRuleCustom.cpp:
1541         (WebCore::toV8):
1542         * css/WebKitCSSRegionRule.cpp:
1543         * css/WebKitCSSRegionRule.h:
1544         * css/WebKitCSSRegionRule.idl:
1545         * page/DOMWindow.idl:
1546
1547 2012-01-20  Nikolas Zimmermann  <nzimmermann@rim.com>
1548
1549         Differentiate between SVG/CSS width/height attributes/properties
1550         https://bugs.webkit.org/show_bug.cgi?id=76447
1551
1552         Reviewed by Antti Koivisto.
1553
1554         Remove a gazillion of hacks out of our SVG implementation, by correctly differentiating between the
1555         SVG width/height attributes and the CSS width/height properties. They need to be treated independently
1556         when handling the intrinsic size negotiation, according to both CSS 2.1 & SVG 1.1 2nd Edition specs.
1557
1558         Fixes several bugs in the LayoutTests/svg/custom/*object*sizing tests, we now match Opera perfectly. FF still has some bugs, and IE9 as well.
1559
1560         * css/svg.css: Remove hardcoded, width/height: 100% on <svg>.
1561         * rendering/RenderBox.h:
1562         (WebCore::RenderBox::computeIntrinsicRatioInformation): Make 'intrinsicRatio' a float, and add 'intrinsicSize' as seperated FloatSize, to avoid confusion.
1563         * rendering/RenderBoxModelObject.cpp:
1564         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions): Add forgotton case for percentage intrinsic sizes, that lead to workarounds in other places, that can now be removed.
1565         * rendering/RenderImage.cpp:
1566         (WebCore::RenderImage::computeReplacedLogicalWidth): Directly use imageHasRelativeWidth/Height(), it does differentiate between SVG/CSS width/height attributes/properties now.
1567         (WebCore::RenderImage::computeIntrinsicRatioInformation): Adapt to 'intrinsicRatio' argument change.
1568         * rendering/RenderImage.h: Ditto.
1569         * rendering/RenderReplaced.cpp: Refactor existing code, break out firstContainingBlockWithLogicalWidth/hasReplacedLogicalWidth/hasReplacedLogicalHeight/hasAutoHeightOrContainingBlockWithAutoHeight.
1570         (WebCore::firstContainingBlockWithLogicalWidth): Refactored.
1571         (WebCore::RenderReplaced::hasReplacedLogicalWidth): Refactored, and exported, so SVGSVGElement::widthAttributeEstablishesViewport() can use it.
1572         (WebCore::hasAutoHeightOrContainingBlockWithAutoHeight): Refactored.
1573         (WebCore::RenderReplaced::hasReplacedLogicalHeight): Refactored, and exported, so SVGSVGElement::heightAttributeEstablishesViewport() can use it.
1574         (WebCore::RenderReplaced::computeReplacedLogicalWidth): Adapt to 'intrinsicRatio' changes ('intrinsicSize' is now decoupled from it). Refactor so that RenderSVGRoot can directly use it as well!
1575         (WebCore::RenderReplaced::computeReplacedLogicalHeight): Ditto.
1576         * rendering/RenderReplaced.h:
1577         * rendering/svg/RenderSVGRoot.cpp:
1578         (WebCore::RenderSVGRoot::computeIntrinsicRatioInformation): Only determine the intrinsic size & ratio using the SVG width/height attributes, not the CSS width/height properties, as it's specified.
1579         (WebCore::resolveLengthAttributeForSVG): Helper function for computeReplacedLogicalWidth/Height, that scales Length values that come from SVG width/height attributes.
1580         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth): Finally remove home-brewn size computation logic - it can be fully shared with RenderReplaced now that we inherit from it.
1581         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight): Ditto.
1582         * rendering/svg/RenderSVGRoot.h:
1583         * rendering/svg/RenderSVGViewportContainer.h:
1584         (WebCore::RenderSVGViewportContainer::viewport): Export viewport() for easier length resolution.
1585         * svg/SVGLengthContext.cpp:
1586         (WebCore::SVGLengthContext::determineViewport): Finally clean up this hell, and make it easy to understand. Only need to resolve lengths against either RenderSVGRoot or RenderSVGViewportContainer now.
1587         * svg/SVGSVGElement.cpp: 
1588         (WebCore::SVGSVGElement::viewport): Remove wrong code and disable this. Its not used, and we have no test coverage for it. Its current implementation didn't make any sense.
1589         (WebCore::SVGSVGElement::parseMappedAttribute): Remove hacks mapping SVG width/height attributes to CSS properties.
1590         (WebCore::SVGSVGElement::svgAttributeChanged): Ditto.
1591         (WebCore::SVGSVGElement::localCoordinateSpaceTransform): Refactored.
1592         (WebCore::SVGSVGElement::currentViewBoxRect): Ditto.
1593         (WebCore::SVGSVGElement::currentViewportSize): Ditto.
1594         (WebCore::SVGSVGElement::widthAttributeEstablishesViewport): Main logic determining if the SVG or CSS properties establish the viewport -  a direct transliteration from the spec.
1595         (WebCore::SVGSVGElement::heightAttributeEstablishesViewport): Ditto.
1596         (WebCore::SVGSVGElement::intrinsicWidth): Helper.
1597         (WebCore::SVGSVGElement::intrinsicHeight): Ditto.
1598         * svg/SVGSVGElement.h:
1599         * svg/graphics/SVGImage.cpp:
1600         (WebCore::SVGImage::size): Cleanup code.
1601         (WebCore::SVGImage::hasRelativeWidth): Added, avoids hacks in RenderBoxModelObject.
1602         (WebCore::SVGImage::hasRelativeHeight): Ditto.
1603         (WebCore::SVGImage::computeIntrinsicDimensions): Make use of new SVGSVGElement::computeIntrinsicDimensions.
1604         * svg/graphics/SVGImage.h:
1605
1606 2012-01-20  Sami Kyostila  <skyostil@chromium.org>
1607
1608         window.innerWidth/Height should not include page scale
1609         https://bugs.webkit.org/show_bug.cgi?id=76555
1610
1611         The DOM attributes window.innerWidth and window.innerHeight should be in
1612         CSS pixels instead of device pixels. Currently the text zoom factor is
1613         cancelled out when calculating these values, but the same also needs to
1614         be done for the page scale.
1615
1616         There is an additional subtlety concerning frames/iframes since their
1617         visible content rectangle is already in (unscaled) CSS pixels. By using
1618         Frame::frameScaleFactor() we avoid unnecessarily cancelling out the page
1619         scale factor in this case.
1620
1621         Reviewed by Kenneth Rohde Christiansen.
1622
1623         Tests: fast/dom/iframe-inner-size-scaling.html
1624                fast/dom/window-inner-size-scaling.html
1625
1626         * page/DOMWindow.cpp:
1627         (WebCore::DOMWindow::innerHeight):
1628         (WebCore::DOMWindow::innerWidth):
1629
1630 2012-01-20  Kinuko Yasuda  <kinuko@chromium.org>
1631
1632         Add DataTransferItems support for drag-and-drop'ed files and texts
1633         https://bugs.webkit.org/show_bug.cgi?id=76367
1634
1635         Reviewed by Tony Chang.
1636
1637         Per http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#the-datatransfer-interface
1638         the new interface should also support drag-and-dropped files and texts in
1639         addition to pasted texts/images.  The user apps should also be able to add
1640         texts/files to the drag store by calling event.dataTransfer.items.add().
1641
1642         This patch adds drag-and-drop'ed items support in DataTransferItem and
1643         DataTransferItemList so that they work for dropped files and texts (as well as
1644         the copy-pasted texts/images).
1645
1646         This patch also adds customized toJS()/toV8() code to Blob/File javascript
1647         binding so that the JS code can get either Blob or File underlying object
1648         where the API returns Blob. This change is necessary since we return Blob
1649         from DataTransferItem.getAsFile() for pasted images but want to return File
1650         for dropped files.
1651
1652         Tests: editing/pasteboard/data-transfer-items-drag-drop-file.html
1653                editing/pasteboard/data-transfer-items-drag-drop-string.html
1654
1655         * GNUmakefile.list.am: Added entries for the new {JS,V8}BlobCustom.
1656         * Target.pri: Ditto.
1657         * UseJSC.cmake: Ditto.
1658         * WebCore.gypi: Ditto.
1659         * bindings/js/JSBindingsAllInOne.cpp: Ditto.
1660         * bindings/js/JSBlobCustom.cpp: Added toJS custom code that returns File or
1661         Blob depending on the return value of isFile().
1662         (WebCore::toJS):
1663         * bindings/v8/custom/V8BlobCustom.cpp: Added toV8 custom code.
1664         (WebCore::toV8):
1665         * dom/DataTransferItem.h: Added a new create() method which takes File.
1666         * dom/DataTransferItemList.cpp: Added add(File) method.
1667         (WebCore::DataTransferItemList::add):
1668         * dom/DataTransferItemList.h: Ditto.
1669         * dom/DataTransferItemList.idl: Ditto.
1670         * fileapi/Blob.idl: Added CustomToJS for toJS/toV8.
1671         * platform/chromium/ClipboardChromium.cpp: Added code for drag-and-drop'ed items.
1672         (WebCore::ClipboardChromium::items): Revised.
1673         (WebCore::ClipboardChromium::mayUpdateItems): Added.
1674         (WebCore::ClipboardChromium::isStorageUpdated): Added.
1675         * platform/chromium/ClipboardChromium.h:
1676         * platform/chromium/DataTransferItemChromium.cpp: Added a new constructor that
1677         takes File and updated getAsFile() to make it support dropped files.
1678         (WebCore::DataTransferItem::create):
1679         (WebCore::DataTransferItemChromium::DataTransferItemChromium):
1680         (WebCore::DataTransferItemChromium::getAsFile):
1681         * platform/chromium/DataTransferItemChromium.h:
1682         * platform/chromium/DataTransferItemListChromium.cpp:
1683         (WebCore::DataTransferItemListChromium::addInternalItem):
1684         * platform/chromium/DataTransferItemListChromium.cpp: Added overrides implementation for m_item accessors to make them reflect the changes in the owner clipboard.
1685         (WebCore::DataTransferItemListChromium::length):
1686         (WebCore::DataTransferItemListChromium::item):
1687         (WebCore::DataTransferItemListChromium::deleteItem):
1688         (WebCore::DataTransferItemListChromium::clear):
1689         (WebCore::DataTransferItemListChromium::add):
1690         (WebCore::DataTransferItemListChromium::mayUpdateItems): Added.
1691         * platform/qt/DataTransferItemQt.cpp: Added a new constructor that takes File and updated
1692         getAsFile() to make it support dropped files.
1693         (WebCore::DataTransferItem::create):
1694         (WebCore::DataTransferItemQt::DataTransferItemQt):
1695         (WebCore::DataTransferItemQt::getAsFile):
1696         * platform/qt/DataTransferItemQt.h:
1697
1698 2012-01-20  Alexis Menard  <alexis.menard@openbossa.org>
1699
1700         remove CSSBorderImageValue
1701         https://bugs.webkit.org/show_bug.cgi?id=75563
1702
1703         Reviewed by Tony Chang.
1704
1705         Remove CSSBorderImageValue as border-image is a shorthand therefore we don't
1706         need a dedicated CSS class type for it. CSSBorderImageValue was here for
1707         -webkit-border-image which is not a shorthand. This is the first step to move border-image
1708         close to a correct shorthand implementation while keeping -webkit-border-image being a regular
1709         CSS property.
1710
1711         No new tests : It's a refactor, existing tests should cover it.
1712
1713         * CMakeLists.txt:
1714         * GNUmakefile.list.am:
1715         * Target.pri:
1716         * WebCore.gypi:
1717         * WebCore.order:
1718         * WebCore.vcproj/WebCore.vcproj:
1719         * WebCore.xcodeproj/project.pbxproj:
1720         * css/CSSAllInOne.cpp:
1721         * css/CSSBorderImage.cpp: Added.
1722         (WebCore::createBorderImageValue):
1723         * css/CSSBorderImage.h: Added.
1724         * css/CSSBorderImageValue.cpp: Removed.
1725         * css/CSSBorderImageValue.h: Removed.
1726         * css/CSSComputedStyleDeclaration.cpp:
1727         (WebCore::valueForNinePieceImage):
1728         * css/CSSParser.cpp:
1729         (WebCore::BorderImageParseContext::commitBorderImage):
1730         * css/CSSStyleSelector.cpp:
1731         (WebCore::CSSStyleSelector::mapNinePieceImage):
1732         * css/CSSValue.cpp:
1733         (WebCore::CSSValue::addSubresourceStyleURLs):
1734         (WebCore::CSSValue::cssText):
1735         (WebCore::CSSValue::destroy):
1736         * css/CSSValue.h:
1737
1738 2012-01-20  Hayato Ito  <hayato@chromium.org>
1739
1740         Add ShadowRoot.idl which is enabled by newly introduced SHADOW_DOM flag.
1741         https://bugs.webkit.org/show_bug.cgi?id=76353
1742
1743         Reviewed by Hajime Morita.
1744
1745         Add ShadowRoot.idl, which is enabled only on chromium port since this is
1746         under development feature.
1747         ShadowRoot.idl contains minimum API so that we can test it.
1748         Other APIs should be added on other changes so that we can isolate issues.
1749
1750         Test: fast/dom/shadow/shadow-root-js-api.html
1751
1752         * WebCore.gypi:
1753         * bindings/generic/RuntimeEnabledFeatures.cpp:
1754         * bindings/generic/RuntimeEnabledFeatures.h:
1755         (WebCore::RuntimeEnabledFeatures::shadowDOMEnabled):
1756         (WebCore::RuntimeEnabledFeatures::setShadowDOMEnabled):
1757         * dom/ShadowRoot.h:
1758         (WebCore::ShadowRoot::host):
1759         * dom/ShadowRoot.idl: Added.
1760         * testing/Internals.cpp:
1761         (WebCore::Internals::ensureShadowRoot):
1762         (WebCore::Internals::shadowRoot):
1763         * testing/Internals.h:
1764         * testing/Internals.idl:
1765
1766 2012-01-19  Kent Tamura  <tkent@chromium.org>
1767
1768         Change LocalizedNumber interface
1769         https://bugs.webkit.org/show_bug.cgi?id=76613
1770
1771         Reviewed by Hajime Morita.
1772
1773         Change the functions of LocalizedNumber from:
1774           double parseLocalizedNumber(const String&);
1775           String formatLocalizedNumber(double, unsigned fractionDigits);
1776         To:
1777           String convertToLocalizedNumber(const String&, usnigned fractionDigits);
1778           String convertFromLocalizedNumber(const String&);
1779         in order that we can avoid conversion from/to a double value.
1780
1781         The fractionDigits argumetn of convertToLocalizedNumber() will be
1782         removed in the future.  We need it because we'd like to recycle the old
1783         functions to implement new functions for now and functions in
1784         LocalizedNumber can't call functions in HTMLParserIdioms.cpp.
1785
1786         No new tests because the change doesn't make any behavior change.
1787
1788         * html/NumberInputType.cpp:
1789         (WebCore::NumberInputType::visibleValue):
1790         Use convertToLocalizedNumber.
1791         (WebCore::NumberInputType::convertFromVisibleValue):
1792         Use convertFromLocalizedNumber.
1793         (WebCore::NumberInputType::isAcceptableValue): ditto.
1794         * platform/text/LocalizedNumber.h:
1795         Remove parseLocalizedNumber and formatLocalizedNumber, and
1796         introduce convertToLocalizedNumber and convertFromLocalizedNumber.
1797         * platform/text/LocalizedNumberICU.cpp:
1798         (WebCore::parseLocalizedNumber): Make this static.
1799         (WebCore::formatLocalizedNumber): Make this static.
1800         (WebCore::convertToLocalizedNumber): Implement this with formatLocalizedNumber.
1801         (WebCore::convertFromLocalizedNumber): Implement this with parseLocalizedNumber.
1802         * platform/text/LocalizedNumberNone.cpp:
1803         (WebCore::convertToLocalizedNumber):
1804         Implement this as a function returning the input string.
1805         (WebCore::convertFromLocalizedNumber): ditto.
1806         * platform/text/mac/LocalizedNumberMac.mm:
1807         (WebCore::parseLocalizedNumber): Make this static.
1808         (WebCore::formatLocalizedNumber): Make this static.
1809         (WebCore::convertToLocalizedNumber): Implement this with formatLocalizedNumber.
1810         (WebCore::convertFromLocalizedNumber): Implement this with parseLocalizedNumber.
1811
1812 2012-01-19  Pavel Feldman  <pfeldman@google.com>
1813
1814         Web Inspector: problem with Ctrl - <arrows> shortcuts in Scripts panel
1815         https://bugs.webkit.org/show_bug.cgi?id=76622
1816
1817         Reviewed by Yury Semikhatsky.
1818
1819         * inspector/front-end/InspectorView.js:
1820         (WebInspector.InspectorView.prototype._keyDown):
1821         * inspector/front-end/TextViewer.js:
1822         (WebInspector.TextViewer.prototype.set readOnly):
1823         (WebInspector.TextViewer.prototype._cancelEditing):
1824         (WebInspector.TextViewer.prototype.wasShown):
1825         (WebInspector.TextViewer.prototype.willHide):
1826         * inspector/front-end/UIUtils.js:
1827         (WebInspector.isInEditMode):
1828         * inspector/front-end/inspector.js:
1829         (WebInspector.documentKeyDown):
1830
1831 2012-01-19  Kaustubh Atrawalkar  <kaustubh@motorola.com> & Erik Arvidsson  <arv@chromium.org>
1832
1833         Migrate createObjectURL & revokeObjectURL to static (Class) methods.
1834         https://bugs.webkit.org/show_bug.cgi?id=74386
1835
1836         Reviewed by Adam Barth.
1837
1838         Test: fast/dom/DOMURL/check-instanceof-domurl-functions.html
1839         Already Existing -
1840             fast/files/revoke-blob-url.html
1841             fast/dom/window-domurl-crash.html
1842             fast/files/apply-blob-url-to-img.html
1843             fast/files/create-blob-url-crash.html
1844             fast/files/workers/inline-worker-via-blob-url.html
1845
1846         * html/DOMURL.cpp: Added HashMap for local static objects.
1847         (WebCore::PublicURLManager::PublicURLManager):
1848         (WebCore::PublicURLManager::contextDestroyed):
1849         (WebCore::PublicURLManager::blobURLs):
1850         (WebCore::PublicURLManager::streamURLs):
1851         (WebCore::publicURLManagerMap):
1852         (WebCore::publicURLManager):
1853         (WebCore::publicBlobURLs):
1854         (WebCore::publicStreamURLs):
1855         (WebCore::DOMURL::createObjectURL): Changed to static.
1856         (WebCore::DOMURL::revokeObjectURL): ditto.
1857         * html/DOMURL.h:
1858         (WebCore::DOMURL::create):
1859         (WebCore::DOMURL::~DOMURL):
1860         (WebCore::DOMURL::DOMURL):
1861         * html/DOMURL.idl:
1862         * page/DOMWindow.cpp: Removed object initialization for DOMURL.
1863         * page/DOMWindow.h: ditto.
1864         * page/DOMWindow.idl: ditto.
1865         * workers/WorkerContext.cpp: ditto.
1866         * workers/WorkerContext.h: ditto.
1867         * workers/WorkerContext.idl: ditto.
1868
1869 2012-01-20  Alexandru Chiculita  <achicu@adobe.com>
1870
1871         CSS Shaders: Add a Settings flag to enable/disable CSS Shaders at runtime
1872         https://bugs.webkit.org/show_bug.cgi?id=76444
1873         
1874         Added setCSSCustomFilterEnabled/isCSSCustomFilterEnabled that is false by default.
1875         I've enabled it by default on Apple Mac, to make sure there's no behavior change. Anyway, CSS shaders need
1876         WebGL enabled, so it ends up being disabled by default.
1877
1878         Reviewed by Nikolas Zimmermann.
1879
1880         Test: css3/filters/effect-custom-disabled.html
1881
1882         * css/CSSParser.cpp:
1883         (WebCore::CSSParser::parseFilter):
1884             Do not parse the custom() function when shaders are disabled.
1885             
1886         * css/CSSStyleSelector.cpp:
1887         (WebCore::CSSStyleSelector::applyProperty):
1888             Do not overwrite the old style->filter() if parsing fails.
1889             
1890         (WebCore::CSSStyleSelector::createFilterOperations):
1891             Do not continue if one custom() filter fails to parse.
1892             
1893         * page/Settings.cpp:
1894         (WebCore::Settings::Settings):
1895         * page/Settings.h:
1896         (WebCore::Settings::setCSSCustomFilterEnabled):
1897         (WebCore::Settings::isCSSCustomFilterEnabled):
1898         * rendering/FilterEffectRenderer.cpp:
1899         (WebCore::isCSSCustomFilterEnabled):
1900         (WebCore::FilterEffectRenderer::build):
1901             Avoid creating the filter when shaders are disabled. It may happen to get here if shaders were disabled between parsing and rendering.
1902         
1903 2012-01-19  Shinya Kawanaka  <shinyak@google.com>
1904
1905         Node::canHaveLightChildRendererWithShadow is not used anywhere.
1906         https://bugs.webkit.org/show_bug.cgi?id=76627
1907
1908         Reviewed by Darin Adler.
1909
1910         Since Node::canHaveLightChildRendererWithShadow is not overriden anywhere, and it returns always false.
1911         We can remove it.
1912
1913         No new tests, because no change in behavior.
1914
1915         * dom/Node.h:
1916         * dom/NodeRenderingContext.cpp:
1917         (WebCore::NodeRenderingContext::shouldCreateRenderer):
1918
1919 2012-01-19  Kinuko Yasuda  <kinuko@chromium.org>
1920
1921         Cleanup: make constant variable names in fileapi/ conform to WebKit's coding guideline
1922         https://bugs.webkit.org/show_bug.cgi?id=76625
1923
1924         Reviewed by David Levin.
1925
1926         No new tests as this patch has no functional changes.
1927
1928         * fileapi/BlobURL.cpp:
1929         (WebCore::BlobURL::getIdentifier):
1930         (WebCore::BlobURL::createBlobURL):
1931         * fileapi/BlobURL.h:
1932         * fileapi/FileWriter.cpp:
1933         (WebCore::FileWriter::write):
1934         (WebCore::FileWriter::truncate):
1935         * platform/AsyncFileSystem.cpp:
1936         (WebCore::AsyncFileSystem::crackFileSystemURL):
1937         (WebCore::AsyncFileSystem::toURL):
1938         (WebCore::AsyncFileSystem::isAvailable):
1939         * platform/AsyncFileSystem.h:
1940
1941 2012-01-18  Sam Weinig  <sam@webkit.org>
1942
1943         Move RunLoop to WebCore/platform
1944         https://bugs.webkit.org/show_bug.cgi?id=76471
1945
1946         Reviewed by Anders Carlsson.
1947
1948         * GNUmakefile.list.am:
1949         * Target.pri:
1950         * WebCore.exp.in:
1951         * WebCore.vcproj/WebCore.vcproj:
1952         * WebCore.xcodeproj/project.pbxproj:
1953         Add newly moved files.
1954
1955         * platform/RunLoop.cpp: Moved from Source/WebKit2/Platform/RunLoop.cpp.
1956         * platform/RunLoop.h: Moved from Source/WebKit2/Platform/RunLoop.h.
1957         * platform/gtk/RunLoopGtk.cpp: Moved from Source/WebKit2/Platform/gtk/RunLoopGtk.cpp.
1958         * platform/mac/RunLoopMac.mm: Moved from Source/WebKit2/Platform/mac/RunLoopMac.mm.
1959         * platform/qt/RunLoopQt.cpp: Moved from Source/WebKit2/Platform/qt/RunLoopQt.cpp.
1960         * platform/win/RunLoopWin.cpp: Moved from Source/WebKit2/Platform/win/RunLoopWin.cpp.
1961         Move the files.
1962
1963 2012-01-19  Pablo Flouret  <pablof@motorola.com>
1964
1965         Fix inconsistent text selection behavior with option-shift-left/right/up/down.
1966         https://bugs.webkit.org/show_bug.cgi?id=75652
1967
1968         Reviewed by Enrica Casucci.
1969
1970         On Mac, selecting backwards by word, line or paragraph from the middle
1971         of some text, and then going forward leaves the caret back in the middle
1972         with no selection, instead of directly selecting to the other end of the
1973         word/line/paragraph (Unix/Windows behavior). Fix this by adding a new
1974         editing behavior to control whether the selection should go across the
1975         initial position of the caret directly or not in situations like the one
1976         outlined above.
1977
1978         Test: editing/selection/selection-extend-should-not-move-across-caret-on-mac.html
1979
1980         * editing/EditingBehavior.h:
1981         (WebCore::EditingBehavior::shouldExtendSelectionByWordOrLineAcrossCaret):
1982         * editing/FrameSelection.cpp:
1983         (WebCore::FrameSelection::modify):
1984
1985 2012-01-19  Simon Fraser  <simon.fraser@apple.com>
1986
1987         Regression (r98735): Video chat moles in Gmail render incorrectly on Mac OS
1988         https://bugs.webkit.org/show_bug.cgi?id=75682
1989
1990         Reviewed by James Robinson.
1991         
1992         RenderLayerBacking::isSimpleContainerCompositingLayer() gave incorret
1993         results in the case where the layer itself was visibility:hidden, but
1994         where it had visible, non-composited descendant layers.
1995         
1996         Fix by breaking RenderLayerBacking::hasVisibleNonCompositingDescendants()
1997         into two methods, one that tests for renderers in this layer which
1998         render stuff (and are thus affected by visibility on this layer), and
1999         another which walks descendant, non-composited layers looking for those
2000         which are visible.
2001         
2002         Removed an early return in the "renderObject->node()->isDocumentNode()"
2003         clause, because we want to run the same code that we run for non-document
2004         nodes.
2005
2006         Test: compositing/visibility/layer-visible-content.html
2007
2008         * rendering/RenderLayerBacking.cpp:
2009         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
2010         (WebCore::RenderLayerBacking::containsNonEmptyRenderers):
2011         (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers):
2012         * rendering/RenderLayerBacking.h:
2013
2014 2012-01-19  Alexandre Elias  <aelias@google.com>
2015
2016         [chromium] Draw gutter quads outside root content layer
2017         https://bugs.webkit.org/show_bug.cgi?id=76328
2018
2019         Reviewed by James Robinson.
2020
2021         Add new layer property "backgroundCoversViewport".  If the content
2022         layers don't fully cover the render surface, this code calculates the
2023         difference between the root clip rect and the root content layer and
2024         draws up to four background-color quads in exactly the area that would
2025         be undrawn.
2026
2027         Test: CCTiledLayerImplTest::backgroundCoversViewport
2028
2029         * platform/graphics/chromium/LayerChromium.cpp:
2030         (WebCore::LayerChromium::LayerChromium):
2031         (WebCore::LayerChromium::setBackgroundCoversViewport):
2032         (WebCore::LayerChromium::pushPropertiesTo):
2033         * platform/graphics/chromium/LayerChromium.h:
2034         (WebCore::LayerChromium::backgroundCoversViewport):
2035         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2036         (WebCore::CCLayerImpl::CCLayerImpl):
2037         (WebCore::CCLayerImpl::setBackgroundCoversViewport):
2038         * platform/graphics/chromium/cc/CCLayerImpl.h:
2039         (WebCore::CCLayerImpl::backgroundCoversViewport):
2040         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2041         (WebCore::CCTiledLayerImpl::appendQuads):
2042
2043 2012-01-19  Cary Clark  <caryclark@google.com>
2044
2045         [Skia Mac] Match style of platform error underline for misspellings
2046         https://bugs.webkit.org/show_bug.cgi?id=76556
2047
2048         Reviewed by Stephen White.
2049
2050         Add Darwin-specific code in Skia to draw the error underline so that
2051         it matches the CoreGraphics style.
2052
2053         Many existing layout tests inadvertantly trigger the misspelling
2054         underline by including the word 'foo' in an editable field. Those
2055         tests are temporarily suppressed separately in an edit to
2056         test_expectations.txt.
2057
2058         * platform/graphics/skia/GraphicsContextSkia.cpp:
2059         (WebCore::GraphicsContext::drawLineForTextChecking):
2060
2061 2012-01-19  No'am Rosenthal  <noam.rosenthal@nokia.com>
2062
2063         [Texmap] TextureMapper creates two many big intermediate surfaces
2064         https://bugs.webkit.org/show_bug.cgi?id=76336
2065
2066         Reviewed by Simon Hausmann.
2067
2068         The following has been done to optimize surface allocation:
2069         1. Instead of using a viewport-size surface, use a surface in the size of the layer's
2070            bounding rect and apply the transform after the content has been rendered into it.
2071         2. Avoid generating intermediate surface for occasions where they're not necessary,
2072            such as nested reflections without opacity.
2073         3. Releasing of textures from the pool is now implicit, based on refCount.
2074         4. Do not use intermediate surfaces for preserve-3d layers. This is in alignment with
2075            other ports.
2076
2077         Tests in LayoutTests/compositing/masks and LayoutTests/compositing/reflection cover this.
2078
2079         * platform/graphics/texmap/TextureMapper.cpp:
2080         (WebCore::TextureMapper::acquireTextureFromPool):
2081         * platform/graphics/texmap/TextureMapper.h:
2082         * platform/graphics/texmap/TextureMapperNode.cpp:
2083         (WebCore::TextureMapperNode::paintSelf):
2084         (WebCore::TextureMapperNode::paintSelfAndChildren):
2085         (WebCore::TextureMapperNode::intermediateSurfaceRect):
2086         (WebCore::TextureMapperNode::shouldPaintToIntermediateSurface):
2087         (WebCore::TextureMapperNode::isVisible):
2088         (WebCore::TextureMapperNode::paintSelfAndChildrenWithReplica):
2089         (WebCore::TextureMapperNode::paintRecursive):
2090         (WebCore::TextureMapperNode::syncCompositingStateSelf):
2091         (WebCore::TextureMapperNode::syncCompositingState):
2092         * platform/graphics/texmap/TextureMapperNode.h:
2093         (WebCore::TextureMapperPaintOptions::TextureMapperPaintOptions):
2094
2095 2012-01-19  Eric Seidel  <eric@webkit.org>
2096
2097         Assertion failure in WebCore::HTMLFrameElementBase::insertedIntoDocument()
2098         https://bugs.webkit.org/show_bug.cgi?id=50312
2099
2100         Reviewed by Alexey Proskuryakov.
2101
2102         Removed the ASSERT and updated the comment.
2103
2104         Test: fast/frames/assert-on-insertedIntoDocument.html
2105
2106         * html/HTMLFrameElementBase.cpp:
2107         (WebCore::HTMLFrameElementBase::insertedIntoDocument):
2108
2109 2012-01-19  James Robinson  <jamesr@chromium.org>
2110
2111         [chromium] Remove CCLayerDelegate, add ContentLayerDelegate for painting
2112         https://bugs.webkit.org/show_bug.cgi?id=76663
2113
2114         Reviewed by Kenneth Russell.
2115
2116         CCLayerDelegate used to be an interface with a half-dozen callbacks on it, but now it has only one call -
2117         paintContents() - and that one call is only valid for one subclass of LayerChromium, ContentLayerChromium. This
2118         removes the CCLayerDelegate pointer from LayerChromium and adds a ContentLayerDelegate for the paint call.
2119
2120         The majority of the code changes in this patch are removing the nil parameter from various places that construct
2121         LayerChromium instances. Also tightens the type of GraphicsLayerChromium::m_layer to ContentLayerChromium.
2122
2123         Refactoring/removing dead code, so no new tests.
2124
2125         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
2126         (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium):
2127         * platform/graphics/chromium/CanvasLayerChromium.cpp:
2128         (WebCore::CanvasLayerChromium::CanvasLayerChromium):
2129         * platform/graphics/chromium/CanvasLayerChromium.h:
2130         * platform/graphics/chromium/ContentLayerChromium.cpp:
2131         (WebCore::ContentLayerPainter::create):
2132         (WebCore::ContentLayerPainter::ContentLayerPainter):
2133         (WebCore::ContentLayerChromium::create):
2134         (WebCore::ContentLayerChromium::ContentLayerChromium):
2135         * platform/graphics/chromium/ContentLayerChromium.h:
2136         (WebCore::ContentLayerDelegate::~ContentLayerDelegate):
2137         (WebCore::ContentLayerChromium::clearDelegate):
2138         * platform/graphics/chromium/DrawingBufferChromium.cpp:
2139         (WebCore::DrawingBuffer::platformLayer):
2140         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
2141         (WebCore::GraphicsLayerChromium::~GraphicsLayerChromium):
2142         (WebCore::GraphicsLayerChromium::setContentsToImage):
2143         (WebCore::GraphicsLayerChromium::setContentsToCanvas):
2144         (WebCore::GraphicsLayerChromium::setContentsToMedia):
2145         (WebCore::GraphicsLayerChromium::updateLayerPreserves3D):
2146         * platform/graphics/chromium/GraphicsLayerChromium.h:
2147         * platform/graphics/chromium/ImageLayerChromium.cpp:
2148         (WebCore::ImageLayerChromium::create):
2149         (WebCore::ImageLayerChromium::ImageLayerChromium):
2150         * platform/graphics/chromium/ImageLayerChromium.h:
2151         * platform/graphics/chromium/LayerChromium.cpp:
2152         (WebCore::LayerChromium::create):
2153         (WebCore::LayerChromium::LayerChromium):
2154         * platform/graphics/chromium/LayerChromium.h:
2155         * platform/graphics/chromium/PluginLayerChromium.cpp:
2156         (WebCore::PluginLayerChromium::create):
2157         (WebCore::PluginLayerChromium::PluginLayerChromium):
2158         * platform/graphics/chromium/PluginLayerChromium.h:
2159         * platform/graphics/chromium/TiledLayerChromium.cpp:
2160         (WebCore::TiledLayerChromium::TiledLayerChromium):
2161         (WebCore::TiledLayerChromium::drawsContent):
2162         * platform/graphics/chromium/TiledLayerChromium.h:
2163         * platform/graphics/chromium/VideoLayerChromium.cpp:
2164         (WebCore::VideoLayerChromium::create):
2165         (WebCore::VideoLayerChromium::VideoLayerChromium):
2166         * platform/graphics/chromium/VideoLayerChromium.h:
2167         * platform/graphics/chromium/WebGLLayerChromium.cpp:
2168         (WebCore::WebGLLayerChromium::create):
2169         (WebCore::WebGLLayerChromium::WebGLLayerChromium):
2170         * platform/graphics/chromium/WebGLLayerChromium.h:
2171
2172 2012-01-19  Greg Billock  <gbillock@google.com>
2173
2174         [Coverity] Fix uninitialized constructor defects in .../html
2175         https://bugs.webkit.org/show_bug.cgi?id=74965
2176
2177         Reviewed by Simon Fraser.
2178
2179         Test: fast/canvas/script-tests/canvas-webkitLineDash.js
2180
2181         * html/HTMLFormCollection.cpp:
2182         (WebCore::HTMLFormCollection::HTMLFormCollection):
2183         * html/StepRange.cpp:
2184         (WebCore::StepRange::StepRange):
2185         * html/canvas/CanvasRenderingContext2D.cpp:
2186         (WebCore::CanvasRenderingContext2D::State::State):
2187         * html/canvas/CanvasStyle.h:
2188         (WebCore::CanvasStyle::CMYKAValues::CMYKAValues):
2189         * html/canvas/WebGLGetInfo.cpp:
2190         (WebCore::WebGLGetInfo::WebGLGetInfo):
2191         * html/parser/CSSPreloadScanner.cpp:
2192         (WebCore::CSSPreloadScanner::CSSPreloadScanner):
2193         * html/track/WebVTTParser.cpp:
2194         (WebCore::WebVTTParser::WebVTTParser):
2195
2196 2012-01-19  Alexandru Chiculita  <achicu@adobe.com>
2197
2198         CSS Shaders: Remove the setTimeout from the layout tests
2199         https://bugs.webkit.org/show_bug.cgi?id=76535
2200
2201         Reviewed by Tony Chang.
2202
2203         We had setTimeout on old tests because the snapshot picture was taken too early, before the shaders were loaded.
2204         The problem was that the RenderLayer was notified that the shader was loaded only after the onload event was triggered,
2205         so a simple setTimeout(0) would have fixed the issue, but better than that would be to to always call CachedResource::data 
2206         in CachedShader::data, which notifies the load earlier (before onload).
2207
2208         No new tests, just removed the setTimeout from old ones.
2209
2210         * loader/cache/CachedShader.cpp:
2211         (WebCore::CachedShader::data):
2212
2213 2012-01-19  Min Qin  <qinmin@google.com>
2214
2215         Improve touch handling performance by reusing the hitTest result
2216         https://bugs.webkit.org/show_bug.cgi?id=75506
2217
2218         Reviewed by Adam Barth.
2219
2220         This is a performance optimization and should not cause behavior changes. Existing tests should cover it.
2221
2222         * page/EventHandler.cpp:
2223         (WebCore::EventHandler::handleTouchEvent):
2224
2225 2012-01-19  Jon Lee  <jonlee@apple.com>
2226
2227         Add text-overflow support that allows placeholder and value text to show an ellipsis when not focused
2228         https://bugs.webkit.org/show_bug.cgi?id=76118
2229         <rdar://problem/9271742>
2230
2231         Reviewed by Dan Bernstein.
2232
2233         Tests: fast/css/text-overflow-input-focus-placeholder-expected.html
2234                fast/css/text-overflow-input-focus-placeholder.html
2235                fast/css/text-overflow-input-focus-value-expected.html
2236                fast/css/text-overflow-input-focus-value.html
2237                fast/css/text-overflow-input.html
2238
2239         * rendering/RenderTextControlSingleLine.cpp:
2240         (WebCore::RenderTextControlSingleLine::styleDidChange): When the style of the text control
2241         changes, we update the text overflow property of the placeholder.
2242         (WebCore::RenderTextControlSingleLine::createInnerTextStyle): When the style of the text control
2243         changes, we update the text overflow property of the inner text block.
2244         (WebCore::RenderTextControlSingleLine::textShouldBeTruncated): The text of the value and placeholder should
2245         only contain the ellipsis if the input's text-overflow property is set to ellipsis, and the input is not focused.
2246         * rendering/RenderTextControlSingleLine.h:
2247
2248 2012-01-19  Mark Hahnenberg  <mhahnenberg@apple.com>
2249
2250         Implement a new allocator for backing stores
2251         https://bugs.webkit.org/show_bug.cgi?id=75181
2252
2253         Reviewed by Filip Pizlo.
2254
2255         No new tests.
2256
2257         Added forwarding header for new CheckedBoolean used in the bump allocator.
2258
2259         * ForwardingHeaders/wtf/CheckedBoolean.h: Added.
2260
2261 2012-01-13  Ryosuke Niwa  <rniwa@webkit.org>
2262
2263         Crash in CompositeEditCommand::ensureComposition
2264         https://bugs.webkit.org/show_bug.cgi?id=76207
2265
2266         Reviewed by Chang Shu.
2267
2268         The crash was caused by TypingCommand not kept alive when new editing commands are executed
2269         during adding more typings to the open last typing command since m_lastEditCommand is replaced
2270         by the new command. Fixed the bug by keeping them alive a little longer with RefPtr.
2271
2272         Test: editing/execCommand/editing-command-while-executing-typing-command-crash.html
2273
2274         * editing/FrameSelection.cpp:
2275         (WebCore::shouldStopBlinkingDueToTypingCommand):
2276         (WebCore::FrameSelection::updateAppearance):
2277         * editing/TypingCommand.cpp:
2278         (WebCore::TypingCommand::deleteSelection):
2279         (WebCore::TypingCommand::deleteKeyPressed):
2280         (WebCore::TypingCommand::forwardDeleteKeyPressed):
2281         (WebCore::TypingCommand::insertText):
2282         (WebCore::TypingCommand::insertLineBreak):
2283         (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent):
2284         (WebCore::TypingCommand::insertParagraphSeparator):
2285         (WebCore::TypingCommand::lastTypingCommandIfStillOpenForTyping):
2286         (WebCore::TypingCommand::closeTyping):
2287         * editing/TypingCommand.h:
2288
2289 2012-01-19  Andreas Kling  <awesomekling@apple.com>
2290
2291         Unreviewed debug build fix.
2292
2293         Remove ASSERT that the cached match is cacheable (we don't store that flag anymore.)
2294
2295         * css/CSSStyleSelector.cpp:
2296         (WebCore::CSSStyleSelector::findFromMatchedDeclarationCache):
2297
2298 2012-01-19  Robert Hogan  <robert@webkit.org>
2299
2300         Fix Debug build after r105433
2301
2302         Unreviewed, build fix.
2303
2304         * rendering/RenderTable.cpp:
2305         (WebCore::RenderTable::recalcCollapsedBorders):
2306
2307 2012-01-19  Andreas Kling  <awesomekling@apple.com>
2308
2309         CSSStyleSelector: Factor 'isCacheable' flag out of MatchedResult.
2310         <http://webkit.org/b/76376>
2311
2312         Reviewed by Antti Koivisto.
2313
2314         Break up the MatchResult struct into MatchResult and MatchRanges. The matched
2315         declaration cache only needs the ranges, so we save 4 bytes per entry.
2316
2317         * css/CSSStyleSelector.cpp:
2318         (WebCore::CSSStyleSelector::matchAllRules):
2319         (WebCore::CSSStyleSelector::matchUARules):
2320         (WebCore::CSSStyleSelector::pseudoStyleForElement):
2321         (WebCore::CSSStyleSelector::pseudoStyleRulesForElement):
2322         (WebCore::operator==):
2323         (WebCore::operator!=):
2324         (WebCore::CSSStyleSelector::findFromMatchedDeclarationCache):
2325         (WebCore::CSSStyleSelector::addToMatchedDeclarationCache):
2326         (WebCore::CSSStyleSelector::applyMatchedDeclarations):
2327         * css/CSSStyleSelector.h:
2328         (WebCore::CSSStyleSelector::MatchRanges::MatchRanges):
2329         (WebCore::CSSStyleSelector::MatchResult::MatchResult):
2330
2331 2012-01-19  Eric Carlson  <eric.carlson@apple.com>
2332
2333         https://bugs.webkit.org/show_bug.cgi?id=75192
2334
2335         Reviewed by Darin Adler.
2336
2337         Notify the media element when tracks are added to and removed from a document instead of
2338         a tree because we don't want to trigger loading unless a track element is in the document.
2339
2340         Test: media/track/track-delete-during-setup.html
2341
2342         * html/HTMLMediaElement.cpp:
2343         (WebCore::HTMLMediaElement::trackWasRemoved): Renamed from trackWillBeRemoved because it is
2344             now called after removal.
2345         * html/HTMLMediaElement.h:
2346
2347         * html/HTMLTrackElement.cpp:
2348         (WebCore::HTMLTrackElement::insertedIntoDocument): Was insertedIntoTree. Use this instead
2349             because we care about when a track is inserted and removed from a document, not a tree.
2350         (WebCore::HTMLTrackElement::removedFromDocument): Ditto.
2351         * html/HTMLTrackElement.h:
2352
2353 2012-01-18  Robert Hogan  <robert@webkit.org>
2354
2355         Hit ASSERTION FAILED: table()->collapseBorders() on techcrunch.com
2356         https://bugs.webkit.org/show_bug.cgi?id=76405
2357
2358         Reviewed by Julien Chaffraix.
2359
2360         Tests: fast/css/nested-table-with-collapsed-borders.html
2361
2362         Change recalcCollapsedBorders() so that it only collects border values for the current
2363         table. Calculating the borders for nested tables was wrong as well as wasting cycles, though it would never
2364         have impacted rendering since a cell only paints the borders that match its own.
2365
2366         * rendering/RenderTable.cpp:
2367         (WebCore::RenderTable::recalcCollapsedBorders):
2368
2369 2012-01-18  Jer Noble  <jer.noble@apple.com>
2370
2371         Make WebAudio API const-correct.
2372         https://bugs.webkit.org/show_bug.cgi?id=76573
2373
2374         Reviewed by Daniel Bates.
2375
2376         No new tests; no net change in functionality, so covered by existing tests.
2377
2378         The non-const data() accessor was renamed mutableData() to expose const-correctness
2379         bugs during compile time:
2380         * platform/audio/AudioChannel.h:
2381         (WebCore::AudioChannel::mutableData):
2382
2383         The following functions were made const correct:
2384         * platform/audio/AudioArray.h:
2385         (WebCore::AudioArray::copyToRange):
2386         * platform/audio/AudioBus.h:
2387         (WebCore::AudioBus::createBufferFromRange):
2388         (WebCore::AudioBus::createBySampleRateConverting):
2389         (WebCore::AudioBus::createByMixingToMono):
2390         * platform/audio/FFTConvolver.cpp:
2391         (WebCore::FFTConvolver::process):
2392         * platform/audio/FFTConvolver.h:
2393         * platform/audio/FFTFrame.cpp:
2394         (WebCore::FFTFrame::doPaddedFFT):
2395         (WebCore::FFTFrame::doFFT):
2396         * platform/audio/FFTFrame.h:
2397         * platform/audio/ReverbConvolverStage.cpp:
2398         (WebCore::ReverbConvolverStage::ReverbConvolverStage):
2399         (WebCore::ReverbConvolverStage::process):
2400         * platform/audio/ReverbConvolverStage.h:
2401         * platform/audio/ReverbInputBuffer.cpp:
2402         (WebCore::ReverbInputBuffer::write):
2403         * platform/audio/ReverbInputBuffer.h:
2404         * platform/audio/SincResampler.cpp:
2405         (WebCore::SincResampler::process):
2406         * platform/audio/SincResampler.h:
2407         * platform/audio/ZeroPole.cpp:
2408         (WebCore::ZeroPole::process):
2409         * platform/audio/ZeroPole.h:
2410         * platform/audio/AudioBus.cpp:
2411         (WebCore::AudioBus::channelByType):
2412         * platform/audio/AudioBus.h:
2413         (WebCore::AudioBus::gain):
2414         * platform/audio/AudioDSPKernelProcessor.cpp:
2415         (WebCore::AudioDSPKernelProcessor::process):
2416         * platform/audio/AudioDSPKernelProcessor.h:
2417         * platform/audio/AudioProcessor.h:
2418         * platform/audio/DynamicsCompressor.cpp:
2419         (WebCore::DynamicsCompressor::process):
2420         * platform/audio/DynamicsCompressor.h:
2421         * platform/audio/DynamicsCompressorKernel.cpp:
2422         (WebCore::DynamicsCompressorKernel::process):
2423         * platform/audio/DynamicsCompressorKernel.h:
2424         * platform/audio/EqualPowerPanner.cpp:
2425         (WebCore::EqualPowerPanner::pan):
2426         * platform/audio/EqualPowerPanner.h:
2427         * platform/audio/HRTFElevation.h:
2428         (WebCore::HRTFElevation::numberOfAzimuths):
2429         * platform/audio/HRTFPanner.cpp:
2430         (WebCore::HRTFPanner::pan):
2431         * platform/audio/HRTFPanner.h:
2432         * platform/audio/Panner.h:
2433         * platform/audio/Reverb.cpp:
2434         (WebCore::Reverb::process):
2435         * platform/audio/Reverb.h:
2436         * platform/audio/ReverbConvolver.cpp:
2437         (WebCore::ReverbConvolver::process):
2438         * platform/audio/ReverbConvolver.h:
2439         * platform/audio/ffmpeg/FFTFrameFFMPEG.cpp:
2440         (WebCore::FFTFrame::doFFT):
2441         * platform/audio/mkl/FFTFrameMKL.cpp:
2442         (WebCore::FFTFrame::doFFT):
2443
2444         The following functions were modified to use the renamed mutableData() accessor:
2445         * platform/audio/AudioBus.cpp:
2446         (WebCore::AudioBus::processWithGainFromMonoStereo):
2447         (WebCore::AudioBus::copyWithSampleAccurateGainValuesFrom):
2448         * platform/audio/AudioChannel.cpp:
2449         (WebCore::AudioChannel::scale):
2450         (WebCore::AudioChannel::copyFrom):
2451         (WebCore::AudioChannel::copyFromRange):
2452         (WebCore::AudioChannel::sumFrom):
2453         * platform/audio/AudioDSPKernelProcessor.cpp:
2454         (WebCore::AudioDSPKernelProcessor::process):
2455         * platform/audio/AudioResampler.cpp:
2456         (WebCore::AudioResampler::process):
2457         * platform/audio/DynamicsCompressor.cpp:
2458         (WebCore::DynamicsCompressor::process):
2459         * platform/audio/EqualPowerPanner.cpp:
2460         (WebCore::EqualPowerPanner::pan):
2461         * platform/audio/HRTFKernel.cpp:
2462         (WebCore::extractAverageGroupDelay):
2463         (WebCore::HRTFKernel::HRTFKernel):
2464         (WebCore::HRTFKernel::createImpulseResponse):
2465         * platform/audio/HRTFPanner.cpp:
2466         (WebCore::HRTFPanner::pan):
2467         * platform/audio/MultiChannelResampler.cpp:
2468         (WebCore::MultiChannelResampler::process):
2469         * platform/audio/Reverb.cpp:
2470         (WebCore::Reverb::process):
2471         * platform/audio/ReverbConvolver.cpp:
2472         (WebCore::ReverbConvolver::ReverbConvolver):
2473         (WebCore::ReverbConvolver::process):
2474         * platform/audio/mac/AudioFileReaderMac.cpp:
2475         (WebCore::AudioFileReader::createBus):
2476         * platform/audio/mac/FFTFrameMac.cpp:
2477         (WebCore::FFTFrame::doFFT):
2478         * webaudio/AudioBufferSourceNode.cpp:
2479         (WebCore::AudioBufferSourceNode::process):
2480         (WebCore::AudioBufferSourceNode::renderFromBuffer):
2481         * webaudio/BiquadProcessor.cpp:
2482         (WebCore::BiquadProcessor::process):
2483         * webaudio/JavaScriptAudioNode.cpp:
2484         (WebCore::JavaScriptAudioNode::process):
2485         * webaudio/OfflineAudioDestinationNode.cpp:
2486         (WebCore::OfflineAudioDestinationNode::render):
2487         * webaudio/RealtimeAnalyser.cpp:
2488         (WebCore::RealtimeAnalyser::writeInput):
2489         * webaudio/WaveShaperProcessor.cpp:
2490         (WebCore::WaveShaperProcessor::process):
2491
2492 2012-01-19  Vsevolod Vlasov  <vsevik@chromium.org>
2493
2494         Unreviewed, inspector closure compilation fix.
2495
2496         * inspector/front-end/ScriptsPanel.js:
2497         * inspector/front-end/TabbedEditorContainer.js:
2498
2499 2012-01-19  David Hyatt  <hyatt@apple.com>
2500
2501         https://bugs.webkit.org/show_bug.cgi?id=76644
2502
2503         Before landing support for centering, fix the keyword value to match the latest draft.
2504         The new keyword is "contain" instead of "bounds."
2505
2506         Revised the existing parsing tests to reflect the updated value.
2507
2508         Reviewed by Dan Bernstein.
2509
2510         * css/CSSParser.cpp:
2511         (WebCore::CSSParser::parseValue):
2512         * css/CSSPrimitiveValueMappings.h:
2513         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2514         (WebCore::CSSPrimitiveValue::operator LineGridSnap):
2515         * css/CSSValueKeywords.in:
2516         * rendering/style/RenderStyleConstants.h:
2517
2518 2012-01-19  Joi Sigurdsson  <joi@chromium.org>
2519
2520         Enable use of precompiled headers in Chromium port on Windows.
2521
2522         Bug 76381 - Use precompiled headers in Chromium port on Windows
2523         https://bugs.webkit.org/show_bug.cgi?id=76381
2524
2525         Reviewed by Tony Chang.
2526
2527         No new tests needed; if the change builds and existing tests pass
2528         that should provide enough coverage.
2529
2530         * WebCore.gyp/WebCore.gyp: Include WinPrecompile.gypi.
2531
2532 2012-01-19  Vsevolod Vlasov  <vsevik@chromium.org>
2533
2534         Web Inspector: Switching tabs in TabbedEditorContainer should reveal selected script in navigator.
2535         https://bugs.webkit.org/show_bug.cgi?id=76636
2536
2537         Reviewed by Pavel Feldman.
2538
2539         Renamed FileSelector's ScriptSelected event into FileSelected, added EditorSelected
2540         event to EditorContainer.
2541         Renamed _showSourceFrame into _showFile.
2542         Made _uiSourceCodeRemoved reuse _removeSourceFrame.
2543
2544         * inspector/front-end/ScriptsNavigator.js:
2545         (WebInspector.ScriptsNavigator.prototype.scriptSelected):
2546         * inspector/front-end/ScriptsPanel.js:
2547         (WebInspector.ScriptsPanel.prototype._uiSourceCodeRemoved):
2548         (WebInspector.ScriptsPanel.prototype._showAndRevealInFileSelector):
2549         (WebInspector.ScriptsPanel.prototype._editorSelected):
2550         (WebInspector.ScriptsPanel.prototype._fileSelected):
2551         (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._goBack):
2552         (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._goForward):
2553         (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._filesSelectChanged):
2554         * inspector/front-end/TabbedEditorContainer.js:
2555         (WebInspector.TabbedEditorContainer):
2556         (WebInspector.TabbedEditorContainer.prototype._tabSelected):
2557
2558 2012-01-19  Mihnea Ovidenie  <mihnea@adobe.com>
2559
2560         [CSSRegions]Add support for background-color in region styling
2561         https://bugs.webkit.org/show_bug.cgi?id=71488
2562
2563         Reviewed by David Hyatt.
2564
2565         This patch enables region styling again. The region styling tests were also added back. 
2566         With the improvements from https://bugs.webkit.org/show_bug.cgi?id=76265, hopefully we will not see the same 3% regressions
2567         in performance.
2568
2569         * rendering/RenderObject.h:
2570         (WebCore::RenderObject::style):
2571
2572 2012-01-16  Jer Noble  <jer.noble@apple.com>
2573
2574         Crash at WebCore::MediaControlRootElement::makeOpaque + 97
2575         https://bugs.webkit.org/show_bug.cgi?id=76391
2576
2577         Reviewed by John Sullivan.
2578
2579         No new tests; Speculative fix for crash.
2580
2581         Crash report data suggests this crash is occurring as the document is being
2582         closed.  Check the nullity of document()->page() before deref-ing.
2583
2584         * html/shadow/MediaControlElements.cpp:
2585         (WebCore::MediaControlPanelElement::makeOpaque):
2586
2587 2012-01-19  Ken Buchanan <kenrb@chromium.org>
2588
2589         Layout Test fast/text/international/spaces-combined-in-vertical-text.html is failing
2590         https://bugs.webkit.org/show_bug.cgi?id=75787
2591
2592         Reviewed by Simon Fraser.
2593
2594         This is a tweak to my patch in r104322. On some platforms
2595         RenderCombineText::combineText() can abort early during inline
2596         iteration, causing this loop in skipLeadingWhitespace to spin,
2597         hence the layout test timeouts. This patch accounts for that
2598         condition and makes the loop iteration more robust.
2599
2600         No new test because this is fixing a failure on an existing test.
2601
2602         * rendering/RenderBlockLineLayout.cpp:
2603         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
2604
2605 2012-01-19  Jer Noble  <jer.noble@apple.com>
2606
2607         HRTFPanner not rendering correctly on mac port
2608         https://bugs.webkit.org/show_bug.cgi?id=76397
2609
2610         Reviewed by Eric Carlson.
2611
2612         No new tests; HRTF results are currently not testable.
2613
2614         Re-generate the Composite.wav file from its constituent azimuth & elevation files.
2615
2616         * platform/audio/resources/Composite.wav:
2617
2618 2012-01-19  David Hyatt  <hyatt@apple.com>
2619
2620         https://bugs.webkit.org/show_bug.cgi?id=76577
2621         
2622         Fix crash when nested line grids are used. Make sure to bail out if no line grid
2623         is found rather than crashing.
2624
2625         Reviewed by Dan Bernstein.
2626
2627         Added fast/line-grid/line-grid-nested.html.
2628
2629         * rendering/LayoutState.cpp:
2630         (WebCore::LayoutState::establishLineGrid):
2631
2632 2012-01-18  Enrica Casucci  <enrica@apple.com>
2633
2634         editingAttributedStringFromRange in WebHTMLConverter does not handle NSUnderlineStyleAttributeName.
2635         https://bugs.webkit.org/show_bug.cgi?id=76588
2636         <rdar://problem/9325183>
2637
2638         Reviewed by Dan Bernstein.
2639
2640         Added TestWebKitAPI test.
2641
2642         * platform/mac/HTMLConverter.mm:
2643         (+[WebHTMLConverter editingAttributedStringFromRange:]):
2644
2645 2012-01-18  Alexander Pavlov  <apavlov@chromium.org>
2646
2647         Web Inspector: Implement screen resolution emulation backend
2648         https://bugs.webkit.org/show_bug.cgi?id=76532
2649
2650         Reviewed by Pavel Feldman.
2651
2652         The emulation affects [min-|max-]device-(width|height) media queries, window.screen.(width|height),
2653         and window.inner(Width|Height).
2654
2655         Test: inspector/styles/override-screen-size.html
2656
2657         * css/MediaQueryEvaluator.cpp:
2658         (WebCore::device_heightMediaFeatureEval): Apply device-height override if necessary.
2659         (WebCore::device_widthMediaFeatureEval): Apply device-width override if necessary.
2660         * inspector/Inspector.json:
2661         * inspector/InspectorCSSAgent.cpp:
2662         (WebCore::InspectorCSSAgent::InspectorCSSAgent):
2663         (WebCore::InspectorCSSAgent::startSelectorProfiler):
2664         (WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
2665         (WebCore::InspectorCSSAgent::willMatchRule):
2666         (WebCore::InspectorCSSAgent::didMatchRule):
2667         (WebCore::InspectorCSSAgent::willProcessRule):
2668         (WebCore::InspectorCSSAgent::didProcessRule):
2669         * inspector/InspectorInstrumentation.cpp:
2670         (WebCore::InspectorInstrumentation::applyScreenWidthOverrideImpl):
2671         (WebCore::InspectorInstrumentation::applyScreenHeightOverrideImpl):
2672         * inspector/InspectorInstrumentation.h:
2673         (WebCore::InspectorInstrumentation::applyScreenWidthOverride):
2674         (WebCore::InspectorInstrumentation::applyScreenHeightOverride):
2675         * inspector/InspectorPageAgent.cpp:
2676         (WebCore::InspectorPageAgent::InspectorPageAgent):
2677         (WebCore::InspectorPageAgent::restore):
2678         (WebCore::InspectorPageAgent::disable):
2679         (WebCore::InspectorPageAgent::setScreenSizeOverride):
2680         (WebCore::InspectorPageAgent::applyScreenWidthOverride):
2681         (WebCore::InspectorPageAgent::applyScreenHeightOverride):
2682         (WebCore::InspectorPageAgent::updateFrameViewFixedLayout):
2683         (WebCore::InspectorPageAgent::clearFrameViewFixedLayout):
2684         (WebCore::InspectorPageAgent::setFrameViewFixedLayout):
2685         * inspector/InspectorPageAgent.h:
2686         * page/DOMWindow.cpp:
2687         (WebCore::DOMWindow::innerHeight): Apply height override if necessary.
2688         (WebCore::DOMWindow::innerWidth): Apply width override if necessary.
2689         * page/Screen.cpp:
2690         (WebCore::Screen::height): Apply height override if necessary.
2691         (WebCore::Screen::width): Apply width override if necessary.
2692
2693 2012-01-18  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2694
2695         [Qt] Handle the layers visible rect calculation on the web process.
2696         https://bugs.webkit.org/show_bug.cgi?id=74720
2697
2698         Reviewed by Noam Rosenthal.
2699
2700         Remove all visible rect calculation related code from TextureMapperNode.
2701
2702         * platform/graphics/texmap/TextureMapperNode.cpp:
2703         * platform/graphics/texmap/TextureMapperNode.h:
2704
2705 2012-01-19  Vsevolod Vlasov  <vsevik@chromium.org>
2706
2707         Web Inspector: Improve focus switching in scripts panel.
2708         https://bugs.webkit.org/show_bug.cgi?id=76628
2709
2710         Reviewed by Pavel Feldman.
2711
2712         * inspector/front-end/Dialog.js:
2713         (WebInspector.Dialog.prototype._hide):
2714         * inspector/front-end/FilteredItemSelectionDialog.js:
2715         (WebInspector.FilteredItemSelectionDialog.prototype.onEnter):
2716         (WebInspector.JavaScriptOutlineDialog.prototype.selectItem):
2717         * inspector/front-end/ScriptsNavigator.js:
2718         (WebInspector.ScriptsNavigator.prototype.get defaultFocusedElement):
2719         * inspector/front-end/ScriptsPanel.js:
2720         (WebInspector.ScriptsPanel.prototype._showSourceLine):
2721
2722 2012-01-19  Vsevolod Vlasov  <vsevik@chromium.org>
2723
2724         Web Inspector: Add isSelfOrAnsector and isSelfOrDescendant methods to utilities.
2725         https://bugs.webkit.org/show_bug.cgi?id=76618
2726
2727         Added isSelfOrAncestor, isSelfOrDescendant and WebInspector.restoreFocusFromElement methods.
2728
2729         Reviewed by Pavel Feldman.
2730
2731         * inspector/front-end/Drawer.js:
2732         * inspector/front-end/HelpScreen.js:
2733         (WebInspector.HelpScreen.prototype._onBlur):
2734         * inspector/front-end/MetricsSidebarPane.js:
2735         (WebInspector.MetricsSidebarPane.prototype._handleKeyDown):
2736         * inspector/front-end/Popover.js:
2737         * inspector/front-end/ScriptsPanel.js:
2738         (WebInspector.ScriptsPanel.prototype.showUISourceCode):
2739         * inspector/front-end/StylesSidebarPane.js:
2740         ():
2741         * inspector/front-end/TextPrompt.js:
2742         (WebInspector.TextPrompt.prototype.detach):
2743         (WebInspector.TextPrompt.prototype.isCaretAtEndOfPrompt):
2744         * inspector/front-end/TextViewer.js:
2745         (WebInspector.TextEditorMainPanel.prototype._updateSelectionOnStartEditing):
2746         (WebInspector.TextEditorMainPanel.prototype._handleDOMUpdates):
2747         * inspector/front-end/UIUtils.js:
2748         (WebInspector.startEditing.cleanUpAfterEditing):
2749         (WebInspector.restoreFocusFromElement):
2750         * inspector/front-end/utilities.js:
2751         (Element.prototype.isInsertionCaretInside):
2752         ():
2753
2754 2012-01-19  Andreas Kling  <awesomekling@apple.com>
2755
2756         DynamicNodeList: Simplify internal Caches object.
2757         <http://webkit.org/b/76600>
2758
2759         Reviewed by Ryosuke Niwa.
2760
2761         Move m_caches from DynamicSubtreeNodeList and ChildNodeList up into DynamicNodeList.
2762         Remove the inheritance from RefCounted and store it simply as "Caches m_caches"
2763         This avoids one heap allocation per DynamicNodeList. Also reordered the Caches members
2764         to pack slightly better on 64-bit.
2765
2766         * dom/ChildNodeList.cpp:
2767         (WebCore::ChildNodeList::ChildNodeList):
2768         (WebCore::ChildNodeList::length):
2769         (WebCore::ChildNodeList::item):
2770         * dom/ChildNodeList.h:
2771         * dom/DynamicNodeList.cpp:
2772         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
2773         (WebCore::DynamicSubtreeNodeList::length):
2774         (WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent):
2775         (WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent):
2776         (WebCore::DynamicSubtreeNodeList::item):
2777         * dom/DynamicNodeList.h:
2778         (WebCore::DynamicNodeList::invalidateCache):
2779         * dom/Node.cpp:
2780         (WebCore::NodeRareData::clearChildNodeListCache):
2781
2782 2012-01-19  Vsevolod Vlasov  <vsevik@chromium.org>
2783
2784         Web Inspector: TabbedPane closeAllTabs does not close all tabs.
2785         https://bugs.webkit.org/show_bug.cgi?id=76624
2786
2787         Reviewed by Pavel Feldman.
2788
2789         * inspector/front-end/ScriptsPanel.js:
2790         * inspector/front-end/TabbedPane.js:
2791         (WebInspector.TabbedPane.prototype.closeAllTabs):
2792
2793 2012-01-18  Rob Buis  <rbuis@rim.com>
2794
2795         image/pjpeg not supported for decoding on BlackBerry platform
2796         https://bugs.webkit.org/show_bug.cgi?id=76595
2797
2798         Reviewed by Antonio Gomes.
2799
2800         Add image/pjpeg as one of the supported types for image decoding on BlackBerry platform.
2801
2802         * platform/MIMETypeRegistry.cpp:
2803         (WebCore::initializeSupportedImageMIMETypes):
2804
2805 2012-01-19  Sheriff Bot  <webkit.review.bot@gmail.com>
2806
2807         Unreviewed, rolling out r105402.
2808         http://trac.webkit.org/changeset/105402
2809         https://bugs.webkit.org/show_bug.cgi?id=76623
2810
2811         Layout test problems (Requested by WildFox on #webkit).
2812
2813         * css/svg.css:
2814         (svg):
2815         * rendering/RenderBox.h:
2816         (WebCore::RenderBox::computeIntrinsicRatioInformation):
2817         * rendering/RenderBoxModelObject.cpp:
2818         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
2819         * rendering/RenderImage.cpp:
2820         (WebCore::RenderImage::computeReplacedLogicalWidth):
2821         (WebCore::RenderImage::computeIntrinsicRatioInformation):
2822         * rendering/RenderImage.h:
2823         * rendering/RenderReplaced.cpp:
2824         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
2825         (WebCore::RenderReplaced::logicalHeightIsAuto):
2826         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
2827         * rendering/RenderReplaced.h:
2828         * rendering/svg/RenderSVGRoot.cpp:
2829         (WebCore::RenderSVGRoot::computeIntrinsicRatioInformation):
2830         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
2831         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
2832         * rendering/svg/RenderSVGRoot.h:
2833         * rendering/svg/RenderSVGViewportContainer.h:
2834         * svg/SVGLengthContext.cpp:
2835         (WebCore::SVGLengthContext::determineViewport):
2836         * svg/SVGSVGElement.cpp:
2837         (WebCore::SVGSVGElement::viewport):
2838         (WebCore::SVGSVGElement::parseMappedAttribute):
2839         (WebCore::updateCSSForAttribute):
2840         (WebCore::SVGSVGElement::svgAttributeChanged):
2841         (WebCore::SVGSVGElement::localCoordinateSpaceTransform):
2842         (WebCore::SVGSVGElement::currentViewBoxRect):
2843         * svg/SVGSVGElement.h:
2844         * svg/graphics/SVGImage.cpp:
2845         (WebCore::SVGImage::size):
2846         (WebCore::SVGImage::computeIntrinsicDimensions):
2847         * svg/graphics/SVGImage.h:
2848
2849 2012-01-19  Alexis Menard  <alexis.menard@openbossa.org>
2850
2851         Strange Result for getComputedStyle on borderWidth set in em
2852         https://bugs.webkit.org/show_bug.cgi?id=18294
2853
2854         Reviewed by Tony Chang.
2855
2856         BorderValue stores its width on a 12 bits unsigned. This patch 
2857         increase it to 27. The patch also modify the way to set the 
2858         width or to get it, we now use a unsigned rather than a short.
2859
2860         Test: fast/css/border-width-large.html
2861
2862         * css/CSSPrimitiveValue.cpp:
2863         (WebCore::CSSPrimitiveValue::computeLength):
2864         * css/CSSStyleApplyProperty.cpp:
2865         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
2866         * page/animation/AnimationBase.cpp:
2867         (WebCore::blendFunc):
2868         (WebCore::AnimationBase::ensurePropertyMap):
2869         * platform/animation/AnimationUtilities.h:
2870         (WebCore::blend):
2871         * rendering/RenderTheme.cpp:
2872         (WebCore::RenderTheme::adjustStyle):
2873         * rendering/style/BorderData.h:
2874         (WebCore::BorderData::borderLeftWidth):
2875         (WebCore::BorderData::borderRightWidth):
2876         (WebCore::BorderData::borderTopWidth):
2877         (WebCore::BorderData::borderBottomWidth):
2878         * rendering/style/BorderValue.h:
2879         (WebCore::BorderValue::width):
2880         * rendering/style/RenderStyle.cpp:
2881         * rendering/style/RenderStyle.h:
2882         (WebCore::RenderStyleBitfields::borderLeftWidth):
2883         (WebCore::RenderStyleBitfields::borderRightWidth):
2884         (WebCore::RenderStyleBitfields::borderTopWidth):
2885         (WebCore::RenderStyleBitfields::borderBottomWidth):
2886         (WebCore::RenderStyleBitfields::setBorderLeftWidth):
2887         (WebCore::RenderStyleBitfields::setBorderRightWidth):
2888         (WebCore::RenderStyleBitfields::setBorderTopWidth):
2889         (WebCore::RenderStyleBitfields::setBorderBottomWidth):
2890         (WebCore::RenderStyleBitfields::initialBorderWidth):
2891         (WebCore::RenderStyleBitfields::initialColumnRuleWidth):
2892         (WebCore::RenderStyleBitfields::initialOutlineWidth):
2893
2894 2012-01-18  Nikolas Zimmermann  <nzimmermann@rim.com>
2895
2896         Differentiate between SVG/CSS width/height attributes/properties
2897         https://bugs.webkit.org/show_bug.cgi?id=76447
2898
2899         Reviewed by Antti Koivisto.
2900
2901         Remove a gazillion of hacks out of our SVG implementation, by correctly differentiating between the
2902         SVG width/height attributes and the CSS width/height properties. They need to be treated independently
2903         when handling the intrinsic size negotiation, according to both CSS 2.1 & SVG 1.1 2nd Edition specs.
2904
2905         Fixes several bugs in the LayoutTests/svg/custom/*object*sizing tests, we now match Opera perfectly. FF still has some bugs, and IE9 as well.
2906
2907         * css/svg.css: Remove hardcoded, width/height: 100% on <svg>.
2908         * rendering/RenderBox.h:
2909         (WebCore::RenderBox::computeIntrinsicRatioInformation): Make 'intrinsicRatio' a float, and add 'intrinsicSize' as seperated FloatSize, to avoid confusion.
2910         * rendering/RenderBoxModelObject.cpp:
2911         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions): Add forgotton case for percentage intrinsic sizes, that lead to workarounds in other places, that can now be removed.
2912         * rendering/RenderImage.cpp:
2913         (WebCore::RenderImage::computeReplacedLogicalWidth): Directly use imageHasRelativeWidth/Height(), it does differentiate between SVG/CSS width/height attributes/properties now.
2914         (WebCore::RenderImage::computeIntrinsicRatioInformation): Adapt to 'intrinsicRatio' argument change.
2915         * rendering/RenderImage.h: Ditto.
2916         * rendering/RenderReplaced.cpp: Refactor existing code, break out firstContainingBlockWithLogicalWidth/hasReplacedLogicalWidth/hasReplacedLogicalHeight/hasAutoHeightOrContainingBlockWithAutoHeight.
2917         (WebCore::firstContainingBlockWithLogicalWidth): Refactored.
2918         (WebCore::RenderReplaced::hasReplacedLogicalWidth): Refactored, and exported, so SVGSVGElement::widthAttributeEstablishesViewport() can use it.
2919         (WebCore::hasAutoHeightOrContainingBlockWithAutoHeight): Refactored.
2920         (WebCore::RenderReplaced::hasReplacedLogicalHeight): Refactored, and exported, so SVGSVGElement::heightAttributeEstablishesViewport() can use it.
2921         (WebCore::RenderReplaced::computeReplacedLogicalWidth): Adapt to 'intrinsicRatio' changes ('intrinsicSize' is now decoupled from it). Refactor so that RenderSVGRoot can directly use it as well!
2922         (WebCore::RenderReplaced::computeReplacedLogicalHeight): Ditto.
2923         * rendering/RenderReplaced.h:
2924         * rendering/svg/RenderSVGRoot.cpp:
2925         (WebCore::RenderSVGRoot::computeIntrinsicRatioInformation): Only determine the intrinsic size & ratio using the SVG width/height attributes, not the CSS width/height properties, as it's specified.
2926         (WebCore::resolveLengthAttributeForSVG): Helper function for computeReplacedLogicalWidth/Height, that scales Length values that come from SVG width/height attributes.
2927         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth): Finally remove home-brewn size computation logic - it can be fully shared with RenderReplaced now that we inherit from it.
2928         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight): Ditto.
2929         * rendering/svg/RenderSVGRoot.h:
2930         * rendering/svg/RenderSVGViewportContainer.h:
2931         (WebCore::RenderSVGViewportContainer::viewport): Export viewport() for easier length resolution.
2932         * svg/SVGLengthContext.cpp:
2933         (WebCore::SVGLengthContext::determineViewport): Finally clean up this hell, and make it easy to understand. Only need to resolve lengths against either RenderSVGRoot or RenderSVGViewportContainer now.
2934         * svg/SVGSVGElement.cpp: 
2935         (WebCore::SVGSVGElement::viewport): Remove wrong code and disable this. Its not used, and we have no test coverage for it. Its current implementation didn't make any sense.
2936         (WebCore::SVGSVGElement::parseMappedAttribute): Remove hacks mapping SVG width/height attributes to CSS properties.
2937         (WebCore::SVGSVGElement::svgAttributeChanged): Ditto.
2938         (WebCore::SVGSVGElement::localCoordinateSpaceTransform): Refactored.
2939         (WebCore::SVGSVGElement::currentViewBoxRect): Ditto.
2940         (WebCore::SVGSVGElement::currentViewportSize): Ditto.
2941         (WebCore::SVGSVGElement::widthAttributeEstablishesViewport): Main logic determining if the SVG or CSS properties establish the viewport -  a direct transliteration from the spec.
2942         (WebCore::SVGSVGElement::heightAttributeEstablishesViewport): Ditto.
2943         (WebCore::SVGSVGElement::intrinsicWidth): Helper.
2944         (WebCore::SVGSVGElement::intrinsicHeight): Ditto.
2945         * svg/SVGSVGElement.h:
2946         * svg/graphics/SVGImage.cpp:
2947         (WebCore::SVGImage::size): Cleanup code.
2948         (WebCore::SVGImage::hasRelativeWidth): Added, avoids hacks in RenderBoxModelObject.
2949         (WebCore::SVGImage::hasRelativeHeight): Ditto.
2950         (WebCore::SVGImage::computeIntrinsicDimensions): Make use of new SVGSVGElement::computeIntrinsicDimensions.
2951         * svg/graphics/SVGImage.h:
2952
2953 2012-01-19  Ryosuke Niwa  <rniwa@webkit.org>
2954
2955         drop event isn't fired for contentEditable in edit drag
2956         https://bugs.webkit.org/show_bug.cgi?id=57185
2957
2958         Reviewed by Adam Barth.
2959
2960         Dispatch drop and dragend events after edit drag per HTML5 spec:
2961         http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#drag-and-drop-processing-model
2962
2963         There are two major differences between the spec and WebKit's new behavior:
2964
2965         While the spec says we have to insert the dragged contents immediately after dispatching drop event
2966         and delete the source in the default event handler of dragend event, doing so in WebKit is extremely
2967         difficult because of the way we manage the selection. Instead, we continue to delete the source
2968         and insert the dragged contents immediately after the drop event; this behavior matches that of Firefox 9.
2969
2970         When the dragged contents and the destination of the move is in the same text node, ReplaceSelectionCommand
2971         may end up replacing it with a new text node. But this removal causes a problem when EventHandler uses
2972         the node to dispatch dragend event because the node is "orphaned" from its parent at that point. To mitigate
2973         this issue, we update the dragState's m_dragSrc when the node is orphaned by the edit drag. While this behavior
2974         may differ from the spec and other browsers, not delivering dragend to the editing host seems strictly worse than
2975         dispatching it at the slightly wrong target.
2976
2977         Tests: fast/events/moving-text-should-fire-drop-and-dragend-events-2.html
2978                fast/events/moving-text-should-fire-drop-and-dragend-events.html
2979
2980         * page/DragController.cpp:
2981         (WebCore::DragController::performDrag): Dispatch drop event even when m_isHandlingDrag is true as long
2982         as DragDestinationActionDHTML is an acceptable action.
2983         (WebCore::DragController::concludeEditDrag): Call updateDragStateAfterEditDragIfNeeded after inserting
2984         the dragged contents. This is necessary when ReplaceSelectionCommand or MoveSelectionCommand modifies
2985         the source node while inserting the dragged contents.
2986         * page/EventHandler.cpp:
2987         (WebCore::EventHandler::performDragAndDrop): Clear the drag state only if drop event's default action
2988         was prevented so that we dispatch dragevent event later.
2989         (WebCore::EventHandler::updateDragStateAfterEditDragIfNeeded): Update dragState's m_dragSrc when the node
2990         is orphaned. See above for the rationale.
2991         * page/EventHandler.h:
2992
2993 2012-01-18  Kinuko Yasuda  <kinuko@chromium.org>
2994
2995         Cleanup: Move chrome-specific filesystem type handling code (for FileSystem API) under chromium directory
2996         https://bugs.webkit.org/show_bug.cgi?id=76551
2997
2998         Reviewed by Darin Fisher.
2999
3000         Moved the implementation of crackFileSystemURL() and toURL() from
3001         WebCore/fileapi/DOMFileSystemBase into WebCore/platform/AsyncFileSystem
3002         so that each platform can extend/implement their behavior if necessary.
3003
3004         No new tests since this patch has no functionality changes. (Existing
3005         tests should pass)
3006
3007         * fileapi/DOMFileSystemBase.cpp: Moved the implementation of
3008         crackFileSystemURL() to AsyncFileSystem
3009         (WebCore::DOMFileSystemBase::crackFileSystemURL):
3010         * fileapi/DOMFileSystemBase.h:
3011         * fileapi/EntryBase.cpp: Moved the implementation of toURL() to AsyncFileSystem
3012         (WebCore::EntryBase::toURL):
3013         * page/DOMWindow.cpp: Removed chrome-specific type handling code.
3014         (WebCore::DOMWindow::webkitRequestFileSystem):
3015         * page/DOMWindow.h: Removed chrome-specific filesystem type
3016         (EXTERNAL).
3017         * platform/AsyncFileSystem.cpp: Added default implementation of toURL() and crackFileSystemURL()
3018         (WebCore::AsyncFileSystem::toURL):
3019         (WebCore::AsyncFileSystem::crackFileSystemURL):
3020         * platform/AsyncFileSystem.h:
3021         * workers/WorkerContext.cpp: Removed chrome-specific type handling code.
3022         (WebCore::WorkerContext::webkitRequestFileSystem):
3023         (WebCore::WorkerContext::webkitRequestFileSystemSync):
3024
3025 2012-01-19  Mihnea Ovidenie  <mihnea@adobe.com>
3026
3027         Cache RenderStyle pointer as a method to avoid performance regression for region styling
3028         https://bugs.webkit.org/show_bug.cgi?id=76265
3029
3030         Reviewed by David Hyatt.
3031
3032         No new tests since this is just refactoring.
3033         When region styling was enabled in https://bugs.webkit.org/show_bug.cgi?id=71488,
3034         it introduced a performance regression due to the change of RenderObject::style() method.
3035         This patch tries to avoid a new performance regression when region styling will be enabled again.
3036
3037         * rendering/RenderBlock.cpp:
3038         (WebCore::RenderBlock::MarginInfo::MarginInfo):
3039         (WebCore::RenderBlock::styleWillChange):
3040         (WebCore::RenderBlock::layoutBlock):
3041         (WebCore::RenderBlock::layoutBlockChildren):
3042         (WebCore::RenderBlock::layoutBlockChild):
3043         (WebCore::RenderBlock::computePreferredLogicalWidths):
3044         (WebCore::getBorderPaddingMargin):
3045         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
3046         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
3047         * rendering/RenderBlockLineLayout.cpp:
3048         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
3049         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
3050         * rendering/RenderBox.cpp:
3051         (WebCore::RenderBox::willBeDestroyed):
3052         (WebCore::RenderBox::styleWillChange):
3053         (WebCore::RenderBox::styleDidChange):
3054         (WebCore::RenderBox::updateBoxModelInfoFromStyle):
3055         (WebCore::RenderBox::computeRectForRepaint):
3056         (WebCore::RenderBox::computeLogicalWidthInRegion):
3057         (WebCore::RenderBox::computeLogicalWidthUsing):
3058         (WebCore::RenderBox::computeLogicalHeight):
3059         (WebCore::RenderBox::computePercentageLogicalHeight):
3060         (WebCore::RenderBox::computePositionedLogicalHeight):
3061         * rendering/RenderBoxModelObject.cpp:
3062         (WebCore::RenderBoxModelObject::styleWillChange):
3063         (WebCore::RenderBoxModelObject::updateBoxModelInfoFromStyle):
3064         * rendering/RenderInline.cpp:
3065         (WebCore::RenderInline::styleDidChange):
3066         * rendering/RenderText.cpp:
3067         (WebCore::RenderText::styleDidChange):
3068         (WebCore::RenderText::computePreferredLogicalWidths):
3069
3070 2012-01-19  Kazuhiro Inaba  <kinaba@chromium.org>
3071
3072         [Chromium] Random characters got rendered as empty boxes or with incorrect glyphs even when a font is present
3073         https://bugs.webkit.org/show_bug.cgi?id=76508
3074
3075         Reviewed by Kent Tamura.
3076
3077         Wrapped GetGlyphIndices() API calls so that when they failed we trigger font
3078         loading outside the sandbox and retry the call.
3079
3080         No new auto tests since the bug involves the system's occasional cache behavior
3081         and thus there's no reliable way to reproduce and test the situation.
3082
3083         * platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp:
3084         (WebCore::getGlyphIndices):
3085         GDI call wrapper ensuring fonts to be loaded.
3086         (WebCore::initSpaceGlyph):
3087         Changed to use the wrapper function.
3088         (WebCore::fillBMPGlyphs):
3089         Changed to use the wrapper function.
3090         Introduced scoped HDC management by HWndDC.
3091         (WebCore::GlyphPage::fill):
3092
3093 2012-01-19  Adam Barth  <abarth@webkit.org>
3094
3095         createAttributeNS should understand that "xmlns" is allowed in the http://www.w3.org/2000/xmlns/
3096         https://bugs.webkit.org/show_bug.cgi?id=76579
3097
3098         Reviewed by Eric Seidel.
3099
3100         This patch cleans up a tiny corner case involving the (somewhat
3101         magical) xmlns attribute that we uncovered when working on
3102         setAttributeNS.
3103
3104         Tests: fast/dom/Document/createAttributeNS-namespace-err.html
3105
3106         * dom/Document.cpp:
3107         (WebCore::Document::importNode):
3108         (WebCore::Document::hasValidNamespaceForElements):
3109         (WebCore::Document::hasValidNamespaceForAttributes):
3110         (WebCore::Document::createElementNS):
3111         (WebCore::Document::createAttributeNS):
3112         * dom/Document.h:
3113         * dom/Element.cpp:
3114         (WebCore::Element::setAttributeNS):
3115
3116 2012-01-19  Roland Steiner  <rolandsteiner@chromium.org>
3117
3118         Unreviewed build fix for DEBUG: remove comparison of an unsigned variable with '>= 0' in ASSERT.
3119
3120         No new tests. (no functionality change)
3121
3122         * webaudio/AudioNodeOutput.cpp:
3123         (WebCore::AudioNodeOutput::AudioNodeOutput):
3124
3125 2012-01-18  Li Yin  <li.yin@intel.com>
3126
3127         [v8] Low efficiency of writing long string from web application to plugin.
3128         https://bugs.webkit.org/show_bug.cgi?id=76592
3129
3130         The efficiency will be improved by 300 times in the best case, when the
3131         size of string reaches 1MB.
3132
3133         Reviewed by Adam Barth.
3134
3135         * bindings/v8/V8NPUtils.cpp:
3136         (WebCore::convertV8ObjectToNPVariant):
3137
3138 2012-01-18  Adam Barth  <abarth@webkit.org>
3139
3140         Assigning to Element.prefix should throw exception when using illegal characters
3141         https://bugs.webkit.org/show_bug.cgi?id=76589
3142
3143         Reviewed by Eric Seidel.
3144
3145         This patch fixes a FIXME and implements the INVALID_CHARACTER_ERR
3146         exception described in
3147         http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-NodeNSPrefix
3148
3149         Tests: fast/dom/Element/prefix-setter-exception.html
3150
3151         * dom/Node.cpp:
3152         (WebCore::isValidNameStartCharacter):
3153         (WebCore::isValidNameCharacter):
3154         (WebCore::hasInvalidValidNameCharacters):
3155         (WebCore::Node::checkSetPrefix):
3156
3157 2012-01-18  Shinya Kawanaka  <shinyak@google.com>
3158
3159         ShadowContent query should be able to have fallback elements.
3160         https://bugs.webkit.org/show_bug.cgi?id=75306
3161
3162         Reviewed by Hajime Morita.
3163
3164         When no elements are selected by a shadow content element selector query,
3165         light children are selected as a fallback elements.
3166
3167         Test: fast/dom/shadow/shadow-contents-fallback.html
3168
3169         * dom/NodeRenderingContext.cpp:
3170         (WebCore::NodeRenderingContext::NodeRenderingContext):
3171           Considers fallback phase. When no elements are chosen, the phase is set to 'fallback'.
3172         (WebCore::NodeRenderingContext::nextRenderer):
3173           Takes fallback phase into account.
3174         (WebCore::NodeRenderingContext::previousRenderer): ditto.
3175         * dom/NodeRenderingContext.h:
3176         * html/shadow/HTMLContentElement.cpp:
3177         (WebCore::HTMLContentElement::attach):
3178           Calculates inclusions before attaching light children.
3179         * html/shadow/HTMLContentElement.h:
3180         (WebCore::HTMLContentElement::hasInclusion):
3181
3182 2012-01-18  Kent Tamura  <tkent@chromium.org>
3183
3184         REGRESSION(r100111): A 'change' event does not fire when a mouse drag
3185         occurs to switch elements in a listbox <select>
3186         https://bugs.webkit.org/show_bug.cgi?id=76244
3187
3188         Reviewed by Hajime Morita.
3189
3190         Test: fast/forms/select/listbox-drag-in-non-multiple.html
3191
3192         * html/HTMLSelectElement.cpp:
3193         (WebCore::HTMLSelectElement::updateSelectedState):
3194         Do not update m_activeSelectionState for non-multiple <select>.
3195         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
3196         Use setActiveSelection*Index() and updateListBoxSelection(true) instead
3197         of updateSelectedState() because updateSelectedState() updates
3198         m_lastOnChangeSelection and will prevent the mouseup handler from
3199         dispatching 'change' event.
3200         We should not call listBoxOnChange() in the mousemove handler in order
3201         to align the behavior of IE and Firefox.
3202
3203 2012-01-18  Eric Seidel  <eric@webkit.org>
3204
3205         setAttributeNS should comply with the obscure rules of DOM2, just like createAttributeNS and createElementNS do
3206         https://bugs.webkit.org/show_bug.cgi?id=76143
3207
3208         Reviewed by Adam Barth.
3209
3210         Test: fast/dom/Element/setAttributeNS-namespace-err.html
3211
3212         * dom/Element.cpp:
3213         (WebCore::Element::setAttributeNS):
3214
3215 2012-01-18  Sheriff Bot  <webkit.review.bot@gmail.com>
3216
3217         Unreviewed, rolling out r105376.
3218         http://trac.webkit.org/changeset/105376
3219         https://bugs.webkit.org/show_bug.cgi?id=76601
3220
3221         Roll 76493 back in after discussion with jsbell (Requested by
3222         rolandsteiner on #webkit).
3223
3224         * bindings/v8/IDBBindingUtilities.cpp:
3225         (WebCore::injectIDBKeyIntoSerializedValue):
3226
3227 2012-01-18  Ian Vollick  <vollick@chromium.org>
3228
3229         [chromium] Create a base-class CCAnimation to represent compositor animations
3230         https://bugs.webkit.org/show_bug.cgi?id=73233
3231
3232         Adds a kernel for running animations on the chromium compositor
3233         thread.
3234
3235         Reviewed by Kenneth Russell.
3236
3237         * WebCore.gypi:
3238         * platform/graphics/chromium/cc/CCActiveAnimation.cpp: Added.
3239         (WebCore::CCActiveAnimation::CCActiveAnimation):
3240         (WebCore::CCActiveAnimation::setRunState):
3241         (WebCore::CCActiveAnimation::isFinishedAt):
3242         (WebCore::CCActiveAnimation::trimTimeToCurrentIteration):
3243         * platform/graphics/chromium/cc/CCActiveAnimation.h: Added.
3244         (WebCore::CCActiveAnimation::create):
3245         (WebCore::CCActiveAnimation::~CCActiveAnimation):
3246         (WebCore::CCActiveAnimation::group):
3247         (WebCore::CCActiveAnimation::targetProperty):
3248         (WebCore::CCActiveAnimation::runState):
3249         (WebCore::CCActiveAnimation::iterations):
3250         (WebCore::CCActiveAnimation::setIterations):
3251         (WebCore::CCActiveAnimation::startTime):
3252         (WebCore::CCActiveAnimation::setStartTime):
3253         (WebCore::CCActiveAnimation::isFinished):
3254         (WebCore::CCActiveAnimation::animationCurve):
3255         * platform/graphics/chromium/cc/CCAnimationCurve.cpp: Added.
3256         (WebCore::CCAnimationCurve::toFloatAnimationCurve):
3257         (WebCore::CCAnimationCurve::toTransformAnimationCurve):
3258         * platform/graphics/chromium/cc/CCAnimationCurve.h: Added.
3259         (WebCore::CCAnimationCurve::~CCAnimationCurve):
3260         (WebCore::CCFloatAnimationCurve::~CCFloatAnimationCurve):
3261         (WebCore::CCFloatAnimationCurve::type):
3262         (WebCore::CCTransformAnimationCurve::~CCTransformAnimationCurve):
3263         (WebCore::CCTransformAnimationCurve::type):
3264         * platform/graphics/chromium/cc/CCLayerAnimationControllerImpl.cpp: Added.
3265         (WebCore::CCLayerAnimationControllerImpl::create):
3266         (WebCore::CCLayerAnimationControllerImpl::CCLayerAnimationControllerImpl):
3267         (WebCore::CCLayerAnimationControllerImpl::animate):
3268         (WebCore::CCLayerAnimationControllerImpl::add):
3269         (WebCore::CCLayerAnimationControllerImpl::getActiveAnimation):
3270         (WebCore::CCLayerAnimationControllerImpl::hasActiveAnimation):
3271         (WebCore::CCLayerAnimationControllerImpl::startAnimationsWaitingForNextTick):
3272         (WebCore::CCLayerAnimationControllerImpl::startAnimationsWaitingForStartTime):
3273         (WebCore::CCLayerAnimationControllerImpl::startAnimationsWaitingForTargetAvailability):
3274         (WebCore::CCLayerAnimationControllerImpl::resolveConflicts):
3275         (WebCore::CCLayerAnimationControllerImpl::purgeFinishedAnimations):
3276         (WebCore::CCLayerAnimationControllerImpl::tickAnimations):
3277         * platform/graphics/chromium/cc/CCLayerAnimationControllerImpl.h: Added.
3278         (WebCore::CCLayerAnimationControllerImplClient::~CCLayerAnimationControllerImplClient):
3279
3280 2012-01-18  Sheriff Bot  <webkit.review.bot@gmail.com>
3281
3282         Unreviewed, rolling out r105331.
3283         http://trac.webkit.org/changeset/105331
3284         https://bugs.webkit.org/show_bug.cgi?id=76599
3285
3286         May have broken Chromium InjectIDBKey browser_test (Requested
3287         by rolandsteiner on #webkit).
3288
3289         * bindings/v8/IDBBindingUtilities.cpp:
3290         (WebCore::injectIDBKeyIntoSerializedValue):
3291
3292 2012-01-18  Raymond Liu  <raymond.liu@intel.com>
3293
3294         Remove some unused code in AudioContext
3295         https://bugs.webkit.org/show_bug.cgi?id=76506
3296
3297         Reviewed by Kenneth Russell.
3298
3299         No new tests required.
3300
3301         * webaudio/AudioContext.cpp:
3302         (WebCore::AudioContext::constructCommon):
3303         (WebCore::AudioContext::uninitialize):
3304         * webaudio/AudioContext.h:
3305
3306 2012-01-18  Raymond Liu  <raymond.liu@intel.com>
3307
3308         Only create AudioBus with required number of channels for AudioNodeOutput
3309         https://bugs.webkit.org/show_bug.cgi?id=76417
3310
3311         Reviewed by Kenneth Russell.
3312
3313         No new tests required.
3314
3315         * webaudio/AudioNodeOutput.cpp:
3316         (WebCore::AudioNodeOutput::AudioNodeOutput):
3317         (WebCore::AudioNodeOutput::setNumberOfChannels):
3318         (WebCore::AudioNodeOutput::updateInternalBus):
3319         (WebCore::AudioNodeOutput::updateNumberOfChannels):
3320         (WebCore::AudioNodeOutput::pull):
3321         * webaudio/AudioNodeOutput.h:
3322
3323 2012-01-18  Andreas Kling  <awesomekling@apple.com>
3324
3325         Cache and reuse the NodeList returned by Node::childNodes().
3326         <http://webkit.org/b/76591>
3327
3328         Reviewed by Ryosuke Niwa.
3329
3330         Instead of only caching the DynamicNodeList::Caches for .childNodes on NodeRareData,
3331         cache the full ChildNodeList object. Lifetime management is left to wrappers who
3332         invalidate the cached (raw) pointer via Node::removeCachedChildNodeList(), called
3333         from ~ChildNodeList().
3334
3335         This is a slight behavior change, in that Node.childNodes === Node.childNodes will
3336         now be true. This matches the behavior of both Firefox and Opera.
3337
3338         This reduces memory consumption by 192 kB (on 32-bit) when viewing the full
3339         HTML5 spec at <http://whatwg.org/c>
3340
3341         Test: fast/dom/gc-9.html
3342               fast/dom/node-childNodes-idempotence.html
3343
3344         * dom/Node.cpp:
3345         (WebCore::Node::childNodes):
3346         * dom/NodeRareData.h:
3347         (WebCore::NodeRareData::NodeRareData):
3348         (WebCore::NodeRareData::childNodeList):
3349         (WebCore::NodeRareData::setChildNodeList):
3350
3351             Only construct one ChildNodeList per Node and store it on NodeRareData for
3352             retrieval across childNodes() calls.
3353
3354         * dom/ChildNodeList.h:
3355         (WebCore::ChildNodeList::create):
3356         * dom/ChildNodeList.cpp:
3357         (WebCore::ChildNodeList::ChildNodeList):
3358
3359             Construct the Caches at creation instead of passing it to the constructor.
3360
3361         (WebCore::ChildNodeList::reset):
3362
3363             Added, resets the internal cache.
3364
3365         (WebCore::ChildNodeList::~ChildNodeList):
3366
3367             Call Node::removeCachedChildNodeList().
3368
3369         * dom/DynamicNodeList.cpp:
3370         * dom/DynamicNodeList.h:
3371
3372             Have DynamicNodeList (and subclasses) respond "true" to isDynamicNodeList().
3373             Previously only DynamicSubtreeNodeList (and subclasses) were doing this.
3374             Without it, JSC may GC our ChildNodeLists prematurely (due to NodeList's
3375             isReachableFromOpaqueRoots() implementation checking isDynamicNodeList().)
3376
3377         * dom/Node.h:
3378         * dom/Node.cpp:
3379         (WebCore::Node::removeCachedChildNodeList):
3380
3381             Added for ~ChildNodeList() to remove the pointer to itself from the Node.
3382
3383         (WebCore::NodeRareData::clearChildNodeListCache):
3384
3385             Call ChildNodeList::reset().
3386
3387 2012-01-18  James Robinson  <jamesr@chromium.org>
3388
3389         Unreviewed, rolling out r105366.
3390         http://trac.webkit.org/changeset/105366
3391         https://bugs.webkit.org/show_bug.cgi?id=76015
3392
3393         Breaks CCLayerTreeHostImplTest unit test
3394
3395         * platform/graphics/chromium/TiledLayerChromium.cpp:
3396         (WebCore::TiledLayerChromium::pushPropertiesTo):
3397         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
3398         * platform/graphics/chromium/cc/CCDrawQuad.h:
3399         (WebCore::CCDrawQuad::drawsOpaque):
3400         (WebCore::CCDrawQuad::needsBlending):
3401         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
3402         (WebCore::CCQuadCuller::cullOccludedQuads):
3403         * platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp:
3404         (WebCore::CCSolidColorDrawQuad::CCSolidColorDrawQuad):
3405         * platform/graphics/chromium/cc/CCTileDrawQuad.cpp:
3406         (WebCore::CCTileDrawQuad::create):
3407         (WebCore::CCTileDrawQuad::CCTileDrawQuad):
3408         * platform/graphics/chromium/cc/CCTileDrawQuad.h:
3409         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
3410         (WebCore::CCTiledLayerImpl::appendQuads):
3411         (WebCore::CCTiledLayerImpl::syncTextureId):
3412         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
3413
3414 2012-01-18  Thiago Marcos P. Santos  <tmpsantos@gmail.com>
3415
3416         Save two ID checks on CSS Min/Width property validation
3417         https://bugs.webkit.org/show_bug.cgi?id=76565
3418
3419         The same validation is done again in the next case statement. Check for
3420         CSSValueIntrinsic and CSSValueMinIntrinsic was done twice when the value
3421         is a number.
3422
3423         Reviewed by Andreas Kling.
3424
3425         * css/CSSParser.cpp:
3426         (WebCore::CSSParser::parseValue):
3427
3428 2012-01-18  Dana Jansens  <danakj@chromium.org>
3429
3430         [chromium] Use region reported painted opaque for draw culling
3431         https://bugs.webkit.org/show_bug.cgi?id=76015
3432
3433         Reviewed by James Robinson.
3434
3435         New unit tests in CCQuadCullerTest.cpp and CCTiledLayerImplTest.cpp
3436
3437         * platform/graphics/chromium/TiledLayerChromium.cpp:
3438         (WebCore::TiledLayerChromium::pushPropertiesTo):
3439         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
3440         * platform/graphics/chromium/cc/CCDrawQuad.h:
3441         (WebCore::CCDrawQuad::opaqueRect):
3442         (WebCore::CCDrawQuad::needsBlending):
3443         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
3444         (WebCore::CCQuadCuller::cullOccludedQuads):
3445         * platform/graphics/chromium/cc/CCTileDrawQuad.cpp:
3446         (WebCore::CCTileDrawQuad::create):
3447         (WebCore::CCTileDrawQuad::CCTileDrawQuad):
3448         * platform/graphics/chromium/cc/CCTileDrawQuad.h:
3449         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
3450         (WebCore::DrawableTile::opaqueRect):
3451         (WebCore::DrawableTile::setOpaqueRect):
3452         (WebCore::CCTiledLayerImpl::appendQuads):
3453         (WebCore::CCTiledLayerImpl::pushTileProperties):
3454         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
3455
3456 2012-01-18  Victoria Kirst  <vrk@chromium.org>
3457
3458         HTMLMediaElement should fire 'progress' event before 'idle' if it was previously loading
3459         https://bugs.webkit.org/show_bug.cgi?id=76568
3460
3461         Reviewed by Eric Carlson.
3462
3463         This fires a progress event when going from a non-empty state to idle,
3464         for the same reason that a progress event is fired when going from a
3465         non-idle state to loaded. Also consolidated logic in a single helper method.
3466
3467         No new tests because the decision of if/when a user agent sets the network state
3468         to idle is up to the user agent in this scenario.
3469
3470         * html/HTMLMediaElement.cpp:
3471         (WebCore::HTMLMediaElement::setNetworkState):
3472         (WebCore::HTMLMediaElement::changeNetworkStateFromLoadingToIdle):
3473         * html/HTMLMediaElement.h:
3474
3475 2012-01-18  Jon Lee  <jonlee@apple.com>
3476
3477         [WK2] Sync call for notifications permissions causes flashes on gmail.com
3478         https://bugs.webkit.org/show_bug.cgi?id=76570
3479         <rdar://problem/10647155>
3480
3481         Reviewed by Anders Carlsson and Sam Weinig.
3482
3483         * WebCore.exp.in: Export SecurityOrigin::toString().
3484
3485         Add runtime setting to enable/disable notifications.
3486
3487         * page/Settings.cpp:
3488         (WebCore::Settings::Settings):
3489         * page/Settings.h: Add new bit for whether notifications are enabled.
3490         (WebCore::Settings::setNotificationsEnabled):
3491         (WebCore::Settings::notificationsEnabled):
3492
3493 2012-01-18  Eric Carlson  <eric.carlson@apple.com>
3494
3495         Provide access to user's list of preferred languages
3496         https://bugs.webkit.org/show_bug.cgi?id=76138
3497
3498         Reviewed by Timothy Hatcher.
3499
3500         No new tests, tested by fast/harness/user-preferred-language.html.
3501
3502         * platform/mac/Language.mm:
3503         (WebCore::platformUserPreferredLanguages): Don't over-release a the CFStrings returned by 
3504             CFLocaleCopyPreferredLanguages.
3505
3506 2012-01-18  Joshua Bell  <jsbell@chromium.org>
3507
3508         IndexedDB: Implement create-intermediate-objects semantics when injecting values via keyPaths
3509         https://bugs.webkit.org/show_bug.cgi?id=76493
3510
3511         Reviewed by Tony Chang.
3512
3513         Tests: storage/indexeddb/objectstore-autoincrement.html
3514
3515         * bindings/v8/IDBBindingUtilities.cpp:
3516         (WebCore::injectIDBKeyIntoSerializedValue):
3517
3518 2012-01-18  Joshua Bell  <jsbell@chromium.org>
3519
3520         IndexedDB: Invalid keys yielded by key paths should raise exceptions, not error callbacks
3521         https://bugs.webkit.org/show_bug.cgi?id=76075
3522
3523         Reviewed by Tony Chang.
3524
3525         Tests: storage/indexeddb/objectstore-basics.html
3526
3527         * storage/IDBObjectStoreBackendImpl.cpp:
3528         (WebCore::IDBObjectStoreBackendImpl::put):
3529
3530 2012-01-18  Dana Jansens  <danakj@chromium.org>
3531
3532         [chromium] Fix compile error from bug #76211
3533         https://bugs.webkit.org/show_bug.cgi?id=76575
3534
3535         Reviewed by James Robinson.
3536
3537         No new tests. Fixing compile only.
3538
3539         * platform/graphics/chromium/ImageLayerChromium.cpp:
3540         (WebCore::ImageLayerTextureUpdater::prepareToUpdate):
3541
3542 2012-01-18  Adam Barth  <abarth@webkit.org>
3543
3544         REGRESSION (r104000): AdBlock extension fails to load/function
3545         https://bugs.webkit.org/show_bug.cgi?id=75554
3546
3547         Reviewed by Andy Estes.
3548
3549         Previously, we would claim the documentElement was available before
3550         we'd actually attached it to the DOM (which we now do via the
3551         attachment queue).  This issue was noted in the code with a FIXME
3552         comment, but there was no test coverage for the issue.  This patch
3553         resolves the FIXME and adds a test.
3554
3555         Test: userscripts/document-element-available-at-start.html
3556
3557         * html/parser/HTMLConstructionSite.cpp:
3558         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
3559
3560 2012-01-18  Eric Carlson  <eric.carlson@apple.com>
3561
3562         Provide access to user's list of preferred languages
3563         https://bugs.webkit.org/show_bug.cgi?id=76138
3564
3565         Reviewed by Alexey Proskuryakov.
3566
3567         Test: fast/harness/user-preferred-language.html
3568
3569         * WebCore.exp.in: Export the new functions.
3570         * WebCore.order: Ditto.
3571
3572         * Target.pri: Include new files.
3573         * WebCore.gypi: Ditto.
3574         * WebCore.vcproj/WebCoreTestSupport.vcproj: Ditto.
3575         * WebCore.xcodeproj/project.pbxproj: Ditto.
3576
3577         * platform/Language.cpp:
3578         (WebCore::defaultLanguage): Return userPreferredLanguages[0].
3579         (WebCore::preferredLanguagesOverride): New, return the languages override.
3580         (WebCore::overrideUserPreferredLanguages): New, set the languages override.
3581         (WebCore::userPreferredLanguages): New, return the languages array.
3582         * platform/Language.h:
3583
3584         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
3585         (WebCore::platformLanguage): Renamed from platformDefaultLanguage, now static.
3586         (WebCore::platformUserPreferredLanguages): New.
3587
3588         * platform/chromium/LanguageChromium.cpp:
3589         (WebCore::platformLanguage): Renamed from platformDefaultLanguage, now static.
3590         (WebCore::platformUserPreferredLanguages): New.
3591
3592         * platform/efl/LanguageEfl.cpp:
3593         (WebCore::platformLanguage): Renamed from platformDefaultLanguage, now static.
3594         (WebCore::platformUserPreferredLanguages): New.
3595
3596         * platform/gtk/LanguageGtk.cpp:
3597         (WebCore::platformLanguage): Renamed from platformDefaultLanguage, now static.
3598         (WebCore::platformUserPreferredLanguages): New.
3599
3600         * platform/mac/Language.mm:
3601         (+[WebLanguageChangeObserver _webkit_languagePreferencesDidChange]): Flag the user languages
3602             as invalid.
3603         (WebCore::platformLanguage): Removed.
3604         (WebCore::platformUserPreferredLanguages): New, return the list of user preferred languages.
3605
3606         * platform/qt/LanguageQt.cpp:
3607         (WebCore::platformLanguage): Renamed from platformDefaultLanguage, now static.
3608         (WebCore::platformUserPreferredLanguages): New.
3609
3610         * platform/win/LanguageWin.cpp:
3611         (WebCore::platformLanguage): Renamed from platformDefaultLanguage, now static.
3612         (WebCore::platformUserPreferredLanguages): New.
3613
3614         * testing/Internals.cpp:
3615         (WebCore::Internals::userPreferredLanguages): New, return the platform's user preferred languages.
3616         (WebCore::Internals::setUserPreferredLanguages): New, override the user's preferred languages.
3617         * testing/Internals.h:
3618         * testing/Internals.idl: Add userPreferredLanguages.
3619
3620         * testing/js/JSInternalsCustom.cpp:
3621         (WebCore::JSInternals::userPreferredLanguages): New.
3622         (WebCore::JSInternals::setUserPreferredLanguages): New.
3623
3624         * testing/v8/V8InternalsCustom.cpp:
3625         (WebCore::V8Internals::userPreferredLanguagesAccessorGetter): New.
3626         (WebCore::V8Internals::userPreferredLanguagesAccessorSetter): New.
3627
3628 2012-01-18  Dana Jansens  <danakj@chromium.org>
3629
3630         [chromium] Enable tracking opaque region in Skia graphics context, return it from LayerTextureUpdater
3631         https://bugs.webkit.org/show_bug.cgi?id=76211
3632
3633         Reviewed by James Robinson.
3634
3635         New unit tests in LayerTextureUpdaterTest.cpp
3636
3637         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
3638         (WebCore::BitmapCanvasLayerTextureUpdater::prepareToUpdate):
3639         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
3640         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp:
3641         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::prepareToUpdate):
3642         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
3643         * platform/graphics/chromium/ContentLayerChromium.cpp:
3644         (WebCore::ContentLayerChromium::createTextureUpdater):
3645         * platform/graphics/chromium/LayerTextureUpdater.h:
3646         (WebCore::LayerTextureUpdater::prepareToUpdate):
3647         * platform/graphics/chromium/PlatformCanvas.h:
3648         (WebCore::PlatformCanvas::Painter::skiaContext):
3649         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp:
3650         (WebCore::SkPictureCanvasLayerTextureUpdater::SkPictureCanvasLayerTextureUpdater):
3651         (WebCore::SkPictureCanvasLayerTextureUpdater::prepareToUpdate):
3652         (WebCore::SkPictureCanvasLayerTextureUpdater::setOpaque):
3653         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.h:
3654         * platform/graphics/chromium/TiledLayerChromium.cpp:
3655         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
3656
3657 2012-01-18  Tim Dresser  <tdresser@chromium.org>
3658
3659         [chromium] Refactor canvas, plugin, and video drawing to be more data-driven
3660         https://bugs.webkit.org/show_bug.cgi?id=76274
3661
3662         Reviewed by James Robinson.
3663
3664         This is the first step in refactoring canvas, plugin, and video drawing.
3665         The CCCustomLayerDrawQuad implementation has been copied to CCCanvasDrawQuad, CCPluginDrawQuad and CCVideoDrawQuad.
3666         All references to CustomLayer have been removed.
3667
3668         As this is a refactor, no new tests were added. CCLayerTreeHostImplTest.blendingOffWhenDrawingOpaqueLayers was modified to
3669         no longer test culling.
3670
3671         * WebCore.gypi:
3672         * platform/graphics/chromium/LayerRendererChromium.cpp:
3673         (WebCore::LayerRendererChromium::drawQuad):
3674         (WebCore::LayerRendererChromium::drawCanvasQuad):
3675         (WebCore::LayerRendererChromium::drawVideoQuad):
3676         (WebCore::LayerRendererChromium::drawPluginQuad):
3677         * platform/graphics/chromium/LayerRendererChromium.h:
3678         * platform/graphics/chromium/cc/CCCanvasDrawQuad.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.cpp.
3679         (WebCore::CCCanvasDrawQuad::create):
3680         (WebCore::CCCanvasDrawQuad::CCCanvasDrawQuad):
3681         * platform/graphics/chromium/cc/CCCanvasDrawQuad.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.h.
3682         (WebCore::CCCanvasDrawQuad::layer):
3683         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
3684         (WebCore::CCCanvasLayerImpl::appendQuads):
3685         * platform/graphics/chromium/cc/CCCanvasLayerImpl.h:
3686         * platform/graphics/chromium/cc/CCDrawQuad.cpp:
3687         (WebCore::CCDrawQuad::toCanvasDrawQuad):
3688         (WebCore::CCDrawQuad::toVideoDrawQuad):
3689         (WebCore::CCDrawQuad::toPluginDrawQuad):
3690         * platform/graphics/chromium/cc/CCDrawQuad.h:
3691         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
3692         (WebCore::CCLayerImpl::appendQuads):
3693         * platform/graphics/chromium/cc/CCPluginDrawQuad.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.cpp.
3694         (WebCore::CCPluginDrawQuad::create):
3695         (WebCore::CCPluginDrawQuad::CCPluginDrawQuad):
3696         * platform/graphics/chromium/cc/CCPluginDrawQuad.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.h.
3697         (WebCore::CCPluginDrawQuad::layer):
3698         * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
3699         (WebCore::CCPluginLayerImpl::appendQuads):
3700         * platform/graphics/chromium/cc/CCPluginLayerImpl.h:
3701         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
3702         * platform/graphics/chromium/cc/CCVideoDrawQuad.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.cpp.
3703         (WebCore::CCVideoDrawQuad::create):
3704         (WebCore::CCVideoDrawQuad::CCVideoDrawQuad):
3705         * platform/graphics/chromium/cc/CCVideoDrawQuad.h: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.h.
3706         (WebCore::CCVideoDrawQuad::layer):
3707         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
3708         (WebCore::CCVideoLayerImpl::appendQuads):
3709         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
3710
3711 2012-01-18  Vsevolod Vlasov  <vsevik@chromium.org>
3712
3713         Web Inspector: Unsafe cross origin access errors should show stack trace in console.
3714         https://bugs.webkit.org/show_bug.cgi?id=73099
3715
3716         Reviewed by Pavel Feldman.
3717
3718         Test: http/tests/inspector/console-cross-origin-iframe-logging.html
3719
3720         * bindings/v8/V8Proxy.cpp:
3721         (WebCore::V8Proxy::reportUnsafeAccessTo):
3722         * dom/ScriptExecutionContext.cpp:
3723         (WebCore::ScriptExecutionContext::addConsoleMessage):
3724         * dom/ScriptExecutionContext.h:
3725         * loader/FrameLoader.cpp:
3726         (WebCore::FrameLoader::shouldAllowNavigation):
3727         * page/Console.cpp:
3728         (WebCore::Console::addMessage):
3729         * page/Console.h:
3730         * page/DOMWindow.cpp:
3731         (WebCore::PostMessageTimer::PostMessageTimer):
3732         (WebCore::PostMessageTimer::stackTrace):
3733         (WebCore::DOMWindow::postMessage):
3734         (WebCore::DOMWindow::postMessageTimerFired):
3735         (WebCore::DOMWindow::printErrorMessage):
3736
3737 2012-01-18  Pablo Flouret  <pablof@motorola.com>
3738
3739         Add [CallWith] support for attributes in JSC/V8 idl code generators.
3740         Part of https://bugs.webkit.org/show_bug.cgi?id=76035
3741
3742         Reviewed by Adam Barth.
3743
3744         * bindings/scripts/CodeGeneratorJS.pm:
3745         (GenerateImplementation):
3746         (GenerateAttributeCallWith):
3747         * bindings/scripts/CodeGeneratorV8.pm:
3748         (GenerateNormalAttrGetter):
3749         (GenerateNormalAttrSetter):
3750         (GenerateAttributeCallWith):
3751         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
3752         (WebDOMTestObj::withScriptStateAttribute):
3753         (WebDOMTestObj::setWithScriptStateAttribute):
3754         (WebDOMTestObj::withScriptExecutionContextAttribute):
3755         (WebDOMTestObj::setWithScriptExecutionContextAttribute):
3756         (WebDOMTestObj::withScriptStateAttributeRaises):
3757         (WebDOMTestObj::setWithScriptStateAttributeRaises):
3758         (WebDOMTestObj::withScriptExecutionContextAttributeRaises):
3759         (WebDOMTestObj::setWithScriptExecutionContextAttributeRaises):
3760         * bindings/scripts/test/CPP/WebDOMTestObj.h:
3761         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
3762         (webkit_dom_test_obj_get_with_script_state_attribute):
3763         (webkit_dom_test_obj_set_with_script_state_attribute):
3764         (webkit_dom_test_obj_get_with_script_execution_context_attribute):
3765         (webkit_dom_test_obj_set_with_script_execution_context_attribute):
3766         (webkit_dom_test_obj_get_with_script_state_attribute_raises):
3767         (webkit_dom_test_obj_set_with_script_state_attribute_raises):
3768         (webkit_dom_test_obj_get_with_script_execution_context_attribute_raises):
3769         (webkit_dom_test_obj_set_with_script_execution_context_attribute_raises):
3770         (webkit_dom_test_obj_set_property):
3771         (webkit_dom_test_obj_get_property):
3772         (webkit_dom_test_obj_class_init):
3773         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
3774         * bindings/scripts/test/JS/JSTestObj.cpp:
3775         (WebCore::jsTestObjWithScriptStateAttribute):
3776         (WebCore::jsTestObjWithScriptExecutionContextAttribute):
3777         (WebCore::jsTestObjWithScriptStateAttributeRaises):
3778         (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
3779         (WebCore::setJSTestObjWithScriptStateAttribute):
3780         (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
3781         (WebCore::setJSTestObjWithScriptStateAttributeRaises):
3782         (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
3783         * bindings/scripts/test/JS/JSTestObj.h:
3784         * bindings/scripts/test/ObjC/DOMTestObj.h:
3785         * bindings/scripts/test/ObjC/DOMTestObj.mm:
3786         (-[DOMTestObj withScriptStateAttribute]):
3787         (-[DOMTestObj setWithScriptStateAttribute:]):
3788         (-[DOMTestObj withScriptExecutionContextAttribute]):
3789         (-[DOMTestObj setWithScriptExecutionContextAttribute:]):
3790         (-[DOMTestObj withScriptStateAttributeRaises]):
3791         (-[DOMTestObj setWithScriptStateAttributeRaises:]):
3792         (-[DOMTestObj withScriptExecutionContextAttributeRaises]):
3793         (-[DOMTestObj setWithScriptExecutionContextAttributeRaises:]):
3794         * bindings/scripts/test/TestObj.idl:
3795         * bindings/scripts/test/V8/V8TestObj.cpp:
3796         (WebCore::TestObjInternal::withScriptStateAttributeAttrGetter):
3797         (WebCore::TestObjInternal::withScriptStateAttributeAttrSetter):
3798         (WebCore::TestObjInternal::withScriptExecutionContextAttributeAttrGetter):
3799         (WebCore::TestObjInternal::withScriptExecutionContextAttributeAttrSetter):
3800         (WebCore::TestObjInternal::withScriptStateAttributeRaisesAttrGetter):
3801         (WebCore::TestObjInternal::withScriptStateAttributeRaisesAttrSetter):
3802         (WebCore::TestObjInternal::withScriptExecutionContextAttributeRaisesAttrGetter):
3803         (WebCore::TestObjInternal::withScriptExecutionContextAttributeRaisesAttrSetter):
3804
3805 2012-01-18  Tim Horton  <timothy_horton@apple.com>
3806
3807         [CG] Rasterized scaling of transformed SVG shapes with gradient fill and -webkit-svg-shadow applied
3808         https://bugs.webkit.org/show_bug.cgi?id=76482
3809         <rdar://problem/10415483>
3810
3811         Reviewed by Simon Fraser.
3812
3813         Scale the CGLayer used when filling or stroking a shadowed path or rect with
3814         a gradient in GraphicsContextCG. Previously, the CGLayer was created and rendered
3815         into at the untransformed size of the shape, leading to pixelation when it was
3816         then scaled up and drawn into the destination.
3817
3818         Add AffineTransform::mapSize() to map a size through a transformation.
3819
3820         Test: svg/custom/transform-with-shadow-and-gradient.svg
3821
3822         * platform/graphics/cg/GraphicsContextCG.cpp:
3823         (WebCore::GraphicsContext::fillPath):
3824         (WebCore::GraphicsContext::strokePath):
3825         (WebCore::GraphicsContext::fillRect):
3826         (WebCore::GraphicsContext::strokeRect):
3827         * platform/graphics/transforms/AffineTransform.cpp:
3828         (WebCore::AffineTransform::mapSize): Added.
3829         * platform/graphics/transforms/AffineTransform.h:
3830
3831 2012-01-18  Dominic Mazzoni  <dmazzoni@google.com>
3832
3833         Accessibility: Chromium needs methods to scroll an object into view or to a specific location.
3834         https://bugs.webkit.org/show_bug.cgi?id=73460
3835
3836         Reviewed by Chris Fleizach.
3837
3838         Tests: platform/chromium/accessibility/scroll-to-global-point-main-window.html
3839                platform/chromium/accessibility/scroll-to-global-point-nested.html
3840                platform/chromium/accessibility/scroll-to-global-point-iframe.html
3841                platform/chromium/accessibility/scroll-to-global-point-iframe-nested.html
3842                platform/chromium/accessibility/scroll-to-make-visible-div-overflow.html
3843                platform/chromium/accessibility/scroll-to-make-visible-iframe.html
3844                platform/chromium/accessibility/scroll-to-make-visible-main-window.html
3845                platform/chromium/accessibility/scroll-to-make-visible-nested.html
3846                platform/chromium/accessibility/scroll-to-make-visible-with-subfocus.html
3847
3848         * accessibility/AccessibilityObject.cpp:
3849         (WebCore::computeBestScrollOffset):
3850         (WebCore::AccessibilityObject::scrollToMakeVisible):
3851         (WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):
3852         (WebCore::AccessibilityObject::scrollToGlobalPoint):
3853         * accessibility/AccessibilityObject.h:
3854         (WebCore::AccessibilityObject::getScrollableAreaIfScrollable):
3855         (WebCore::AccessibilityObject::scrollTo):
3856         * accessibility/AccessibilityRenderObject.cpp:
3857         (WebCore::AccessibilityRenderObject::getScrollableAreaIfScrollable):
3858         (WebCore::AccessibilityRenderObject::scrollTo):
3859         * accessibility/AccessibilityRenderObject.h:
3860         * accessibility/AccessibilityScrollView.cpp:
3861         (WebCore::AccessibilityScrollView::getScrollableAreaIfScrollable):
3862         (WebCore::AccessibilityScrollView::scrollTo):
3863         * accessibility/AccessibilityScrollView.h:
3864
3865 2012-01-17  Alexey Proskuryakov  <ap@apple.com>
3866
3867         file:// doesn't work as base URL
3868         https://bugs.webkit.org/show_bug.cgi?id=76496
3869
3870         Reviewed by Darin Adler.
3871
3872         Test: fast/url/degenerate-file-base.html
3873
3874         * platform/KURL.cpp: (WebCore::KURL::parse): Handle degenerate file URLs properly.
3875
3876 2012-01-18  Ilya Tikhonovsky  <loislo@chromium.org>
3877
3878         [chromium] Web Inspector: highlight DOM nodes from detached DOM trees.
3879         https://bugs.webkit.org/show_bug.cgi?id=76545
3880
3881         Reviewed by Yury Semikhatsky.
3882
3883         * inspector/front-end/DetailedHeapshotGridNodes.js:
3884         (WebInspector.HeapSnapshotGenericObjectNode):
3885         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
3886         * inspector/front-end/HeapSnapshot.js:
3887         (WebInspector.HeapSnapshotNode.prototype.get isNativeRoot):
3888         (WebInspector.HeapSnapshotNode.prototype.get isDetachedDOMTree):
3889         (WebInspector.HeapSnapshot.prototype._init):
3890         (WebInspector.HeapSnapshot.prototype._markDetachedDOMTreeNodes):
3891         (WebInspector.HeapSnapshot.prototype._markQueriableHeapObjects):
3892         (WebInspector.HeapSnapshot.prototype._calculateFlags):
3893         * inspector/front-end/heapProfiler.css:
3894         (.detached-dom-tree-node):
3895
3896 2012-01-18  Pavel Feldman  <pfeldman@google.com>
3897
3898         Web Inspector: there should be a way to set HTML for given frame.
3899         https://bugs.webkit.org/show_bug.cgi?id=76548
3900
3901         Reviewed by Yury Semikhatsky.
3902
3903         * inspector/Inspector.json:
3904         * inspector/InspectorPageAgent.cpp:
3905         (WebCore::InspectorPageAgent::setDocumentContent):
3906         * inspector/InspectorPageAgent.h:
3907         * inspector/front-end/DOMAgent.js:
3908         (WebInspector.DOMModelResourceBinding.prototype.setContent.callbackWrapper):
3909         (WebInspector.DOMModelResourceBinding.prototype.setContent):
3910
3911 2012-01-18  Sergio Villar Senin  <svillar@igalia.com>
3912
3913         [GTK] [regression] A couple of tests failing after r105253
3914         https://bugs.webkit.org/show_bug.cgi?id=76549
3915
3916         Reviewed by Gustavo Noronha Silva.
3917
3918         Fixes a regression added by r105253. The method that
3919         RenderThemeGtk needs to overwrite is popsMenuBySpaceOrReturn()
3920         instead of popsMenuByArrowKeys().
3921
3922         No new tests as it's already covered by
3923         fast/forms/select-popup-pagekeys.html and
3924         fast/forms/select/menulist-onchange-fired-with-key-up-down.html
3925         that started to fail after the revision mentioned above.
3926
3927         * platform/gtk/RenderThemeGtk.h:
3928         (WebCore::RenderThemeGtk::popsMenuBySpaceOrReturn):
3929
3930 2012-01-18  Andrey Kosyakov  <caseq@chromium.org>
3931
3932         Web Inspector: omit compression field in HAR entries for resources coming from cache
3933         https://bugs.webkit.org/show_bug.cgi?id=76543
3934
3935         Reviewed by Yury Semikhatsky.
3936
3937         * inspector/front-end/HAREntry.js:
3938         (WebInspector.HAREntry.prototype._buildContent):
3939         (WebInspector.HAREntry.prototype.get responseCompression):
3940
3941 2012-01-18  Mihnea Ovidenie  <mihnea@adobe.com>
3942
3943         [CSSRegions]Fix region style code in CSSStyleSelector
3944         https://bugs.webkit.org/show_bug.cgi?id=76453
3945
3946         Reviewed by Antti Koivisto.
3947
3948         Follow up after comments in https://bugs.webkit.org/show_bug.cgi?id=76064.
3949         With the new approach, the css rule specificity is correctly taken into account
3950         when applying the region style rule.
3951         No new tests, the region style tests are still disabled.
3952
3953         * css/CSSStyleSelector.cpp:
3954         (WebCore::RuleSet::RuleSetSelectorPair::RuleSetSelectorPair):
3955         (WebCore::CSSStyleSelector::CSSStyleSelector):
3956         (WebCore::CSSStyleSelector::addMatchedDeclaration):
3957         (WebCore::CSSStyleSelector::collectMatchingRules):
3958         (WebCore::CSSStyleSelector::collectMatchingRulesForRegion):
3959         (WebCore::CSSStyleSelector::matchRules):
3960         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
3961         (WebCore::CSSStyleSelector::matchAllRules):
3962         (WebCore::CSSStyleSelector::styleForElement):
3963         (WebCore::CSSStyleSelector::pseudoStyleForElement):
3964         (WebCore::CSSStyleSelector::checkRegionStyle):
3965         (WebCore::CSSStyleSelector::checkRegionSelector):
3966         (WebCore::RuleData::RuleData):
3967         (WebCore::RuleSet::RuleSet):
3968         (WebCore::RuleSet::addRule):
3969         (WebCore::RuleSet::addRegionRule):
3970         (WebCore::RuleSet::addRulesFromSheet):
3971         (WebCore::isInsideRegionRule):
3972         (WebCore::CSSStyleSelector::applyDeclaration):
3973         (WebCore::CSSStyleSelector::applyDeclarations):
3974         (WebCore::CSSStyleSelector::isValidRegionStyleProperty):
3975         (WebCore::CSSStyleSelector::applyProperty):
3976         * css/CSSStyleSelector.h:
3977
3978 2012-01-17  Jer Noble  <jer.noble@apple.com>
3979
3980         Mac fails to fire an 'error' event for a <video> <source> having an URL with no file extension
3981         https://bugs.webkit.org/show_bug.cgi?id=76494
3982
3983         Reviewed by Eric Carlson.
3984
3985         No new tests; fixes compositing/video/video-with-invalid-source.html. Modified 
3986         media/video-source-error-no-candidate.html to check error condition.
3987
3988         When we run out of media engines for a given resource, inform the media player client
3989         that resource loading failed by calling mediaPlayerResourceNotSupported().
3990
3991         * html/HTMLMediaElement.cpp:
3992         (WebCore::HTMLMediaElement::mediaPlayerResourceNotSupported):
3993         * html/HTMLMediaElement.h:
3994         * platform/graphics/MediaPlayer.cpp:
3995         (WebCore::MediaPlayer::loadWithNextMediaEngine):
3996         * platform/graphics/MediaPlayer.h:
3997         (WebCore::MediaPlayerClient::mediaPlayerResourceNotSupported):
3998
3999 2012-01-18  Alexandru Chiculita  <achicu@adobe.com>
4000
4001         CSS Shaders: Parse float parameters for the custom() filter syntax
4002         https://bugs.webkit.org/show_bug.cgi?id=76253
4003
4004         Reviewed by Nikolas Zimmermann.
4005
4006         Custom CSS filters allow passing parameters from CSS to the underlying rendering technology (in this case WebGL Shaders).
4007         This patch adds support for parameters of types float, vec2, vec3 and vec4.
4008
4009         https://dvcs.w3.org/hg/FXTF/raw-file/tip/custom/index.html#feCustomParamsAttribute
4010
4011         Tests: css3/filters/effect-custom-combined-missing.html
4012                css3/filters/effect-custom-parameters.html
4013
4014         * GNUmakefile.list.am:
4015         * Target.pri:
4016         * WebCore.gypi:
4017         * WebCore.vcproj/WebCore.vcproj:
4018         * WebCore.xcodeproj/project.pbxproj:
4019             Added CustomFilterParameter.h, CustomFilterNumberParameter.h and CustomFilterOperation.cpp to the projects.
4020
4021         * css/CSSComputedStyleDeclaration.cpp:
4022         (WebCore::CSSComputedStyleDeclaration::valueForCustomFilterNumberParameter):
4023         (WebCore::CSSComputedStyleDeclaration::valueForCustomFilterParameter):
4024         (WebCore::CSSComputedStyleDeclaration::valueForFilter):
4025             Added the computed parameters in alphabetic order (CustomFilterOperation always keeps the parameters sorted).
4026         * css/CSSComputedStyleDeclaration.h:
4027         * css/CSSStyleSelector.cpp:
4028         (WebCore::sortParametersByNameComparator):
4029         (WebCore::CSSStyleSelector::parseCustomFilterNumberParamter):
4030         (WebCore::CSSStyleSelector::parseCustomFilterParameterList):
4031         (WebCore::CSSStyleSelector::createCustomFilterOperation):
4032             Added parsing for float, vec2, vec3 and vec4. The values are space separated.
4033
4034         * css/CSSStyleSelector.h:
4035         * platform/graphics/filters/CustomFilterNumberParameter.h: Added.
4036         (WebCore::CustomFilterNumberParameter::create):
4037         (WebCore::CustomFilterNumberParameter::size):
4038         (WebCore::CustomFilterNumberParameter::valueAt):
4039         (WebCore::CustomFilterNumberParameter::addValue):
4040         (WebCore::CustomFilterNumberParameter::CustomFilterNumberParameter):
4041
4042         * platform/graphics/filters/CustomFilterOperation.cpp: Added.
4043         (WebCore::CustomFilterOperation::CustomFilterOperation):
4044         (WebCore::CustomFilterOperation::~CustomFilterOperation):
4045             Moved constructor and destructor in CustomFilterOperation.cpp to avoid including CustomFilterParameter everywhere.
4046         (WebCore::CustomFilterOperation::hasSortedParameterList):
4047             Debug runtime check that we always have parameters in alphabetic order.
4048
4049         * platform/graphics/filters/CustomFilterOperation.h:
4050         (WebCore::CustomFilterOperation::create):
4051         (WebCore::CustomFilterOperation::parameters):
4052             Just added the parameters list. Not using a map, but keeping the items sorted by name. We need them sorted
4053             to make it easy and fast to merge two CustomFilterOperations during animations.
4054
4055         * platform/graphics/filters/CustomFilterParameter.h: Added.
4056         (WebCore::CustomFilterParameter::~CustomFilterParameter):
4057         (WebCore::CustomFilterParameter::parameterType):
4058         (WebCore::CustomFilterParameter::name):
4059         (WebCore::CustomFilterParameter::CustomFilterParameter):
4060         * platform/graphics/filters/CustomFilterShader.cpp:
4061