48a032798fbd104cb638480295e9adaa86f04391
[WebKit.git] / Source / WebCore / ChangeLog
1 2011-02-02  Andrey Adaikin  <aandrey@google.com>
2
3         Reviewed by Pavel Feldman.
4
5         Web Inspector: Use DIVs instead of TABLE in TextViewer
6         https://bugs.webkit.org/show_bug.cgi?id=53299
7
8         * inspector/front-end/SourceFrame.js:
9         (WebInspector.SourceFrame.prototype._createTextViewer):
10         (WebInspector.SourceFrame.prototype._mouseDown):
11         * inspector/front-end/TextViewer.js:
12         (WebInspector.TextViewer):
13         (WebInspector.TextViewer.prototype.set mimeType):
14         (WebInspector.TextViewer.prototype.revealLine):
15         (WebInspector.TextViewer.prototype.addDecoration):
16         (WebInspector.TextViewer.prototype.removeDecoration):
17         (WebInspector.TextViewer.prototype.markAndRevealRange):
18         (WebInspector.TextViewer.prototype.highlightLine):
19         (WebInspector.TextViewer.prototype.clearLineHighlight):
20         (WebInspector.TextViewer.prototype.freeCachedElements):
21         (WebInspector.TextViewer.prototype._handleKeyDown):
22         (WebInspector.TextViewer.prototype.editLine.finishEditing):
23         (WebInspector.TextViewer.prototype.editLine):
24         (WebInspector.TextViewer.prototype.beginUpdates):
25         (WebInspector.TextViewer.prototype.endUpdates):
26         (WebInspector.TextViewer.prototype.resize):
27         (WebInspector.TextViewer.prototype._textChanged):
28         (WebInspector.TextViewer.prototype._updatePanelOffsets):
29         (WebInspector.TextViewer.prototype._syncScroll):
30         (WebInspector.TextViewer.prototype._syncDecorationsForLine):
31         (WebInspector.TextEditorChunkedPanel):
32         (WebInspector.TextEditorChunkedPanel.prototype.set syncScrollListener):
33         (WebInspector.TextEditorChunkedPanel.prototype.get textModel):
34         (WebInspector.TextEditorChunkedPanel.prototype.addDecoration):
35         (WebInspector.TextEditorChunkedPanel.prototype.removeDecoration):
36         (WebInspector.TextEditorChunkedPanel.prototype.revealLine):
37         (WebInspector.TextEditorChunkedPanel.prototype.makeLineAChunk):
38         (WebInspector.TextEditorChunkedPanel.prototype.textChanged):
39         (WebInspector.TextEditorChunkedPanel.prototype.beginUpdates):
40         (WebInspector.TextEditorChunkedPanel.prototype.endUpdates):
41         (WebInspector.TextEditorChunkedPanel.prototype.resize):
42         (WebInspector.TextEditorChunkedPanel.prototype._scroll):
43         (WebInspector.TextEditorChunkedPanel.prototype._scheduleRepaintAll):
44         (WebInspector.TextEditorChunkedPanel.prototype._buildChunks):
45         (WebInspector.TextEditorChunkedPanel.prototype._repaintAll):
46         (WebInspector.TextEditorChunkedPanel.prototype._chunkNumberForLine):
47         (WebInspector.TextEditorChunkedPanel.prototype._chunkForLine):
48         (WebInspector.TextEditorGutterPanel):
49         (WebInspector.TextEditorGutterPanel.prototype.freeCachedElements):
50         (WebInspector.TextEditorGutterPanel.prototype._createNewChunk):
51         (WebInspector.TextEditorGutterPanel.prototype._expandChunks):
52         (WebInspector.TextEditorGutterChunk):
53         (WebInspector.TextEditorGutterChunk.prototype.get expanded):
54         (WebInspector.TextEditorGutterChunk.prototype.set expanded):
55         (WebInspector.TextEditorGutterChunk.prototype.get height):
56         (WebInspector.TextEditorGutterChunk.prototype._createRow):
57         (WebInspector.TextEditorMainPanel):
58         (WebInspector.TextEditorMainPanel.prototype.set syncDecorationsForLine):
59         (WebInspector.TextEditorMainPanel.prototype.set mimeType):
60         (WebInspector.TextEditorMainPanel.prototype.markAndRevealRange):
61         (WebInspector.TextEditorMainPanel.prototype.highlightLine):
62         (WebInspector.TextEditorMainPanel.prototype.clearLineHighlight):
63         (WebInspector.TextEditorMainPanel.prototype.freeCachedElements):
64         (WebInspector.TextEditorMainPanel.prototype._buildChunks):
65         (WebInspector.TextEditorMainPanel.prototype._createNewChunk):
66         (WebInspector.TextEditorMainPanel.prototype._expandChunks):
67         (WebInspector.TextEditorMainPanel.prototype._highlightDataReady):
68         (WebInspector.TextEditorMainPanel.prototype._paintLines):
69         (WebInspector.TextEditorMainPanel.prototype._paintLine):
70         (WebInspector.TextEditorMainPanel.prototype._releaseLinesHighlight):
71         (WebInspector.TextEditorMainPanel.prototype._getSelection):
72         (WebInspector.TextEditorMainPanel.prototype._restoreSelection):
73         (WebInspector.TextEditorMainPanel.prototype._selectionToPosition):
74         (WebInspector.TextEditorMainPanel.prototype._positionToSelection):
75         (WebInspector.TextEditorMainPanel.prototype._appendTextNode):
76         (WebInspector.TextEditorMainPanel.prototype._handleDomUpdates):
77         (WebInspector.TextEditorMainChunk):
78         (WebInspector.TextEditorMainChunk.prototype.addDecoration):
79         (WebInspector.TextEditorMainChunk.prototype.set expanded):
80         (WebInspector.TextEditorMainChunk.prototype.get height):
81         (WebInspector.TextEditorMainChunk.prototype.getExpandedLineRow):
82         (WebInspector.TextEditorMainChunk.prototype._createRow):
83         (WebInspector):
84         * inspector/front-end/textViewer.css:
85         (.text-editor-lines):
86         (.text-editor-contents):
87         (.text-editor-editable):
88         (.webkit-line-decorations):
89         (.webkit-line-number):
90         (.webkit-execution-line.webkit-line-content):
91         (.diff-container .webkit-added-line.webkit-line-content):
92         (.diff-container .webkit-removed-line.webkit-line-content):
93         (.diff-container .webkit-changed-line.webkit-line-content):
94         (.webkit-highlighted-line.webkit-line-content):
95
96 2011-02-02  Hans Wennborg  <hans@chromium.org>
97
98         Reviewed by Jeremy Orlow.
99
100         IndexedDB: Implement support for cursor updates
101         https://bugs.webkit.org/show_bug.cgi?id=53421
102
103         Implement support for cursor updates using the same pattern as cursor
104         deletes: forward the calls to the IDBObjectStoreBackend::put().
105         The put() function's signature needs to be changed to allow for a
106         "cursor update mode". This makes the signature more clear anyway,
107         since it replaces the boolean parameter.
108
109         Test: storage/indexeddb/cursor-update.html
110
111         * storage/IDBCursor.idl:
112         * storage/IDBCursorBackendImpl.cpp:
113         (WebCore::IDBCursorBackendImpl::key):
114         (WebCore::IDBCursorBackendImpl::update):
115         * storage/IDBCursorBackendImpl.h:
116         * storage/IDBObjectStore.cpp:
117         (WebCore::IDBObjectStore::add):
118         (WebCore::IDBObjectStore::put):
119         * storage/IDBObjectStoreBackendImpl.cpp:
120         (WebCore::IDBObjectStoreBackendImpl::put):
121         (WebCore::IDBObjectStoreBackendImpl::putInternal):
122         * storage/IDBObjectStoreBackendImpl.h:
123         * storage/IDBObjectStoreBackendInterface.h:
124
125 2011-02-02  Naoki Takano  <takano.naoki@gmail.com>
126
127         Reviewed by Kent Tamura.
128
129         Fix popup menu RTL bug introduced by Changeset 75982.
130         https://bugs.webkit.org/show_bug.cgi?id=53567
131
132         PopupMenuChromium::layout() calculates X position according to RTL or not. So Change the X position calculation in layoutAndCalculateWidgetRect().
133
134         No new tests. However we can check manually with select_dropdown_box_alignment.html, autofill_alignment.html, select_alignment.html, select_dropdown_box_alignment.html, autofill-popup-width-and-item-direction.html
135
136         * platform/chromium/PopupMenuChromium.cpp:
137         (WebCore::PopupContainer::layoutAndCalculateWidgetRect): Fix calculation of x position, because layout() considers RTL. And change the parameter from both X and Y positions to only Y position.
138         (WebCore::PopupContainer::showPopup): Change the passing parameter.
139         (WebCore::PopupContainer::refresh): Change the passing parameter.
140         * platform/chromium/PopupMenuChromium.h: Change the parameter declaration.
141
142 2011-02-02  Alejandro G. Castro  <alex@igalia.com>
143
144         Reviewed by Martin Robinson.
145
146         [GTK] Fix dist compilation
147         https://bugs.webkit.org/show_bug.cgi?id=53579
148
149         * GNUmakefile.am: Added FontWidthVariant.h to the sources, it was
150         added in r77153.
151
152 2011-02-02  Dai Mikurube  <dmikurube@google.com>
153
154         Reviewed by David Levin.
155
156         Make mime type lookup in File::create(path) thread-safe
157         https://bugs.webkit.org/show_bug.cgi?id=47700
158
159         This patch introduces a new function MIMETypeRegistry::getMIMETypeForExtensionThreadSafe().
160         The function is to be called as a thread-safe version of getMIMETypeForExtension() when
161         both FILE_SYSTEM and WORKERS are enabled.
162
163         No tests for this patch. This patch itself doesn't change the behaviors.
164         For Chromium, it runs in the same way with getMIMETypeForExtensionThreadSafe().
165         For the other platforms, it causes compilation error in case of enabled FILE_SYSTEM and WORKERS.
166         The compilation error would be a signal to implement getMIMETypeForExtensionThreadSafe() in these
167         platforms. Currently it doesn't happen since FILE_SYSTEM is not available in the other platforms.
168
169         * platform/MIMETypeRegistry.cpp: Defined generic getMIMETypeForExtension() calling getMIMETypeForExtensionThreadSafe() for enabled FILE_SYSTEM and WORKERS.
170         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
171         * platform/MIMETypeRegistry.h: Declared getMIMETypeForExtensionThreadSafe() which should be implemented for each platform.
172         * platform/android/TemporaryLinkStubs.cpp:
173         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
174         * platform/brew/MIMETypeRegistryBrew.cpp:
175         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
176         * platform/chromium/MIMETypeRegistryChromium.cpp: Defined getMIMETypeForExtensionThreadSafe() for the case when FILE_SYSTEM and WORKERS are enabled.
177         (WebCore::MIMETypeRegistry::getMIMETypeForExtensionThreadSafe):
178         * platform/efl/MIMETypeRegistryEfl.cpp:
179         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
180         * platform/gtk/MIMETypeRegistryGtk.cpp:
181         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
182         * platform/haiku/MIMETypeRegistryHaiku.cpp:
183         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
184         * platform/mac/MIMETypeRegistryMac.mm:
185         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
186         * platform/qt/MIMETypeRegistryQt.cpp:
187         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
188         * platform/win/MIMETypeRegistryWin.cpp:
189         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
190         * platform/wince/MIMETypeRegistryWinCE.cpp:
191         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
192         * platform/wx/MimeTypeRegistryWx.cpp:
193         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
194
195 2011-02-01  Adam Barth  <abarth@webkit.org>
196
197         Reviewed by Alexey Proskuryakov.
198
199         Improve readability of updateWidget by converting bool parameter to an enum
200         https://bugs.webkit.org/show_bug.cgi?id=53576
201
202         As requested on webkit-dev.
203
204         * html/HTMLEmbedElement.cpp:
205         (WebCore::HTMLEmbedElement::updateWidget):
206         * html/HTMLEmbedElement.h:
207         * html/HTMLMediaElement.cpp:
208         (WebCore::HTMLMediaElement::updateWidget):
209         * html/HTMLMediaElement.h:
210         * html/HTMLObjectElement.cpp:
211         (WebCore::HTMLObjectElement::updateWidget):
212         * html/HTMLObjectElement.h:
213         * html/HTMLPlugInImageElement.cpp:
214         (WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary):
215         * html/HTMLPlugInImageElement.h:
216         * page/FrameView.cpp:
217         (WebCore::FrameView::updateWidget):
218
219 2011-02-01  James Robinson  <jamesr@chromium.org>
220
221         Reviewed by Adam Barth.
222
223         [v8] Increase V8 native->js recursion limit to match document.write() recursion limit
224         https://bugs.webkit.org/show_bug.cgi?id=53566
225
226         A recursion limit of 22 is necessary to pass fast/dom/Document/document-write-recursion.html.
227         Other than being large enough for this one test case, this limit is arbitrary.
228
229         * bindings/v8/V8Proxy.h:
230
231 2011-02-01  Adam Barth  <abarth@webkit.org>
232
233         Reviewed by Andreas Kling.
234
235         Remove useless comment
236         https://bugs.webkit.org/show_bug.cgi?id=53549
237
238         The reason for this parameter is captured in
239         plugins/netscape-plugin-setwindow-size.html, which is a better place to
240         capture it than in this comment (which otherwise just re-iterates the
241         name of the parameter).
242
243         * html/HTMLPlugInImageElement.cpp:
244         (WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary):
245
246 2011-02-01  James Simonsen  <simonjam@chromium.org>
247
248         Reviewed by Tony Gentilcore.
249
250         [WebTiming] Remove asserts that verify timestamp order
251         https://bugs.webkit.org/show_bug.cgi?id=53548
252
253         Covered by existing tests.
254
255         * loader/FrameLoader.cpp:
256         (WebCore::FrameLoader::stopLoading): Remove assert.
257         * page/DOMWindow.cpp:
258         (WebCore::DOMWindow::dispatchTimedEvent): Ditto.
259
260 2011-02-01  Dimitri Glazkov  <dglazkov@chromium.org>
261
262         Add the 'default_targets' enclosure to the flags.
263
264         * WebCore.gyp/WebCore.gyp: Did it.
265
266 2011-02-01  Mihai Parparita  <mihaip@chromium.org>
267
268         Reviewed by James Robinson.
269
270         Async event handlers should not fire within a modal dialog
271         https://bugs.webkit.org/show_bug.cgi?id=53202
272
273         Asychronous events that use EventQueue would currently fire while a
274         modal dialog (e.g. window.alert()) was up. Change EventQueue to use a
275         SuspendableTimer (which automatically gets suspended while dialogs are
276         up and in other cases where JS execution is not allowed).
277         
278         Test: fast/events/scroll-event-during-modal-dialog.html
279
280         * dom/Document.cpp:
281         (WebCore::Document::Document):
282         * dom/EventQueue.cpp:
283         (WebCore::EventQueueTimer::EventQueueTimer):
284         (WebCore::EventQueueTimer::fired):
285         (WebCore::EventQueue::EventQueue):
286         (WebCore::EventQueue::enqueueEvent):
287         (WebCore::EventQueue::pendingEventTimerFired):
288         * dom/EventQueue.h:
289         (WebCore::EventQueue::create):
290         * page/SuspendableTimer.cpp:
291         (WebCore::SuspendableTimer::SuspendableTimer):
292         (WebCore::SuspendableTimer::suspend):
293         (WebCore::SuspendableTimer::resume):
294         * page/SuspendableTimer.h:
295
296 2011-02-01  Patrick Gansterer  <paroga@webkit.org>
297
298         Reviewed by Andreas Kling.
299
300         Change wrong PLATFORM(WIN) to USE(WININET)
301         https://bugs.webkit.org/show_bug.cgi?id=53547
302
303         * platform/network/ResourceHandle.h:
304
305 2011-02-01  Beth Dakin  <bdakin@apple.com>
306
307         32-bit build fix.
308
309         * platform/mac/ScrollAnimatorMac.mm:
310         (-[ScrollbarPainterControllerDelegate contentAreaRectForScrollerImpPair:]):
311
312 2011-01-25  Martin Robinson  <mrobinson@igalia.com>
313
314         Reviewed by Gustavo Noronha Silva.
315
316         [GTK] Two tests crash after r76555
317         https://bugs.webkit.org/show_bug.cgi?id=53057
318
319         Instead of creating synchronous ResourceHandles manually, use the ::create factory.
320         This ensures that ::start() is not called when there is a scheduled failure and also
321         reduces code duplication.
322
323         * platform/network/soup/ResourceHandleSoup.cpp:
324         (WebCore::ResourceHandle::loadResourceSynchronously): Use the ::create factory method.
325
326 2011-02-01  Martin Robinson  <mrobinson@igalia.com>
327
328         Reviewed by Eric Seidel.
329
330         [GTK] GObject DOM bindings do no support the CallWith attribute
331         https://bugs.webkit.org/show_bug.cgi?id=53331
332
333         Disable building GObject DOM bindings for IndexedDB because we do not support
334         the CallWith attribute at this time.
335
336         * bindings/gobject/GNUmakefile.am: Disable building bindings for the IndexedDB API.
337
338 2011-02-01  Darin Adler  <darin@apple.com>
339
340         Reviewed by Brady Eidson.
341
342         Fix a couple loose ends from the back/forward tree encode/decode work
343         https://bugs.webkit.org/show_bug.cgi?id=53537
344
345         * history/HistoryItem.cpp:
346         (WebCore::HistoryItem::encodeBackForwardTreeNode): Remove extra copy of
347         original URL string; no need to encode it twice.
348         (WebCore::HistoryItem::decodeBackForwardTree): Ditto.
349         * history/HistoryItem.h: Removed declaration for function that is no
350         longer defined nor used.
351
352 2011-02-01  Tony Chang  <tony@chromium.org>
353
354         Reviewed by Kent Tamura.
355
356         [chromium] disable arm uninitialized variable warnings
357         https://bugs.webkit.org/show_bug.cgi?id=53553
358
359         We just got another error:
360         third_party/WebKit/Source/WebCore/css/CSSPrimitiveValue.cpp:123:error:
361         'colorTransparent.unstatic.4879' may be used uninitialized in this
362         function
363
364         * WebCore.gyp/WebCore.gyp:
365
366 2011-02-01  chris reiss  <christopher.reiss@nokia.com>
367
368         Reviewed by Adam Barth.
369
370         Self-replicating code makes Safari hang and eventually crash
371         https://bugs.webkit.org/show_bug.cgi?id=15123
372
373        
374         Here we are replicating the Firefox safeguard against
375         recursive document.write( ) 's.
376
377         See  https://bug197052.bugzilla.mozilla.org/attachment.cgi?id=293907 in bug 
378         https://bugzilla.mozilla.org/show_bug.cgi?id=197052 .   Firefox does two things - 
379             a) imposes a recursion limit of 20 on document.write( ) and
380             b) once that limit is passed, panics all the way the call stack (rather than just returning one level.)
381         To see why this is necessary, consider the script : 
382
383         <script>
384            var t = document.body.innerHTML;
385            document.write(t);
386         </script> 
387
388         This will create a tree both broad and deep as the script keeps appending itself to the text.   If
389         we just return one level after the recursion limit is reached, we still allow millions of copies to 
390         duplicate (and execute).   
391
392         The recursion is fortunately depth-first, so as soon as we cross this limit, we panic up the callstack
393         to prevent this situation.    (IE apparently does the same thing, with a lower recursion limit.) 
394
395         Test: fast/dom/Document/document-write-recursion.html        
396         Test: fast/dom/Document/document-close-iframe-load.html
397         Test: fast/dom/Document/document-close-nested-iframe-load.html
398
399
400         * dom/Document.cpp:
401         (WebCore::Document::Document):
402         (WebCore::Document::write):
403         * dom/Document.h:
404
405 2011-02-01  Johnny Ding  <jnd@chromium.org>
406
407         Reviewed by Darin Adler.
408
409         Don't set user gesture in HTMLAnchorElement's click handler because the click handler can be triggered by untrusted event.
410         https://bugs.webkit.org/show_bug.cgi?id=53424
411
412         Test: fast/events/popup-blocked-from-untrusted-click-event-on-anchor.html
413
414         * html/HTMLAnchorElement.cpp:
415         (WebCore::handleLinkClick):
416
417 2011-02-01  Csaba Osztrogonác  <ossy@webkit.org>
418
419         Unreviewed Qt buildfix after r77286.
420
421         https://bugs.webkit.org/show_bug.cgi?id=53520 
422         Remove the physical terminology from IntRect and FloatRect.
423
424         * platform/graphics/TiledBackingStore.cpp:
425         (WebCore::TiledBackingStore::createTiles):
426
427 2011-02-01  Sam Weinig  <sam@webkit.org>
428
429         Fix Mac production builds.
430
431         * DerivedSources.make:
432         * WebCore.xcodeproj/project.pbxproj:
433         * platform/mac/ScrollAnimatorMac.h:
434         * platform/mac/ScrollbarThemeMac.h:
435
436 2011-02-01  Darin Adler  <darin@apple.com>
437
438         Reviewed by Chris Fleizach.
439
440         REGRESSION: Removing focus from area element causes unwanted scrolling
441         https://bugs.webkit.org/show_bug.cgi?id=50169
442
443         Test: fast/images/imagemap-scroll.html
444
445         * html/HTMLAreaElement.cpp:
446         (WebCore::HTMLAreaElement::setFocus): Added override. Calls the new
447         RenderImage::areaElementFocusChanged function.
448         (WebCore::HTMLAreaElement::updateFocusAppearance): Removed the code
449         here that calls setNeedsLayout on the image's renderer. This was an
450         attempt to cause repaint of the renderer, but this function does not
451         need to do that. Also changed this to use the imageElement function
452         to avoid repeating code.
453
454         * html/HTMLAreaElement.h: Updated for above changes.
455
456         * rendering/RenderImage.cpp:
457         (WebCore::RenderImage::paint): Updated for name change.
458         (WebCore::RenderImage::paintAreaElementFocusRing): Renamed this from
459         paintFocusRing, because it only paints area focus rings, and should
460         not be confused with paintFocusRing functions in other classes. Also
461         removed the unused style argument. Removed the code that used an
462         HTMLCollection to see if the focused area element is for this image
463         and instead just call imageElement on the area element.
464         (WebCore::RenderImage::areaElementFocusChanged): Added. Calls repaint.
465
466         * rendering/RenderImage.h: Added a public areaElementFocusChanged
467         function for HTMLAreaElement to call. Made the paintFocusRing function
468         private, renamed it to paintAreaElementFocusRing, and removed its
469         unused style argument.
470
471 2011-02-01  Patrick Gansterer  <paroga@webkit.org>
472
473         Unreviewed WinCE build fix for r77286.
474
475         * platform/graphics/wince/GraphicsContextWinCE.cpp:
476         (WebCore::TransparentLayerDC::TransparentLayerDC):
477
478 2011-02-01  Chris Fleizach  <cfleizach@apple.com>
479
480         Reviewed by Darin Adler.
481
482         AX: AXPosition of AXScrollArea is wrong
483         https://bugs.webkit.org/show_bug.cgi?id=53511
484
485         AccessibilityScrollView needed to return a valid documentFrameView() object.
486         At the same time, the code from document() should be consolidated in 
487         AccessibilityObject, so all objects can use it.
488
489         Test: platform/mac/accessibility/webkit-scrollarea-position.html
490
491         * accessibility/AccessibilityObject.cpp:
492         (WebCore::AccessibilityObject::document):
493         * accessibility/AccessibilityObject.h:
494         * accessibility/AccessibilityScrollView.cpp:
495         (WebCore::AccessibilityScrollView::accessibilityHitTest):
496         (WebCore::AccessibilityScrollView::documentFrameView):
497         * accessibility/AccessibilityScrollView.h:
498
499 2011-02-01  Zhenyao Mo  <zmo@google.com>
500
501         Reviewed by Kenneth Russell.
502
503         getUniform should support SAMPLER_2D or SAMPLER_CUBE
504         https://bugs.webkit.org/show_bug.cgi?id=52190
505
506         * html/canvas/WebGLRenderingContext.cpp:
507         (WebCore::WebGLRenderingContext::getUniform):
508
509 2011-02-01  Zhenyao Mo  <zmo@google.com>
510
511         Reviewed by Darin Adler.
512
513         Fix the incorrect usage of RetainPtr cases in GraphicsContext3DCG.cpp
514         https://bugs.webkit.org/show_bug.cgi?id=53531
515
516         With this fix, running WebGL conformance tests should no longer crash randomly.
517
518         * platform/graphics/cg/GraphicsContext3DCG.cpp:
519         (WebCore::GraphicsContext3D::getImageData):
520
521 2011-02-01  Dimitri Glazkov  <dglazkov@chromium.org>
522
523         One more Chromium build fix after r77286.
524
525         * platform/chromium/ScrollbarThemeChromiumMac.mm:
526         (WebCore::ScrollbarThemeChromiumMac::paint): Changed to not use topLeft().
527
528 2011-02-01  Sam Weinig  <sam@webkit.org>
529
530         Fix the build for Beth.
531
532         * platform/mac/ScrollAnimatorMac.mm:
533         (-[ScrollbarPainterControllerDelegate inLiveResizeForScrollerImpPair:]):
534
535 2011-02-01  Sam Weinig  <sam@webkit.org>
536
537         Reviewed by Beth Dakin.
538
539         Part 2 for <rdar://problem/8492788>
540         Adopt WKScrollbarPainterController
541
542         Use header detection to define scrollbar painting controller #define.
543
544         * WebCore.exp.in:
545         * platform/mac/ScrollAnimatorMac.h:
546         * platform/mac/ScrollbarThemeMac.h:
547         * platform/mac/WebCoreSystemInterface.h:
548         * platform/mac/WebCoreSystemInterface.mm:
549
550 2011-02-01  David Hyatt  <hyatt@apple.com>
551
552         Reviewed by Oliver Hunt.
553
554         https://bugs.webkit.org/show_bug.cgi?id=53520
555         
556         Remove the physical terminology from IntRect and FloatRect.
557         
558         Now that we have flipped RenderBlocks for vertical-rl and horizontal-bt writing modes,
559         we need to update our terminology to be more accurate.
560
561         I'm borrowing a page from AppKit here (which also supports flipped NSViews) and
562         renaming right() and bottom() to maxX() and maxY().  These terms remain accurate
563         even for flipped rectangles.
564
565         * accessibility/AccessibilityRenderObject.cpp:
566         (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
567         * accessibility/mac/AccessibilityObjectWrapper.mm:
568         (-[AccessibilityObjectWrapper position]):
569         * dom/ClientRect.h:
570         (WebCore::ClientRect::right):
571         (WebCore::ClientRect::bottom):
572         * html/HTMLCanvasElement.cpp:
573         (WebCore::HTMLCanvasElement::convertLogicalToDevice):
574         * html/canvas/CanvasRenderingContext2D.cpp:
575         (WebCore::normalizeRect):
576         * inspector/InspectorAgent.cpp:
577         (WebCore::InspectorAgent::drawElementTitle):
578         * page/DOMWindow.cpp:
579         (WebCore::DOMWindow::adjustWindowRect):
580         * page/DragController.cpp:
581         (WebCore::dragLocForSelectionDrag):
582         * page/EventHandler.cpp:
583         (WebCore::EventHandler::sendContextMenuEventForKey):
584         * page/PrintContext.cpp:
585         (WebCore::PrintContext::computePageRectsWithPageSizeInternal):
586         (WebCore::PrintContext::pageNumberForElement):
587         * page/SpatialNavigation.cpp:
588         (WebCore::end):
589         (WebCore::areRectsFullyAligned):
590         (WebCore::areRectsMoreThanFullScreenApart):
591         (WebCore::below):
592         (WebCore::rightOf):
593         (WebCore::isRectInDirection):
594         (WebCore::entryAndExitPointsForDirection):
595         (WebCore::virtualRectForDirection):
596         * page/WindowFeatures.cpp:
597         (WebCore::WindowFeatures::WindowFeatures):
598         * platform/ScrollView.cpp:
599         (WebCore::ScrollView::wheelEvent):
600         * platform/Scrollbar.cpp:
601         (WebCore::Scrollbar::setFrameRect):
602         * platform/ScrollbarThemeComposite.cpp:
603         (WebCore::ScrollbarThemeComposite::splitTrack):
604         * platform/chromium/ScrollbarThemeChromium.cpp:
605         (WebCore::ScrollbarThemeChromium::paintTickmarks):
606         * platform/graphics/FloatQuad.h:
607         (WebCore::FloatQuad::FloatQuad):
608         * platform/graphics/FloatRect.cpp:
609         (WebCore::FloatRect::intersects):
610         (WebCore::FloatRect::contains):
611         (WebCore::FloatRect::intersect):
612         (WebCore::FloatRect::unite):
613         (WebCore::enclosingIntRect):
614         * platform/graphics/FloatRect.h:
615         (WebCore::FloatRect::maxX):
616         (WebCore::FloatRect::maxY):
617         (WebCore::FloatRect::contains):
618         * platform/graphics/IntRect.cpp:
619         (WebCore::IntRect::intersects):
620         (WebCore::IntRect::contains):
621         (WebCore::IntRect::intersect):
622         (WebCore::IntRect::unite):
623         * platform/graphics/IntRect.h:
624         (WebCore::IntRect::maxX):
625         (WebCore::IntRect::maxY):
626         (WebCore::IntRect::shiftXEdgeTo):
627         (WebCore::IntRect::shiftMaxXEdgeTo):
628         (WebCore::IntRect::shiftYEdgeTo):
629         (WebCore::IntRect::shiftMaxYEdgeTo):
630         (WebCore::IntRect::contains):
631         * platform/graphics/WidthIterator.cpp:
632         (WebCore::WidthIterator::advance):
633         * platform/graphics/cg/GraphicsContextCG.cpp:
634         (WebCore::GraphicsContext::drawRect):
635         (WebCore::GraphicsContext::fillPath):
636         (WebCore::GraphicsContext::fillRect):
637         * platform/graphics/cg/ImageBufferCG.cpp:
638         (WebCore::getImageData):
639         (WebCore::putImageData):
640         * platform/graphics/cg/ImageCG.cpp:
641         (WebCore::BitmapImage::draw):
642         * platform/graphics/filters/FilterEffect.cpp:
643         (WebCore::FilterEffect::copyImageBytes):
644         * platform/graphics/mac/ComplexTextController.cpp:
645         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
646         * platform/graphics/mac/SimpleFontDataMac.mm:
647         (WebCore::SimpleFontData::platformBoundsForGlyph):
648         * platform/graphics/transforms/AffineTransform.cpp:
649         (WebCore::AffineTransform::mapRect):
650         * platform/graphics/win/FontCGWin.cpp:
651         (WebCore::drawGDIGlyphs):
652         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
653         (WebCore::MediaPlayerPrivate::paint):
654         * platform/gtk/RenderThemeGtk.cpp:
655         (WebCore::centerRectVerticallyInParentInputElement):
656         * platform/mac/WidgetMac.mm:
657         (WebCore::Widget::paint):
658         * rendering/InlineFlowBox.cpp:
659         (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
660         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
661         * rendering/InlineTextBox.cpp:
662         (WebCore::InlineTextBox::selectionRect):
663         (WebCore::InlineTextBox::paint):
664         (WebCore::InlineTextBox::positionForOffset):
665         * rendering/RenderBlock.cpp:
666         (WebCore::RenderBlock::addOverflowFromChildren):
667         (WebCore::RenderBlock::paintChildren):
668         (WebCore::RenderBlock::paintEllipsisBoxes):
669         (WebCore::RenderBlock::inlineSelectionGaps):
670         (WebCore::RenderBlock::adjustPointToColumnContents):
671         (WebCore::RenderBlock::flipForWritingModeIncludingColumns):
672         (WebCore::RenderBlock::adjustForColumns):
673         * rendering/RenderBlock.h:
674         (WebCore::RenderBlock::FloatingObject::right):
675         (WebCore::RenderBlock::FloatingObject::bottom):
676         * rendering/RenderBox.cpp:
677         (WebCore::RenderBox::reflectedRect):
678         (WebCore::RenderBox::localCaretRect):
679         (WebCore::RenderBox::addShadowOverflow):
680         (WebCore::RenderBox::addLayoutOverflow):
681         (WebCore::RenderBox::visualOverflowRectForPropagation):
682         (WebCore::RenderBox::layoutOverflowRectForPropagation):
683         (WebCore::RenderBox::flipForWritingMode):
684         * rendering/RenderFrameSet.cpp:
685         (WebCore::RenderFrameSet::paintColumnBorder):
686         (WebCore::RenderFrameSet::paintRowBorder):
687         * rendering/RenderInline.cpp:
688         (WebCore::RenderInline::paintOutlineForLine):
689         * rendering/RenderLayer.cpp:
690         (WebCore::RenderLayer::getRectToExpose):
691         (WebCore::cornerRect):
692         (WebCore::RenderLayer::positionOverflowControls):
693         (WebCore::RenderLayer::overflowBottom):
694         (WebCore::RenderLayer::overflowRight):
695         (WebCore::RenderLayer::paintResizer):
696         * rendering/RenderLineBoxList.cpp:
697         (WebCore::RenderLineBoxList::rangeIntersectsRect):
698         (WebCore::RenderLineBoxList::paint):
699         * rendering/RenderListItem.cpp:
700         (WebCore::RenderListItem::positionListMarker):
701         * rendering/RenderListMarker.cpp:
702         (WebCore::RenderListMarker::paint):
703         * rendering/RenderObject.cpp:
704         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
705         * rendering/RenderOverflow.h:
706         (WebCore::RenderOverflow::RenderOverflow):
707         (WebCore::RenderOverflow::addLayoutOverflow):
708         (WebCore::RenderOverflow::addVisualOverflow):
709         (WebCore::RenderOverflow::setLayoutOverflow):
710         (WebCore::RenderOverflow::setVisualOverflow):
711         (WebCore::RenderOverflow::resetLayoutOverflow):
712         * rendering/RenderReplaced.cpp:
713         (WebCore::RenderReplaced::shouldPaint):
714         * rendering/RenderScrollbarTheme.cpp:
715         (WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):
716         * rendering/RenderTable.cpp:
717         (WebCore::RenderTable::paint):
718         * rendering/RenderTableCell.cpp:
719         (WebCore::RenderTableCell::paint):
720         * rendering/RenderTableSection.cpp:
721         (WebCore::RenderTableSection::paintObject):
722         * rendering/RenderText.cpp:
723         (WebCore::RenderText::absoluteQuads):
724         * rendering/RenderTextControlSingleLine.cpp:
725         (WebCore::RenderTextControlSingleLine::forwardEvent):
726         * rendering/RenderThemeMac.mm:
727         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
728         (WebCore::RenderThemeMac::paintMenuListButton):
729         (WebCore::RenderThemeMac::paintSliderTrack):
730         * rendering/RenderView.cpp:
731         (WebCore::RenderView::computeRectForRepaint):
732         (WebCore::RenderView::docBottom):
733         (WebCore::RenderView::docRight):
734         * rendering/RootInlineBox.cpp:
735         (WebCore::RootInlineBox::paddedLayoutOverflowRect):
736         * rendering/svg/RenderSVGInlineText.cpp:
737         (WebCore::RenderSVGInlineText::localCaretRect):
738
739 2011-02-01  Beth Dakin  <bdakin@apple.com>
740
741         Reviewed by Sam Weinig.
742
743         Fix for <rdar://problem/8492788> Adopt WKScrollbarPainterController
744
745         Lots of new WebCoreSystemInterface functions to export.
746         * WebCore.exp.in:
747         * platform/mac/WebCoreSystemInterface.h:
748         * platform/mac/WebCoreSystemInterface.mm:
749
750         Let the scrollAnimator know when the mouse has
751         moved anywhere inside the page, and when the mouse 
752         has moved in or out of the window. 
753         * page/EventHandler.cpp:
754         (WebCore::EventHandler::mouseMoved):
755         (WebCore::EventHandler::updateMouseEventTargetNode):
756
757         Let the scrollAnimator know when the window has become
758         active or inactive.
759         * page/FocusController.cpp:
760         (WebCore::FocusController::setActive):
761         
762         Let the scrollAnimator know when all of these things
763         are happening.
764         * page/FrameView.cpp:
765         (WebCore::FrameView::setContentsSize):
766         (WebCore::FrameView::didMoveOnscreen):
767         (WebCore::FrameView::willMoveOffscreen):
768         (WebCore::FrameView::currentMousePosition):
769         (WebCore::FrameView::contentsResized):
770         
771         New functions called through WebKit2 that allow the
772         scrollAnimator to know when a live resize starts and ends.
773         (WebCore::FrameView::willStartLiveResize):
774         (WebCore::FrameView::willEndLiveResize):
775         * page/FrameView.h:
776         
777         New functions on ScrollAnimator that pass information
778         to the WKPainterController when we're using one.
779         * platform/ScrollAnimator.h:
780         (WebCore::ScrollAnimator::scrollableArea):
781         (WebCore::ScrollAnimator::contentAreaWillPaint):
782         (WebCore::ScrollAnimator::mouseEnteredContentArea):
783         (WebCore::ScrollAnimator::mouseExitedContentArea):
784         (WebCore::ScrollAnimator::mouseMovedInContentArea):
785         (WebCore::ScrollAnimator::willStartLiveResize):
786         (WebCore::ScrollAnimator::contentsResized):
787         (WebCore::ScrollAnimator::willEndLiveResize):
788         (WebCore::ScrollAnimator::contentAreaDidShow):
789         (WebCore::ScrollAnimator::contentAreaDidHide):
790         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
791         (WebCore::ScrollAnimatorMac::scrollbarPainterDelegate):
792         (WebCore::ScrollAnimatorMac::setPainterForPainterController):
793         (WebCore::ScrollAnimatorMac::removePainterFromPainterController):
794         (WebCore::ScrollAnimatorMac::notityPositionChanged):
795         (WebCore::ScrollAnimatorMac::contentAreaWillPaint):
796         (WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
797         (WebCore::ScrollAnimatorMac::mouseExitedContentArea):
798         (WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
799         (WebCore::ScrollAnimatorMac::willStartLiveResize):
800         (WebCore::ScrollAnimatorMac::contentsResized):
801         (WebCore::ScrollAnimatorMac::willEndLiveResize):
802         (WebCore::ScrollAnimatorMac::contentAreaDidShow):
803         (WebCore::ScrollAnimatorMac::contentAreaDidHide):
804         
805         Let the scrollAnimator know when this is happening.
806         * platform/ScrollView.cpp:
807         (WebCore::ScrollView::paint):
808         
809         New function lets the scrollAnimator get the current 
810         mouse position.
811         * platform/ScrollView.h:
812         (WebCore::ScrollView::currentMousePosition):
813         
814         New function that returns the scrollAnimator when needed.
815         * platform/ScrollableArea.h:
816         (WebCore::ScrollableArea::scrollAnimator):
817         
818         Keep track of if we're in a live resize using a new memeber
819         variable.
820         * platform/mac/ScrollAnimatorMac.h:
821         (WebCore::ScrollAnimatorMac::inLiveResize):
822         * platform/mac/ScrollAnimatorMac.mm:
823         (WebCore::view):
824         
825         New delegates for the WKPainter and WKPainterController
826         (-[ScrollbarPainterControllerDelegate initWithScrollAnimator:WebCore::]):
827         (-[ScrollbarPainterControllerDelegate contentAreaRectForScrollerImpPair:]):
828         (-[ScrollbarPainterControllerDelegate inLiveResizeForScrollerImpPair:]):
829         (-[ScrollbarPainterControllerDelegate mouseLocationInContentAreaForScrollerImpPair:]):
830         (-[ScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
831         (-[ScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
832         (-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
833         (-[ScrollKnobAnimation initWithScrollbarPainter:forScrollAnimator:WebCore::animateKnobAlphaTo:duration:]):
834         (-[ScrollKnobAnimation setCurrentProgress:]):
835         (-[ScrollbarPainterDelegate initWithScrollAnimator:WebCore::]):
836         (-[ScrollbarPainterDelegate convertRectToBacking:]):
837         (-[ScrollbarPainterDelegate convertRectFromBacking:]):
838         (-[ScrollbarPainterDelegate layer]):
839         (-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:animateKnobAlphaTo:duration:]):
840         (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
841         (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
842         (-[ScrollbarPainterDelegate scrollerImp:overlayScrollerStateChangedTo:]):
843
844         Get the WKScrollbarPainterRefs to synch up with the 
845         WKScrollbarPainterControllerRefs when appropriate
846         * platform/mac/ScrollbarThemeMac.h:
847         * platform/mac/ScrollbarThemeMac.mm:
848         (WebCore::ScrollbarThemeMac::registerScrollbar):
849         (WebCore::ScrollbarThemeMac::unregisterScrollbar):
850         (WebCore::ScrollbarThemeMac::setNewPainterForScrollbar):
851         (WebCore::ScrollbarThemeMac::usesOverlayScrollbars):
852
853         Implement ScrollableArea's virtual function contentsSize() for access
854         through the scrollAnimator.
855         * rendering/RenderLayer.h:
856         (WebCore::RenderLayer::contentsSize):
857
858 2011-02-01  Carol Szabo  <carol.szabo@nokia.com>
859
860         Reviewed by David Hyatt.
861
862         layoutTestController.counterValueForElementById does not return the correct value
863         https://bugs.webkit.org/show_bug.cgi?id=53037
864
865         Test: fast/css/counters/deep-before.html
866
867         * rendering/RenderTreeAsText.cpp:
868         (WebCore::counterValueForElement):
869         Modified to use the newly available RenderObject::beforePseudoElement()
870         and RenderObject::afterPseudoElement() instead of the old imperfect
871         algorithm to find the before and after pseudo elements.
872
873 2011-02-01  Anton Muhin  <antonm@chromium.org>
874
875         Reviewed by Adam Barth.
876
877         Allow access for security origin same as this.
878         https://bugs.webkit.org/show_bug.cgi?id=53440
879
880         Hard to test as newly added path currently is never hit.
881
882         * page/SecurityOrigin.cpp:
883         (WebCore::SecurityOrigin::canAccess): allow access if this == other
884
885 2011-01-31  Oliver Hunt  <oliver@apple.com>
886
887         Reviewed by Geoffrey Garen.
888
889         Update JSObject storage for new marking API
890         https://bugs.webkit.org/show_bug.cgi?id=53467
891
892         Update WebCore to handle new anonymous slot behaviour.
893
894         * bindings/js/JSDOMWindowShell.cpp:
895         (WebCore::JSDOMWindowShell::setWindow):
896         * bindings/js/WorkerScriptController.cpp:
897         (WebCore::WorkerScriptController::initScript):
898         * bindings/scripts/CodeGeneratorJS.pm:
899
900 2011-02-01  Xiaomei Ji  <xji@chromium.org>
901
902         Reviewed by David Hyatt.
903
904         Fix a text rendering problem when enclosing block is RTL and text runs
905         are in different directionality.
906         https://bugs.webkit.org/show_bug.cgi?id=34176
907
908         The problem happens in the following example scenario (ABC represents 
909         Hebrew characters):
910         <div dir=rtl>this is a <span><span>test <span>ABC</span></span></span></div>
911
912         The line consists of 3 text runs -- TextRun1 TextRun2 TextRun3. In which
913         TextRun1 and TextRun2's bidi level are 2, and TextRun3's bidi level is 1.
914         TextRun2 and TextRun3's least common ancestor is not a sibling of TextRun1.
915
916         The visual bidi run order of the text runs is TextRun3 TextRun1 TextRun2.
917
918         Inside RenderBlock::constructLine(), when RenderBlock::createLineBoxes()
919         creates InlineFlowBox for TextRun2, it should check an InlineFlowBox for
920         the run's render object's ancestor (not only its parent) has already 
921         been constructed or has something following it on the line, in which 
922         case, create a new box for TextRun2 instead of sharing the same box with
923         TextRun3.
924
925         In other words, the following 2 div should render the same results
926         (ABC represents Hebrew characters).
927         <div dir=rtl>this is a <span><span>test <span>ABC</span></span></span></div>
928         <div dir=rtl>this is a <span>Test <span>ABC</span></span></div>
929
930         Test: fast/dom/34176.html
931
932         * rendering/RenderBlockLineLayout.cpp:
933         (WebCore::parentIsConstructedOrHaveNext):
934         (WebCore::RenderBlock::createLineBoxes):
935
936 2011-02-01  Abhishek Arya  <inferno@chromium.org>
937
938         Reviewed by Dan Bernstein.
939
940         Do not add a node in the document's stylesheet candidate node list if the
941         node is already removed from document.
942         https://bugs.webkit.org/show_bug.cgi?id=53441
943
944         Test: fast/css/stylesheet-candidate-nodes-crash.xhtml
945
946         * dom/Document.cpp:
947         (WebCore::Document::addStyleSheetCandidateNode):
948
949 2011-02-01  Dave Hyatt  <hyatt@apple.com>
950
951         Reviewed by Darin Adler.
952
953         https://bugs.webkit.org/show_bug.cgi?id=46422, make printing and pagination work
954         with vertical text.
955
956         Change printing functions to check writing-mode and properly swap width and height
957         as needed.
958         
959         Fix the setScrollOrigin function so that the origin doesn't cause
960         scroll spasming during printing (this is only partially successful, but it's better
961         than it was).
962
963         Rewrite computePageRects to handle both RTL documents properly as well as vertical
964         text documents properly.
965
966         * WebCore.exp.in:
967         * page/FrameView.cpp:
968         (WebCore::FrameView::adjustViewSize):
969         (WebCore::FrameView::forceLayoutForPagination):
970         * page/PrintContext.cpp:
971         (WebCore::PrintContext::computePageRects):
972         (WebCore::PrintContext::computePageRectsWithPageSizeInternal):
973         (WebCore::PrintContext::computeAutomaticScaleFactor):
974         (WebCore::PrintContext::spoolPage):
975         (WebCore::PrintContext::spoolRect):
976         * page/PrintContext.h:
977         * page/mac/WebCoreFrameView.h:
978         * platform/ScrollView.cpp:
979         (WebCore::ScrollView::wheelEvent):
980         * platform/ScrollView.h:
981         * platform/mac/ScrollViewMac.mm:
982         (WebCore::ScrollView::platformSetScrollOrigin):
983         * rendering/RenderView.cpp:
984         (WebCore::RenderView::layout):
985
986 2011-02-01  Mikhail Naganov  <mnaganov@chromium.org>
987
988         Reviewed by Pavel Feldman.
989
990         Web Inspector: Fix profiles reset to avoid clearing heap profiles in Chromium.
991
992         https://bugs.webkit.org/show_bug.cgi?id=53500
993
994         * inspector/InspectorProfilerAgent.cpp:
995         (WebCore::InspectorProfilerAgent::resetFrontendProfiles):
996
997 2011-02-01  Mikhail Naganov  <mnaganov@chromium.org>
998
999         Reviewed by Pavel Feldman.
1000
1001         Web Inspector: [Chromium] Landing detailed heap snapshots, part 1.
1002
1003         https://bugs.webkit.org/show_bug.cgi?id=53173
1004
1005         Adding code for accessing heap snapshot data and
1006         performing graph calculations.
1007
1008         * English.lproj/localizedStrings.js:
1009         * inspector/front-end/HeapSnapshot.js:
1010         (WebInspector.HeapSnapshotArraySlice): Helper class to avoid array contents copying.
1011         (WebInspector.HeapSnapshotEdge): Wrapper for accessing graph edge properties.
1012         (WebInspector.HeapSnapshotEdgeIterator):
1013         (WebInspector.HeapSnapshotNode): Wrapper for accessing graph node properties.
1014         (WebInspector.HeapSnapshotNodeIterator):
1015         (WebInspector.HeapSnapshot): Wrapper for the heap snapshot.
1016         (WebInspector.HeapSnapshotFilteredOrderedIterator):
1017         (WebInspector.HeapSnapshotEdgesProvider):
1018         (WebInspector.HeapSnapshotNodesProvider):
1019         (WebInspector.HeapSnapshotPathFinder):
1020         * inspector/front-end/HeapSnapshotView.js:
1021         (WebInspector.HeapSnapshotView.prototype._convertSnapshot):
1022
1023 2011-02-01  Adam Roben  <aroben@apple.com>
1024
1025         Fix linker warnings in Release_LTCG builds
1026
1027         * WebCore.vcproj/WebCore.vcproj: Exclude EventNames.cpp and EventTarget.cpp from all
1028         configurations, since they get pulled in via DOMAllInOne.cpp.
1029
1030 2011-02-01  Alexander Pavlov  <apavlov@chromium.org>
1031
1032         Reviewed by Yury Semikhatsky.
1033
1034         Web Inspector: [Chromium] Wrongly labelled context-menu item for links in Web Inspector's side-pane
1035         https://bugs.webkit.org/show_bug.cgi?id=53482
1036
1037         * English.lproj/localizedStrings.js:
1038         * inspector/front-end/ElementsPanel.js:
1039         (WebInspector.ElementsPanel.prototype.populateHrefContextMenu):
1040         * inspector/front-end/inspector.js:
1041         (WebInspector.resourceForURL):
1042         (WebInspector.openLinkExternallyLabel):
1043
1044 2011-02-01  Anton Muhin  <antonm@chromium.org>
1045
1046         Reviewed by Adam Barth.
1047
1048         Propagate parent document security origin to newly create Document XML response
1049         https://bugs.webkit.org/show_bug.cgi?id=53444
1050
1051         Covered by the existing tests.
1052
1053         * xml/XMLHttpRequest.cpp:
1054         (WebCore::XMLHttpRequest::responseXML):
1055
1056 2011-02-01  Yury Semikhatsky  <yurys@chromium.org>
1057
1058         Unreviewed. Rollout r77230 which caused many layout tests
1059         crashes on Chromium Debug bots.
1060
1061         Async event handlers should not fire within a modal dialog
1062         https://bugs.webkit.org/show_bug.cgi?id=53202
1063
1064         * dom/Document.cpp:
1065         (WebCore::Document::Document):
1066         * dom/EventQueue.cpp:
1067         (WebCore::EventQueue::EventQueue):
1068         (WebCore::EventQueue::enqueueEvent):
1069         (WebCore::EventQueue::pendingEventTimerFired):
1070         * dom/EventQueue.h:
1071
1072 2011-02-01  Zoltan Herczeg  <zherczeg@webkit.org>
1073
1074         Reviewed by Dirk Schulze.
1075
1076         LightElement changes does not require relayout.
1077         https://bugs.webkit.org/show_bug.cgi?id=53232
1078
1079         When an attribute of a LightElement changes, it
1080         send an update message to the lighting filters
1081         to update its corresponding LightSource objects,
1082         and repaint the filters.
1083
1084         Duplicated 'id' attributes removed from svg-filter-animation.svg.
1085
1086         Existing dynamic-update tests covers this feature.
1087
1088         5x speedup on manual-tests/svg-filter-animation.svg
1089
1090         * manual-tests/svg-filter-animation.svg:
1091         * platform/graphics/filters/DistantLightSource.h:
1092         * platform/graphics/filters/FEDiffuseLighting.cpp:
1093         (WebCore::FEDiffuseLighting::setLightingColor):
1094         (WebCore::FEDiffuseLighting::setSurfaceScale):
1095         (WebCore::FEDiffuseLighting::setDiffuseConstant):
1096         (WebCore::FEDiffuseLighting::setKernelUnitLengthX):
1097         (WebCore::FEDiffuseLighting::setKernelUnitLengthY):
1098         * platform/graphics/filters/FEDiffuseLighting.h:
1099         * platform/graphics/filters/LightSource.cpp:
1100         (WebCore::PointLightSource::setX):
1101         (WebCore::PointLightSource::setY):
1102         (WebCore::PointLightSource::setZ):
1103         (WebCore::SpotLightSource::setX):
1104         (WebCore::SpotLightSource::setY):
1105         (WebCore::SpotLightSource::setZ):
1106         (WebCore::SpotLightSource::setPointsAtX):
1107         (WebCore::SpotLightSource::setPointsAtY):
1108         (WebCore::SpotLightSource::setPointsAtZ):
1109         (WebCore::SpotLightSource::setSpecularExponent):
1110         (WebCore::SpotLightSource::setLimitingConeAngle):
1111         (WebCore::DistantLightSource::setAzimuth):
1112         (WebCore::DistantLightSource::setElevation):
1113         (WebCore::LightSource::setAzimuth):
1114         (WebCore::LightSource::setElevation):
1115         (WebCore::LightSource::setX):
1116         (WebCore::LightSource::setY):
1117         (WebCore::LightSource::setZ):
1118         (WebCore::LightSource::setPointsAtX):
1119         (WebCore::LightSource::setPointsAtY):
1120         (WebCore::LightSource::setPointsAtZ):
1121         (WebCore::LightSource::setSpecularExponent):
1122         (WebCore::LightSource::setLimitingConeAngle):
1123         * platform/graphics/filters/LightSource.h:
1124         * platform/graphics/filters/PointLightSource.h:
1125         * platform/graphics/filters/SpotLightSource.h:
1126         * rendering/svg/RenderSVGResourceFilter.cpp:
1127         (WebCore::RenderSVGResourceFilter::primitiveAttributeChanged):
1128         * svg/SVGFEDiffuseLightingElement.cpp:
1129         (WebCore::SVGFEDiffuseLightingElement::setFilterEffectAttribute):
1130         (WebCore::SVGFEDiffuseLightingElement::lightElementAttributeChanged):
1131         (WebCore::SVGFEDiffuseLightingElement::build):
1132         (WebCore::SVGFEDiffuseLightingElement::findLightElement):
1133         (WebCore::SVGFEDiffuseLightingElement::findLight):
1134         * svg/SVGFEDiffuseLightingElement.h:
1135         * svg/SVGFELightElement.cpp:
1136         (WebCore::SVGFELightElement::svgAttributeChanged):
1137         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
1138         (WebCore::SVGFilterPrimitiveStandardAttributes::setFilterEffectAttribute):
1139         * svg/SVGFilterPrimitiveStandardAttributes.h:
1140
1141 2011-02-01  Roland Steiner  <rolandsteiner@chromium.org>
1142
1143         Reviewed by Dimitri Glazkov.
1144
1145         Bug 53289 - DOM: Move DocumentOrderedMap from Document into separate files
1146         https://bugs.webkit.org/show_bug.cgi?id=53289
1147
1148         Moving the nested class DocumentOrderedMap from Document into separate files,
1149         updating code where necessary.
1150
1151         No new tests. (refactoring)
1152
1153         * Android.mk:
1154         * CMakeLists.txt:
1155         * GNUMakefile.am:
1156         * WebCore.gypi:
1157         * WebCore.pro:
1158         * WebCore.vcproj/WebCore.vcproj:
1159         * WebCore.xcodeproj/project.pbxproj:
1160         * dom/Document.cpp:
1161         (WebCore::Document::getElementById):
1162         (WebCore::Document::getImageMap):
1163         * dom/Document.h:
1164         * dom/DocumentOrderedMap.cpp: Added.
1165         (WebCore::keyMatchesId):
1166         (WebCore::keyMatchesMapName):
1167         (WebCore::keyMatchesLowercasedMapName):
1168         (WebCore::DocumentOrderedMap::clear):
1169         (WebCore::DocumentOrderedMap::add):
1170         (WebCore::DocumentOrderedMap::remove):
1171         (WebCore::DocumentOrderedMap::get):
1172         (WebCore::DocumentOrderedMap::getElementById):
1173         (WebCore::DocumentOrderedMap::getElementByMapName):
1174         (WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
1175         * dom/DocumentOrderedMap.h: Added.
1176         (WebCore::DocumentOrderedMap::contains):
1177         (WebCore::DocumentOrderedMap::containsMultiple):
1178         * dom/DOMAllInOne.cpp:
1179
1180 2011-02-01  Mario Sanchez Prada  <msanchez@igalia.com>
1181
1182         Reviewed by Martin Robinson.
1183
1184         [Gtk] atk_text_set_caret_offset fails for list items
1185         https://bugs.webkit.org/show_bug.cgi?id=53388
1186
1187         Allow using text ranges across list items.
1188
1189         * accessibility/gtk/AccessibilityObjectAtk.cpp:
1190         (WebCore::AccessibilityObject::allowsTextRanges): Add list items
1191         to the list of accessibility objects supporting text ranges.
1192
1193 2011-02-01  Mario Sanchez Prada  <msanchez@igalia.com>
1194
1195         Reviewed by Martin Robinson.
1196
1197         [GTK] character range extents is off when the end of a wrapped line is included
1198         https://bugs.webkit.org/show_bug.cgi?id=53323
1199
1200         Fixed wrong calculation getting the range extents.
1201
1202         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1203         (webkit_accessible_text_get_range_extents): Removed '+1' since the
1204         requested interval shouldn't include the last character.
1205
1206 2011-02-01  Mario Sanchez Prada  <msanchez@igalia.com>
1207
1208         Reviewed by Martin Robinson.
1209
1210         [GTK] Caret Offset is one off at the end of wrapped lines
1211         https://bugs.webkit.org/show_bug.cgi?id=53300
1212
1213         Consider linebreaks as special cases.
1214
1215         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1216         (objectAndOffsetUnignored): In order to avoid getting wrong values
1217         when around linebreaks, we need to workaround this by explicitly
1218         avoiding those '\n' text nodes from affecting the result of
1219         calling to TextIterator:rangeLength().
1220
1221 2011-02-01  Roland Steiner  <rolandsteiner@chromium.org>
1222
1223         Unreviewed, rolling out r77229.
1224         http://trac.webkit.org/changeset/77229
1225         https://bugs.webkit.org/show_bug.cgi?id=53289
1226
1227         revert mysterious build breakage
1228
1229         * Android.mk:
1230         * CMakeLists.txt:
1231         * GNUmakefile.am:
1232         * WebCore.gypi:
1233         * WebCore.pro:
1234         * WebCore.vcproj/WebCore.vcproj:
1235         * WebCore.xcodeproj/project.pbxproj:
1236         * dom/DOMAllInOne.cpp:
1237         * dom/Document.cpp:
1238         (WebCore::Document::DocumentOrderedMap::clear):
1239         (WebCore::Document::DocumentOrderedMap::add):
1240         (WebCore::Document::DocumentOrderedMap::remove):
1241         (WebCore::Document::DocumentOrderedMap::get):
1242         (WebCore::keyMatchesId):
1243         (WebCore::Document::getElementById):
1244         (WebCore::keyMatchesMapName):
1245         (WebCore::keyMatchesLowercasedMapName):
1246         (WebCore::Document::getImageMap):
1247         * dom/Document.h:
1248         (WebCore::Document::DocumentOrderedMap::contains):
1249         (WebCore::Document::DocumentOrderedMap::containsMultiple):
1250         * dom/DocumentOrderedMap.cpp: Removed.
1251         * dom/DocumentOrderedMap.h: Removed.
1252
1253 2011-02-01  Mihai Parparita  <mihaip@chromium.org>
1254
1255         Reviewed by James Robinson.
1256
1257         Async event handlers should not fire within a modal dialog
1258         https://bugs.webkit.org/show_bug.cgi?id=53202
1259
1260         Asychronous events that use EventQueue would currently fire while a
1261         modal dialog (e.g. window.alert()) was up. Change EventQueue to use a
1262         SuspendableTimer (which automatically gets suspended while dialogs are
1263         up and in other cases where JS execution is not allowed).
1264         
1265         Test: fast/events/scroll-event-during-modal-dialog.html
1266
1267         * dom/Document.cpp:
1268         (WebCore::Document::Document):
1269         * dom/EventQueue.cpp:
1270         (WebCore::EventQueueTimer::EventQueueTimer):
1271         (WebCore::EventQueueTimer::fired):
1272         (WebCore::EventQueue::EventQueue):
1273         (WebCore::EventQueue::enqueueEvent):
1274         (WebCore::EventQueue::pendingEventTimerFired):
1275         * dom/EventQueue.h:
1276         (WebCore::EventQueue::create):
1277
1278 2011-02-01  Roland Steiner  <rolandsteiner@chromium.org>
1279
1280         Reviewed by Dimitri Glazkov.
1281
1282         Bug 53289 - DOM: Move DocumentOrderedMap from Document into separate files
1283         https://bugs.webkit.org/show_bug.cgi?id=53289
1284
1285         Moving the nested class DocumentOrderedMap from Document into separate files,
1286         updating code where necessary.
1287
1288         No new tests. (refactoring)
1289
1290         * Android.mk:
1291         * CMakeLists.txt:
1292         * GNUMakefile.am:
1293         * WebCore.gypi:
1294         * WebCore.pro:
1295         * WebCore.vcproj/WebCore.vcproj:
1296         * WebCore.xcodeproj/project.pbxproj:
1297         * dom/Document.cpp:
1298         (WebCore::Document::getElementById):
1299         (WebCore::Document::getImageMap):
1300         * dom/Document.h:
1301         * dom/DocumentOrderedMap.cpp: Added.
1302         (WebCore::keyMatchesId):
1303         (WebCore::keyMatchesMapName):
1304         (WebCore::keyMatchesLowercasedMapName):
1305         (WebCore::DocumentOrderedMap::clear):
1306         (WebCore::DocumentOrderedMap::add):
1307         (WebCore::DocumentOrderedMap::remove):
1308         (WebCore::DocumentOrderedMap::get):
1309         (WebCore::DocumentOrderedMap::getElementById):
1310         (WebCore::DocumentOrderedMap::getElementByMapName):
1311         (WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
1312         * dom/DocumentOrderedMap.h: Added.
1313         (WebCore::DocumentOrderedMap::contains):
1314         (WebCore::DocumentOrderedMap::containsMultiple):
1315         * dom/DOMAllInOne.cpp:
1316
1317 2011-02-01  Naoki Takano  <takano.naoki@gmail.com>
1318
1319         Reviewed by Darin Fisher.
1320
1321         [Chromium] Autofill should work with HTML5 form elements
1322         https://bugs.webkit.org/show_bug.cgi?id=51809
1323         http://crbug.com/65654
1324
1325         No new tests, because this fix is for Chromium project and hard to test only in WebKit project.
1326
1327         * html/InputType.h: Insert comment for canSetSuggestedValue().
1328         * html/TextFieldInputType.cpp:
1329         (WebCore::TextFieldInputType::canSetSuggestedValue): Implemented to return always true for that all text filed inputs can be completed.
1330         * html/TextFieldInputType.h: Declare canSetSuggestedValue().
1331         * html/TextInputType.cpp: Delete canSetSuggestedValue() not to return true anymore.
1332         * html/TextInputType.h: Delete canSetSuggestedValue() not to return true anymore.
1333
1334 2011-02-01  Kent Tamura  <tkent@chromium.org>
1335
1336         Reviewed by Dan Bernstein.
1337
1338         REGRESSION (r65062): Safari loops forever under WebCore::plainTextToMallocAllocatedBuffer()
1339         https://bugs.webkit.org/show_bug.cgi?id=53272
1340
1341         * editing/TextIterator.cpp:
1342         (WebCore::TextIterator::handleTextBox): Pass the appropriate renderer to emitText().
1343
1344 2011-01-31  Alexey Proskuryakov  <ap@apple.com>
1345
1346         Reviewed by Maciej Stachowiak.
1347
1348         https://bugs.webkit.org/show_bug.cgi?id=53466
1349         Move WebKit2 to printing via API methods
1350
1351         * WebCore.exp.in: Export IntRect::scale().
1352
1353 2011-01-31  Patrick Gansterer  <paroga@webkit.org>
1354
1355         Reviewed by Adam Barth.
1356
1357         Remove obsolete comment after r41871
1358         https://bugs.webkit.org/show_bug.cgi?id=53406
1359
1360         * dom/Document.h:
1361
1362 2011-01-31  Simon Fraser  <simon.fraser@apple.com>
1363
1364         Fix according to reviewer comments: can just use Color::black now.
1365
1366         * platform/graphics/ShadowBlur.cpp:
1367         (WebCore::ShadowBlur::drawInsetShadow):
1368         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
1369
1370 2011-01-31  Simon Fraser  <simon.fraser@apple.com>
1371
1372         Reviewed by Sam Weinig.
1373
1374         Clean up ShadowBlur
1375         https://bugs.webkit.org/show_bug.cgi?id=53472
1376
1377         Some minor ShadowBlur cleanup.
1378
1379         * platform/graphics/ShadowBlur.h:
1380         * platform/graphics/ShadowBlur.cpp:
1381         (WebCore::ShadowBlur::ShadowBlur): Use m_blurRadius rather than the radius
1382         paramter.
1383         (WebCore::ShadowBlur::adjustBlurRadius): Renamed from adjustBlurDistance.
1384         (WebCore::ShadowBlur::calculateLayerBoundingRect): Rename layerFloatRect to
1385         layerRect. Make frameSize a float.
1386         (WebCore::ShadowBlur::beginShadowLayer): This now takes a precomputed
1387         layerRect rather than calling calculateLayerBoundingRect() to compute
1388         it itself, since we were calling calculateLayerBoundingRect() twice.
1389         (WebCore::ShadowBlur::drawRectShadow): Optimize to call calculateLayerBoundingRect()
1390         only once. The shadowRect variable was unused, so two return paths could be
1391         collapsed into one.
1392         (WebCore::ShadowBlur::drawInsetShadow): Call calculateLayerBoundingRect() before
1393         beginShadowLayer() now.
1394         (WebCore::ShadowBlur::drawRectShadowWithoutTiling): The layerRect gets passed in.
1395         We always used alpha=1, so no need to pass that in.
1396         (WebCore::ShadowBlur::drawRectShadowWithTiling): We always used alpha=1, so no need to
1397         pass that in. Move shadowRect down to first use.
1398         ShadowBlur::clipBounds() was unused.
1399
1400 2011-01-31  No'am Rosenthal  <noam.rosenthal@nokia.com>
1401
1402         Reviewed by Kenneth Rohde Christiansen.
1403
1404         [Qt] QWebElements example from QtWebKit Bridge documentation does not work at all
1405         https://bugs.webkit.org/show_bug.cgi?id=46748
1406
1407         This problem disappears when we register QWebElement using qRegisterMetaType, which we now do in QtInstance.
1408         Added a regression test to tst_QWebFrame.
1409
1410         * bridge/qt/qt_instance.cpp:
1411         (JSC::Bindings::QtInstance::QtInstance):
1412
1413 2011-01-27  MORITA Hajime  <morrita@google.com>
1414
1415         Reviewed by Dimitri Glazkov.
1416         
1417         Convert <progress> shadow DOM to a DOM-based shadow.
1418         https://bugs.webkit.org/show_bug.cgi?id=50660
1419
1420         * Removed RenderProgress::m_valuePart, moved the shadow node
1421           to the shadow root of HTMLProgressElement.
1422         * Removed hard-coded pseudo ID for -webkit-progress-bar-value.
1423           ProgressBarValueElement is defined only for overriding
1424           shadowPseudoId().
1425         
1426         No new tests. No behavioral change.
1427
1428         * css/CSSSelector.cpp:
1429         (WebCore::CSSSelector::pseudoId):
1430         (WebCore::nameToPseudoTypeMap):
1431         (WebCore::CSSSelector::extractPseudoType):
1432         * css/CSSSelector.h:
1433         * html/HTMLProgressElement.cpp:
1434         (WebCore::ProgressBarValueElement::ProgressBarValueElement):
1435         (WebCore::ProgressBarValueElement::shadowPseudoId):
1436         (WebCore::ProgressBarValueElement::create):
1437         (WebCore::ProgressBarValueElement::detach):
1438         (WebCore::HTMLProgressElement::parseMappedAttribute):
1439         (WebCore::HTMLProgressElement::attach):
1440         (WebCore::HTMLProgressElement::valuePart):
1441         (WebCore::HTMLProgressElement::didElementStateChange):
1442         (WebCore::HTMLProgressElement::createShadowSubtreeIfNeeded):
1443         * html/HTMLProgressElement.h:
1444         * rendering/RenderProgress.cpp:
1445         (WebCore::RenderProgress::~RenderProgress):
1446         (WebCore::RenderProgress::updateFromElement):
1447         (WebCore::RenderProgress::layoutParts):
1448         (WebCore::RenderProgress::shouldHaveParts):
1449         (WebCore::RenderProgress::valuePart):
1450         * rendering/RenderProgress.h:
1451         * rendering/style/RenderStyleConstants.h:
1452
1453 2011-01-31  Charlie Reis  <creis@chromium.org>
1454
1455         Reviewed by Mihai Parparita.
1456
1457         Add sanity check to help diagnose bug 52819
1458         https://bugs.webkit.org/show_bug.cgi?id=53402
1459
1460         Crash early if the children of fromItem look invalid.
1461
1462         * loader/HistoryController.cpp:
1463
1464 2011-01-31  Kalle Vahlman  <kalle.vahlman@movial.com>
1465
1466         Reviewed by Andreas Kling.
1467
1468         [Qt] canvas.drawImage(HTMLVideoElement) doesn't work with Qt Multimedia backend
1469         https://bugs.webkit.org/show_bug.cgi?id=53325
1470
1471         Reimplement paintCurrentFrameInContext() rather than delegate the
1472         rendering to paint() to make sure we really do get the video frame
1473         content into the GraphicsContext, regardless of accelerated
1474         compositing and the video scene state.
1475
1476         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
1477         (WebCore::MediaPlayerPrivateQt::paintCurrentFrameInContext):
1478         * platform/graphics/qt/MediaPlayerPrivateQt.h:
1479
1480 2011-01-31  Emil A Eklund  <eae@chromium.org>
1481
1482         Reviewed by Darin Adler.
1483
1484         Setting "selected" attribute to false should have no effect in single line <select>
1485         https://bugs.webkit.org/show_bug.cgi?id=52436
1486
1487         Change SelectElement::setSelectedIndex to select the first selectable
1488         option when the select state of all options is set to false as required
1489         by the HTML5 specification.
1490
1491         Test: fast/dom/HTMLSelectElement/selected-false.html
1492
1493         * dom/SelectElement.cpp:
1494         (WebCore::SelectElement::setSelectedIndex):
1495
1496 2011-01-31  Alexander Pavlov  <apavlov@chromium.org>
1497
1498         Reviewed by Yury Semikhatsky.
1499
1500         Web Inspector: Console source references need a left-margin
1501         https://bugs.webkit.org/show_bug.cgi?id=53308
1502
1503         * inspector/front-end/inspector.css:
1504         (.console-message-url): Added a 4px margin on the left.
1505
1506 2011-01-31  Carol Szabo  <carol.szabo@nokia.com>
1507
1508         Reviewed by David Hyatt.
1509
1510         Code Changes only.
1511
1512         It is needlessly expensive to find the generating node from an anonymous renderer of a pseudoelement.
1513         https://bugs.webkit.org/show_bug.cgi?id=53024
1514
1515         No new tests. No change in functionality
1516
1517         * rendering/RenderObject.h:
1518         (WebCore::RenderObject::before):
1519         (WebCore::RenderObject::after):
1520         (WebCore::RenderObject::generatingNode):
1521         Added new accessors for the use of the CSS 2.1 counters code
1522         (mainlyly)
1523         * rendering/RenderObjectChildList.cpp:
1524         (WebCore::beforeAfterContainer):
1525         (WebCore::RenderObjectChildList::invalidateCounters):
1526         (WebCore::RenderObjectChildList::before):
1527         (WebCore::RenderObjectChildList::after):
1528         Refactored the code to take advantage of the new accessors.
1529         (WebCore::RenderObjectChildList::updateBeforeAfterContent):
1530         Changed to store the generating node in the :before and :after
1531         renderers.
1532         * rendering/RenderObjectChildList.h:
1533
1534 2011-01-31  Krithigassree Sambamurthy  <krithigassree.sambamurthy@nokia.com>
1535
1536         Reviewed by David Hyatt.
1537
1538         Add background-clip to background shorthand
1539         https://bugs.webkit.org/show_bug.cgi?id=52080
1540
1541         Added background-clip to background-shorthand. Also made changes to
1542         include webkitMaskClip to the mask shorthand to keep both in sync.
1543
1544         * css/CSSParser.cpp:
1545         (WebCore::CSSParser::parseValue):
1546         (WebCore::CSSParser::parseFillShorthand):
1547
1548 2011-01-31  Darin Adler  <darin@apple.com>
1549
1550         Reviewed by Adele Peterson.
1551
1552         WKView should support scrollPageDown:, scrollPageUp:, scrollToBeg and other similar selectors
1553         https://bugs.webkit.org/show_bug.cgi?id=53460
1554
1555         * editing/EditorCommand.cpp:
1556         (WebCore::executeScrollPageBackward): Added.
1557         (WebCore::executeScrollPageForward): Added.
1558         (WebCore::executeScrollToBeginningOfDocument): Added.
1559         (WebCore::executeScrollToEndOfDocument): Added.
1560         (WebCore::createCommandMap): Added the four commands above to the map.
1561
1562 2011-01-31  Dan Bernstein  <mitz@apple.com>
1563
1564         Reviewed by Adele Peterson.
1565
1566         Inter-ideograph justification should apply to hiragana and katakana as well
1567         https://bugs.webkit.org/show_bug.cgi?id=53464
1568
1569         Changed the test for expansion opportunities from isCJKIdeograph() to isCJKIdeographOrSymbol().
1570
1571         * platform/graphics/Font.cpp:
1572         (WebCore::Font::expansionOpportunityCount):
1573         * platform/graphics/WidthIterator.cpp:
1574         (WebCore::WidthIterator::advance):
1575         * platform/graphics/mac/ComplexTextController.cpp:
1576         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
1577
1578 2011-01-31  Dimitri Glazkov  <dglazkov@chromium.org>
1579
1580         Reviewed by James Robinson.
1581
1582         REGRESSION(r76951): Appearance of media controls changed slightly on Qt/Chromium ports
1583         https://bugs.webkit.org/show_bug.cgi?id=53314
1584
1585         Fixes media/controls-strict.html on Chromium.
1586
1587         * css/mediaControlsChromium.css:
1588         (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
1589             Added proper box-sizing to avoid differences between strict/quirks mode.
1590
1591 2011-01-31  Kent Tamura  <tkent@chromium.org>
1592
1593         Reviewed by Dimitri Glazkov.
1594
1595         Validation message bubble shouldn't inherit text-security style
1596         https://bugs.webkit.org/show_bug.cgi?id=53457
1597
1598         No new tests because the validation message feature depends on timers
1599         and is enabled only in Chromium port.
1600
1601         * css/html.css:
1602         (::-webkit-validation-bubble): Reset -webkit-text-security.
1603
1604 2011-01-31  Michael Saboff  <msaboff@apple.com>
1605
1606         Reviewed by Geoffrey Garen.
1607
1608         Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
1609         https://bugs.webkit.org/show_bug.cgi?id=53271
1610
1611         Reapplying this patch again. 
1612         The removal of this patch in <http://trac.webkit.org/changeset/77125>
1613         as part of https://bugs.webkit.org/show_bug.cgi?id=53418,
1614         removed the both the first (failing) patch (r76893) and this fixed 
1615         patch (r76969).  This patch includes slight changes necessitated by
1616         r77151.
1617
1618         Reapplying this patch with the change that the second ASSERT in 
1619         RootObject::removeRuntimeObject was changed to use
1620         .uncheckedGet() instead of the failing .get().  The object in question
1621         could be in the process of being GC'ed.  The get() call will not return
1622         such an object while the uncheckedGet() call will return the (unsafe) 
1623         object.  This is the behavior we want.
1624
1625         Precautionary change.
1626         Changed RootObject to use WeakGCMap instead of HashSet.
1627         Found will looking for another issue, but can't produce a test case
1628         that is problematic.  THerefore there aren't any new tests.
1629
1630         * bridge/runtime_root.cpp:
1631         (JSC::Bindings::RootObject::invalidate):
1632         (JSC::Bindings::RootObject::addRuntimeObject):
1633         (JSC::Bindings::RootObject::removeRuntimeObject):
1634         * bridge/runtime_root.h:
1635
1636 2011-01-31  Andreas Kling  <kling@webkit.org>
1637
1638         Unbreak Qt build after r77151.
1639
1640         * bridge/qt/qt_instance.cpp:
1641         (JSC::Bindings::QtInstance::removeCachedMethod):
1642         (JSC::Bindings::QtInstance::markAggregate):
1643
1644 2011-01-31  takano takumi  <takano@apple.com>
1645
1646         Reviewed by Dave Hyatt.
1647
1648         Implement text-combine rendering code
1649         https://bugs.webkit.org/show_bug.cgi?id=50621
1650
1651         Test: fast/text/international/text-combine-image-test.html
1652
1653         * Android.mk: Added RenderCombineText.cpp/h
1654         * CMakeLists.txt: Added RenderCombineText.cpp/h
1655         * GNUmakefile.am: Added RenderCombineText.cpp/h
1656         * WebCore.exp.in:
1657         * WebCore.gypi: Added RenderCombineText.cpp/h
1658         * WebCore.pro: Added RenderCombineText.cpp/h
1659         * WebCore.vcproj/WebCore.vcproj: Added RenderCombineText.cpp/h
1660         * WebCore.xcodeproj/project.pbxproj: Added RenderCombineText.cpp/h
1661         * css/CSSFontFaceSource.cpp:
1662         (WebCore::CSSFontFaceSource::getFontData):
1663         - Added fontDescription.widthVariant to SimpleFontData creation.
1664         * css/CSSStyleSelector.cpp:
1665         (WebCore::CSSStyleSelector::applyProperty):
1666         - Changed to set "Unique" flag to RenderStyle in case of TextCombine.
1667         * dom/Text.cpp:
1668         (WebCore::Text::createRenderer):
1669         - Changed to create RenderCombineText in case of TextCombine.
1670         * loader/cache/CachedFont.cpp:
1671         (WebCore::CachedFont::platformDataFromCustomData):
1672         - Added FontWidthVariant as an argument for FontPlatformData creation.
1673         * loader/cache/CachedFont.h:
1674         - Ditto.
1675         * platform/graphics/Font.h:
1676         (WebCore::Font::widthVariant):
1677         - The accessor to FontWidthVariant member variable.
1678         * platform/graphics/FontCache.cpp:
1679         - Made cache to incorporate FontWidthVariant value.
1680         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
1681         (WebCore::FontPlatformDataCacheKey::operator==):
1682         (WebCore::computeHash):
1683         (WebCore::FontCache::getCachedFontPlatformData):
1684         * platform/graphics/FontDescription.h:
1685         - Add a member variable that holds a width variant - none, half-width, third-width, and quarter-width.
1686         (WebCore::FontDescription::FontDescription):
1687         (WebCore::FontDescription::widthVariant):
1688         (WebCore::FontDescription::setWidthVariant):
1689         (WebCore::FontDescription::operator==):
1690         * platform/graphics/FontWidthVariant.h: Added.
1691         * platform/graphics/cairo/FontCustomPlatformData.h:
1692         - Changed to carry FontWidthVariant value.
1693         * platform/graphics/cocoa/FontPlatformData.h:
1694         - Changed to carry FontWidthVariant value.
1695         (WebCore::FontPlatformData::FontPlatformData):
1696         (WebCore::FontPlatformData::widthVariant):
1697         (WebCore::FontPlatformData::hash):
1698         (WebCore::FontPlatformData::operator==):
1699         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1700         (WebCore::FontPlatformData::FontPlatformData):
1701         - Changed to carry FontWidthVariant value.
1702         (WebCore::FontPlatformData::operator=):
1703         - Ditto.
1704         (WebCore::mapFontWidthVariantToCTFeatureSelector):
1705         - A function to map a FontWidthVariant value to a CoreText's text spacing feature selector.
1706         (WebCore::FontPlatformData::ctFont):
1707         - Changed to create CTFont with text spacing variant based on FontWidthVariant.
1708         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
1709         (WebCore::FontCustomPlatformData::fontPlatformData):
1710         - Changed to carry FontWidthVariant value.
1711         * platform/graphics/haiku/FontCustomPlatformData.cpp:
1712         (WebCore::FontCustomPlatformData::fontPlatformData):
1713         - Changed to carry FontWidthVariant value.
1714         * platform/graphics/haiku/FontCustomPlatformData.h:
1715         * platform/graphics/mac/FontCacheMac.mm:
1716         (WebCore::FontCache::createFontPlatformData):
1717         - Changed to carry FontWidthVariant value.
1718         * platform/graphics/mac/FontCustomPlatformData.cpp:
1719         (WebCore::FontCustomPlatformData::fontPlatformData):
1720         - Changed to carry FontWidthVariant value.
1721         * platform/graphics/mac/FontCustomPlatformData.h:
1722         - Ditto.
1723         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
1724         (WebCore::shouldUseCoreText):
1725         - Changed to skip CT path when width variant is specified.
1726         * platform/graphics/pango/FontCustomPlatformDataPango.cpp:
1727         (WebCore::FontCustomPlatformData::fontPlatformData):
1728         - Ditto.
1729         * platform/graphics/qt/FontCustomPlatformData.h:
1730         - Ditto.
1731         * platform/graphics/qt/FontCustomPlatformDataQt.cpp:
1732         (WebCore::FontCustomPlatformData::fontPlatformData):
1733         - Ditto.
1734         * platform/graphics/skia/FontCustomPlatformData.cpp:
1735         (WebCore::FontCustomPlatformData::fontPlatformData):
1736         - Ditto.
1737         * platform/graphics/skia/FontCustomPlatformData.h:
1738         - Ditto.
1739         * platform/graphics/win/FontCustomPlatformData.cpp:
1740         (WebCore::FontCustomPlatformData::fontPlatformData):
1741         - Ditto.
1742         * platform/graphics/win/FontCustomPlatformData.h:
1743         - Ditto.
1744         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
1745         - Ditto.
1746         (WebCore::FontCustomPlatformData::fontPlatformData):
1747         - Ditto.
1748         * platform/graphics/win/FontCustomPlatformDataCairo.h:
1749         - Ditto.
1750         * platform/graphics/wince/FontCustomPlatformData.cpp:
1751         (WebCore::FontCustomPlatformData::fontPlatformData):
1752         - Ditto.
1753         * platform/graphics/wince/FontCustomPlatformData.h:
1754         - Ditto.
1755         * platform/graphics/wx/FontCustomPlatformData.cpp:
1756         (WebCore::FontCustomPlatformData::fontPlatformData):
1757         - Ditto.
1758         * platform/graphics/wx/FontCustomPlatformData.h:
1759         - Ditto.
1760         * rendering/InlineTextBox.cpp:
1761         (WebCore::InlineTextBox::paint):
1762         - In case of RenderCombineText, we don't rotate text even in vertical writing. Also, we render original text
1763         instead of text returned from text().
1764         * rendering/RenderBlock.cpp:
1765         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
1766         - Made to call RenderCombinedText's prepareTextCombine() here.
1767         * rendering/RenderBlockLineLayout.cpp:
1768         (WebCore::textWidth):
1769         - Made to always use the render object's width() in case of TextCombine.
1770         (WebCore::RenderBlock::findNextLineBreak):
1771         - Made to call RenderCombinedText's prepareTextCombine() here.
1772         * rendering/RenderCombineText.cpp: Added. A subclass of RenderText.
1773         (WebCore::RenderCombineText::RenderCombineText):
1774         (WebCore::RenderCombineText::styleDidChange):
1775         - Clear the flag that indicated the font has been prepared for combining. The font will be reinitialized in
1776         the next call of RenderBlock::findNextLineBreak().
1777         (WebCore::RenderCombineText::setTextInternal):
1778         - Ditto.
1779         (WebCore::RenderCombineText::width):
1780         - Returns 1-em width in case of font combine.
1781         (WebCore::RenderCombineText::adjustTextOrigin):
1782         - Adjust drawing origin point in case of font combine.
1783         (WebCore::RenderCombineText::charactersToRender):
1784         - Return original text instead of current text in case of font combine.
1785         (WebCore::RenderCombineText::combineText):
1786         - This function tries to pack passed text with; 1) the current font as is, 2) the font created
1787         from the descriptor with half-width variant specified, 3) the font with third-width variant, 4) the font
1788         with quarter-width variant.
1789         - If a suitable font successfully found, replace the current font with the new font. If no appropriate font found,
1790         we give up text-combine as the CSS spec describes.
1791         - If a new font found, we replace the text with 0xFFFC. This is needed for a combined text block to be able to
1792         behave like a single character against text decorations.
1793         * rendering/RenderCombineText.h: Added.
1794         (WebCore::RenderCombineText::isCombined):
1795         (WebCore::RenderCombineText::combinedTextWidth):
1796         - Returns 1-em width in case of font combine.
1797         (WebCore::RenderCombineText::renderName):
1798         (WebCore::toRenderCombineText):
1799         * rendering/RenderText.cpp:
1800         (WebCore::RenderText::widthFromCache):
1801         - Made to call RenderCombineText's combinedTextWidth when the text is combined.
1802         * rendering/RenderingAllInOne.cpp: Added RenderCombineText.cpp
1803         * rendering/style/RenderStyle.h:
1804         (WebCore::InheritedFlags::hasTextCombine):
1805         - Added for a quick test of TextCombine.
1806
1807 2011-01-31  Oliver Hunt  <oliver@apple.com>
1808
1809         Convert markstack to a slot visitor API
1810         https://bugs.webkit.org/show_bug.cgi?id=53219
1811
1812         rolling r77098, r77099, r77100, r77109, and
1813         r77111 back in, along with a few more Qt fix attempts.
1814
1815         * ForwardingHeaders/runtime/WriteBarrier.h: Added.
1816         * WebCore.exp.in:
1817         * bindings/js/DOMWrapperWorld.h:
1818         (WebCore::DOMWrapperWorld::globalData):
1819         * bindings/js/JSAudioConstructor.cpp:
1820         (WebCore::JSAudioConstructor::JSAudioConstructor):
1821         * bindings/js/JSDOMBinding.cpp:
1822         (WebCore::markDOMNodesForDocument):
1823         (WebCore::markDOMObjectWrapper):
1824         (WebCore::markDOMNodeWrapper):
1825         * bindings/js/JSDOMGlobalObject.cpp:
1826         (WebCore::JSDOMGlobalObject::markChildren):
1827         (WebCore::JSDOMGlobalObject::setInjectedScript):
1828         (WebCore::JSDOMGlobalObject::injectedScript):
1829         * bindings/js/JSDOMGlobalObject.h:
1830         (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
1831         (WebCore::getDOMConstructor):
1832         * bindings/js/JSDOMWindowCustom.cpp:
1833         (WebCore::JSDOMWindow::setLocation):
1834         (WebCore::DialogHandler::dialogCreated):
1835         * bindings/js/JSDOMWindowShell.cpp:
1836         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
1837         (WebCore::JSDOMWindowShell::setWindow):
1838         (WebCore::JSDOMWindowShell::markChildren):
1839         (WebCore::JSDOMWindowShell::unwrappedObject):
1840         * bindings/js/JSDOMWindowShell.h:
1841         (WebCore::JSDOMWindowShell::window):
1842         (WebCore::JSDOMWindowShell::setWindow):
1843         * bindings/js/JSDeviceMotionEventCustom.cpp:
1844         (WebCore::createAccelerationObject):
1845         (WebCore::createRotationRateObject):
1846         * bindings/js/JSEventListener.cpp:
1847         (WebCore::JSEventListener::JSEventListener):
1848         (WebCore::JSEventListener::markJSFunction):
1849         * bindings/js/JSEventListener.h:
1850         (WebCore::JSEventListener::jsFunction):
1851         * bindings/js/JSHTMLDocumentCustom.cpp:
1852         (WebCore::JSHTMLDocument::setAll):
1853         * bindings/js/JSImageConstructor.cpp:
1854         (WebCore::JSImageConstructor::JSImageConstructor):
1855         * bindings/js/JSImageDataCustom.cpp:
1856         (WebCore::toJS):
1857         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
1858         (WebCore::JSJavaScriptCallFrame::scopeChain):
1859         (WebCore::JSJavaScriptCallFrame::scopeType):
1860         * bindings/js/JSNodeFilterCondition.cpp:
1861         (WebCore::JSNodeFilterCondition::markAggregate):
1862         (WebCore::JSNodeFilterCondition::acceptNode):
1863         * bindings/js/JSNodeFilterCondition.h:
1864         * bindings/js/JSNodeFilterCustom.cpp:
1865         * bindings/js/JSOptionConstructor.cpp:
1866         (WebCore::JSOptionConstructor::JSOptionConstructor):
1867         * bindings/js/JSSQLResultSetRowListCustom.cpp:
1868         (WebCore::JSSQLResultSetRowList::item):
1869         * bindings/js/ScriptCachedFrameData.cpp:
1870         (WebCore::ScriptCachedFrameData::restore):
1871         * bindings/js/ScriptObject.cpp:
1872         (WebCore::ScriptGlobalObject::set):
1873         * bindings/js/SerializedScriptValue.cpp:
1874         (WebCore::CloneDeserializer::putProperty):
1875         * bindings/scripts/CodeGeneratorJS.pm:
1876         * bridge/qt/qt_class.cpp:
1877         (JSC::Bindings::QtClass::fallbackObject):
1878         * bridge/qt/qt_instance.cpp:
1879         (JSC::Bindings::QtInstance::QtInstance):
1880         (JSC::Bindings::QtInstance::removeCachedMethod):
1881         (JSC::Bindings::QtInstance::markAggregate):
1882         * bridge/qt/qt_instance.h:
1883         * bridge/qt/qt_runtime.cpp:
1884         (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
1885         (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
1886         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
1887         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
1888         * bridge/qt/qt_runtime.h:
1889         * dom/Document.h:
1890
1891 2011-01-31  Dan Winship  <danw@gnome.org>
1892
1893         Reviewed by Gustavo Noronha Silva.
1894
1895         wss (websockets ssl) support for gtk via new gio TLS support
1896         https://bugs.webkit.org/show_bug.cgi?id=50344
1897
1898         Update to use GPollableOutputStream and GTlsConnection to
1899         implement wss URLs
1900
1901         * platform/network/soup/SocketStreamHandle.h:
1902         * platform/network/soup/SocketStreamHandleSoup.cpp:
1903         (WebCore::SocketStreamHandle::SocketStreamHandle):
1904         (WebCore::SocketStreamHandle::connected):
1905         (WebCore::SocketStreamHandle::platformSend):
1906         (WebCore::SocketStreamHandle::beginWaitingForSocketWritability):
1907         (WebCore::writeReadyCallback):
1908
1909 2011-01-31  Abhishek Arya  <inferno@chromium.org>
1910
1911         Reviewed by Dimitri Glazkov.
1912
1913         Check the textarea node still exists in document before casting
1914         it to HTMLTextAreaElement.
1915         https://bugs.webkit.org/show_bug.cgi?id=53429
1916
1917         Test: fast/forms/textarea-node-removed-from-document-crash.html
1918
1919         * rendering/RenderTextControlMultiLine.cpp:
1920         (WebCore::RenderTextControlMultiLine::~RenderTextControlMultiLine):
1921
1922 2011-01-27  Abhishek Arya  <inferno@chromium.org>
1923
1924         Reviewed by Dave Hyatt.
1925
1926         If beforeChild is wrapped in an anonymous table section, we need to
1927         go the parent to find it and use it before adding childs to table.
1928         https://bugs.webkit.org/show_bug.cgi?id=53276
1929
1930         We need to make sure that beforeChild's parent is "this" before calling
1931         RenderBox::addChild. The previous condition in while is too restrictive
1932         and fails to calculate the right beforeChild value when its display
1933         style is table caption.
1934         Test: fast/table/before-child-non-table-section-add-table-crash.html
1935
1936         * rendering/RenderTable.cpp:
1937         (WebCore::RenderTable::addChild):
1938
1939 2011-01-31  Shane Stephens  <shanestephens@google.com>
1940
1941         Reviewed by Simon Fraser.
1942
1943         AffineTransform::translateRight incorrectly computes a translateLeft.
1944         https://bugs.webkit.org/show_bug.cgi?id=52551
1945
1946         Removed translateRight and converted all uses to perform standard
1947         matrix multiplication.
1948
1949         No new tests because patch doesn't modify functionality.
1950
1951         * platform/graphics/transforms/AffineTransform.cpp:
1952         * platform/graphics/transforms/AffineTransform.h:
1953         (WebCore::AffineTransform::translation):
1954         * rendering/svg/RenderSVGResourceMarker.cpp:
1955         (WebCore::RenderSVGResourceMarker::localToParentTransform):
1956         * rendering/svg/RenderSVGRoot.cpp:
1957         (WebCore::RenderSVGRoot::localToRepaintContainerTransform):
1958         (WebCore::RenderSVGRoot::localToParentTransform):
1959         * rendering/svg/RenderSVGViewportContainer.cpp:
1960         (WebCore::RenderSVGViewportContainer::localToParentTransform):
1961         * rendering/svg/SVGTextLayoutEngine.cpp:
1962         (WebCore::SVGTextLayoutEngine::finalizeTransformMatrices):
1963
1964 2011-01-31  Mario Sanchez Prada  <msanchez@igalia.com>
1965
1966         Reviewed by Martin Robinson.
1967
1968         [Gtk] atk_text_set_caret_offset returns True even when it is unsuccessful
1969         https://bugs.webkit.org/show_bug.cgi?id=53389
1970
1971         Return FALSE when not able to set the caret at the specified offset.
1972
1973         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1974         (webkit_accessible_text_set_caret_offset): Return FALSE when the
1975         range created is NULL and adjust offset to account for list markers.
1976
1977 2011-01-28  Pavel Feldman  <pfeldman@chromium.org>
1978
1979         Reviewed by Yury Semikhatsky.
1980
1981         Web Inspector: copy HAR to clipboard instead of saving blob on export.
1982         https://bugs.webkit.org/show_bug.cgi?id=53328
1983
1984         * inspector/front-end/NetworkPanel.js:
1985         (WebInspector.NetworkPanel.prototype._exportAll):
1986         (WebInspector.NetworkPanel.prototype._exportResource):
1987
1988 2011-01-30  Pavel Feldman  <pfeldman@chromium.org>
1989
1990         Reviewed by Timothy Hatcher.
1991
1992         Web Inspector: speed up network panel rendering.
1993         https://bugs.webkit.org/show_bug.cgi?id=53397
1994
1995         * inspector/front-end/DataGrid.js:
1996         (WebInspector.DataGrid.prototype.get scrollContainer):
1997         * inspector/front-end/NetworkPanel.js:
1998         (WebInspector.NetworkPanel.prototype.elementsToRestoreScrollPositionsFor):
1999         (WebInspector.NetworkPanel.prototype._positionSummaryBar):
2000         (WebInspector.NetworkPanel.prototype._createTable):
2001         (WebInspector.NetworkPanel.prototype._exportResource):
2002         (WebInspector.NetworkPanel.prototype._onScroll):
2003         * inspector/front-end/networkPanel.css:
2004         (.network-sidebar .data-grid.small tr.offscreen):
2005         (.network-sidebar .data-grid tr.offscreen):
2006         (.network-sidebar .data-grid tr.offscreen td):
2007
2008 2011-01-31  Peter Varga  <pvarga@webkit.org>
2009
2010         Reviewed by Andreas Kling.
2011
2012         Remove wrec from WebCore
2013         https://bugs.webkit.org/show_bug.cgi?id=53298
2014
2015         No new tests needed.
2016
2017         * Android.jscbindings.mk:
2018         * ForwardingHeaders/wrec/WREC.h: Removed.
2019         * WebCore.vcproj/WebCore.vcproj:
2020         * WebCore.vcproj/copyForwardingHeaders.cmd:
2021
2022 2011-01-31  Sheriff Bot  <webkit.review.bot@gmail.com>
2023
2024         Unreviewed, rolling out r76969.
2025         http://trac.webkit.org/changeset/76969
2026         https://bugs.webkit.org/show_bug.cgi?id=53418
2027
2028         "It is causing crashes in GTK+ and Leopard bots" (Requested by
2029         alexg__ on #webkit).
2030
2031         * bridge/runtime_root.cpp:
2032         (JSC::Bindings::RootObject::invalidate):
2033         (JSC::Bindings::RootObject::addRuntimeObject):
2034         (JSC::Bindings::RootObject::removeRuntimeObject):
2035         * bridge/runtime_root.h:
2036
2037 2011-01-31  Antti Koivisto  <antti@apple.com>
2038
2039         Not reviewed.
2040
2041         Spelling.
2042
2043         * css/CSSSelectorList.h:
2044         (WebCore::CSSSelectorList::next):
2045
2046 2011-01-31  Yury Semikhatsky  <yurys@chromium.org>
2047
2048         Unreviewed. Fix Chromium compilation on Linux.
2049
2050         * platform/graphics/ShadowBlur.cpp: added PLATFORM(CHROMIUM) guard
2051         * platform/graphics/ShadowBlur.h: added missing ColorSpace.h header include
2052
2053 2011-01-31  Yury Semikhatsky  <yurys@chromium.org>
2054
2055         Unreviewed. Fix Chromium compilation on Mac broken by r77101.
2056
2057         * WebCore.gypi: add ShadowBlur.{h,cpp} to the gypi file.
2058
2059 2011-01-31  Mikhail Naganov  <mnaganov@chromium.org>
2060
2061         Reviewed by Yury Semikhatsky.
2062
2063         WebInspector: Change button title from "Clear CPU profiles" to "Clear all profiles".
2064
2065         https://bugs.webkit.org/show_bug.cgi?id=53309
2066
2067         * English.lproj/localizedStrings.js:
2068         * inspector/front-end/ProfilesPanel.js:
2069         (WebInspector.ProfilesPanel):
2070
2071 2011-01-31  Carlos Garcia Campos  <cgarcia@igalia.com>
2072
2073         Unreviewed, fix the build with current GTK+ 3.x.
2074
2075         * plugins/gtk/gtk2xtbin.c:
2076         * plugins/gtk/gtk2xtbin.h:
2077
2078 2011-01-30  Kenichi Ishibashi  <bashi@google.com>
2079
2080         Reviewed by Kent Tamura.
2081
2082         Dangling form associated elements should not be registered on the document
2083         https://bugs.webkit.org/show_bug.cgi?id=53223
2084
2085         Adds insertedIntoDocument() and remvoedFromDocument() to
2086         FormAssociatedElement class to register the element on the document
2087         if and only if it actually inserted into (removed from) the document.
2088
2089         Test: fast/forms/dangling-form-element-crash.html
2090
2091         * html/FormAssociatedElement.cpp:
2092         (WebCore::FormAssociatedElement::insertedIntoDocument): Added.
2093         (WebCore::FormAssociatedElement::removedFromDocument): Ditto.
2094         (WebCore::FormAssociatedElement::insertedIntoTree): Don't register
2095         the element to a document.
2096         (WebCore::FormAssociatedElement::removedFromTree): Don't unregister
2097         the element from a document.
2098         * html/FormAssociatedElement.h:
2099         * html/HTMLFormControlElement.cpp:
2100         (WebCore::HTMLFormControlElement::insertedIntoDocument): Added.
2101         (WebCore::HTMLFormControlElement::removedFromDocument): Ditto.
2102         * html/HTMLFormControlElement.h:
2103         * html/HTMLObjectElement.cpp:
2104         (WebCore::HTMLObjectElement::insertedIntoDocument): Calls
2105         FormAssociatedElement::insertedIntoDocument().
2106         (WebCore::HTMLObjectElement::removedFromDocument): Calls
2107         FormAssociatedElement::removedFromDocument().
2108
2109 2011-01-30  Csaba Osztrogonác  <ossy@webkit.org>
2110
2111         Unreviewed, rolling out r77098, r77099, r77100, r77109, and
2112         r77111.
2113         http://trac.webkit.org/changeset/77098
2114         http://trac.webkit.org/changeset/77099
2115         http://trac.webkit.org/changeset/77100
2116         http://trac.webkit.org/changeset/77109
2117         http://trac.webkit.org/changeset/77111
2118         https://bugs.webkit.org/show_bug.cgi?id=53219
2119
2120         Qt build is broken
2121
2122         * ForwardingHeaders/runtime/WriteBarrier.h: Removed.
2123         * WebCore.exp.in:
2124         * bindings/js/DOMWrapperWorld.h:
2125         * bindings/js/JSAudioConstructor.cpp:
2126         (WebCore::JSAudioConstructor::JSAudioConstructor):
2127         * bindings/js/JSDOMBinding.cpp:
2128         (WebCore::markDOMNodesForDocument):
2129         (WebCore::markDOMObjectWrapper):
2130         (WebCore::markDOMNodeWrapper):
2131         * bindings/js/JSDOMGlobalObject.cpp:
2132         (WebCore::JSDOMGlobalObject::markChildren):
2133         (WebCore::JSDOMGlobalObject::setInjectedScript):
2134         (WebCore::JSDOMGlobalObject::injectedScript):
2135         * bindings/js/JSDOMGlobalObject.h:
2136         (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
2137         (WebCore::getDOMConstructor):
2138         * bindings/js/JSDOMWindowCustom.cpp:
2139         (WebCore::JSDOMWindow::setLocation):
2140         (WebCore::DialogHandler::dialogCreated):
2141         * bindings/js/JSDOMWindowShell.cpp:
2142         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
2143         (WebCore::JSDOMWindowShell::setWindow):
2144         (WebCore::JSDOMWindowShell::markChildren):
2145         (WebCore::JSDOMWindowShell::unwrappedObject):
2146         * bindings/js/JSDOMWindowShell.h:
2147         (WebCore::JSDOMWindowShell::window):
2148         (WebCore::JSDOMWindowShell::setWindow):
2149         * bindings/js/JSDeviceMotionEventCustom.cpp:
2150         (WebCore::createAccelerationObject):
2151         (WebCore::createRotationRateObject):
2152         * bindings/js/JSEventListener.cpp:
2153         (WebCore::JSEventListener::JSEventListener):
2154         (WebCore::JSEventListener::markJSFunction):
2155         * bindings/js/JSEventListener.h:
2156         (WebCore::JSEventListener::jsFunction):
2157         * bindings/js/JSHTMLDocumentCustom.cpp:
2158         (WebCore::JSHTMLDocument::setAll):
2159         * bindings/js/JSImageConstructor.cpp:
2160         (WebCore::JSImageConstructor::JSImageConstructor):
2161         * bindings/js/JSImageDataCustom.cpp:
2162         (WebCore::toJS):
2163         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
2164         (WebCore::JSJavaScriptCallFrame::scopeChain):
2165         (WebCore::JSJavaScriptCallFrame::scopeType):
2166         * bindings/js/JSNodeFilterCondition.cpp:
2167         (WebCore::JSNodeFilterCondition::markAggregate):
2168         (WebCore::JSNodeFilterCondition::acceptNode):
2169         * bindings/js/JSNodeFilterCondition.h:
2170         * bindings/js/JSNodeFilterCustom.cpp:
2171         * bindings/js/JSOptionConstructor.cpp:
2172         (WebCore::JSOptionConstructor::JSOptionConstructor):
2173         * bindings/js/JSSQLResultSetRowListCustom.cpp:
2174         (WebCore::JSSQLResultSetRowList::item):
2175         * bindings/js/ScriptCachedFrameData.cpp:
2176         (WebCore::ScriptCachedFrameData::restore):
2177         * bindings/js/ScriptObject.cpp:
2178         (WebCore::ScriptGlobalObject::set):
2179         * bindings/js/SerializedScriptValue.cpp:
2180         (WebCore::CloneDeserializer::putProperty):
2181         * bindings/scripts/CodeGeneratorJS.pm:
2182         * bridge/qt/qt_instance.cpp:
2183         (JSC::Bindings::QtInstance::QtInstance):
2184         (JSC::Bindings::QtInstance::removeCachedMethod):
2185         (JSC::Bindings::QtInstance::markAggregate):
2186         * bridge/qt/qt_instance.h:
2187         * bridge/qt/qt_runtime.cpp:
2188         (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
2189         (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
2190         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
2191         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
2192         * bridge/qt/qt_runtime.h:
2193         * bridge/runtime_root.cpp:
2194         (JSC::Bindings::RootObject::invalidate):
2195         * bridge/runtime_root.h:
2196         * dom/Document.h:
2197
2198 2011-01-30  Sheriff Bot  <webkit.review.bot@gmail.com>
2199
2200         Unreviewed, rolling out r77107.
2201         http://trac.webkit.org/changeset/77107
2202         https://bugs.webkit.org/show_bug.cgi?id=53412
2203
2204         Caused 5 new form-related test crashes (Requested by smfr on
2205         #webkit).
2206
2207         * css/CSSSelector.cpp:
2208         (WebCore::CSSSelector::pseudoId):
2209         (WebCore::nameToPseudoTypeMap):
2210         (WebCore::CSSSelector::extractPseudoType):
2211         * css/CSSSelector.h:
2212         * html/HTMLProgressElement.cpp:
2213         (WebCore::HTMLProgressElement::parseMappedAttribute):
2214         (WebCore::HTMLProgressElement::attach):
2215         * html/HTMLProgressElement.h:
2216         * rendering/RenderProgress.cpp:
2217         (WebCore::RenderProgress::~RenderProgress):
2218         (WebCore::RenderProgress::updateFromElement):
2219         (WebCore::RenderProgress::layoutParts):
2220         (WebCore::RenderProgress::shouldHaveParts):
2221         * rendering/RenderProgress.h:
2222         * rendering/style/RenderStyleConstants.h:
2223
2224 2011-01-30  Simon Fraser  <simon.fraser@apple.com>
2225
2226         Reviewed by Sam Weinig.
2227
2228         Enhance ShadowBlur to render inset box shadows
2229         https://bugs.webkit.org/show_bug.cgi?id=51567
2230         
2231         Use ShadowBlur for inset box-shadows with CG. It 
2232         currently lacks a tiled version, but is still much
2233         faster than CG shadows.
2234
2235         Test: fast/box-shadow/inset-box-shadow-radius.html
2236
2237         * platform/graphics/ShadowBlur.cpp:
2238         * platform/graphics/ShadowBlur.h: New method for inset
2239         shadows.
2240         (WebCore::ShadowBlur::drawInsetShadow): 
2241
2242         * platform/graphics/GraphicsContext.cpp: #ifdef out
2243         fillRectWithRoundedHole() for CG.
2244
2245         * platform/graphics/cg/GraphicsContextCG.cpp:
2246         (WebCore::GraphicsContext::fillRectWithRoundedHole): If there's
2247         a shadow with a radius > 0, use ShadowBlur.
2248
2249 2011-01-28  Kenneth Russell  <kbr@google.com>
2250
2251         Reviewed by Chris Marrin.
2252
2253         WebGL shows PNG Textures with indexed colors too dark
2254         https://bugs.webkit.org/show_bug.cgi?id=47477
2255
2256         Properly handle indexed PNG images by re-rendering them as RGBA
2257         images before upload. Verified with this layout test and the test
2258         cases from bugs 47477 and 53269.
2259
2260         * platform/graphics/cg/GraphicsContext3DCG.cpp:
2261         (WebCore::GraphicsContext3D::getImageData):
2262
2263 2011-01-27  MORITA Hajime  <morrita@google.com>
2264
2265         Reviewed by Dimitri Glazkov.
2266         
2267         Convert <progress> shadow DOM to a DOM-based shadow.
2268         https://bugs.webkit.org/show_bug.cgi?id=50660
2269
2270         * Removed RenderProgress::m_valuePart, moved the shadow node
2271           to the shadow root of HTMLProgressElement.
2272         * Removed hard-coded pseudo ID for -webkit-progress-bar-value.
2273           ProgressBarValueElement is defined only for overriding
2274           shadowPseudoId().
2275         
2276         No new tests. No behavioral change.
2277
2278         * css/CSSSelector.cpp:
2279         (WebCore::CSSSelector::pseudoId):
2280         (WebCore::nameToPseudoTypeMap):
2281         (WebCore::CSSSelector::extractPseudoType):
2282         * css/CSSSelector.h:
2283         * html/HTMLProgressElement.cpp:
2284         (WebCore::ProgressBarValueElement::ProgressBarValueElement):
2285         (WebCore::ProgressBarValueElement::shadowPseudoId):
2286         (WebCore::ProgressBarValueElement::create):
2287         (WebCore::HTMLProgressElement::parseMappedAttribute):
2288         (WebCore::HTMLProgressElement::attach):
2289         (WebCore::HTMLProgressElement::valuePart):
2290         (WebCore::HTMLProgressElement::didElementStateChange):
2291         (WebCore::HTMLProgressElement::createShadowSubtreeIfNeeded):
2292         * html/HTMLProgressElement.h:
2293         * rendering/RenderProgress.cpp:
2294         (WebCore::RenderProgress::~RenderProgress):
2295         (WebCore::RenderProgress::updateFromElement):
2296         (WebCore::RenderProgress::layoutParts):
2297         (WebCore::RenderProgress::shouldHaveParts):
2298         (WebCore::RenderProgress::valuePart):
2299         * rendering/RenderProgress.h:
2300         * rendering/style/RenderStyleConstants.h:
2301
2302 2011-01-30  Simon Fraser  <simon.fraser@apple.com>
2303
2304         Reviewed by Ariya Hidayat.
2305
2306         Enhance ShadowBlur to render inset box shadows; Part 1.
2307         https://bugs.webkit.org/show_bug.cgi?id=51567
2308         
2309         Add a new method to GraphicsContext to render a rect with a rounded hole,
2310         for use by inset box-shadow code. Knowledge that we're rendering a rounded
2311         hole will enable ShadowBlur to be used here in future.
2312
2313         * platform/graphics/GraphicsContext.cpp:
2314         (WebCore::GraphicsContext::fillRectWithRoundedHole):
2315         * platform/graphics/GraphicsContext.h:
2316         * rendering/RenderBoxModelObject.cpp:
2317         (WebCore::RenderBoxModelObject::paintBoxShadow):
2318
2319 2011-01-23  MORITA Hajime  <morrita@google.com>
2320
2321         Reviewed by Eric Seidel.
2322
2323         REGRESSION: Inset shadow with too large border radius misses rounded corner.
2324         https://bugs.webkit.org/show_bug.cgi?id=52800
2325
2326         The refactoring on r76083 broke the invariant between border
2327         IntRect and its radii because RoundedIntRect::setRect() is called
2328         after getRoundedInnerBorderWithBorderWidths(), which enforces the
2329         invariant. Th rounded-rect clipping code verifies the invariant,
2330         and discard the invalid radii, that results broken paintings.
2331         
2332         This change moved setRect() before
2333         getRoundedInnerBorderWithBorderWidths() not to modify the valid
2334         RoundedIntRect value.
2335         
2336         Test: fast/box-shadow/inset-with-extraordinary-radii-and-border.html
2337
2338         * rendering/RenderBoxModelObject.cpp:
2339         (WebCore::RenderBoxModelObject::paintBoxShadow):
2340
2341 2011-01-30  Simon Fraser  <simon.fraser@apple.com>
2342
2343         Attempt to fix Windows build by adding ShadowBlur.cpp/h to the
2344         vcproj.
2345
2346         * WebCore.vcproj/WebCore.vcproj:
2347
2348 2011-01-30  Simon Fraser  <simon.fraser@apple.com>
2349
2350         Reviewed by Dan Bernstein.
2351
2352         -webkit-box-shadow causes awful scroll/resize/redraw performance
2353         https://bugs.webkit.org/show_bug.cgi?id=22102
2354         
2355         Use ShadowBlur for CG, whe rendering shadows on rects and
2356         rounded rects outside of canvas.
2357         
2358         CG shadows with a radius of more than 8px do not render
2359         correctly. We preserve this incorrect rendering by compensating
2360         for it when rending -webkit-box-shadow. Calls that should use
2361         this deprecated radius behavior now use setLegacyShadow().
2362
2363         Test: fast/box-shadow/box-shadow-transformed.html
2364         
2365         * html/canvas/CanvasRenderingContext2D.cpp: Use setLegacyShadow()
2366         for canvas, to indicate that it should use the deprecated radius
2367         behavior.
2368         (WebCore::CanvasRenderingContext2D::setAllAttributesToDefault): Ditto.
2369         (WebCore::CanvasRenderingContext2D::setShadow): Ditto.
2370         (WebCore::CanvasRenderingContext2D::applyShadow): Ditto.
2371         
2372         * platform/graphics/GraphicsContext.cpp:
2373         (WebCore::GraphicsContext::setLegacyShadow): Set the m_state.shadowsUseLegacyRadius bit.
2374         
2375         * platform/graphics/GraphicsContext.h:
2376         (WebCore::GraphicsContextState::GraphicsContextState): Add a 
2377         shadowsUseLegacyRadius bit to the state.
2378         
2379         * platform/graphics/cg/GraphicsContextCG.cpp:
2380         (WebCore::radiusToLegacyRadius): Map from the actual radius to one
2381         that approximates CG behavior.
2382         (WebCore::hasBlurredShadow): Helper that returns true if we have a shadow
2383         with a non-zero blur radius.
2384         (WebCore::GraphicsContext::fillRect): Use ShadowBlur if not canvas.
2385         (WebCore::GraphicsContext::fillRoundedRect): Ditto.
2386         (WebCore::GraphicsContext::setPlatformShadow): Comment.
2387
2388         * rendering/RenderBoxModelObject.cpp:
2389         (WebCore::RenderBoxModelObject::paintBoxShadow): Call setLegacyShadow()
2390         for -webkit-box-shadow.
2391
2392         * platform/graphics/ShadowBlur.cpp: 
2393         (WebCore::ShadowBlur::calculateLayerBoundingRect): Fix some pixel crack issues
2394         by rounding up the blur radius.
2395         (WebCore::ShadowBlur::drawRectShadow): Ditto
2396         (WebCore::ShadowBlur::drawRectShadowWithTiling): Ditto.
2397
2398 2011-01-30  Oliver Hunt  <oliver@apple.com>
2399
2400         Try to fix Qt build (again).
2401
2402         * bridge/qt/qt_runtime.cpp:
2403         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
2404         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
2405
2406 2011-01-30  Oliver Hunt  <oliver@apple.com>
2407
2408         Try to fix Qt build.
2409
2410         * bridge/qt/qt_instance.cpp:
2411         (JSC::Bindings::QtInstance::QtInstance):
2412         (JSC::Bindings::QtInstance::removeCachedMethod):
2413         (JSC::Bindings::QtInstance::markAggregate):
2414         * bridge/qt/qt_instance.h:
2415
2416 2011-01-30  Oliver Hunt  <oliver@apple.com>
2417
2418         Convert markstack to a slot visitor API
2419         https://bugs.webkit.org/show_bug.cgi?id=53219
2420
2421         rolling r77006 and r77020 back in.
2422
2423         * ForwardingHeaders/runtime/WriteBarrier.h: Added.
2424         * WebCore.exp.in:
2425         * bindings/js/DOMWrapperWorld.h:
2426         (WebCore::DOMWrapperWorld::globalData):
2427         * bindings/js/JSAudioConstructor.cpp:
2428         (WebCore::JSAudioConstructor::JSAudioConstructor):
2429         * bindings/js/JSDOMBinding.cpp:
2430         (WebCore::markDOMNodesForDocument):
2431         (WebCore::markDOMObjectWrapper):
2432         (WebCore::markDOMNodeWrapper):
2433         * bindings/js/JSDOMGlobalObject.cpp:
2434         (WebCore::JSDOMGlobalObject::markChildren):
2435         (WebCore::JSDOMGlobalObject::setInjectedScript):
2436         (WebCore::JSDOMGlobalObject::injectedScript):
2437         * bindings/js/JSDOMGlobalObject.h:
2438         (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
2439         (WebCore::getDOMConstructor):
2440         * bindings/js/JSDOMWindowCustom.cpp:
2441         (WebCore::JSDOMWindow::setLocation):
2442         (WebCore::DialogHandler::dialogCreated):
2443         * bindings/js/JSDOMWindowShell.cpp:
2444         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
2445         (WebCore::JSDOMWindowShell::setWindow):
2446         (WebCore::JSDOMWindowShell::markChildren):
2447         (WebCore::JSDOMWindowShell::unwrappedObject):
2448         * bindings/js/JSDOMWindowShell.h:
2449         (WebCore::JSDOMWindowShell::window):
2450         (WebCore::JSDOMWindowShell::setWindow):
2451         * bindings/js/JSDeviceMotionEventCustom.cpp:
2452         (WebCore::createAccelerationObject):
2453         (WebCore::createRotationRateObject):
2454         * bindings/js/JSEventListener.cpp:
2455         (WebCore::JSEventListener::JSEventListener):
2456         (WebCore::JSEventListener::markJSFunction):
2457         * bindings/js/JSEventListener.h:
2458         (WebCore::JSEventListener::jsFunction):
2459         * bindings/js/JSHTMLDocumentCustom.cpp:
2460         (WebCore::JSHTMLDocument::setAll):
2461         * bindings/js/JSImageConstructor.cpp:
2462         (WebCore::JSImageConstructor::JSImageConstructor):
2463         * bindings/js/JSImageDataCustom.cpp:
2464         (WebCore::toJS):
2465         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
2466         (WebCore::JSJavaScriptCallFrame::scopeChain):
2467         (WebCore::JSJavaScriptCallFrame::scopeType):
2468         * bindings/js/JSNodeFilterCondition.cpp:
2469         (WebCore::JSNodeFilterCondition::markAggregate):
2470         (WebCore::JSNodeFilterCondition::acceptNode):
2471         * bindings/js/JSNodeFilterCondition.h:
2472         * bindings/js/JSNodeFilterCustom.cpp:
2473         * bindings/js/JSOptionConstructor.cpp:
2474         (WebCore::JSOptionConstructor::JSOptionConstructor):
2475         * bindings/js/JSSQLResultSetRowListCustom.cpp:
2476         (WebCore::JSSQLResultSetRowList::item):
2477         * bindings/js/ScriptCachedFrameData.cpp:
2478         (WebCore::ScriptCachedFrameData::restore):
2479         * bindings/js/ScriptObject.cpp:
2480         (WebCore::ScriptGlobalObject::set):
2481         * bindings/js/SerializedScriptValue.cpp:
2482         (WebCore::CloneDeserializer::putProperty):
2483         * bindings/scripts/CodeGeneratorJS.pm:
2484         * bridge/qt/qt_runtime.cpp:
2485         (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
2486         (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
2487         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
2488         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
2489         * bridge/qt/qt_runtime.h:
2490         * bridge/runtime_root.cpp:
2491         (JSC::Bindings::RootObject::invalidate):
2492         * bridge/runtime_root.h:
2493         * dom/Document.h:
2494
2495 2011-01-30  Simon Fraser  <simon.fraser@apple.com>
2496
2497         Reviewed by Sam Weinig.
2498
2499         Make ContextShadow code cross-platform
2500         https://bugs.webkit.org/show_bug.cgi?id=51312
2501
2502         Add a new class, ShadowBlur, that contains most of the
2503         code from ContextShadow, but is fully cross-platform.
2504         It depends on one new method, GraphicsContext::clipBounds(),
2505         which platforms will have to implement.
2506         
2507         Add ShadowBlur to the Mac Xcode project, but don't use it
2508         anywhere yet.
2509
2510         * WebCore.xcodeproj/project.pbxproj:
2511         * platform/graphics/GraphicsContext.cpp:
2512         (WebCore::GraphicsContext::clipBounds):
2513         * platform/graphics/GraphicsContext.h:
2514         * platform/graphics/ShadowBlur.cpp: Added.
2515         (WebCore::roundUpToMultipleOf32):
2516         (WebCore::ScratchBuffer::ScratchBuffer):
2517         (WebCore::ScratchBuffer::getScratchBuffer):
2518         (WebCore::ScratchBuffer::scheduleScratchBufferPurge):
2519         (WebCore::ScratchBuffer::timerFired):
2520         (WebCore::ScratchBuffer::clearScratchBuffer):
2521         (WebCore::ScratchBuffer::shared):
2522         (WebCore::ShadowBlur::ShadowBlur):
2523         (WebCore::ShadowBlur::blurLayerImage):
2524         (WebCore::ShadowBlur::adjustBlurDistance):
2525         (WebCore::ShadowBlur::calculateLayerBoundingRect):
2526         (WebCore::ShadowBlur::beginShadowLayer):
2527         (WebCore::ShadowBlur::endShadowLayer):
2528         (WebCore::ShadowBlur::drawRectShadow):
2529         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
2530         (WebCore::ShadowBlur::drawRectShadowWithTiling):
2531         (WebCore::ShadowBlur::clipBounds):
2532         * platform/graphics/ShadowBlur.h: Added.
2533         (WebCore::ShadowBlur::setShadowsIgnoreTransforms):
2534         (WebCore::ShadowBlur::shadowsIgnoreTransforms):
2535         * platform/graphics/cg/GraphicsContextCG.cpp:
2536         (WebCore::GraphicsContext::clipBounds):
2537
2538 2011-01-29  Simon Fraser  <simon.fraser@apple.com>
2539
2540         Reviewed by Dan Bernstein.
2541
2542         CSS3 gradients with em-based stops fail to repaint when font size changes
2543         https://bugs.webkit.org/show_bug.cgi?id=51845
2544         
2545         Mark as uncacheable gradidients whose color stops depend on font size,
2546         and don't attempt to put these into CSSImageGeneratorValue's image cache.
2547         This means we return a new gradient each time, which is fairly cheap, and
2548         fixes repaint issues under changing font size.
2549
2550         Test: fast/repaint/gradients-em-stops-repaint.html
2551
2552         * css/CSSGradientValue.cpp:
2553         (WebCore::CSSGradientValue::image):
2554         (WebCore::CSSGradientValue::isCacheable):
2555         * css/CSSGradientValue.h:
2556
2557 2011-01-29  Geoffrey Garen  <ggaren@apple.com>
2558
2559         Undo try to fix the Qt build.
2560         
2561         My guess didn't work.
2562
2563         * WebCore.pro:
2564
2565 2011-01-29  Geoffrey Garen  <ggaren@apple.com>
2566
2567         Try to fix the Qt build.
2568
2569         * WebCore.pro: Added platform/text/CharacterNames.h.
2570
2571 2011-01-28  Geoffrey Garen  <ggaren@apple.com>
2572
2573         Reviewed by Maciej Stachowiak.
2574
2575         Some more Heap cleanup.
2576         https://bugs.webkit.org/show_bug.cgi?id=53357
2577         
2578         Updated for JavaScriptCore changes.
2579
2580         * bindings/js/ScriptGCEvent.cpp:
2581         (WebCore::ScriptGCEvent::getHeapSize):
2582
2583 2011-01-29  Adam Barth  <abarth@webkit.org>
2584
2585         Reviewed by Daniel Bates.
2586
2587         Fix XSSFilter crash when extracting the source for a token twice
2588         https://bugs.webkit.org/show_bug.cgi?id=53368
2589
2590         Previously, it was unsafe to extract the source for the same token
2591         twice because the HTMLSourceTracker would advance its internal
2592         representation of the SegmentedString.  This patch introduces a cache
2593         to make calling HTMLSourceTracker::sourceForToken multiple times safe.
2594
2595         * html/parser/HTMLSourceTracker.cpp:
2596         (WebCore::HTMLSourceTracker::end):
2597         (WebCore::HTMLSourceTracker::sourceForToken):
2598         * html/parser/HTMLSourceTracker.h:
2599
2600 2011-01-29  Maciej Stachowiak  <mjs@apple.com>
2601
2602         Reviewed by Dan Bernstein.
2603
2604         Fix fat build for both 32-bit and 64-bit under llvm-gcc 4.2
2605         https://bugs.webkit.org/show_bug.cgi?id=53386
2606
2607         * platform/mac/ScrollAnimatorMac.mm:
2608         (WebCore::elasticDeltaForReboundDelta):
2609         (WebCore::scrollWheelMultiplier):
2610         (WebCore::ScrollAnimatorMac::smoothScrollWithEvent):
2611         (WebCore::ScrollAnimatorMac::beginScrollGesture):
2612         (WebCore::roundTowardZero):
2613         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
2614
2615 2011-01-29  Daniel Bates  <dbates@rim.com>
2616
2617         Reviewed by Maciej Stachowiak.
2618
2619         Remove reference to ${CMAKE_SOURCE_DIR}/Source in CMake files
2620         https://bugs.webkit.org/show_bug.cgi?id=53382
2621
2622         Our file system hierarchy ensures that CMAKE_SOURCE_DIR is defined to be /Source.
2623         So, ${CMAKE_SOURCE_DIR}/Source evaluates to the non-existent directory /Source/Source.
2624         Therefore, we should remove such references.
2625
2626         * CMakeLists.txt:
2627
2628 2011-01-29  Sam Weinig  <sam@webkit.org>
2629
2630         Reviewed by Jon Honeycutt.
2631
2632         Fix 32-bit build on the Mac.
2633
2634         * platform/mac/ScrollAnimatorMac.mm:
2635         (WebCore::roundTowardZero):
2636         (WebCore::roundToDevicePixelTowardZero):
2637         Use floats instead of doubles to avoid double-to-float conversion
2638         issues.
2639
2640 2011-01-29  Simon Fraser  <simon.fraser@apple.com>
2641
2642         Reviewed by Adam Barth.
2643
2644         Use clampToInteger() functions in a few places
2645         https://bugs.webkit.org/show_bug.cgi?id=53363
2646         
2647         * css/CSSStyleSelector.cpp:
2648         (WebCore::CSSStyleSelector::applyProperty): Use clampToInteger() for z-index.
2649         (WebCore::CSSStyleSelector::createTransformOperations): Use clampToPositiveInteger().
2650         * platform/graphics/transforms/PerspectiveTransformOperation.cpp: Ditto.
2651         (WebCore::PerspectiveTransformOperation::blend): Ditto.
2652
2653 2011-01-29  Patrick Gansterer  <paroga@webkit.org>
2654
2655         Reviewed by David Kilzer.
2656
2657         Move CharacterNames.h into WTF directory
2658         https://bugs.webkit.org/show_bug.cgi?id=49618
2659
2660         * ForwardingHeaders/wtf/unicode/CharacterNames.h: Added.
2661         * GNUmakefile.am:
2662         * WebCore.gypi:
2663         * WebCore.vcproj/WebCore.vcproj:
2664         * WebCore.xcodeproj/project.pbxproj:
2665         * accessibility/AccessibilityObject.cpp:
2666         * accessibility/AccessibilityRenderObject.cpp:
2667         * bindings/cpp/WebDOMHTMLDocumentCustom.cpp:
2668         * bindings/js/JSHTMLDocumentCustom.cpp:
2669         * dom/Position.cpp:
2670         * dom/SelectElement.cpp:
2671         * editing/CompositeEditCommand.cpp:
2672         * editing/Editor.cpp:
2673         * editing/HTMLInterchange.cpp:
2674         * editing/InsertTextCommand.cpp:
2675         * editing/MarkupAccumulator.cpp:
2676         * editing/TextIterator.cpp:
2677         * editing/VisibleSelection.cpp:
2678         * editing/htmlediting.cpp:
2679         * editing/htmlediting.h:
2680         * editing/markup.cpp:
2681         * html/FTPDirectoryDocument.cpp:
2682         * html/HTMLFormControlElement.cpp:
2683         * html/parser/HTMLTreeBuilder.cpp:
2684         * loader/appcache/ManifestParser.cpp:
2685         * platform/chromium/PopupMenuChromium.cpp:
2686         * platform/graphics/Font.h:
2687         * platform/graphics/FontFastPath.cpp:
2688         * platform/graphics/GlyphPageTreeNode.cpp:
2689         * platform/graphics/StringTruncator.cpp:
2690         * platform/graphics/mac/ComplexTextController.cpp:
2691         * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
2692         * platform/graphics/wince/GraphicsContextWinCE.cpp:
2693         * platform/mac/PasteboardMac.mm:
2694         * platform/text/TextCodecICU.cpp:
2695         * platform/text/mac/TextCodecMac.cpp:
2696         * platform/text/transcoder/FontTranscoder.cpp:
2697         * rendering/RenderBlockLineLayout.cpp:
2698         * rendering/RenderFlexibleBox.cpp:
2699         * rendering/RenderListMarker.cpp:
2700         * rendering/RenderText.cpp:
2701         * rendering/RenderTextControl.cpp:
2702         * rendering/RenderTreeAsText.cpp:
2703         * rendering/break_lines.cpp:
2704         * rendering/mathml/RenderMathMLOperator.h:
2705         * websockets/WebSocketHandshake.cpp:
2706         * wml/WMLTableElement.cpp:
2707
2708 2011-01-29  Dan Winship  <danw@gnome.org>
2709
2710         Reviewed by Xan Lopez.
2711
2712         [GTK] Remove HAVE_LIBSOUP_2_29_90 conditionals; we depend on
2713         libsoup 2.33.1 now.
2714         https://bugs.webkit.org/show_bug.cgi?id=50675
2715
2716         * platform/network/soup/CookieJarSoup.cpp:
2717         (WebCore::defaultCookieJar):
2718         (WebCore::setCookies):
2719         * platform/network/soup/ResourceHandleSoup.cpp:
2720         (WebCore::ResourceHandle::prepareForURL):
2721         (WebCore::restartedCallback):
2722         (WebCore::startHttp):
2723         * platform/network/soup/ResourceRequestSoup.cpp:
2724         (WebCore::ResourceRequest::updateSoupMessage):
2725         (WebCore::ResourceRequest::toSoupMessage):
2726         (WebCore::ResourceRequest::updateFromSoupMessage):
2727
2728 2011-01-29  Adam Barth  <abarth@webkit.org>
2729
2730         Reviewed by Daniel Bates.
2731
2732         XSSFilter should replace URLs with about:blank instead of the empty string
2733         https://bugs.webkit.org/show_bug.cgi?id=53370
2734
2735         Using the empty string will make the URL complete to the current
2736         document's URL, which isn't really what we want.  Instead, we want to
2737         use about:blank, which is safe.
2738
2739         * html/parser/XSSFilter.cpp:
2740         (WebCore::XSSFilter::filterObjectToken):
2741         (WebCore::XSSFilter::filterEmbedToken):
2742
2743 2011-01-29  Adam Barth  <abarth@webkit.org>
2744
2745         Reviewed by Daniel Bates.
2746
2747         XSSFilter should pass xssAuditor/script-tag-addslashes*
2748         https://bugs.webkit.org/show_bug.cgi?id=53365
2749
2750         We need to canonicalize strings to avoid being tricked by addslashes.
2751
2752         * html/parser/XSSFilter.cpp:
2753         (WebCore::HTMLNames::isNonCanonicalCharacter):
2754             - This function is copied from the XSSAuditor (with some tweaks).
2755               We'll eventually remove the XSSAuditor once we've got XSSFilter
2756               working properly.
2757         (WebCore::HTMLNames::canonicalize):
2758         (WebCore::HTMLNames::decodeURL):
2759         (WebCore::XSSFilter::isContainedInRequest):
2760
2761 2011-01-29  Adam Barth  <abarth@webkit.org>
2762
2763         Reviewed by Daniel Bates.
2764
2765         XSSFilter should pass xssAuditor/script-tag-with-source-same-host.html
2766         and xssAuditor/script-tag-post-*
2767         https://bugs.webkit.org/show_bug.cgi?id=53364
2768
2769         We're supposed to allow loading same-origin resources even if they
2770         appear as part of the request.
2771
2772         Also, we're supposed to look at the POST data too.  :)
2773
2774         * html/parser/XSSFilter.cpp:
2775         (WebCore::XSSFilter::eraseAttributeIfInjected):
2776         (WebCore::XSSFilter::isSameOriginResource):
2777             - Copy/paste from XSSAuditor::isSameOriginResource.  We'll
2778               eventually remove the XSSAuditor version when XSSFilter is done.
2779         * html/parser/XSSFilter.h:
2780
2781 2011-01-29  Adam Barth  <abarth@webkit.org>
2782
2783         Reviewed by Daniel Bates.
2784
2785         XSSFilter should pass 16 of the xssAuditor/script-tag* tests
2786         https://bugs.webkit.org/show_bug.cgi?id=53362
2787
2788         Turns out we need to replace the src attribute of script tags with
2789         about:blank to avoid loading the main document URL as a script.  Also,
2790         move misplaced return statement that was triggering the console message
2791         too often.
2792
2793         * html/parser/HTMLToken.h:
2794         (WebCore::HTMLToken::appendToAttributeValue):
2795         * html/parser/XSSFilter.cpp:
2796         (WebCore::XSSFilter::filterScriptToken):
2797         (WebCore::XSSFilter::eraseAttributeIfInjected):
2798         * html/parser/XSSFilter.h:
2799
2800 2011-01-28  Jon Honeycutt  <jhoneycutt@apple.com>
2801
2802         Downloads in WK2 on Windows should write resume data to bundle
2803         https://bugs.webkit.org/show_bug.cgi?id=53282
2804         <rdar://problem/8753077>
2805
2806         Reviewed by Alice Liu.
2807
2808         * WebCore.vcproj/WebCore.vcproj:
2809         Added new files to project.
2810
2811         * platform/network/cf/DownloadBundle.h: Added.
2812         * platform/network/win/DownloadBundleWin.cpp: Added.
2813         (WebCore::DownloadBundle::magicNumber):
2814         Moved from WebKit's WebDownload so that WebKit and WebKit2 can share
2815         it.
2816         (WebCore::DownloadBundle::fileExtension):
2817         Ditto.
2818         (WebCore::DownloadBundle::appendResumeData):
2819         Ditto - but modified to return bool rather than HRESULT and to clean up
2820         whitespace.
2821         (WebCore::DownloadBundle::extractResumeData):
2822         Ditto - modified to clean up whitespace.
2823
2824 2011-01-29  Sheriff Bot  <webkit.review.bot@gmail.com>
2825
2826         Unreviewed, rolling out r77050.
2827         http://trac.webkit.org/changeset/77050
2828         https://bugs.webkit.org/show_bug.cgi?id=53371
2829
2830         Caused a crash in Chromium's test_shell_tests (Requested by
2831         rniwa on #webkit).
2832
2833         * html/parser/HTMLTreeBuilder.cpp:
2834         (WebCore::HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext):
2835         (WebCore::HTMLTreeBuilder::FragmentParsingContext::document):
2836         (WebCore::HTMLTreeBuilder::FragmentParsingContext::finished):
2837         * html/parser/HTMLTreeBuilder.h:
2838
2839 2011-01-28  Eric Seidel  <eric@webkit.org>
2840
2841         Reviewed by Darin Adler.
2842
2843         HTML5 TreeBuilder regressed a Peacekeeper DOM test by 40%
2844         https://bugs.webkit.org/show_bug.cgi?id=48719
2845
2846         It's unclear exactly what the Peacekeeper benchmark is testing,
2847         because I haven't found a way to run it myself.
2848
2849         However, I constructed a benchmark which shows at least one possible slow point.
2850         The HTML5 spec talks about creating a new document for every time we use
2851         the fragment parsing algorithm.  Document() it turns out, it a huge bloated
2852         mess, and the constructor and destructor do a huge amount of work.
2853         To avoid constructing (or destructing) documents for each innerHTML call,
2854         this patch adds a shared dummy document used by all innerHTML calls.
2855
2856         This patch brings us from 7x slower than Safari 5 on tiny-innerHTML
2857         to only 1.5x slower than Safari 5.  I'm sure there is more work to do here.
2858
2859         Saving a shared Document like this is error prone.  Currently
2860         DummyDocumentFactory::releaseDocument() calls removeAllChildren()
2861         in an attempt to clear the Document's state. However it's possible
2862         that that call is not sufficient and we'll have future bugs here.
2863
2864         * html/parser/HTMLTreeBuilder.cpp:
2865         (WebCore::DummyDocumentFactory::createDummyDocument):
2866         (WebCore::DummyDocumentFactory::releaseDocument):
2867         (WebCore::HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext):
2868         (WebCore::HTMLTreeBuilder::FragmentParsingContext::document):
2869         (WebCore::HTMLTreeBuilder::FragmentParsingContext::finished):
2870         * html/parser/HTMLTreeBuilder.h:
2871
2872 2011-01-28  Johnny Ding  <jnd@chromium.org>
2873
2874         Reviewed by Adam Barth.
2875
2876         Gesture API: Don't use current gesture status to set "forceUserGesture" parameter when calling ScriptController::executeScript.
2877         The "forceUserGesture" parameter should be only set when you are definitely sure that the running script is from a hyper-link.
2878         https://bugs.webkit.org/show_bug.cgi?id=53244
2879
2880         Test: fast/events/popup-blocked-from-iframe-src.html
2881
2882         * bindings/ScriptControllerBase.cpp:
2883         (WebCore::ScriptController::executeIfJavaScriptURL):
2884
2885 2011-01-28  Simon Fraser  <simon.fraser@apple.com>
2886
2887         Reviewed by Gavin Barraclough.
2888
2889         Add various clampToInt() methods to MathExtras.h
2890         https://bugs.webkit.org/show_bug.cgi?id=52910
2891
2892         Use clampToInteger() from MathExtras.h
2893
2894         * css/CSSParser.cpp:
2895         (WebCore::CSSParser::parseCounter):
2896
2897 2011-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
2898
2899         Unreviewed, rolling out r77006 and r77020.
2900         http://trac.webkit.org/changeset/77006
2901         http://trac.webkit.org/changeset/77020
2902         https://bugs.webkit.org/show_bug.cgi?id=53360
2903
2904         "Broke Windows tests" (Requested by rniwa on #webkit).
2905
2906         * ForwardingHeaders/runtime/WriteBarrier.h: Removed.
2907         * WebCore.exp.in:
2908         * bindings/js/DOMWrapperWorld.h:
2909         * bindings/js/JSAudioConstructor.cpp:
2910         (WebCore::JSAudioConstructor::JSAudioConstructor):
2911         * bindings/js/JSDOMBinding.cpp:
2912         (WebCore::markDOMNodesForDocument):
2913         (WebCore::markDOMObjectWrapper):
2914         (WebCore::markDOMNodeWrapper):
2915         * bindings/js/JSDOMGlobalObject.cpp:
2916         (WebCore::JSDOMGlobalObject::markChildren):
2917         (WebCore::JSDOMGlobalObject::setInjectedScript):
2918         (WebCore::JSDOMGlobalObject::injectedScript):
2919         * bindings/js/JSDOMGlobalObject.h:
2920         (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
2921         (WebCore::getDOMConstructor):
2922         * bindings/js/JSDOMWindowCustom.cpp:
2923         (WebCore::JSDOMWindow::setLocation):
2924         (WebCore::DialogHandler::dialogCreated):
2925         * bindings/js/JSDOMWindowShell.cpp:
2926         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
2927         (WebCore::JSDOMWindowShell::setWindow):
2928         (WebCore::JSDOMWindowShell::markChildren):
2929         (WebCore::JSDOMWindowShell::unwrappedObject):
2930         * bindings/js/JSDOMWindowShell.h:
2931         (WebCore::JSDOMWindowShell::window):
2932         (WebCore::JSDOMWindowShell::setWindow):
2933         * bindings/js/JSDeviceMotionEventCustom.cpp:
2934         (WebCore::createAccelerationObject):
2935         (WebCore::createRotationRateObject):
2936         * bindings/js/JSEventListener.cpp:
2937         (WebCore::JSEventListener::JSEventListener):
2938         (WebCore::JSEventListener::markJSFunction):
2939         * bindings/js/JSEventListener.h:
2940         (WebCore::JSEventListener::jsFunction):
2941         * bindings/js/JSHTMLDocumentCustom.cpp:
2942         (WebCore::JSHTMLDocument::setAll):
2943         * bindings/js/JSImageConstructor.cpp:
2944         (WebCore::JSImageConstructor::JSImageConstructor):
2945         * bindings/js/JSImageDataCustom.cpp:
2946         (WebCore::toJS):
2947         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
2948         (WebCore::JSJavaScriptCallFrame::scopeChain):
2949         (WebCore::JSJavaScriptCallFrame::scopeType):
2950         * bindings/js/JSNodeFilterCondition.cpp:
2951         (WebCore::JSNodeFilterCondition::markAggregate):
2952         (WebCore::JSNodeFilterCondition::acceptNode):
2953         * bindings/js/JSNodeFilterCondition.h:
2954         * bindings/js/JSNodeFilterCustom.cpp:
2955         * bindings/js/JSOptionConstructor.cpp:
2956         (WebCore::JSOptionConstructor::JSOptionConstructor):
2957         * bindings/js/JSSQLResultSetRowListCustom.cpp:
2958         (WebCore::JSSQLResultSetRowList::item):
2959         * bindings/js/ScriptCachedFrameData.cpp:
2960         (WebCore::ScriptCachedFrameData::restore):
2961         * bindings/js/ScriptObject.cpp:
2962         (WebCore::ScriptGlobalObject::set):
2963         * bindings/js/SerializedScriptValue.cpp:
2964         (WebCore::CloneDeserializer::putProperty):
2965         * bindings/scripts/CodeGeneratorJS.pm:
2966         * bridge/qt/qt_runtime.cpp:
2967         (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
2968         (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
2969         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
2970         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
2971         * bridge/qt/qt_runtime.h:
2972         * bridge/runtime_root.cpp:
2973         (JSC::Bindings::RootObject::invalidate):
2974         * bridge/runtime_root.h:
2975         * dom/Document.h:
2976
2977 2011-01-28  Adam Barth  <abarth@webkit.org>
2978
2979         Reviewed by Eric Seidel.
2980
2981         XSSFilter should log to the console when it blocks something
2982         https://bugs.webkit.org/show_bug.cgi?id=53354
2983
2984         This patch refactors a bunch of methods in XSSFilter to return a bool
2985         indicating whether they blocked anything.  Using this bool, we decide
2986         whether to log to the console.  We're using the same log message as the
2987         XSSAuditor, but it seems likely we can improve this message in the
2988         future (especially by piping in the correct line number, which is now
2989         accessible via the parser).
2990
2991         * html/parser/XSSFilter.cpp:
2992         (WebCore::HTMLNames::isNameOfInlineEventHandler):
2993         (WebCore::XSSFilter::filterToken):
2994         (WebCore::XSSFilter::filterTokenInitial):
2995         (WebCore::XSSFilter::filterTokenAfterScriptStartTag):
2996         (WebCore::XSSFilter::filterScriptToken):
2997         (WebCore::XSSFilter::filterObjectToken):
2998         (WebCore::XSSFilter::filterEmbedToken):
2999         (WebCore::XSSFilter::filterAppletToken):
3000         (WebCore::XSSFilter::filterMetaToken):
3001         (WebCore::XSSFilter::filterBaseToken):
3002         (WebCore::XSSFilter::eraseInlineEventHandlersIfInjected):
3003         * html/parser/XSSFilter.h:
3004
3005 2011-01-28  Adam Barth  <abarth@webkit.org>
3006
3007         Reviewed by Daniel Bates.
3008
3009         Wire up settings->xssAuditorEnabled to XSSFilter
3010         https://bugs.webkit.org/show_bug.cgi?id=53345
3011
3012         * html/parser/XSSFilter.cpp:
3013         (WebCore::XSSFilter::XSSFilter):
3014         (WebCore::XSSFilter::filterToken):
3015         * html/parser/XSSFilter.h:
3016
3017 2011-01-28  Adam Barth  <abarth@webkit.org>
3018
3019         Reviewed by Daniel Bates.
3020
3021         Teach XSSFilter about <meta> and <base> tags
3022         https://bugs.webkit.org/show_bug.cgi?id=53339
3023
3024         I'm not 100% sure we need to block <meta http-equiv>, but it seems
3025         prudent given how powerful that attribute is.  We definitely need to
3026         block injection of <base href> because that can redirect script tags
3027         that use relative URLs.
3028
3029         * html/parser/XSSFilter.cpp:
3030         (WebCore::XSSFilter::filterToken):
3031         (WebCore::XSSFilter::filterMetaToken):
3032         (WebCore::XSSFilter::filterBaseToken):
3033         * html/parser/XSSFilter.h:
3034
3035 2011-01-28  Adam Barth  <abarth@webkit.org>
3036
3037         Reviewed by Daniel Bates.
3038
3039         Teach XSSFilter about <applet>
3040         https://bugs.webkit.org/show_bug.cgi?id=53338
3041
3042         HTML5 is pretty light on information about how the <applet> tag works.
3043         According to this site:
3044
3045         http://download.oracle.com/javase/1.4.2/docs/guide/misc/applet.html
3046
3047         The "code" and "object" attributes are the essential attributes for
3048         determining which piece of Java to run.  We might need to expand to the
3049         codebase and archive attributes at some point, but hopefully code and
3050         object will be sufficient.
3051
3052         * html/parser/XSSFilter.cpp:
3053         (WebCore::XSSFilter::filterToken):
3054         (WebCore::XSSFilter::filterAppletToken):
3055         * html/parser/XSSFilter.h:
3056
3057 2011-01-28  Adam Barth  <abarth@webkit.org>
3058
3059         Reviewed by Daniel Bates.
3060
3061         Teach the XSSFilter about object and embed tags
3062         https://bugs.webkit.org/show_bug.cgi?id=53336
3063
3064         For <object> and <embed>, we filter out attribute values that either
3065         indicate which piece of media to load or which plugin to load.  In a
3066         perfect world, we'd only need to filter out the URLs of the media, but
3067         some plug-ins (like Flash) have lots of fun places you can hide the
3068         URL (e.g., the "movie" <param>).
3069
3070         * html/parser/XSSFilter.cpp:
3071         (WebCore::XSSFilter::filterToken):
3072         (WebCore::XSSFilter::filterScriptToken):
3073         (WebCore::XSSFilter::filterObjectToken):
3074         (WebCore::XSSFilter::filterEmbedToken):
3075         (WebCore::XSSFilter::eraseAttributeIfInjected):
3076         * html/parser/XSSFilter.h:
3077
3078 2011-01-28  Oliver Hunt  <oliver@apple.com>
3079
3080         Fix Qt build.
3081
3082         * bridge/qt/qt_runtime.cpp:
3083         (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
3084         (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
3085         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
3086         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
3087         * bridge/qt/qt_runtime.h:
3088
3089 2011-01-28  Antti Koivisto  <antti@apple.com>
3090
3091         Reviewed by Simon Fraser.
3092
3093         CSS styles are shared based on uninitialized property values
3094         https://bugs.webkit.org/show_bug.cgi?id=53285
3095         
3096         Null test.
3097
3098         * dom/NamedNodeMap.cpp:
3099         (WebCore::NamedNodeMap::mappedMapsEquivalent):
3100
3101 2011-01-27  Oliver Hunt  <oliver@apple.com>
3102
3103         Reviewed by Geoffrey Garen.
3104
3105         Convert markstack to a slot visitor API
3106         https://bugs.webkit.org/show_bug.cgi?id=53219
3107
3108         Update WebCore to the new marking apis, correct bindings
3109         codegen. 
3110
3111         * ForwardingHeaders/runtime/WriteBarrier.h: Added.
3112         * WebCore.exp.in:
3113         * bindings/js/DOMWrapperWorld.h:
3114         (WebCore::DOMWrapperWorld::globalData):
3115         * bindings/js/JSAudioConstructor.cpp:
3116         (WebCore::JSAudioConstructor::JSAudioConstructor):
3117         * bindings/js/JSDOMBinding.cpp:
3118         (WebCore::markDOMNodesForDocument):
3119         (WebCore::markDOMObjectWrapper):
3120         (WebCore::markDOMNodeWrapper):
3121         * bindings/js/JSDOMGlobalObject.cpp:
3122         (WebCore::JSDOMGlobalObject::markChildren):
3123         (WebCore::JSDOMGlobalObject::setInjectedScript):
3124         (WebCore::JSDOMGlobalObject::injectedScript):
3125         * bindings/js/JSDOMGlobalObject.h:
3126         (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
3127         (WebCore::getDOMConstructor):
3128         * bindings/js/JSDOMWindowCustom.cpp:
3129         (WebCore::JSDOMWindow::setLocation):
3130         (WebCore::DialogHandler::dialogCreated):
3131         * bindings/js/JSDOMWindowShell.cpp:
3132         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
3133         (WebCore::JSDOMWindowShell::setWindow):
3134         (WebCore::JSDOMWindowShell::markChildren):
3135         (WebCore::JSDOMWindowShell::unwrappedObject):
3136         * bindings/js/JSDOMWindowShell.h:
3137         (WebCore::JSDOMWindowShell::window):
3138         (WebCore::JSDOMWindowShell::setWindow):
3139         * bindings/js/JSEventListener.cpp:
3140         (WebCore::JSEventListener::JSEventListener):
3141         (WebCore::JSEventListener::markJSFunction):
3142         * bindings/js/JSEventListener.h:
3143         (WebCore::JSEventListener::jsFunction):
3144         * bindings/js/JSHTMLDocumentCustom.cpp:
3145         (WebCore::JSHTMLDocument::setAll):
3146         * bindings/js/JSImageConstructor.cpp:
3147         (WebCore::JSImageConstructor::JSImageConstructor):
3148         * bindings/js/JSImageDataCustom.cpp:
3149         (WebCore::toJS):
3150         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
3151         (WebCore::JSJavaScriptCallFrame::scopeChain):
3152         (WebCore::JSJavaScriptCallFrame::scopeType):
3153         * bindings/js/JSNodeFilterCondition.cpp:
3154         (WebCore::JSNodeFilterCondition::markAggregate):
3155         (WebCore::JSNodeFilterCondition::acceptNode):
3156         * bindings/js/JSNodeFilterCondition.h:
3157         * bindings/js/JSNodeFilterCustom.cpp:
3158         * bindings/js/JSOptionConstructor.cpp:
3159         (WebCore::JSOptionConstructor::JSOptionConstructor):
3160         * bindings/js/JSSQLResultSetRowListCustom.cpp:
3161         (WebCore::JSSQLResultSetRowList::item):
3162         * bindings/js/ScriptCachedFrameData.cpp:
3163         (WebCore::ScriptCachedFrameData::restore):
3164         * bindings/js/ScriptObject.cpp:
3165         (WebCore::ScriptGlobalObject::set):
3166         * bindings/js/SerializedScriptValue.cpp:
3167         (WebCore::CloneDeserializer::putProperty):
3168         * bindings/scripts/CodeGeneratorJS.pm:
3169         * dom/Document.h:
3170
3171 2011-01-28  Sam Weinig  <sam@webkit.org>
3172
3173         Reviewed by Anders Carlsson.
3174
3175         Keyboard scrolling doesn’t work in WebKit2
3176         <rdar://problem/8909672>
3177
3178         * platform/mac/ScrollAnimatorMac.mm:
3179         (-[ScrollAnimationHelperDelegate convertSizeToBacking:]):
3180         (-[ScrollAnimationHelperDelegate convertSizeFromBacking:]):
3181         Add additional necessary delegate methods.
3182
3183 2011-01-29  Darin Adler  <darin@apple.com>
3184
3185         Reviewed by Dan Bernstein.
3186
3187         Re-land this patch with the missing null check that caused crashes in layout tests.
3188
3189         Changing cursor style has no effect until the mouse moves
3190         https://bugs.webkit.org/show_bug.cgi?id=14344
3191         rdar://problem/7563712
3192
3193         No tests added because we don't have infrastructure for testing actual cursor
3194         changes (as opposed to cursor style computation) at this time. We might add it later.
3195
3196         * page/EventHandler.cpp:
3197         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon): Added.
3198         * page/EventHandler.h: Ditto.
3199
3200         * rendering/RenderObject.cpp:
3201         (WebCore::areNonIdenticalCursorListsEqual): Added.
3202         (WebCore::areCursorsEqual): Added.
3203         (WebCore::RenderObject::styleDidChange): Call dispatchFakeMouseMoveEventSoon if
3204         cursor styles changed.
3205
3206 2011-01-28  Justin Schuh  <jschuh@chromium.org>
3207
3208         Reviewed by Eric Seidel.
3209
3210         We should hold RefPtrs to SVG font faces
3211         https://bugs.webkit.org/show_bug.cgi?id=53270
3212
3213         Test: svg/custom/use-multiple-on-nested-disallowed-font.html
3214
3215         * css/CSSFontFaceSource.cpp:
3216         (WebCore::CSSFontFaceSource::getFontData):
3217         * css/CSSFontFaceSource.h:
3218         * svg/SVGFontFaceElement.cpp:
3219         (WebCore::SVGFontFaceElement::associatedFontElement):
3220         * svg/SVGFontFaceElement.h:
3221
3222 2011-01-28  Zhenyao Mo  <zmo@google.com>
3223
3224         Reviewed by Kenneth Russell.
3225
3226         uniformN*v should generate INVALID_VALUE of the array size is not a multiple of N
3227         https://bugs.webkit.org/show_bug.cgi?id=53306
3228
3229         * html/canvas/WebGLRenderingContext.cpp:
3230         (WebCore::WebGLRenderingContext::validateUniformMatrixParameters):
3231
3232 2011-01-28  Tom Sepez  <tsepez@chromium.org>
3233
3234         Reviewed by Eric Seidel.
3235
3236         NULL pointer crash in TextIterator::handleTextBox()
3237         https://bugs.webkit.org/show_bug.cgi?id=53267
3238
3239         Test: fast/css/rtl-nth-child-first-letter-crash.html
3240
3241         * editing/TextIterator.cpp:
3242         (WebCore::TextIterator::handleTextBox):
3243
3244 2011-01-28  Adrienne Walker  <enne@google.com>
3245
3246         Reviewed by Kenneth Russell.
3247
3248         [chromium] Remove a spurious diagnostic CRASH check.
3249         https://bugs.webkit.org/show_bug.cgi?id=52379
3250
3251         * platform/graphics/chromium/LayerTilerChromium.cpp:
3252         (WebCore::LayerTilerChromium::invalidateRect):
3253
3254 2011-01-28  Dan Bernstein  <mitz@apple.com>
3255
3256         Reviewed by Sam Weinig.
3257
3258         <rdar://problem/4761512> <select> can't display right-to-left (rtl) languages
3259         https://bugs.webkit.org/show_bug.cgi?id=19785
3260
3261         Changed <select> pop-up menus on Mac OS X Snow Leopard and later to have their items aligned in the
3262         direction corresponding to the writing direction of the <select> element, with the checkmarks
3263         on the "start" side, and use the <option>'s writing direction rather than "natural". Made the
3264         pop-up button match the menu by adding a Chrome boolean function, selectItemAlignmentFollowsMenuWritingDirection(),
3265         which returns true for this pop-up behavior.
3266
3267         * loader/EmptyClients.h:
3268         (WebCore::EmptyChromeClient::selectItemAlignmentFollowsMenuWritingDirection): Added.
3269         * manual-tests/pop-up-alignment-and-direction.html: Added.
3270         * page/Chrome.cpp:
3271         (WebCore::Chrome::selectItemAlignmentFollowsMenuWritingDirection): Added. Calls through to the
3272         client.
3273         * page/Chrome.h:
3274         * page/ChromeClient.h:
3275         * platform/PopupMenuStyle.h:
3276         (WebCore::PopupMenuStyle::PopupMenuStyle): Added hasTextDirectionOverride parameter and member
3277         variable initialization.
3278         (WebCore::PopupMenuStyle::hasTextDirectionOverride): Added this accessor.
3279         * platform/mac/PopupMenuMac.mm:
3280         (WebCore::PopupMenuMac::populate): Set the pop-up's layout direction and items' text alignment
3281         to match the menu's writing direction. Set items' writing direction and direction override
3282         according to their styles.
3283         * rendering/RenderMenuList.cpp:
3284         (WebCore::RenderMenuList::RenderMenuList): Removed unncesaary initialization of a smart pointer.
3285         (WebCore::RenderMenuList::adjustInnerStyle): If the alignment of items in the menu follows the
3286         menu's writing direction, use that alignment for the button as well. Also in this mode, use the
3287         item's writing direction and override setting.
3288         (WebCore::RenderMenuList::setTextFromOption): Store the option element's style.
3289         (WebCore::RenderMenuList::itemStyle): Pass the text direction override value.
3290         (WebCore::RenderMenuList::menuStyle): Ditto. Also use the button's direction, not the inner text's.
3291         * rendering/RenderMenuList.h:
3292         * rendering/RenderTextControlSingleLine.cpp:
3293         (WebCore::RenderTextControlSingleLine::menuStyle): Pass the text direction override value.
3294
3295 2011-01-28  Adam Barth  <abarth@webkit.org>
3296
3297         Reviewed by Daniel Bates.
3298
3299         Teach XSSFilter how to filter <script> elements
3300         https://bugs.webkit.org/show_bug.cgi?id=53279
3301
3302         This patch adds the ability for the XSSFilter to block injected
3303         <script> elements.  Handling script elements is slightly subtle because
3304         these elements act very differently depending on whether they have a
3305         src attribute.
3306         
3307         In the "src case", which check whether the src attribute was present in
3308         the request.  In the "non-src case", we check whether the start tag and
3309         the body of the script element was included in the request.  Checking
3310         for the whole start tag means we miss out on some attribute splitting
3311         attacks inside of script tags, but that doesn't seem like that big a
3312         deal.
3313
3314         This patch also introduces some amount of state into the XSSFilter
3315         because inline script elements span multiple tokens.  There's a lot of
3316         tuning and optimization left in these cases, some of which I've noted
3317         with FIXMEs.
3318
3319         To test this patch, I played around with some of the existing
3320         XSSAuditor tests.  Hopefully I'll be able to run the test suite more
3321         systematically in the future.
3322
3323         * html/parser/HTMLToken.h:
3324         (WebCore::HTMLToken::eraseCharacters):
3325         (WebCore::HTMLToken::eraseValueOfAttribute):
3326         * html/parser/XSSFilter.cpp:
3327         (WebCore::HTMLNames::hasName):
3328         (WebCore::HTMLNames::findAttributeWithName):
3329         (WebCore::HTMLNames::isNameOfScriptCarryingAttribute):
3330         (WebCore::XSSFilter::XSSFilter):
3331         (WebCore::XSSFilter::filterToken):
3332         (WebCore::XSSFilter::filterTokenAfterScriptStartTag):
3333         (WebCore::XSSFilter::filterScriptToken):
3334         (WebCore::XSSFilter::snippetForRange):
3335         (WebCore::XSSFilter::snippetForAttribute):
3336         * html/parser/XSSFilter.h:
3337
3338 2011-01-28  Adam Barth  <abarth@webkit.org>
3339
3340         Reviewed by Daniel Bates.
3341
3342         Sketch out new XSS filter design (disabled by default)
3343         https://bugs.webkit.org/show_bug.cgi?id=53205
3344
3345         This patch adds a basic sketch of the new XSS filter design.  Rather
3346         than watching scripts as they execute, in this design, we watch tokens
3347         emitted by the tokenizer.  We then map the tokens directly back into
3348         input characters, which lets us skip all the complicated logic related
3349         to HTML entities and double-decoding of JavaScript URLs.
3350
3351         This patch contains only the bare essentially machinery.  I'll add more
3352         in future patches and eventually remove the previous code once this
3353         code is up and running correctly.
3354
3355         * Android.mk:
3356         * CMakeLists.txt:
3357         * GNUmakefile.am:
3358         * WebCore.gypi:
3359         * WebCore.pro:
3360         * WebCore.vcproj/WebCore.vcproj:
3361         * WebCore.xcodeproj/project.pbxproj:
3362         * html/parser/HTMLDocumentParser.cpp:
3363         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
3364         (WebCore::HTMLDocumentParser::pumpTokenizer):
3365         (WebCore::HTMLDocumentParser::sourceForToken):
3366         * html/parser/HTMLDocumentParser.h:
3367         * html/parser/XSSFilter.cpp: Added.
3368         * html/parser/XSSFilter.h: Added.
3369
3370 2011-01-28  Michael Saboff  <msaboff@apple.com>
3371
3372         Reviewed by Geoffrey Garen.
3373
3374         Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
3375         https://bugs.webkit.org/show_bug.cgi?id=53271
3376
3377         Reapplying this patch with the change that the second ASSERT in 
3378         RootObject::removeRuntimeObject was changed to use
3379         .uncheckedGet() instead of the failing .get().  The object in question
3380         could be in the process of being GC'ed.  The get() call will not return
3381         such an object while the uncheckedGet() call will return the (unsafe) 
3382         object.  This is the behavior we want.
3383
3384         Precautionary change.
3385         Changed RootObject to use WeakGCMap instead of HashSet.
3386         Found will looking for another issue, but can't produce a test case
3387         that is problematic.  THerefore there aren't any new tests.
3388
3389         * bridge/runtime_root.cpp:
3390         (JSC::Bindings::RootObject::invalidate):
3391         (JSC::Bindings::RootObject::addRuntimeObject):
3392         (JSC::Bindings::RootObject::removeRuntimeObject):
3393         * bridge/runtime_root.h:
3394
3395 2011-01-28  Adam Roben  <aroben@apple.com>
3396
3397         Notify CACFLayerTreeHost when the context is flushed
3398
3399         LegacyCACFLayerTreeHost was keeping this a secret, which meant that WebCore's animation
3400         timers were never starting.
3401
3402         Fixes <http://webkit.org/b/53302> [Windows 7 Release Tests] changesets 76853, 76856, and
3403         76858 broke ~36 animations, compositing, and transitions tests
3404
3405         Reviewed by Sam Weinig.
3406
3407         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp:
3408         (WebCore::LegacyCACFLayerTreeHost::contextDidChange): Call up to the base class after we
3409         start our render timer.
3410
3411 2011-01-28  Antti Koivisto  <antti@apple.com>
3412
3413         Reviewed by Dan Bernstein.
3414
3415         Remove dead code that tried to map from CSS values to parser values
3416         https://bugs.webkit.org/show_bug.cgi?id=53318
3417
3418         * css/CSSFunctionValue.cpp:
3419         * css/CSSFunctionValue.h:
3420         * css/CSSPrimitiveValue.cpp:
3421         * css/CSSPrimitiveValue.h:
3422         * css/CSSValue.h:
3423         * css/CSSValueList.cpp:
3424         * css/CSSValueList.h:
3425
3426 2011-01-28  Enrica Casucci  <enrica@apple.com>
3427
3428         Reviewed by Adam Roben.
3429
3430         Some drag and drop tests fail since r76824
3431         https://bugs.webkit.org/show_bug.cgi?id=53304
3432
3433         There were '||' instead of '&&' in the checks for valid
3434         clipboard content.
3435         
3436         * platform/win/ClipboardWin.cpp:
3437         (WebCore::ClipboardWin::getData):
3438         (WebCore::ClipboardWin::types):
3439         (WebCore::ClipboardWin::files):
3440
3441 2011-01-28  Martin Robinson  <mrobinson@igalia.com>
3442
3443         [GTK] AudioProcessingEvent.h and JSJavaScriptAudioNode.h: No such file or directory
3444         https://bugs.webkit.org/show_bug.cgi?id=52889
3445
3446         Build fix for WebAudio. Include WebAudio source files on the source
3447         list when WebAudio is enabled.
3448
3449         * GNUmakefile.am: Include missing source files.
3450
3451 2011-01-28  Sam Weinig  <sam@webkit.org>
3452
3453         Reviewed by Maciej Stachowiak.
3454
3455         Add basic rubber banding support
3456         <rdar://problem/8219429>
3457         https://bugs.webkit.org/show_bug.cgi?id=53277
3458
3459         * page/EventHandler.cpp:
3460         (WebCore::EventHandler::handleGestureEvent):
3461         Pass gesture events to the FrameView.
3462
3463         * platform/ScrollAnimator.cpp:
3464         (WebCore::ScrollAnimator::handleGestureEvent):
3465         * platform/ScrollAnimator.h:
3466         Add stubbed out implementation.
3467
3468         * platform/ScrollView.cpp:
3469         (WebCore::ScrollView::ScrollView):
3470         (WebCore::ScrollView::overhangAmount):
3471         (WebCore::ScrollView::wheelEvent):
3472         * platform/ScrollView.h:
3473         * platform/ScrollableArea.cpp:
3474         (WebCore::ScrollableArea::ScrollableArea):
3475         (WebCore::ScrollableArea::handleGestureEvent):
3476         * platform/ScrollableArea.h:
3477         (WebCore::ScrollableArea::constrainsScrollingToContentEdge):
3478         (WebCore::ScrollableArea::setConstrainsScrollingToContentEdge):
3479         Move constrains scrolling bit to ScrollableArea from ScrollView.
3480
3481         (WebCore::ScrollableArea::contentsSize):
3482         (WebCore::ScrollableArea::overhangAmount):
3483         Add additional virtual functions for information needed by the animator.
3484
3485         * platform/mac/ScrollAnimatorMac.h:
3486         * platform/mac/ScrollAnimatorMac.mm:
3487         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
3488         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaX):
3489         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaY):
3490         (WebCore::elasticDeltaForTimeDelta):
3491         (WebCore::elasticDeltaForReboundDelta):
3492         (WebCore::reboundDeltaForElasticDelta):
3493         (WebCore::scrollWheelMultiplier):
3494         (WebCore::ScrollAnimatorMac::handleWheelEvent):
3495         (WebCore::ScrollAnimatorMac::handleGestureEvent):
3496         (WebCore::ScrollAnimatorMac::pinnedInDirection):
3497         (WebCore::ScrollAnimatorMac::allowsVerticalStretching):
3498         (WebCore::ScrollAnimatorMac::allowsHorizontalStretching):
3499         (WebCore::ScrollAnimatorMac::smoothScrollWithEvent):
3500         (WebCore::ScrollAnimatorMac::beginScrollGesture):
3501         (WebCore::ScrollAnimatorMac::endScrollGesture):
3502         (WebCore::ScrollAnimatorMac::snapRubberBand):
3503         (WebCore::roundTowardZero):
3504         (WebCore::roundToDevicePixelTowardZero):
3505         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
3506         Implement basic rubber banding.
3507
3508 2011-01-28  Dan Bernstein  <mitz@apple.com>
3509
3510         Reviewed by Anders Carlsson.
3511
3512         Changing unicode-bidi doesn’t force layout
3513         https://bugs.webkit.org/show_bug.cgi?id=53311
3514
3515         Test: fast/dynamic/unicode-bidi.html
3516
3517         * rendering/style/RenderStyle.cpp:
3518         (WebCore::RenderStyle::diff): Return a layout difference if unicode-bidi values differ.
3519
3520 2011-01-27  Dimitri Glazkov  <dglazkov@chromium.org>
3521
3522         Reviewed by Kent Tamura.
3523
3524         Change HTMLInputElement-derived parts of media element shadow DOM to use shadowPseudoId.
3525         https://bugs.webkit.org/show_bug.cgi?id=53122
3526
3527         This is the first step in converting HTMLMediaElement to the new shadow DOM.
3528
3529         Should not regress any existing tests. No observable change in behavior.
3530
3531         * css/CSSSelector.cpp:
3532         (WebCore::CSSSelector::pseudoId): Removed now-unnecessary hard-coded pseudo-element selectors.
3533         (WebCore::nameToPseudoTypeMap): Ditto.
3534         (WebCore::CSSSelector::extractPseudoType): Ditto.
3535         * css/CSSSelector.h: Ditto.
3536         * css/mediaControls.css: Added proper initial values, now that elements use the proper selector pipeline.
3537         * rendering/MediaControlElements.cpp:
3538         (WebCore::MediaControlInputElement::MediaControlInputElement): Removed the switch statement,
3539             which is now replaced with virtual shadowPseudoId on each corresponding class.
3540         (WebCore::MediaControlInputElement::styleForElement): Changed to use element pipeline.
3541         (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement): Changed to set
3542             display type in constructor.
3543         (WebCore::MediaControlMuteButtonElement::create): Changed to not take PseudoId as
3544             constructor argument.
3545         (WebCore::MediaControlMuteButtonElement::shadowPseudoId): Added.
3546         (WebCore::MediaControlVolumeSliderMuteButtonElement::MediaControlVolumeSliderMuteButtonElement): Added
3547             to disambiguate from the MediaControlMuteButtonElement.
3548         (WebCore::MediaControlVolumeSliderMuteButtonElement::create): Added.
3549         (WebCore::MediaControlVolumeSliderMuteButtonElement::shadowPseudoId): Added.
3550         (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): Changed to not take PseudoId as
3551             constructor argument.
3552         (WebCore::MediaControlPlayButtonElement::shadowPseudoId): Added.
3553         (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement): Changed to not take PseudoId as
3554             constructor argument.
3555         (WebCore::MediaControlSeekForwardButtonElement::MediaControlSeekForwardButtonElement): Added.
3556         (WebCore::MediaControlSeekForwardButtonElement::create): Added.
3557         (WebCore::MediaControlSeekForwardButtonElement::shadowPseudoId): Added.
3558         (WebCore::MediaControlSeekBackButtonElement::MediaControlSeekBackButtonElement): Added.
3559         (WebCore::MediaControlSeekBackButtonElement::create): Added.
3560         (WebCore::MediaControlSeekBackButtonElement::shadowPseudoId): Added.
3561         (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): Added.
3562         (WebCore::MediaControlRewindButtonElement::shadowPseudoId): Added.
3563         (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): Changed to not take PseudoId as
3564             constructor argument.
3565         (WebCore::MediaControlReturnToRealtimeButtonElement::shadowPseudoId): Added.
3566         (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement): Changed to not take PseudoId as
3567             constructor argument.
3568         (WebCore::MediaControlToggleClosedCaptionsButtonElement::shadowPseudoId): Added.
3569         (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): Changed to not take PseudoId as
3570             constructor argument.
3571         (WebCore::MediaControlTimelineElement::shadowPseudoId): Added.
3572         (WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement): Changed to not take PseudoId as
3573             constructor argument.
3574         (WebCore::MediaControlVolumeSliderElement::shadowPseudoId): Added.
3575         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): Changed to not take PseudoId as
3576             constructor argument.
3577         (WebCore::MediaControlFullscreenButtonElement::shadowPseudoId): Added.
3578         * rendering/MediaControlElements.h:
3579         (WebCore::MediaControlSeekForwardButtonElement::isForwardButton): Added.
3580         (WebCore::MediaControlSeekBackButtonElement::isForwardButton): Added.
3581         * rendering/RenderMedia.cpp:
3582         (WebCore::RenderMedia::createMuteButton): Changed to use new constructor.
3583         (WebCore::RenderMedia::createSeekBackButton): Ditto.
3584         (WebCore::RenderMedia::createSeekForwardButton): Ditto.
3585         (WebCore::RenderMedia::createVolumeSliderMuteButton): Ditto.
3586         * rendering/style/RenderStyleConstants.h: Removed constants that are no longer used.
3587
3588 2011-01-27  Dimitri Glazkov  <dglazkov@chromium.org>
3589
3590         Reviewed by Eric Carlson.
3591
3592         Split MediaControls out of RenderMedia.
3593         https://bugs.webkit.org/show_bug.cgi?id=53252
3594
3595         Near-mechanical moving of stuff, no change in behavior, thus no new tests.
3596
3597         * Android.mk: Added MediaControls to build system.
3598         * CMakeLists.txt: Ditto.
3599         * GNUmakefile.am: Ditto.
3600         * WebCore.gypi: Ditto.
3601         * WebCore.pro: Ditto.
3602         * WebCore.vcproj/WebCore.vcproj: Ditto.
3603         * WebCore.xcodeproj/project.pbxproj: Ditto.
3604         * html/HTMLMediaElement.cpp:
3605         (WebCore::HTMLMediaElement::defaultEventHandler): Changed to forward events to MediaControls.
3606         * html/shadow/MediaControls.cpp: Copied all controls-related methods from
3607             Source/WebCore/rendering/RenderMedia.cpp, pulled them into their own class called MediaControls. 
3608         * html/shadow/MediaControls.h: Ditto from Source/WebCore/rendering/RenderMedia.h.
3609         * rendering/MediaControlElements.cpp:
3610         (WebCore::MediaControlTimelineElement::defaultEventHandler): Changed to use MediaControls.
3611         * rendering/RenderMedia.cpp:
3612         (WebCore::RenderMedia::RenderMedia): Moved relevant constructor initializers out to MediaControls.
3613         (WebCore::RenderMedia::destroy): Changed to use MediaControls.
3614         (WebCore::RenderMedia::styleDidChange): Ditto.
3615         (WebCore::RenderMedia::layout): Ditto.
3616         (WebCore::RenderMedia::updateFromElement): Ditto.
3617         * rendering/RenderMedia.h: Updated defs accordingly and removed player() accessor, which
3618             is only used by sub-class RenderVideo.
3619         (WebCore::RenderMedia::controls): Added.
3620         * rendering/RenderVideo.cpp:
3621         (WebCore::RenderVideo::~RenderVideo): Changed to access MediaPlayer* directly from mediaElement().
3622         (WebCore::RenderVideo::calculateIntrinsicSize): Ditto.
3623         (WebCore::RenderVideo::paintReplaced): Ditto.
3624         (WebCore::RenderVideo::updatePlayer): Ditto.
3625         (WebCore::RenderVideo::supportsAcceleratedRendering): Ditto.
3626         (WebCore::RenderVideo::acceleratedRenderingStateChanged): Ditto.
3627
3628 2011-01-28  Pavel Feldman  <pfeldman@chromium.org>
3629
3630         Reviewed by Yury Semikhatsky.
3631
3632         Web Inspector: allow remote debugging with front-end
3633         served from the cloud.
3634         https://bugs.webkit.org/show_bug.cgi?id=53303
3635
3636         * inspector/front-end/inspector.js:
3637
3638 2011-01-28  Aparna Nandyal  <aparna.nand@wipro.com>
3639
3640         Reviewed by Andreas Kling.
3641
3642         Setting value of m_PressedPos to make scrolling smooth
3643
3644         Page scroll popup menu "Scroll here" option not working when cliking above scroll slider/handler.
3645         https://bugs.webkit.org/show_bug.cgi?id=51349
3646
3647         The value of m_PressedPos was getting set before moveThumb() call
3648         in all other scenarios except when "Scroll Here" option is used.
3649         Hence scrolling with this option was not as expected even in cases
3650         where scrolling was happening. The thumb would move in unexpected
3651         direction. m_PressedPos is now set to pressed position so delta is
3652         calculated.
3653         Unable to write a test case as the test needs to click on "Scroll
3654         Here" option of context sensitive menu and QTest is unable to do it.
3655         Besides no new functionality introduced.
3656
3657         * platform/qt/ScrollbarQt.cpp:
3658         (WebCore::Scrollbar::contextMenu):
3659
3660 2011-01-28  Andrey Kosyakov  <caseq@chromium.org>
3661
3662         Reviewed by Pavel Feldman.
3663
3664         Web Inspector: [Extensions API] add JSON schema for extensions API
3665         https://bugs.webkit.org/show_bug.cgi?id=53236
3666
3667         * inspector/front-end/ExtensionAPISchema.json: Added.
3668
3669 2011-01-27  Zhenyao Mo  <zmo@google.com>
3670
3671         Reviewed by Kenneth Russell.
3672
3673         Remove _LENGTH enumerants
3674         https://bugs.webkit.org/show_bug.cgi?id=53259
3675
3676         * html/canvas/WebGLRenderingContext.cpp: Remove queries for *LENGTH.
3677         (WebCore::WebGLRenderingContext::getProgramParameter):
3678         (WebCore::WebGLRenderingContext::getShaderParameter):
3679         * html/canvas/WebGLRenderingContext.idl: Remove *LENGTH.
3680
3681 2011-01-28  Alexander Pavlov  <apavlov@chromium.org>
3682
3683         Reviewed by Yury Semikhatsky.
3684
3685         Web Inspector: syntax highlight inline JS and CSS in HTML resources
3686         https://bugs.webkit.org/show_bug.cgi?id=30831
3687
3688         * inspector/front-end/SourceHTMLTokenizer.js:
3689         (WebInspector.SourceHTMLTokenizer):
3690         (WebInspector.SourceHTMLTokenizer.prototype.set line):
3691         (WebInspector.SourceHTMLTokenizer.prototype.nextToken):
3692         * inspector/front-end/SourceHTMLTokenizer.re2js:
3693
3694 2011-01-28  Alexander Pavlov  <apavlov@chromium.org>
3695
3696         Reviewed by Yury Semikhatsky.
3697
3698         Web Inspector: [STYLES] Up/Down-suggestion breaks an existing keyword
3699         https://bugs.webkit.org/show_bug.cgi?id=53295
3700
3701         Select the current word suffix before switching to the next suggestion.
3702
3703         * inspector/front-end/StylesSidebarPane.js:
3704         ():
3705
3706 2011-01-28  Alejandro G. Castro  <alex@igalia.com>
3707
3708         Reviewed by Xan Lopez.
3709
3710         [GTK] Fix dist compilation for the release
3711         https://bugs.webkit.org/show_bug.cgi?id=53290
3712
3713         * GNUmakefile.am: Added inspector files to the extra dist.
3714
3715 2011-01-28  Ilya Sherman  <isherman@chromium.org>
3716
3717         Reviewed by Andreas Kling.
3718
3719         Const-correct HTMLSelectElement and WebSelectElement
3720         https://bugs.webkit.org/show_bug.cgi?id=53293
3721
3722         * html/HTMLSelectElement.cpp:
3723         (WebCore::HTMLSelectElement::value): const.
3724         * html/HTMLSelectElement.h:
3725
3726 2011-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
3727
3728         Unreviewed, rolling out r76893.
3729         http://trac.webkit.org/changeset/76893
3730         https://bugs.webkit.org/show_bug.cgi?id=53287
3731
3732         It made some tests crash on GTK and Qt debug bots (Requested
3733         by Ossy on #webkit).
3734
3735         * bridge/runtime_root.cpp:
3736         (JSC::Bindings::RootObject::invalidate):
3737         (JSC::Bindings::RootObject::addRuntimeObject):
3738         (JSC::Bindings::RootObject::removeRuntimeObject):
3739         * bridge/runtime_root.h:
3740
3741 2011-01-27  Greg Coletta  <greg.coletta@nokia.com>
3742
3743         Reviewed by Laszlo Gombos.
3744
3745         Get rid of prefix header dependency for WebKit2 build system
3746         https://bugs.webkit.org/show_bug.cgi?id=50174
3747
3748         Guard EmptyProtocalDefinitions.h to make sure it's not included twice.
3749
3750         * platform/mac/EmptyProtocolDefinitions.h:
3751
3752 2011-01-27  Abhishek Arya  <inferno@chromium.org>
3753
3754         Reviewed by Dan Bernstein.
3755
3756         Recalc table sections if needed before calculating the first line
3757         box baseline.
3758         https://bugs.webkit.org/show_bug.cgi?id=53265
3759
3760         When we try to calculate the baseline position of a table cell,
3761         we recurse through all the child sibling boxes (when children are
3762         non inline) and add their first linebox baseline values. If one of
3763         the children is a table with pending section recalc, we will access
3764         wrong table section values. We recalc table sections if it is needed.
3765
3766         Test: fast/table/recalc-section-first-body-crash-main.html
3767
3768         * rendering/RenderTable.cpp:
3769         (WebCore::RenderTable::firstLineBoxBaseline):
3770
3771 2011-01-27  Adrienne Walker  <enne@google.com>
3772
3773         Reviewed by Kenneth Russell.
3774
3775         [chromium] Add CRASH calls to further debug tiled compositor memcpy crash.
3776         https://bugs.webkit.org/show_bug.cgi?id=52379
3777
3778         Test: LayoutTests/compositing (to verify these weren't triggered)
3779
3780         * platform/graphics/chromium/LayerTilerChromium.cpp:
3781         (WebCore::LayerTilerChromium::invalidateRect):
3782         (WebCore::LayerTilerChromium::update):
3783
3784 2011-01-27  Alexander Pavlov  <apavlov@chromium.org>
3785
3786         Reviewed by Pavel Feldman.
3787
3788         Web Inspector: [STYLES] Cancelled suggestion of a property name results in a visual artifact
3789         https://bugs.webkit.org/show_bug.cgi?id=53242
3790
3791         * inspector/front-end/StylesSidebarPane.js:
3792         (WebInspector.StylePropertyTreeElement.prototype):
3793
3794 2011-01-27  Sheriff Bot  <webkit.review.bot@gmail.com>
3795
3796         Unreviewed, rolling out r76891.
3797         http://trac.webkit.org/changeset/76891
3798         https://bugs.webkit.org/show_bug.cgi?id=53280
3799
3800         Makes every layout test crash (Requested by othermaciej on
3801         #webkit).
3802
3803         * page/EventHandler.cpp:
3804         * page/EventHandler.h:
3805         * rendering/RenderObject.cpp:
3806         (WebCore::RenderObject::styleDidChange):
3807
3808 2011-01-27  Ryosuke Niwa  <rniwa@webkit.org>
3809
3810         Unreviewed, rolling out r76839.
3811         http://trac.webkit.org/changeset/76839
3812         https://bugs.webkit.org/show_bug.cgi?id=49744
3813
3814         broke pixel tests
3815
3816         * rendering/RenderBox.cpp:
3817         (WebCore::RenderBox::localCaretRect):
3818
3819 2011-01-27  Emil A Eklund  <eae@chromium.org>
3820
3821         Reviewed by Darin Adler.
3822
3823         contentEditable formatBlock crashes on divs with contenteditable="false"
3824         https://bugs.webkit.org/show_bug.cgi?id=53263
3825
3826         Check if editableRootForPosition returns null for position.
3827
3828         Test: editing/execCommand/format-block-contenteditable-false.html
3829
3830         * editing/FormatBlockCommand.cpp:
3831         (WebCore::FormatBlockCommand::formatRange):
3832
3833 2011-01-27  Dimitri Glazkov  <dglazkov@chromium.org>
3834
3835         Reviewed by Darin Adler.
3836
3837         Remove RenderMedia members that aren't used.
3838         https://bugs.webkit.org/show_bug.cgi?id=53245
3839
3840         Refactoring, no change in behavior, so no new tests.
3841
3842         * rendering/RenderMedia.h: Removed unused member variables.
3843
3844 2011-01-27  Michael Saboff  <msaboff@apple.com>
3845
3846         Reviewed by Darin Adler.
3847
3848         Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
3849         https://bugs.webkit.org/show_bug.cgi?id=53271
3850
3851         Precautionary change.
3852         Changed RootObject to use WeakGCMap instead of HashSet.
3853         Found will looking for another issue, but can't produce a test case
3854         that is problematic.  THerefore there aren't any new tests.
3855
3856         * bridge/runtime_root.cpp:
3857         (JSC::Bindings::RootObject::invalidate):
3858         (JSC::Bindings::RootObject::addRuntimeObject):
3859         (JSC::Bindings::RootObject::removeRuntimeObject):
3860         * bridge/runtime_root.h:
3861
3862 2011-01-27  Kenneth Russell  <kbr@google.com>
3863
3864         Reviewed by James Robinson.
3865
3866         Rename Typed Array slice() to subset()
3867         https://bugs.webkit.org/show_bug.cgi?id=53273
3868
3869         * bindings/js/JSArrayBufferViewHelper.h:
3870         (WebCore::constructArrayBufferView):
3871         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
3872         (WebCore::constructWebGLArray):
3873         * html/canvas/Float32Array.cpp:
3874         (WebCore::Float32Array::subset):
3875         * html/canvas/Float32Array.h:
3876         * html/canvas/Float32Array.idl:
3877         * html/canvas/Int16Array.cpp:
3878         (WebCore::Int16Array::subset):
3879         * html/canvas/Int16Array.h:
3880         * html/canvas/Int16Array.idl:
3881         * html/canvas/Int32Array.cpp:
3882         (WebCore::Int32Array::subset):
3883         * html/canvas/Int32Array.h:
3884         * html/canvas/Int32Array.idl:
3885         * html/canvas/Int8Array.cpp:
3886         (WebCore::Int8Array::subset):
3887         * html/canvas/Int8Array.h:
3888         * html/canvas/Int8Array.idl:
3889         * html/canvas/TypedArrayBase.h:
3890         (WebCore::TypedArrayBase::subsetImpl):
3891         * html/canvas/Uint16Array.cpp:
3892         (WebCore::Uint16Array::subset):
3893         * html/canvas/Uint16Array.h:
3894         * html/canvas/Uint16Array.idl:
3895         * html/canvas/Uint32Array.cpp:
3896         (WebCore::Uint32Array::subset):
3897         * html/canvas/Uint32Array.h:
3898         * html/canvas/Uint32Array.idl:
3899         * html/canvas/Uint8Array.cpp:
3900         (WebCore::Uint8Array::subset):
3901         * html/canvas/Uint8Array.h:
3902         * html/canvas/Uint8Array.idl:
3903
3904 2011-01-27  Darin Adler  <darin@apple.com>
3905
3906         Reviewed by Dan Bernstein.
3907
3908         Changing cursor style has no effect until the mouse moves
3909         https://bugs.webkit.org/show_bug.cgi?id=14344
3910         rdar://problem/7563712
3911
3912         No tests added because we don't have infrastructure for testing actual cursor
3913         changes (as opposed to cursor style computation) at this time. We might add it later.
3914
3915         * page/EventHandler.cpp:
3916         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon): Added.
3917         * page/EventHandler.h: Ditto.
3918
3919         * rendering/RenderObject.cpp:
3920         (WebCore::areNonIdenticalCursorListsEqual): Added.
3921         (WebCore::areCursorsEqual): Added.
3922         (WebCore::RenderObject::styleDidChange): Call dispatchFakeMouseMoveEventSoon if
3923         cursor styles changed.
3924
3925 2011-01-27  Leo Yang  <leo.yang@torchmobile.com.cn>
3926
3927         Reviewed by Dirk Schulze.
3928
3929         SVG Use Cycle is not detected
3930         https://bugs.webkit.org/show_bug.cgi?id=52544
3931
3932         We should check if SVGUseElement::buildInstanceTree finds problem
3933         for every child node. If it finds problem for any children we must
3934         return immediately because otherwise the foundProblem variable may
3935         be rewritten to false.
3936
3937         Test: svg/custom/recursive-use2.svg
3938
3939         * svg/SVGUseElement.cpp:
3940         (WebCore::SVGUseElement::buildInstanceTree):
3941
3942 2011-01-27  Zhenyao Mo  <zmo@google.com>
3943
3944         Reviewed by Kenneth Russell.
3945
3946         texSubImage2D's format/type needs to match the internalformat/type from the previous texImage2D call
3947         https://bugs.webkit.org/show_bug.cgi?id=53054
3948
3949         Test: fast/canvas/webgl/tex-sub-image-2d-bad-args.html
3950
3951         * html/canvas/WebGLRenderingContext.cpp:
3952         (WebCore::WebGLRenderingContext::texSubImage2DBase): Check format/type match.
3953
3954 2011-01-27  Yi Shen  <yi.4.shen@nokia.com>, Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
3955
3956         Reviewed by Andreas Kling.
3957
3958         [Qt] Add fullscreen media control button for html video
3959         https://bugs.webkit.org/show_bug.cgi?id=51543
3960
3961         Implement media control fullscreen button for QtWebKit html5 video.
3962
3963         * css/mediaControlsQt.css:
3964         (video::-webkit-media-controls-fullscreen-button):
3965         * platform/qt/RenderThemeQt.cpp:
3966         (WebCore::RenderThemeQt::paintMediaFullscreenButton):
3967
3968 2011-01-27  Nate Chapin  <japhet@chromium.org>
3969
3970         Reviewed by Adam Barth.
3971
3972         Remove FrameLoader::url() and update callers to use
3973         Document::url().
3974         https://bugs.webkit.org/show_bug.cgi?id=41165
3975
3976         Refactor, no new tests.
3977
3978         * WebCore.exp.in:
3979         * dom/Document.cpp:
3980         (WebCore::Document::processHttpEquiv):
3981         (WebCore::Document::removePendingSheet):
3982         * history/CachedFrame.cpp:
3983         (WebCore::CachedFrameBase::CachedFrameBase):
3984         * history/PageCache.cpp:
3985         (WebCore::logCanCacheFrameDecision):
3986         (WebCore::PageCache::canCachePageContainingThisFrame):
3987         * html/HTMLFrameElementBase.cpp:
3988         (WebCore::HTMLFrameElementBase::isURLAllowed):
3989         * html/HTMLPlugInImageElement.cpp:
3990         (WebCore::HTMLPlugInImageElement::allowedToLoadFrameURL):
3991         * inspector/InspectorAgent.cpp:
3992         (WebCore::InspectorAgent::inspectedURL):
3993         * inspector/InspectorResourceAgent.cpp:
3994         (WebCore::buildObjectForFrame):
3995         * loader/DocumentWriter.cpp:
3996         (WebCore::DocumentWriter::replaceDocument):
3997         (WebCore::DocumentWriter::deprecatedFrameEncoding):
3998         * loader/FrameLoader.cpp:
3999         * loader/FrameLoader.h:
4000         * loader/HistoryController.cpp:
4001         (WebCore::HistoryController::updateForStandardLoad):
4002         (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
4003         (WebCore::HistoryController::updateForSameDocumentNavigation):
4004         * loader/NavigationScheduler.cpp:
4005         (WebCore::ScheduledHistoryNavigation::fire):
4006         (WebCore::NavigationScheduler::scheduleLocationChange):
4007         (WebCore::NavigationScheduler::scheduleRefresh):
4008         * page/FrameView.cpp:
4009         (WebCore::FrameView::updateControlTints):
4010         * page/Location.cpp:
4011         (WebCore::Location::url):
4012         (WebCore::Location::setProtocol):
4013         (WebCore::Location::setHost):
4014         (WebCore::Location::setHostname):
4015         (WebCore::Location::setPort):
4016         (WebCore::Location::setPathname):
4017         (WebCore::Location::setSearch):
4018         (WebCore::Location::setHash):
4019         (WebCore::Location::reload):
4020         * page/Page.cpp:
4021         (WebCore::Page::goToItem):
4022
4023 2011-01-27  Stephen White  <senorblanco@chromium.org>
4024
4025         Reviewed by Darin Adler.
4026
4027         Fix performance regression in ImageQualityController::objectDestroyed().
4028         https://bugs.webkit.org/show_bug.cgi?id=52645
4029
4030         In r72282, I inadvertently introduced this regression by using a
4031         linear search through the hash map on object destruction.  This was
4032         because the hash key consisted of both object pointer and layer id,
4033         but on object destruction we only know the object pointer, requiring
4034         a search to find all the layers. 
4035         By replacing the hash map with two nested hash maps, where the outer key
4036         is the object and the inner key is the layer, we can find all the
4037         relevant data for an object in one hash lookup.
4038
4039         * rendering/RenderBoxModelObject.cpp:
4040         Replace the (object,layer)->size HashMap with object->layer and
4041         layer->size HashMaps.
4042         (WebCore::ImageQualityController::isEmpty):
4043         Implement isEmpty() for the outer HashMap.
4044         (WebCore::ImageQualityController::removeLayer):
4045         When a layer is removed, remove it from the inner hash map.
4046         (WebCore::ImageQualityController::set):
4047         Implement set():  if the inner map exists, set the layer->size tuple
4048         directly.  If not, create a new inner map, set the tuple, and insert
4049         it in the outer map.
4050         (WebCore::ImageQualityController::objectDestroyed):
4051         Look up the object in the outer map only.
4052         (WebCore::ImageQualityController::highQualityRepaintTimerFired):
4053         Cosmetic changes for the renamed now-outer hash map.
4054         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
4055         Do both outer and inner hash map lookups.  Call set() to add/update
4056         entries to the hash maps.  keyDestroyed() is now removeLayer().
4057         (WebCore::imageQualityController):
4058         Make the ImageQualityController a file-static global, so it can be
4059         created and destroyed on the fly.
4060         (WebCore::RenderBoxModelObject::~RenderBoxModelObject):
4061         If there is no ImageQualityController, don't call objectDestroyed().
4062         If it's empty, delete it.
4063         * rendering/RenderImage.cpp:
4064         (WebCore::RenderImage::paintIntoRect):
4065         Also pass the Image* as the (void*) layer, since 0 is not a valid
4066         HashMap key.
4067
4068 2011-01-27  Adrienne Walker  <enne@google.com>
4069
4070         Reviewed by James Robinson.
4071
4072         [chromium] Tiled compositor crashes if compositing turned off mid-paint
4073         https://bugs.webkit.org/show_bug.cgi?id=53198
4074
4075         * platform/graphics/chromium/LayerRendererChromium.cpp:
4076         (WebCore::LayerRendererChromium::drawLayers):
4077         * platform/graphics/chromium/LayerTilerChromium.cpp:
4078         (WebCore::LayerTilerChromium::update):
4079         (WebCore::LayerTilerChromium::draw):
4080
4081 2011-01-27  Carol Szabo <carol.szabo@nokia.com>
4082
4083         Reviewed by David Hyatt.
4084
4085         A corrupted counter tree is created when renderers are added to the
4086         tree bypassing RenderObject::addChild
4087         https://bugs.webkit.org/show_bug.cgi?id=51270
4088
4089         No new tests. This patch reimplements the fix for bugs 43812 and
4090         51637 and hence all tests are already there as part of the original
4091         fixes for those bugs.
4092
4093         * rendering/RenderCounter.cpp:
4094         (WebCore::findPlaceForCounter):
4095         Removed old workaround as this patch hopefully fixes the real
4096         problem.
4097         * rendering/RenderObject.cpp:
4098         (WebCore::RenderObject::addChild):
4099         Removed call to counter updater as it was moved to a lower level.
4100         (WebCore::RenderObject::destroy):
4101         Moved attached counter nodes destruction to after the node is
4102         removed from the tree.
4103         * rendering/RenderObjectChildList.cpp:
4104         (WebCore::RenderObjectChildList::removeChildNode):
4105         (WebCore::RenderObjectChildList::appendChildNode):
4106         (WebCore::RenderObjectChildList::insertChildNode):
4107         Added notifications to the Counter system such that the
4108         CounterForest reflects the changes to the RendererTree.
4109         * rendering/RenderWidget.cpp:
4110         (WebCore::RenderWidget::destroy):
4111         Applied the same changes as for RenderObject::destroy()
4112         since RenderObject::destroy() is not called from here.
4113
4114 2011-01-27  Adam Roben  <aroben@apple.com>
4115
4116         Add WKCACFViewLayerTreeHost
4117
4118         This is a class that derives from CACFLayerTreeHost and uses a WKCACFView to render.
4119
4120         Fixes <http://webkit.org/b/53251> <rdar://problem/8925496> CACFLayerTreeHost should use
4121         WKCACFView for rendering
4122
4123         * WebCore.vcproj/WebCore.vcproj: Added WKCACFViewLayerTreeHost.{cpp,h}.
4124
4125         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
4126         (WebCore::CACFLayerTreeHost::acceleratedCompositingAvailable): Make the test window have a
4127         non-zero size. WKCACFView will always say it can't render if you pass it a 0-sized window,
4128         so we need a non-empty window to perform a valid test.
4129         (WebCore::CACFLayerTreeHost::create): First try to create a WKCACFViewLayerTreeHost, then
4130         fall back to a LegacyCACFLayerTreeHost.
4131         (WebCore::CACFLayerTreeHost::flushPendingLayerChangesNow): Moved code to react to the
4132         context flush from here...
4133         (WebCore::CACFLayerTreeHost::contextDidChange): ...to here. Derived classes are required to
4134         call this function whenever changes are flushed to the context.
4135
4136         * platform/graphics/ca/win/CACFLayerTreeHost.h: Added contextDidChange.
4137
4138         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp:
4139         (WebCore::LegacyCACFLayerTreeHost::createRenderer):
4140         (WebCore::LegacyCACFLayerTreeHost::resize):
4141         Changed to use flushContext instead of flushing the context manually so that we will always
4142         notify the base class when the context gets flushed.
4143
4144         (WebCore::LegacyCACFLayerTreeHost::flushContext): Added a call to contextDidChange so the
4145         base class will know what happened. Moved code to schedule a render from here...
4146         (WebCore::LegacyCACFLayerTreeHost::contextDidChange): ...to here.
4147
4148         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.h: Added contextDidChange.
4149
4150         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp: Added.
4151         (WebCore::WKCACFViewLayerTreeHost::create): If WebKitQuartzCoreAdditions, which provides
4152         WKCACFView, isn't present, bail. Otherwise allocate and return a new host.
4153         (WebCore::WKCACFViewLayerTreeHost::WKCACFViewLayerTreeHost): Initialize members.
4154         (WebCore::WKCACFViewLayerTreeHost::updateViewIfNeeded): Update the view if we previously
4155         marked that we needed to do so, and flush the context if our layer's bounds have changed.
4156         (WebCore::WKCACFViewLayerTreeHost::contextDidChangeCallback): Call through to
4157         contextDidChange.
4158         (WebCore::WKCACFViewLayerTreeHost::contextDidChange): Tell the WKCACFView to start rendering
4159         (if we didn't already), then call up to the base class.
4160         (WebCore::WKCACFViewLayerTreeHost::initializeContext): Set the context's user data, the
4161         view's layer, and hook up our "context did change" callback.
4162         (WebCore::WKCACFViewLayerTreeHost::resize): Mark that the view needs to be updated the next
4163         time we paint.
4164         (WebCore::WKCACFViewLayerTreeHost::createRenderer): Update our view and return whether it is
4165         able to render or not.
4166         (WebCore::WKCACFViewLayerTreeHost::destroyRenderer): Clear out all the info we passed down
4167         to the view.
4168         (WebCore::WKCACFViewLayerTreeHost::lastCommitTime): Call through to the view.
4169         (WebCore::WKCACFViewLayerTreeHost::flushContext): Ditto.
4170         (WebCore::WKCACFViewLayerTreeHost::paint): Update the view so it will draw at the right
4171         size, then call up to the base class.
4172         (WebCore::WKCACFViewLayerTreeHost::render): Invalidate the view using the passed-in dirty
4173         rects, then ask it to draw.
4174
4175         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.h: Copied from Source/WebCore/platform/graphics/ca/win/LegacyCACFLayerTreeHost.h.
4176
4177 2011-01-27  Adam Roben  <aroben@apple.com>
4178
4179         Move LegacyCACFLayerTreeHost into its own files
4180
4181         More preparation for <http://webkit.org/b/53251> <rdar://problem/8925496> CACFLayerTreeHost
4182         should use WKCACFView for rendering
4183
4184         Reviewed by Simon Fraser.
4185
4186         * WebCore.vcproj/WebCore.vcproj: Added LegacyCACFLayerTreeHost.{cpp,h}.
4187
4188         * platform/graphics/ca/win/CACFLayerTreeHost.cpp: Moved code from here to new files.
4189
4190         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp: Added.
4191         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.h: Added.
4192
4193 2011-01-27  Patrick Gansterer  <paroga@webkit.org>
4194
4195         Unreviewed WinCE build fix for r76824.
4196
4197         * platform/wince/DragDataWinCE.cpp:
4198         (WebCore::DragData::dragDataMap):
4199
4200 2011-01-27  Adam Roben  <aroben@apple.com>
4201