d6e7c0e6cb406da39a5683d88741ff1a986d14ee
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-08-17  David Grogan  <dgrogan@chromium.org>
2
3         Change references to leveldb.gyp to leveldatabase.gyp as part of the
4         leveldb refactoring going on in chromium: crbug.com/89378
5         https://bugs.webkit.org/show_bug.cgi?id=66332
6
7         Reviewed by Tony Gentilcore.
8
9         Tests: new-run-webkit-tests --debug --chromium --no-retry-failures --build-directory=llvm storage/indexeddb
10
11         * WebCore.gyp/WebCore.gyp:
12
13 2011-08-17  Hayato Ito  <hayato@chromium.org>
14
15         Implement proper handling of focus/blur events in regard to shadow DOM boundaries.
16         https://bugs.webkit.org/show_bug.cgi?id=61421
17
18         Reviewed by Dimitri Glazkov.
19
20         Introduces FocusEventDispatchMediator/BlurEventDispatchMediator so
21         that focus/blue events are stopped at the lowest common shadow boundary.
22
23         * dom/Document.cpp:
24         (WebCore::Document::setFocusedNode):
25         * dom/Event.cpp:
26         (WebCore::FocusEventDispatchMediator::create):
27         (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
28         (WebCore::FocusEventDispatchMediator::dispatchEvent):
29         (WebCore::BlurEventDispatchMediator::create):
30         (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
31         (WebCore::BlurEventDispatchMediator::dispatchEvent):
32         * dom/Event.h:
33         * dom/Node.cpp:
34         (WebCore::Node::dispatchFocusEvent):
35         (WebCore::Node::dispatchBlurEvent):
36         * dom/Node.h:
37         * html/HTMLFormControlElement.cpp:
38         (WebCore::HTMLFormControlElement::dispatchBlurEvent):
39         * html/HTMLFormControlElement.h:
40         * html/HTMLSelectElement.cpp:
41         (WebCore::HTMLSelectElement::dispatchFocusEvent):
42         (WebCore::HTMLSelectElement::dispatchBlurEvent):
43         * html/HTMLSelectElement.h:
44         * html/HTMLTextFormControlElement.cpp:
45         (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
46         (WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
47         * html/HTMLTextFormControlElement.h:
48         * page/FocusController.cpp:
49         (WebCore::dispatchEventsOnWindowAndFocusedNode):
50
51 2011-08-17  Ben Wells  <benwells@chromium.org>
52
53         Canvas fill and fillRect with SourceIn, DestinationIn, SourceOut, DestinationAtop and Copy have errors
54         https://bugs.webkit.org/show_bug.cgi?id=66036
55
56         These modes cannot be passed straight through to the underlying graphics context as the graphics context
57         and the HTML5 canvas spec have different interpretations to them. In the graphics context, the compositing
58         modes are applied just over the area being filled. In the HTML5 spec, the compositing modes are applied over
59         the entire canvas.
60
61         The SourceIn, DestinationIn, SourceOut, DestinationAtop and Copy modes all need some kind of extra action
62         to just performing the composited fill on the canvas, as they need t he canvas to be cleared outside of the 
63         area being filled.
64
65         Previous to this change the Copy mode did not do this clearing at all. The other modes did but if the
66         transformed path being filled contained anti-aliasing at its edges artifacts were introduced.
67
68         With this change, Copy now does a complete erase of the canvas before performing a fill as per normal.
69         The other modes use a temporary buffer just big enough for the transformed path (in device coordinates).
70         The fill is first done there in SourceOver mode. Then this is drawn into the canvas context using the
71         appropriate mode, with any areas outside the draw area being cleared.
72
73         Reviewed by James Robinson.
74
75         Test: fast/canvas/canvas-composite-transformclip.html
76
77         * html/HTMLCanvasElement.h:
78         * html/canvas/CanvasRenderingContext2D.cpp:
79         (WebCore::CanvasRenderingContext2D::fill):
80         (WebCore::CanvasRenderingContext2D::fillRect):
81         (WebCore::CanvasRenderingContext2D::clearCanvas):
82         (WebCore::CanvasRenderingContext2D::transformAreaToDevice):
83         (WebCore::CanvasRenderingContext2D::fillAndDisplayTransparencyElsewhere):
84         * html/canvas/CanvasRenderingContext2D.h:
85         * platform/graphics/skia/ImageBufferSkia.cpp:
86         (WebCore::ImageBuffer::ImageBuffer):
87
88 2011-08-17  Emil A Eklund  <eae@chromium.org>
89
90         Switch inspector to to new layout types
91         https://bugs.webkit.org/show_bug.cgi?id=66358
92
93         Reviewed by Eric Seidel.
94
95         Convert inspector code to new layout abstraction as a part of the ongoing
96         conversion work.
97
98         No new tests, no new functionality.
99
100         * inspector/DOMNodeHighlighter.cpp:
101         (WebCore::DOMNodeHighlighter::drawNodeHighlight):
102         * inspector/InspectorInstrumentation.cpp:
103         (WebCore::InspectorInstrumentation::willPaintImpl):
104         * inspector/InspectorInstrumentation.h:
105         (WebCore::InspectorInstrumentation::willPaint):
106         * inspector/InspectorTimelineAgent.cpp:
107         (WebCore::InspectorTimelineAgent::willPaint):
108         * inspector/InspectorTimelineAgent.h:
109         * inspector/TimelineRecordFactory.cpp:
110         (WebCore::TimelineRecordFactory::createPaintData):
111         * inspector/TimelineRecordFactory.h:
112
113 2011-08-17  Levi Weintraub  <leviw@chromium.org>
114
115         Switch Editing code to new layout types
116         https://bugs.webkit.org/show_bug.cgi?id=66355
117
118         Reviewed by Eric Seidel.
119
120         Converting remaining editing code to the LayoutUnit abstraction.
121
122         No new tests, no change in functionality.
123
124         * editing/Editor.cpp:
125         (WebCore::Editor::rangeForPoint):
126         (WebCore::Editor::insideVisibleArea):
127         (WebCore::Editor::countMatchesForText):
128         * editing/Editor.h:
129         * editing/mac/FrameSelectionMac.mm:
130         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
131
132 2011-08-17  Levi Weintraub  <leviw@chromium.org>
133
134         Switch Accessibility code to new layout types
135         https://bugs.webkit.org/show_bug.cgi?id=66348
136
137         Reviewed by Eric Seidel.
138
139         Converting remaining Accessibility code to the LayoutUnit abstraction.
140
141         No new tests, no change in functionality
142
143         * accessibility/AccessibilityImageMapLink.cpp:
144         (WebCore::AccessibilityImageMapLink::elementRect):
145         * accessibility/AccessibilityImageMapLink.h:
146         * accessibility/AccessibilityListBox.cpp:
147         (WebCore::AccessibilityListBox::elementAccessibilityHitTest):
148         * accessibility/AccessibilityListBox.h:
149         * accessibility/AccessibilityListBoxOption.cpp:
150         (WebCore::AccessibilityListBoxOption::elementRect):
151         * accessibility/AccessibilityListBoxOption.h:
152         * accessibility/AccessibilityMenuListOption.cpp:
153         (WebCore::AccessibilityMenuListOption::elementRect):
154         * accessibility/AccessibilityMenuListOption.h:
155         (WebCore::AccessibilityMenuListOption::size):
156         * accessibility/AccessibilityMenuListPopup.h:
157         (WebCore::AccessibilityMenuListPopup::elementRect):
158         (WebCore::AccessibilityMenuListPopup::size):
159         * accessibility/AccessibilityObject.cpp:
160         (WebCore::AccessibilityObject::clickPoint):
161         (WebCore::AccessibilityObject::orientation):
162         (WebCore::AccessibilityObject::elementAccessibilityHitTest):
163         * accessibility/AccessibilityObject.h:
164         (WebCore::AccessibilityObject::accessibilityHitTest):
165         (WebCore::AccessibilityObject::boundingBoxRect):
166         (WebCore::AccessibilityObject::size):
167         (WebCore::AccessibilityObject::boundsForVisiblePositionRange):
168         (WebCore::AccessibilityObject::doAXBoundsForRange):
169         * accessibility/AccessibilityRenderObject.cpp:
170         (WebCore::AccessibilityRenderObject::isOffScreen):
171         (WebCore::AccessibilityRenderObject::boundingBoxRect):
172         (WebCore::AccessibilityRenderObject::checkboxOrRadioRect):
173         (WebCore::AccessibilityRenderObject::elementRect):
174         (WebCore::AccessibilityRenderObject::size):
175         (WebCore::AccessibilityRenderObject::clickPoint):
176         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
177         (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
178         (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
179         (WebCore::AccessibilityRenderObject::doAXBoundsForRange):
180         * accessibility/AccessibilityRenderObject.h:
181         * accessibility/AccessibilityScrollView.cpp:
182         (WebCore::AccessibilityScrollView::accessibilityHitTest):
183         (WebCore::AccessibilityScrollView::elementRect):
184         * accessibility/AccessibilityScrollView.h:
185         * accessibility/AccessibilityScrollbar.cpp:
186         (WebCore::AccessibilityScrollbar::elementRect):
187         * accessibility/AccessibilityScrollbar.h:
188         * accessibility/AccessibilitySlider.cpp:
189         (WebCore::AccessibilitySliderThumb::elementRect):
190         (WebCore::AccessibilitySliderThumb::size):
191         * accessibility/AccessibilitySlider.h:
192         * accessibility/AccessibilityTableColumn.cpp:
193         (WebCore::AccessibilityTableColumn::elementRect):
194         (WebCore::AccessibilityTableColumn::size):
195         * accessibility/AccessibilityTableColumn.h:
196         * accessibility/AccessibilityTableHeaderContainer.cpp:
197         (WebCore::AccessibilityTableHeaderContainer::elementRect):
198         (WebCore::AccessibilityTableHeaderContainer::size):
199         * accessibility/AccessibilityTableHeaderContainer.h:
200         * accessibility/mac/AccessibilityObjectWrapper.mm:
201         (-[AccessibilityObjectWrapper position]):
202         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
203         (-[AccessibilityObjectWrapper accessibilityShowContextMenu]):
204
205 2011-08-17  Emil A Eklund  <eae@chromium.org>
206
207         Switch focus handling to to new layout types
208         https://bugs.webkit.org/show_bug.cgi?id=66331
209
210         Reviewed by Eric Seidel.
211
212         Convert FocusController and SpatialNavigation to new layout abstraction
213         as a part of the ongoing conversion work.
214
215         No new tests, no new functionality.
216
217         * page/FocusController.cpp:
218         (WebCore::updateFocusCandidateIfNeeded):
219         (WebCore::FocusController::findFocusCandidateInContainer):
220         (WebCore::FocusController::advanceFocusDirectionallyInContainer):
221         (WebCore::FocusController::advanceFocusDirectionally):
222         * page/FocusController.h:
223         * page/SpatialNavigation.cpp:
224         (WebCore::alignmentForRects):
225         (WebCore::start):
226         (WebCore::middle):
227         (WebCore::end):
228         (WebCore::areRectsFullyAligned):
229         (WebCore::areRectsPartiallyAligned):
230         (WebCore::areRectsMoreThanFullScreenApart):
231         (WebCore::below):
232         (WebCore::rightOf):
233         (WebCore::isRectInDirection):
234         (WebCore::hasOffscreenRect):
235         (WebCore::scrollInDirection):
236         (WebCore::deflateIfOverlapped):
237         (WebCore::canScrollInDirection):
238         (WebCore::rectToAbsoluteCoordinates):
239         (WebCore::nodeRectInAbsoluteCoordinates):
240         (WebCore::frameRectInAbsoluteCoordinates):
241         (WebCore::entryAndExitPointsForDirection):
242         (WebCore::distanceDataForNode):
243         (WebCore::canBeScrolledIntoView):
244         (WebCore::virtualRectForDirection):
245         (WebCore::virtualRectForAreaElementAndDirection):
246         * page/SpatialNavigation.h:
247
248 2011-08-17  Levi Weintraub  <leviw@chromium.org>
249
250         Switch Document, DocumentMarker, Clipboard, and Range to new layout types
251         https://bugs.webkit.org/show_bug.cgi?id=66330
252
253         Reviewed by Eric Seidel.
254
255         Converting the remaining DOM classes to use the LayoutUnit abstraction.
256
257         No new tests, no new behavior.
258
259         * dom/Clipboard.h:
260         (WebCore::Clipboard::dragLocation):
261         * dom/Document.cpp:
262         (WebCore::Document::nodesFromRect):
263         (WebCore::nodeFromPoint):
264         (WebCore::Document::caretRangeFromPoint):
265         (WebCore::Document::prepareMouseEvent):
266         * dom/Document.h:
267         * dom/DocumentMarkerController.cpp:
268         (WebCore::DocumentMarkerController::markerContainingPoint):
269         (WebCore::DocumentMarkerController::renderedRectsForMarkers):
270         (WebCore::DocumentMarkerController::invalidateRenderedRectsForMarkersInRect):
271         * dom/DocumentMarkerController.h:
272         * dom/Range.cpp:
273         (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoomAndPageScale):
274         * dom/RenderedDocumentMarker.h:
275         (WebCore::RenderedDocumentMarker::contains):
276         (WebCore::RenderedDocumentMarker::setRenderedRect):
277         (WebCore::RenderedDocumentMarker::renderedRect):
278         (WebCore::RenderedDocumentMarker::invalidMarkerRect):
279         (WebCore::RenderedDocumentMarker::invalidate):
280
281 2011-08-17  Dan Bernstein  <mitz@apple.com>
282
283         Removed an unused setting.
284
285         Reviewed by Anders Carlsson.
286
287         * WebCore.exp.in:
288         * page/Settings.cpp:
289         (WebCore::Settings::Settings): Removed initializer for m_needsTigerMailQuirks.
290         * page/Settings.h: Removed accessors.
291
292 2011-08-17  Oliver Hunt  <oliver@apple.com>
293
294         Move towards supporting user controlled prototypes on CanvasPixelArray
295         https://bugs.webkit.org/show_bug.cgi?id=66429
296
297         Reviewed by Gavin Barraclough.
298
299         Start using a per-global object structure for canvas pixel array.
300
301         * bindings/js/JSImageDataCustom.cpp:
302         (WebCore::toJS):
303
304 2011-08-17  Luke Macpherson   <macpherson@chromium.org>
305
306         Support cast from CSSPrimitiveValue to unsigned, and use in appropriate places in CSSStyleSelector::applyProperty
307         https://bugs.webkit.org/show_bug.cgi?id=66281
308
309         Reviewed by Eric Seidel.
310
311         No new tests - refactoring only.
312
313         The return if type!=CSS_NUMBER case becomes an ASSERT because it is unreachable unless there is an error in the parser.
314
315         * css/CSSPrimitiveValueMappings.h:
316         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
317         Support cast from unsigned to CSSPrimitiveValue
318         (WebCore::CSSPrimitiveValue::operator unsigned):
319         Support cast from CSSPrimitiveValue to unsigned
320         * css/CSSStyleSelector.cpp:
321         (WebCore::CSSStyleSelector::applyProperty):
322         Use HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro for CSSPropertyWebkitBoxFlex,
323         CSSPropertyWebkitBoxFlexGroup and CSSPropertyWebkitBoxOrdinalGroup properties.
324
325 2011-08-17  Scott Byer  <scottbyer@chromium.org>
326
327         ScrollAnimatorNone: Remove unused field
328         https://bugs.webkit.org/show_bug.cgi?id=66312
329
330         Reviewed by Adam Barth.
331
332         No functional change; no test needed.
333
334         * platform/ScrollAnimatorNone.cpp:
335         (WebCore::ScrollAnimatorNone::PerAxisData::updateDataFromParameters):
336         (WebCore::ScrollAnimatorNone::scroll):
337         * platform/ScrollAnimatorNone.h:
338
339 2011-08-17  Jeff Miller  <jeffm@apple.com>
340
341         Work-in-progress on Soft link against AVFoundationCF and CoreMedia
342         https://bugs.webkit.org/show_bug.cgi?id=65725
343         
344         Don't bother with SOFT_LINK_LIBRARY(libdispatch), we're going to continue to statically link to it since
345         the DLL will have already been loaded by other parts of AAS and is guaranteed to be available if AVFoundation
346         is enabled.
347
348         Reviewed by Anders Carlsson.
349
350         No new tests; no functional change.
351
352         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Removed SOFT_LINK_DEBUG_LIBRARY(libdispatch) and SOFT_LINK_LIBRARY(libdispatch).
353         (WebCore::MediaPlayerPrivateAVFoundationCF::isAvailable): Don't check for libdispatch.
354
355 2011-08-17  Brady Eidson  <beidson@apple.com>
356
357         https://bugs.webkit.org/show_bug.cgi?id=66354 and <rdar://problem/9965209>
358         Regression:  On Lion, redirects lose HTTP authentication headers
359
360         Reviewed by Alexey Proskuryakov and Darin Adler.
361
362         This changes makes WebCore try to apply basic credentials after a redirect if the redirect is to the same origin,
363         assuming the redirected URL did not contain credentials directly.
364
365         Tests: http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin.html
366                http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin.html
367                http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html
368
369         * platform/network/cf/ResourceHandleCFNet.cpp:
370         (WebCore::applyBasicAuthorizationHeader): Apply the user/password from a credential to the HTTP headers for a request.
371         (WebCore::ResourceHandle::createCFURLConnection): Use the applyBasicAuthorizationHeader helper.
372         (WebCore::ResourceHandle::willSendRequest): If this is a redirect within the same origin, apply any stored target credentials to the new request.
373
374         * platform/network/mac/ResourceHandleMac.mm:
375         (WebCore::applyBasicAuthorizationHeader): Apply the user/password from a credential to the HTTP headers for a request.
376         (WebCore::ResourceHandle::createNSURLConnection): Use the applyBasicAuthorizationHeader helper.
377         (WebCore::ResourceHandle::willSendRequest): If this is a redirect within the same origin, apply any stored target credentials to the new request.
378
379 2011-08-17  Chris Fleizach  <cfleizach@apple.com>
380
381         Accessibility stack exhaustion using role attribute
382         https://bugs.webkit.org/show_bug.cgi?id=65174
383
384         Reviewed by Darin Adler.
385
386         Forgot to commit review comments.
387
388         * accessibility/AccessibilityRenderObject.cpp:
389         (WebCore::AccessibilityRenderObject::remapAriaRoleDueToParent):
390
391 2011-08-17  Chris Fleizach  <cfleizach@apple.com>
392
393         Accessibility stack exhaustion using role attribute
394         https://bugs.webkit.org/show_bug.cgi?id=65174
395
396         Make sure we do not call accessibilityIsIgnored() during the AccessibilityObject
397         creation flow. That can lead to loops.
398    
399         Reviewed by Darin Adler.
400
401         Tests: accessibility/crash-determining-aria-role-when-label-present.html
402
403         * accessibility/AccessibilityObject.cpp:
404         (WebCore::createARIARoleMap):
405         * accessibility/AccessibilityRenderObject.cpp:
406         (WebCore::AccessibilityRenderObject::remapAriaRoleDueToParent):
407         (WebCore::AccessibilityRenderObject::determineAriaRoleAttribute):
408         * accessibility/AccessibilityRenderObject.h:
409
410 2011-08-17  James Robinson  <jamesr@chromium.org>
411
412         [chromium] Crash if compositing is disabled during updateLayers()
413         https://bugs.webkit.org/show_bug.cgi?id=66353
414
415         Reviewed by Kenneth Russell.
416
417         If compositing is turned off during LayerRendererChromium::updateLayers(), the rootLayer() will become null.
418         Sicne CCLayerTreeHost::doComposite() calls updateLayers() and then drawLayers() without checking for this case,
419         drawLayers() has to return without doing anything if the root layer is null.
420
421         Crash fixed based on crash reports.  No known reliably repro case, unfortunately.
422
423         * platform/graphics/chromium/LayerRendererChromium.cpp:
424         (WebCore::LayerRendererChromium::drawLayers):
425
426 2011-08-17  Dan Bernstein  <mitz@apple.com>
427
428         <rdar://problem/9971293> Mid-word breaks can occur in the middle of a surrogate pair
429         https://bugs.webkit.org/show_bug.cgi?id=66402
430
431         Reviewed by Dave Hyatt.
432
433         Test: fast/text/midword-break-before-surrogate-pair-2.html
434
435         * rendering/RenderBlockLineLayout.cpp:
436         (WebCore::RenderBlock::LineBreaker::nextLineBreak): Just never allow a mid-word
437         break before a trailing surrogate.
438
439 2011-08-16  Chang Shu  <cshu@webkit.org>
440
441         Support reset in WebCore::Internals
442         https://bugs.webkit.org/show_bug.cgi?id=66307
443
444         Reviewed by Dimitri Glazkov.
445
446         New tests will be added when function reset is implemented.
447
448         Added framework code in WebCoreTestSupport. The real implementation of
449         Internals::reset() depends on the need from the settings that require a reset.
450
451         * testing/Internals.cpp:
452         (WebCore::Internals::reset):
453         * testing/Internals.h:
454         * testing/js/WebCoreTestSupport.cpp:
455         (WebCoreTestSupport::resetInternalsObject):
456         * testing/js/WebCoreTestSupport.h:
457         * testing/v8/WebCoreTestSupport.cpp:
458         (WebCoreTestSupport::resetInternalsObject):
459         * testing/v8/WebCoreTestSupport.h:
460
461 2011-08-17  Tony Chang  <tony@chromium.org>
462
463         Fix chromium mac compile.  MediaPlayerPrivateAVFoundationObjC.* moved
464         and the WebCore.gypi file wasn't updated.
465
466         * WebCore.gypi:
467
468 2011-08-17  Abhishek Arya  <inferno@chromium.org>
469
470         Crash in Document::recalcStyleSelector
471         https://bugs.webkit.org/show_bug.cgi?id=66335
472
473         Reviewed by Simon Fraser.
474
475         When node is getting destroyed and its removedFromDocument
476         is not called due to entire document structure torn down(using
477         removeAllChildren), make sure to clear out the stylesheet
478         candidate node from document's structures in its destructor.
479
480         Test: svg/dom/stylesheet-candidate-node-crash-main.html
481
482         * dom/ProcessingInstruction.cpp:
483         (WebCore::ProcessingInstruction::~ProcessingInstruction):
484         * html/HTMLLinkElement.cpp:
485         (WebCore::HTMLLinkElement::~HTMLLinkElement):
486         * html/HTMLStyleElement.cpp:
487         (WebCore::HTMLStyleElement::~HTMLStyleElement):
488         * svg/SVGStyleElement.cpp:
489         (WebCore::SVGStyleElement::~SVGStyleElement):
490
491 2011-08-17  Sam White  <samuel.white@rochester.edu>
492
493         AccessibilityObject levels are inconsistent
494         https://bugs.webkit.org/show_bug.cgi?id=66180
495         
496         Updated accessibilityTable to return level values consistent with other accessibilityObjects that
497         return level values. This means a value of 0 is now only returned when tableLevel() is called on a
498         non-table element.
499
500         Reviewed by Chris Fleizach.
501
502         Test: platform/mac/accessibility/element-level.html
503
504         * accessibility/AccessibilityTable.cpp:
505         (WebCore::AccessibilityTable::tableLevel):
506         * accessibility/mac/AccessibilityObjectWrapper.mm:
507         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
508
509 2011-08-17  Ryosuke Niwa  <rniwa@webkit.org>
510
511         An arrow key collapses directionless selection range in the wrong direction in BiDi
512         https://bugs.webkit.org/show_bug.cgi?id=64626
513
514         Reviewed by Darin Adler.
515
516         The bug was caused by willBeModified's always using block direction to determine
517         the direction to which the selection is collapsed. Fixed the bug by calling directionOfSelection
518         in willBeModified, which will return the text direction of the surrounding context when
519         the start and the end have the same direction. When the text directions at the start and at the end
520         of selection do not match, it uses the block's text direction.
521
522         Test: editing/selection/collapse-selection-in-bidi.html
523
524         * editing/FrameSelection.cpp:
525         (WebCore::FrameSelection::directionOfSelection): Added.
526         (WebCore::FrameSelection::willBeModified): Calls directionOfSelection.
527         (WebCore::FrameSelection::modifyMovingRight): Ditto.
528         (WebCore::FrameSelection::modifyMovingLeft): Ditto.
529         * editing/FrameSelection.h:
530
531 2011-08-17  Jeff Miller  <jeffm@apple.com>
532
533         Some AVFoundation source files should be in platform-specific directories
534         https://bugs.webkit.org/show_bug.cgi?id=66352
535         
536         Moved platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.* files to platform/graphics/avfoundation/cf,
537         and moved platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.* files to platform/graphics/avfoundation/objc/.
538         
539         While I was at it, added svn:eol-style property to the MediaPlayerPrivateAVFoundationObjC.* files.
540         
541         Also, for some reason, Visual Studio decided to re-sort a couple files in \inspector\front-end\ in WebCore.vcproj, even though
542         I just re-sorted the project in r93215.
543
544         Reviewed by Eric Carlson.
545
546         No new tests; no functional change.
547
548         * WebCore.vcproj/WebCore.vcproj: Moved platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.* files to platform/graphics/avfoundation/cf.
549
550         * WebCore.vcproj/WebCoreMediaQT.vsprops: Added $(ProjectDir)..\platform\graphics\avfoundation\cf to include paths.
551
552         * WebCore.xcodeproj/project.pbxproj: Moved platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.* files to platform/graphics/avfoundation/objc/.
553
554         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.cpp: Removed.
555         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.h: Removed.
556         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h: Removed.
557         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm: Removed.
558
559         * platform/graphics/avfoundation/cf: Added.
560         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Copied from Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.cpp.
561         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: Copied from Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.h.
562
563         * platform/graphics/avfoundation/objc: Added.
564         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: Copied from Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h.
565         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: Copied from Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm.
566
567 2011-08-17  Luke Macpherson   <macpherson@chromium.org>
568
569         Only set m_fontDirty if TextSizeAdjust is actually changed.
570         https://bugs.webkit.org/show_bug.cgi?id=66022
571
572         Reviewed by Darin Adler.
573
574         No new tests. Refactoring only.
575
576         Reduces instances where the font information is dirtied to save recalculation where it is not necessary.
577
578         * css/CSSStyleSelector.cpp:
579         (WebCore::CSSStyleSelector::applyProperty):
580         Call new setTextSizeAdjust function.
581         * css/CSSStyleSelector.h:
582         (WebCore::CSSStyleSelector::setTextSizeAdjust):
583         Add wrapper for RenderStyle::setTextSizeAdjust() that automatically updates m_fontDirty.
584         * rendering/style/RenderStyle.h:
585         (WebCore::RenderStyle::setTextSizeAdjust):
586         Make setTextSizeAdjust return true if the unlderlying value was changed.
587
588 2011-08-17  Kenichi Ishibashi  <bashi@chromium.org>
589
590         [Chromium] Crash in HarfbuzzFace::~HarfbuzzFace
591         https://bugs.webkit.org/show_bug.cgi?id=66211
592
593         Holds Skia's unique font ID instead of FontPlatformData to avoid accessing freed FontPlatformData.
594
595         Reviewed by Tony Chang.
596
597         No new tests; no functional change.
598
599         * platform/graphics/chromium/HarfbuzzSkia.cpp:
600         (WebCore::releaseCachedHarfbuzzFace): Changed the argument.
601         (WebCore::HarfbuzzFace::HarfbuzzFace): Changed to have Skia's font uniqueID instead of FontPlatformData.
602         (WebCore::HarfbuzzFace::~HarfbuzzFace): Uses m_uniqueID to call releaseCachedHarfbuzzFace.
603         * platform/graphics/chromium/HarfbuzzSkia.h:
604
605 2011-08-17  Jeff Miller  <jeffm@apple.com>
606
607         Re-sort the WebCore project with Visual Studio after recent changes that I assume were done by manually editing the XML.
608
609         * WebCore.vcproj/WebCore.vcproj:
610
611 2011-08-17  Sailesh Agrawal  <sail@chromium.org>
612
613         Chromium Mac: Fix implementation of wkScrollbarMinimumTotalLengthNeededForThumb to match WebKitSystemInterface
614         https://bugs.webkit.org/show_bug.cgi?id=66311
615
616         Reviewed by Dimitri Glazkov.
617
618         Updated wkScrollbarMinimumTotalLengthNeededForThumb() based on the latest disassembly of libWebKitSystemInterfaceLion.a.
619
620         * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm:
621         (wkScrollbarMinimumTotalLengthNeededForThumb):
622
623 2011-08-17  Steve Block  <steveblock@google.com>
624
625         Unreviewed, rolling out r93186.
626         http://trac.webkit.org/changeset/93186
627         https://bugs.webkit.org/show_bug.cgi?id=66114
628
629         Breaks LayoutTests on Chromium canary bots
630
631         * platform/graphics/chromium/LayerChromium.h:
632         * platform/graphics/chromium/LayerRendererChromium.cpp:
633         (WebCore::LayerRendererChromium::updateLayers):
634         (WebCore::LayerRendererChromium::drawLayersInternal):
635         (WebCore::LayerRendererChromium::drawLayer):
636         * platform/graphics/chromium/cc/CCLayerImpl.h:
637
638 2011-08-17  Ryosuke Niwa  <rniwa@webkit.org>
639
640         Get rid of calls to deprecatedNode and deprecatedEditingOffset in
641         AccessibilityRenderObject.cpp and InsertTextCommand.cpp
642         https://bugs.webkit.org/show_bug.cgi?id=66014
643
644         Reviewed by Hajime Morita.
645
646         Removed calls to deprecatedNode and deprecatedEditingOffsets in the following files.
647
648         * accessibility/AccessibilityRenderObject.cpp:
649         (WebCore::AccessibilityRenderObject::indexForVisiblePosition): Calls Position::rootEditableElement
650         and Range::setEnd(const Position&, ExceptionCode) instead of manually pulling deprecatedNode
651         and deprecatedEditingOffset.
652         (WebCore::AccessibilityRenderObject::index): Abstracted the logic to loop through render objects
653         from deprecatedNodes' renderer to m_renderer as renderObjectContainsPosition.
654         * dom/Position.h:
655         (WebCore::Position::rootEditableElement): Added.
656         * dom/Range.cpp:
657         (WebCore::Range::setStart): Added.
658         (WebCore::Range::setEnd): Added.
659         * dom/Range.h:
660         * editing/InsertTextCommand.cpp:
661         (WebCore::InsertTextCommand::insertTab):
662         * editing/RenderedPosition.cpp:
663         (WebCore::renderObjectContainsPosition): Extracted from AccessibilityRenderObject::index.
664         * editing/RenderedPosition.h:
665
666 2011-08-17  Sailesh Agrawal  <sail@chromium.org>
667
668         Chromium Mac: Fix issue where scrollbar wouldn't be drawn until page finished loading
669         https://bugs.webkit.org/show_bug.cgi?id=66238
670
671         Reviewed by Dimitri Glazkov.
672
673         Overlay scrollbars were not visible if the user scrolled a page while the page was loading. The sequence of events necessary to reproduce this bug were:
674           1. -[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:] is called
675           2. animation is delayed because shouldSuspendScrollAnimations() is true
676           3. ScrollAnimatorChromiumMac::scroll() is called before the ScrollAnimatorChromiumMac::m_initialScrollbarPaintTimer is fired.
677           4. At this point the scrollbar painter assumes the scrollbar is already visible (because of 1.) so the scrollbar's alpha stays at 0. Thus the scrollbar isn't visible until the page finishes loading.
678         It turns out that the root problem was that when the initialScrollbarPainterTimer fired I wasn't flashing the scrollbar correctly. My implementation of wkScrollbarPainterForceFlashScrollers() just called flashScrollers. The Safari implementation of this function also calls hideOverlayScrollers. Calling hideOverlayScrollers causes the alpha to change to 0 which prevents step 4 from happening.
679
680         Also, now that wkScrollbarPainterForceFlashScrollers is working correctly I don't need the extra logic I added to the initialScrollbarPainterTimer handler. That logic restarted the timer if shouldSuspendScrollAnimations() was true. But this isn't necessary since calling wkScrollbarPainterForceFlashScrollers() causes -[ScrollbarPainterDelegate setUpAnimation:...] to be called which does the exact same thing. Removing the extra logic reverts http://trac.webkit.org/changeset/92316.
681
682         * platform/chromium/ScrollAnimatorChromiumMac.mm:
683         (WebCore::ScrollAnimatorChromiumMac::initialScrollbarPaintTimerFired):
684         * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm:
685         (wkScrollbarPainterForceFlashScrollers):
686
687 2011-08-16  Andrey Kosyakov  <caseq@chromium.org>
688
689         Web Inspector: maintain visible view hierarchy and dispatch common view events automatically
690         https://bugs.webkit.org/show_bug.cgi?id=66131
691
692         Reviewed by Pavel Feldman.
693
694         Test: inspector/view-events.html
695
696         - added a notion of an optional parent to a View
697         - maintain a list of View children
698         - dispatch common view events, such as show/hide/resize automatically through the hierarchy of visible views.
699         - promoted Panel's logic of (re)storing scroll positions to view
700         - demoted inheritScrollPositionFromView to a couple of views that need it.
701
702         * inspector/front-end/ApplicationCacheItemsView.js:
703         (WebInspector.ApplicationCacheItemsView.prototype.onResize):
704         * inspector/front-end/ConsoleView.js:
705         (WebInspector.ConsoleView.prototype.populateStatusBar):
706         (WebInspector.ConsoleView.prototype.elementsToRestoreScrollPositionsFor):
707         * inspector/front-end/CookieItemsView.js:
708         (WebInspector.CookieItemsView.prototype.onResize):
709         (WebInspector.SimpleCookiesTable.prototype.onResize):
710         * inspector/front-end/DOMStorageItemsView.js:
711         (WebInspector.DOMStorageItemsView.prototype.onResize):
712         * inspector/front-end/DetailedHeapshotView.js:
713         (WebInspector.DetailedHeapshotView.prototype.onResize):
714         * inspector/front-end/Drawer.js:
715         (WebInspector.Drawer.prototype.set visibleView):
716         (WebInspector.Drawer.prototype.show):
717         (WebInspector.Drawer.prototype.hide):
718         (WebInspector.Drawer.prototype.onResize):
719         (WebInspector.Drawer.prototype._animateDrawerHeight.animationFinished):
720         (WebInspector.Drawer.prototype._animateDrawerHeight):
721         (WebInspector.Drawer.prototype._statusBarDragging):
722         (WebInspector.Drawer.prototype._endStatusBarDragging):
723         * inspector/front-end/ElementsPanel.js:
724         (WebInspector.ElementsPanel.prototype.onResize):
725         * inspector/front-end/ExtensionPanel.js:
726         * inspector/front-end/FontView.js:
727         (WebInspector.FontView.prototype.onResize):
728         * inspector/front-end/IFrameView.js:
729         (WebInspector.IFrameView):
730         * inspector/front-end/NetworkItemView.js:
731         (WebInspector.NetworkItemView.prototype._installHighlightSupport):
732         * inspector/front-end/NetworkPanel.js:
733         (WebInspector.NetworkLogView):
734         (WebInspector.NetworkLogView.prototype.elementsToRestoreScrollPositionsFor):
735         (WebInspector.NetworkLogView.prototype.onResize):
736         (WebInspector.NetworkLogView.prototype.wasShown):
737         (WebInspector.NetworkLogView.prototype.willHide):
738         (WebInspector.NetworkPanel):
739         (WebInspector.NetworkPanel.prototype.show):
740         (WebInspector.NetworkPanel.prototype._showResource):
741         (WebInspector.NetworkPanel.prototype._closeVisibleResource):
742         * inspector/front-end/Panel.js:
743         (WebInspector.Panel.prototype.show):
744         (WebInspector.Panel.prototype.hide):
745         (WebInspector.Panel.prototype.performSearch.processChunk):
746         (WebInspector.Panel.prototype.performSearch):
747         (WebInspector.Panel.prototype.updateSidebarWidth):
748         * inspector/front-end/PanelEnablerView.js:
749         (WebInspector.PanelEnablerView.prototype.show):
750         (WebInspector.PanelEnablerView.prototype.onResize):
751         * inspector/front-end/ProfileView.js:
752         (WebInspector.CPUProfileView.prototype.onResize):
753         * inspector/front-end/ProfilesPanel.js:
754         (WebInspector.ProfilesPanel.prototype.updateMainViewWidth):
755         * inspector/front-end/ResourceCookiesView.js:
756         (WebInspector.ResourceCookiesView.prototype.onResize):
757         * inspector/front-end/ResourcePreviewView.js:
758         (WebInspector.ResourcePreviewView.prototype.contentLoaded):
759         * inspector/front-end/ResourceResponseView.js:
760         (WebInspector.ResourceResponseView.prototype.contentLoaded):
761         * inspector/front-end/ResourceTimingView.js:
762         (WebInspector.ResourceTimingView.prototype.show):
763         * inspector/front-end/ResourcesPanel.js:
764         (WebInspector.ResourcesPanel.prototype.show):
765         (WebInspector.ResourcesPanel.prototype._innerShowView):
766         (WebInspector.ResourcesPanel.prototype.closeVisibleView):
767         (WebInspector.ResourcesPanel.prototype.updateMainViewWidth):
768         (WebInspector.FrameResourceTreeElement.prototype._recreateSourceView):
769         * inspector/front-end/ScriptsPanel.js:
770         (WebInspector.ScriptsPanel.prototype.show):
771         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
772         (WebInspector.ScriptsPanel.prototype._removeSourceFrame):
773         (WebInspector.ScriptsPanel.prototype.setSidebarWidth):
774         * inspector/front-end/SourceFrame.js:
775         (WebInspector.SourceFrame):
776         (WebInspector.SourceFrame.prototype.show):
777         (WebInspector.SourceFrame.prototype.willHide):
778         (WebInspector.SourceFrame.prototype.clearMessages):
779         (WebInspector.SourceFrame.prototype._setTextViewerDecorations):
780         (WebInspector.SourceFrame.prototype.inheritScrollPositions):
781         * inspector/front-end/TabbedPane.js:
782         (WebInspector.TabbedPane.prototype.appendTab):
783         * inspector/front-end/TextViewer.js:
784         (WebInspector.TextViewer.prototype.elementsToRestoreScrollPositionsFor):
785         (WebInspector.TextViewer.prototype.inheritScrollPositions):
786         (WebInspector.TextViewer.prototype.onResize):
787         * inspector/front-end/TimelinePanel.js:
788         (WebInspector.TimelinePanel.prototype.onResize):
789         (WebInspector.TimelinePanel.prototype.elementsToRestoreScrollPositionsFor):
790         (WebInspector.TimelinePanel.prototype.show):
791         * inspector/front-end/View.js:
792         (WebInspector.View):
793         (WebInspector.View.prototype.wasShown):
794         (WebInspector.View.prototype.willHide):
795         (WebInspector.View.prototype._innerShow):
796         (WebInspector.View.prototype.show):
797         (WebInspector.View.prototype._innerHide):
798         (WebInspector.View.prototype.hide):
799         (WebInspector.View.prototype._detach):
800         (WebInspector.View.prototype.elementsToRestoreScrollPositionsFor):
801         (WebInspector.View.prototype.storeScrollPositions):
802         (WebInspector.View.prototype.restoreScrollPositions):
803         (WebInspector.View.prototype.addChildView):
804         (WebInspector.View.prototype.removeChildView):
805         (WebInspector.View.prototype.onResize):
806         (WebInspector.View.prototype.doResize):
807         (WebInspector.View.prototype.dispatchToSelfAndVisibleChildren):
808         (WebInspector.View.prototype.dispatchToVisibleChildren):
809         * inspector/front-end/inspector.js:
810         (WebInspector.windowResize):
811
812 2011-08-16  Luke Macpherson   <macpherson@chromium.org>
813
814         Represent RenderStyle::textOverflow property using an enum instead of a bool.
815         https://bugs.webkit.org/show_bug.cgi?id=66356
816
817         Reviewed by Dan Bernstein.
818
819         No new tests - no behavioral changes.
820
821         * css/CSSPrimitiveValueMappings.h:
822         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
823         Support cast from TextOverflow to CSSPrimitiveValue.
824         (WebCore::CSSPrimitiveValue::operator TextOverflow):
825         Support cast from CSSPrimitiveValue to TextOverflow.
826         * css/CSSStyleSelector.cpp:
827         (WebCore::CSSStyleSelector::applyProperty):
828         Use HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro for text overflow.
829         * rendering/style/RenderStyle.h:
830         (WebCore::InheritedFlags::textOverflow):
831         Return TextOverflow enum.
832         (WebCore::InheritedFlags::setTextOverflow):
833         Accept TextOverflow enum parameter.
834         (WebCore::InheritedFlags::initialTextOverflow):
835         Return TextOverflowClip.
836         * rendering/style/RenderStyleConstants.h:
837         Define TextOverflow enum.
838         * rendering/style/StyleRareNonInheritedData.h:
839         Change representation of text overflow from bool to one-bit unsigned.
840
841 2011-08-16  Jeff Miller  <jeffm@apple.com>
842
843         Apple's Windows production build should fail to compile if AVFoundation is not enabled
844         https://bugs.webkit.org/show_bug.cgi?id=66339
845         
846         Generate a compile-time error for Production builds if !USE(AVFOUNDATION).
847
848         Reviewed by Darin Adler.
849
850         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.cpp: Generate a compile-time error for Production builds if !USE(AVFOUNDATION).
851
852 2011-08-16  David Levin  <levin@chromium.org>
853
854         REGRESSION (r89086): All worker xhr requests trigger preflight requests.
855         https://bugs.webkit.org/show_bug.cgi?id=66340
856
857         Reviewed by Adam Barth.
858
859         Test coming in a more comprehensive patch shortly. This is just a very targetted
860         patch to allow for easier merging.
861
862         * loader/CrossOriginAccessControl.cpp:
863         (WebCore::isOnAccessControlSimpleRequestHeaderWhitelist): Add referer to the list
864         of whitelisted headers. It can't be set by xhr so it is ok to whitelist it, but it is
865         set before calling this function. This is similar to what is done for "origin" in here.
866
867 2011-08-16  Shawn Singh  <shawnsingh@chromium.org>
868
869         Computing screen-space transform for LayerChromium and CCLayerImpl
870         https://bugs.webkit.org/show_bug.cgi?id=66114
871
872         Reviewed by James Robinson.
873
874         Test: compositing/backface-visibility-hierarchical-transform.html
875
876         Added a data member to LayerChromium and CCLayerImpl that holds
877         the screen-space transform.   The transform is computed in
878         calculateDrawTransformsAndVisibility(), which is used during
879         updating (LayerChromium) and drawing (CCLayerImpl).  This transform
880         will also be used for other things, such as HUD drawing, in upcoming
881         patches.
882
883         Also fixed a FIXME in LayerRendererChromium::drawLayer, which
884         was not computing the entire hierarchy of transforms to determine
885         back-face visibility.  Now it simply uses the screen space transform.
886
887         * platform/graphics/chromium/LayerChromium.h:
888         (WebCore::LayerChromium::screenSpaceDrawTransform):
889         (WebCore::LayerChromium::setScreenSpaceDrawTransform):
890         * platform/graphics/chromium/LayerRendererChromium.cpp:
891         (WebCore::LayerRendererChromium::updateLayers):
892         (WebCore::LayerRendererChromium::drawLayersInternal):
893         (WebCore::LayerRendererChromium::drawLayer):
894         (WebCore::calculateDrawTransformsAndVisibility):
895         * platform/graphics/chromium/cc/CCLayerImpl.h:
896         (WebCore::CCLayerImpl::screenSpaceDrawTransform):
897         (WebCore::CCLayerImpl::setScreenSpaceDrawTransform):
898
899 2011-08-16  Hayato Ito  <hayato@chromium.org>
900
901         Implement proper handling of events which happen in children of shadow hosts.
902         https://bugs.webkit.org/show_bug.cgi?id=66285
903
904         Reviewed by Dimitri Glazkov.
905
906         Fix the issue where a shadow host stops an event propagation if an
907         event happens at the children of shadow hosts, outside of the shadow root.
908
909         Test: fast/dom/shadow/shadow-contents-event.html
910
911         * dom/EventDispatcher.cpp:
912         (WebCore::EventDispatcher::adjustToShadowBoundaries):
913
914 2011-08-16  Per-Erik Brodin  <per-erik.brodin@ericsson.com>
915
916         Make it possible to explicitly prevent a preflight via ThreadableLoaderOptions
917         https://bugs.webkit.org/show_bug.cgi?id=65694
918
919         Reviewed by Alexey Proskuryakov.
920
921         No new tests since there is no change in behavior.
922
923         * fileapi/FileReaderLoader.cpp:
924         (WebCore::FileReaderLoader::start):
925         * loader/DocumentThreadableLoader.cpp:
926         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
927         (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
928         * loader/ThreadableLoader.h:
929         (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions):
930         * notifications/Notification.cpp:
931         (WebCore::Notification::startLoading):
932         * xml/XMLHttpRequest.cpp:
933         (WebCore::XMLHttpRequest::createRequest):
934
935 2011-08-16  Scott Byer  <scottbyer@chromium.org>
936
937         Fix spelling error.
938         https://bugs.webkit.org/show_bug.cgi?id=66261
939
940         Reviewed by Adam Barth.
941
942         No functional change, no tests needed.
943
944         * platform/ScrollAnimator.cpp:
945         (WebCore::ScrollAnimator::scroll):
946         (WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation):
947         (WebCore::ScrollAnimator::notifyPositionChanged):
948         * platform/ScrollAnimator.h:
949         * platform/ScrollAnimatorNone.cpp:
950         (WebCore::ScrollAnimatorNone::scrollToOffsetWithoutAnimation):
951         (WebCore::ScrollAnimatorNone::animationTimerFired):
952         * platform/ScrollAnimatorWin.cpp:
953         (WebCore::ScrollAnimatorWin::scrollToOffsetWithoutAnimation):
954         (WebCore::ScrollAnimatorWin::animateScroll):
955         * platform/chromium/ScrollAnimatorChromiumMac.h:
956         * platform/chromium/ScrollAnimatorChromiumMac.mm:
957         (WebCore::ScrollAnimatorChromiumMac::immediateScrollToPoint):
958         (WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaX):
959         (WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaY):
960         (WebCore::ScrollAnimatorChromiumMac::notifyPositionChanged):
961         * platform/mac/ScrollAnimatorMac.h:
962         * platform/mac/ScrollAnimatorMac.mm:
963         (WebCore::ScrollAnimatorMac::immediateScrollToPoint):
964         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaX):
965         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaY):
966         (WebCore::ScrollAnimatorMac::notifyPositionChanged):
967
968 2011-08-16  Joseph Pecoraro  <joepeck@webkit.org>
969
970         ASSERT in fast/css/custom-font-xheight.html
971         https://bugs.webkit.org/show_bug.cgi?id=66328
972
973         Reviewed by Dan Bernstein.
974
975         In r93140 the temporary font created for a remote CSS font face
976         was created without being retained. We need to protect the
977         font from being purged while we hold onto it, so add a font cache
978         purge preventer.
979
980         * css/CSSFontFaceSource.cpp:
981         (WebCore::CSSFontFaceSource::getFontData):
982
983 2011-08-16  Joseph Pecoraro  <joepeck@webkit.org>
984
985         Unreviewed Chromium Windows build fix after r93140. Take 4.
986         Namespace the now public enum as FontCache::ShouldRetain.
987
988         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
989         (WebCore::GetLastResortFallbackFontProcData::GetLastResortFallbackFontProcData):
990
991 2011-08-15  Stephen White  <senorblanco@chromium.org>
992
993         Canvas resizing can be slow
994         https://bugs.webkit.org/show_bug.cgi?id=66251
995
996         Canvas resizing was slow due to re-allocation of the ImageBuffer on
997         each size change (width or height).  This was introduced inadvertently
998         by calls to isAccelerated() during canvas reset().  Since we won't 
999         know if we have successfully accelerated until ImageBuffer creation,
1000         move the compositor invalidation to createImageBuffer() as well.
1001         This patch also attempts to unify the Skia and CG accelerated canvas
1002         paths.  The DrawingBuffer used by the Skia path is now owned by 
1003         ImageBuffer[Skia], similar to how the IOSurface is owned by
1004         ImageBuffer[CG].  Some of the logic for when to accelerate was moved
1005         into HTMLCanvasElement and unified with the CG path.  Acceleration is
1006         also now enabled by the same "Accelerated" ImageBuffer create flag
1007         used by the CG path.  DrawingBuffer is now re-created even for a 
1008         same-size change (same as the memory buffer), but we speed it up
1009         by calling GraphicsContext3D::texImage2D() with a NULL pixels ptr
1010         instead of GraphicsContext3D::teximage2DResourceSafe() (no need to
1011         clear it, since it's done with a glClear anyway).
1012
1013         Reviewed by Kenneth Russell.
1014
1015         Covered by existing tests in fast/canvas and canvas/philip.
1016
1017         * html/HTMLCanvasElement.cpp:
1018         (WebCore::HTMLCanvasElement::reset):
1019         Don't call isAccelerated() from reset(), since we don't want to
1020         inadvertently create the ImageBuffer.  Also, since we won't know if
1021         we have successfully accelerated until createImageBuffer() is
1022         called, defer the compositor invalidation to createImageBuffer() as
1023         well.
1024         (WebCore::HTMLCanvasElement::shouldAccelerate):
1025         Unify the CG and Skia ports' logic for when to accelerate (Skia
1026         logic moved in from CanvasRenderingContext2D).
1027         (WebCore::HTMLCanvasElement::createImageBuffer):
1028         Use the unified shouldAccelerate() logic, and pass it as a flag
1029         to ImageBuffer.  Do compositor invalidation as well.
1030         * html/HTMLCanvasElement.h:
1031         (WebCore::HTMLCanvasElement::hasCreatedImageBuffer):
1032         Expose hasCreatedImageBuffer() publically, so
1033         CanvasRenderingContext2D::isAccelerated() doesn't inadvertently create
1034         it.
1035         * html/canvas/CanvasRenderingContext2D.cpp:
1036         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
1037         (WebCore::CanvasRenderingContext2D::~CanvasRenderingContext2D):
1038         Remove all acceleration setting and resetting, since it's now done
1039         during ImageBuffer creation.
1040         (WebCore::CanvasRenderingContext2D::isAccelerated):
1041         Check if the image buffer was created, so we don't inadvertently
1042         create it here.
1043         (WebCore::CanvasRenderingContext2D::paintsIntoCanvasBuffer):
1044         Don't call GraphicsContext3D::paintsIntoCanvasBuffer(), since its
1045         WebViewImpl may be null.  Ask the render tree instead.
1046         (WebCore::CanvasRenderingContext2D::reset):
1047         Don't reset acceleration here, since we don't own it anymore.
1048         (WebCore::CanvasRenderingContext2D::platformLayer):
1049         Call into the ImageBuffer to get our PlatformLayer.
1050         * html/canvas/CanvasRenderingContext2D.h:
1051         Remove m_drawingBuffer, and all acceleration-related calls.
1052         * platform/graphics/GraphicsContext.cpp:
1053         * platform/graphics/GraphicsContext.h:
1054         Remove setGraphicsContext3D(), and paintsIntoImageBuffer().
1055         * platform/graphics/ImageBuffer.cpp:
1056         (WebCore::ImageBuffer::platformLayer):
1057         Implement a dummy platformLayer() call for non-skia ports.
1058         * platform/graphics/ImageBuffer.h:
1059         Declare a platformLayer() call (USE(ACCELERATED_COMPOSITING) only).
1060         * platform/graphics/chromium/ImageBufferDataSkia.h:
1061         Add a DrawingBuffer data member.
1062         * platform/graphics/gpu/DrawingBuffer.cpp:
1063         (WebCore::DrawingBuffer::reset):
1064         Use texImage2D() with a NULL ptr, not texImage2DResourceSafe().
1065         Since we immediately clear the framebuffer via glClear(), this whole
1066         resource safe business is overkill.
1067         * platform/graphics/skia/GraphicsContextSkia.cpp:
1068         Remove setGraphicsContext3D() and paintsIntoImageBuffer().  This
1069         functionality is handled by ImageBuffer now.
1070         * platform/graphics/skia/ImageBufferSkia.cpp:
1071         (WebCore::ImageBuffer::ImageBuffer):
1072         Give the ImageBufferData ownership of the DrawingBuffer.
1073         (WebCore::ImageBuffer::platformLayer):
1074         Implement an accessor for the DrawingBuffer's PlatformLayer.
1075         * platform/graphics/skia/PlatformContextSkia.cpp:
1076         (WebCore::PlatformContextSkia::setGraphicsContext3D):
1077         * platform/graphics/skia/PlatformContextSkia.h:
1078         Remove isPathSkiaSafe() extern (unused).
1079         Remove paintsIntoImageBuffer() (now unused).  Remove IntSize param
1080         from setGraphicsContext3D() (unused).
1081
1082 2011-08-16  Joseph Pecoraro  <joepeck@webkit.org>
1083
1084         Unreviewed Chromium Windows build fix after r93140. Take 3.
1085         Include the proper includes!
1086
1087         * platform/graphics/FontCache.h:
1088
1089 2011-08-16  Mihnea Ovidenie  <mihnea@adobe.com>
1090
1091         Unmatrix algorithm implementation is wrong
1092         https://bugs.webkit.org/show_bug.cgi?id=66080
1093
1094         Reviewed by Dean Jackson.
1095
1096         Current version of the algorithm negates only the scaleX while
1097         it should negate also scaleY and scaleZ when appropriate.
1098
1099         Test: animations/animation-matrix-negative-scale-unmatrix.html
1100
1101         * platform/graphics/transforms/TransformationMatrix.cpp:
1102         (WebCore::decompose):
1103
1104 2011-08-16  Joseph Pecoraro  <joepeck@webkit.org>
1105
1106         Unreviewed Chromium Windows build fix after r93140.
1107
1108         This just makes the troublesome enum public. If this
1109         fixes the build I will file a follow-up bug to clean-up
1110         these build issues and either keep the enum public and
1111         cleanup other functions or restore the enum to private.
1112         There is no harm in making the enum public right now.
1113
1114         * platform/graphics/FontCache.h:
1115
1116 2011-08-16  Joseph Pecoraro  <joepeck@webkit.org>
1117
1118         Unreviewed Chromium Windows build fix after r93140.
1119
1120         * platform/graphics/FontCache.h:
1121
1122 2011-08-16  Joseph Pecoraro  <joepeck@webkit.org>
1123
1124         Unreviewed Windows and Chromium Windows build fix after r93140.
1125
1126         * platform/graphics/FontCache.h:
1127         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
1128         (WebCore::FontCache::fontDataFromDescriptionAndLogFont):
1129         (WebCore::getLastResortFallbackFontProc):
1130         (WebCore::FontCache::getLastResortFallbackFont):
1131         * platform/graphics/win/FontCacheWin.cpp:
1132         (WebCore::FontCache::fontDataFromDescriptionAndLogFont):
1133         (WebCore::FontCache::getLastResortFallbackFont):
1134
1135 2011-08-16  Adam Roben  <aroben@apple.com>
1136
1137         Make placeholder text remain visible until a character is typed on Windows
1138
1139         Fixes <http://webkit.org/b/66319> Placeholder text in text fields disappears when the field
1140         is focused on Windows, which doesn't match Lion or Windows native text fields
1141
1142         Covered by existing tests (which are currently failing on the bots until this patch lands).
1143
1144         Reviewed by Dave Hyatt.
1145
1146         * rendering/RenderThemeSafari.h:
1147         (WebCore::RenderThemeSafari::shouldShowPlaceholderWhenFocused):
1148         * rendering/RenderThemeWin.h:
1149         (WebCore::RenderThemeWin::shouldShowPlaceholderWhenFocused):
1150         Added overrides to return true.
1151
1152 2011-08-16  David Hyatt  <hyatt@apple.com>
1153
1154         https://bugs.webkit.org/show_bug.cgi?id=66254
1155
1156         Make region invalidation and repainting work properly. We do this by making RenderFlowThreads into
1157         repaint containers and then issuing new repaints in the regions that contain the invalidated flow thread
1158         content.
1159
1160         Reviewed by Simon Fraser.
1161
1162         Added new tests in fast/repaint.
1163
1164         * rendering/RenderFlowThread.cpp:
1165         (WebCore::RenderFlowThread::repaintRectangleInRegions):
1166         * rendering/RenderFlowThread.h:
1167         * rendering/RenderObject.cpp:
1168         (WebCore::RenderObject::enclosingRenderFlowThread):
1169         (WebCore::RenderObject::containerForRepaint):
1170         (WebCore::RenderObject::repaintUsingContainer):
1171         * rendering/RenderObject.h:
1172         * rendering/RenderView.cpp:
1173         (WebCore::RenderView::RenderView):
1174         (WebCore::RenderView::renderFlowThreadWithName):
1175         * rendering/RenderView.h:
1176         (WebCore::RenderView::hasRenderFlowThreads):
1177
1178 2011-08-16  Joseph Pecoraro  <joepeck@webkit.org>
1179
1180         Abandoned Memory: Temporary CSS Fonts May Never Be Purged
1181         https://bugs.webkit.org/show_bug.cgi?id=66153
1182
1183         Reviewed by Dan Bernstein.
1184
1185         While a remote CSS font face is loading we fallback to a
1186         temporary font. We don't want to retain the fallback font
1187         because noone takes ownership of the temporary font. This
1188         patch adds a way to get an uncached fallback font, which
1189         plumbs the ShouldRetain enum through the different platform
1190         implementations of getLastResortFallbackFont.
1191
1192         No new tests, no functional change.
1193
1194         * css/CSSFontFaceSource.cpp:
1195         (WebCore::CSSFontFaceSource::getFontData):
1196         * platform/graphics/FontCache.cpp:
1197         (WebCore::FontCache::getNonRetainedLastResortFallbackFont):
1198         * platform/graphics/FontCache.h:
1199         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
1200         (WebCore::fontDataFromDescriptionAndLogFont):
1201         (WebCore::GetLastResortFallbackFontProcData::GetLastResortFallbackFontProcData):
1202         (WebCore::getLastResortFallbackFontProc):
1203         (WebCore::FontCache::getLastResortFallbackFont):
1204         * platform/graphics/chromium/FontCacheLinux.cpp:
1205         (WebCore::FontCache::getLastResortFallbackFont):
1206         * platform/graphics/freetype/FontCacheFreeType.cpp:
1207         (WebCore::FontCache::getLastResortFallbackFont):
1208         * platform/graphics/haiku/FontCacheHaiku.cpp:
1209         (WebCore::FontCache::getLastResortFallbackFont):
1210         * platform/graphics/mac/FontCacheMac.mm:
1211         (WebCore::FontCache::getLastResortFallbackFont):
1212         * platform/graphics/pango/FontCachePango.cpp:
1213         (WebCore::FontCache::getLastResortFallbackFont):
1214         * platform/graphics/qt/FontCacheQt.cpp:
1215         (WebCore::FontCache::getLastResortFallbackFont):
1216         * platform/graphics/win/FontCacheWin.cpp:
1217         (WebCore::fontDataFromDescriptionAndLogFont):
1218         (WebCore::FontCache::getLastResortFallbackFont):
1219         * platform/graphics/wince/FontCacheWinCE.cpp:
1220         * platform/graphics/wx/FontCacheWx.cpp:
1221         (WebCore::FontCache::getLastResortFallbackFont):
1222
1223 2011-08-16  Alexei Svitkine  <asvitkine@chromium.org>
1224
1225         Chromium Mac: Rubber banding gutter drawing
1226         https://bugs.webkit.org/show_bug.cgi?id=66226
1227
1228         Make ScrollView::paintOverhangAreas() use the ScrollbarTheme::nativeTheme() to
1229         draw the overhang areas.
1230         Move default implementation to ScrollbarThemeComposite::paintOverhangAreas().
1231         Add a different implementation for Chromium Mac.
1232
1233         Reviewed by Dimitri Glazkov.
1234
1235         No new tests since this is just refactoring code and adding a Chromium-specific path for overhang drawing.
1236
1237         * platform/ScrollView.cpp:
1238         (WebCore::ScrollView::wheelEvent):
1239         * platform/ScrollbarTheme.h:
1240         (WebCore::ScrollbarTheme::paintOverhangAreas):
1241         * platform/ScrollbarThemeComposite.cpp:
1242         (WebCore::ScrollbarThemeComposite::paintOverhangAreas):
1243         * platform/ScrollbarThemeComposite.h:
1244         * platform/chromium/ScrollbarThemeChromiumMac.h:
1245         * platform/chromium/ScrollbarThemeChromiumMac.mm:
1246         (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac):
1247         (WebCore::scrollbarStateToThemeState):
1248         (WebCore::ScrollbarThemeChromiumMac::paintTickmarks):
1249         (WebCore::ScrollbarThemeChromiumMac::paintOverhangAreas):
1250
1251 2011-08-12  Wyatt Carss  <wcarss@chromium.org>
1252
1253         Programmatically set selection should not have direction on Mac
1254         https://bugs.webkit.org/show_bug.cgi?id=60529
1255
1256         Reviewed by Ryosuke Niwa.
1257
1258         Modified default value of VisibleSelection->m_isDirectional from 'true'
1259         to 'false' by adding a defaulted argument to several VisibleSelection 
1260         constructors to make programmatic selection be directionless by default 
1261         on Mac. Also modified several calls to VisibleSelection's constructors
1262         to correctly preserve directionality.
1263         
1264         Near the end of FrameSelection::modify (presently FrameSelection.cpp:869)
1265         a call to setExtent triggers an editing delegate that uses the
1266         FrameSelection. The direction here should have been preserved from before,
1267         but setIsDirectional was not called until after FrameSelection.cpp:869. It
1268         has been moved up to make things behave.
1269
1270         * WebCore.exp.in:
1271         * editing/ApplyBlockElementCommand.cpp:
1272         (WebCore::ApplyBlockElementCommand::doApply):
1273         (WebCore::ApplyBlockElementCommand::formatSelection):
1274         * editing/ApplyStyleCommand.cpp:
1275         (WebCore::ApplyStyleCommand::updateStartEnd):
1276         * editing/BreakBlockquoteCommand.cpp:
1277         (WebCore::BreakBlockquoteCommand::doApply):
1278         * editing/CompositeEditCommand.cpp:
1279         (WebCore::CompositeEditCommand::moveParagraphWithClones):
1280         (WebCore::CompositeEditCommand::moveParagraphs):
1281         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
1282         (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph):
1283         * editing/CreateLinkCommand.cpp:
1284         (WebCore::CreateLinkCommand::doApply):
1285         * editing/DeleteSelectionCommand.cpp:
1286         (WebCore::DeleteSelectionCommand::setStartingSelectionOnSmartDelete):
1287         (WebCore::DeleteSelectionCommand::doApply):
1288         * editing/Editor.cpp:
1289         (WebCore::Editor::selectionForCommand):
1290         * editing/FrameSelection.cpp:
1291         (WebCore::shouldAlwaysUseDirectionalSelection):
1292         (WebCore::FrameSelection::FrameSelection):
1293         (WebCore::FrameSelection::moveTo):
1294         (WebCore::FrameSelection::setNonDirectionalSelectionIfNeeded):
1295         (WebCore::FrameSelection::modify):
1296         (WebCore::FrameSelection::setBase):
1297         (WebCore::FrameSelection::setExtent):
1298         * editing/FrameSelection.h:
1299         * editing/InsertLineBreakCommand.cpp:
1300         (WebCore::InsertLineBreakCommand::doApply):
1301         * editing/InsertListCommand.cpp:
1302         (WebCore::InsertListCommand::doApply):
1303         * editing/InsertParagraphSeparatorCommand.cpp:
1304         (WebCore::InsertParagraphSeparatorCommand::doApply):
1305         * editing/InsertTextCommand.cpp:
1306         (WebCore::InsertTextCommand::performTrivialReplace):
1307         (WebCore::InsertTextCommand::doApply):
1308         * editing/MoveSelectionCommand.cpp:
1309         (WebCore::MoveSelectionCommand::doApply):
1310         * editing/ReplaceSelectionCommand.cpp:
1311         (WebCore::ReplaceSelectionCommand::completeHTMLReplacement):
1312         * editing/TypingCommand.cpp:
1313         (WebCore::TypingCommand::makeEditableRootEmpty):
1314         (WebCore::TypingCommand::deleteKeyPressed):
1315         (WebCore::TypingCommand::forwardDeleteKeyPressed):
1316         * editing/VisibleSelection.cpp:
1317         (WebCore::VisibleSelection::VisibleSelection):
1318         * editing/VisibleSelection.h:
1319         * page/EventHandler.cpp:
1320         (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart):
1321         (WebCore::EventHandler::updateSelectionForMouseDrag):
1322
1323 2011-08-16  Jeffrey Pfau  <jpfau@apple.com>
1324
1325         New XML parser: Add document fragment parser
1326         https://bugs.webkit.org/show_bug.cgi?id=66317
1327
1328         Reviewed by Adam Barth.
1329
1330         * dom/DocumentFragment.cpp:
1331         (WebCore::DocumentFragment::parseXML):
1332         * xml/parser/NewXMLDocumentParser.cpp:
1333         (WebCore::NewXMLDocumentParser::NewXMLDocumentParser):
1334         (WebCore::NewXMLDocumentParser::parseDocumentFragment):
1335         * xml/parser/NewXMLDocumentParser.h:
1336         (WebCore::NewXMLDocumentParser::create):
1337         * xml/parser/XMLTokenizer.h:
1338         * xml/parser/XMLTreeBuilder.cpp:
1339         (WebCore::XMLTreeBuilder::XMLTreeBuilder):
1340         (WebCore::XMLTreeBuilder::pushCurrentNode):
1341         * xml/parser/XMLTreeBuilder.h:
1342         (WebCore::XMLTreeBuilder::create):
1343         (WebCore::XMLTreeBuilder::NodeStackItem::node):
1344
1345 2011-08-16  Jeffrey Pfau  <jpfau@apple.com>
1346
1347         New XML parser: Replace assertions regarding character data in the prolog with proper checks
1348         https://bugs.webkit.org/show_bug.cgi?id=66269
1349
1350         Reviewed by Adam Barth.
1351
1352         This patch checks for character data in the prolog (which is illegal in XML) and discards it, instead of failing an assertion.
1353
1354         * xml/parser/XMLTreeBuilder.cpp:
1355         (WebCore::XMLTreeBuilder::processProcessingInstruction):
1356         (WebCore::XMLTreeBuilder::processXMLDeclaration):
1357         (WebCore::XMLTreeBuilder::processDOCTYPE):
1358         (WebCore::XMLTreeBuilder::enterText):
1359         (WebCore::XMLTreeBuilder::failOnText):
1360         * xml/parser/XMLTreeBuilder.h:
1361
1362 2011-08-16  Alexander Pavlov  <apavlov@chromium.org>
1363
1364         Web Inspector: word wrap long edits
1365         https://bugs.webkit.org/show_bug.cgi?id=65512
1366
1367         Reviewed by Pavel Feldman.
1368
1369         * inspector/front-end/inspector.css:
1370         (.styles-section .properties li.child-editing):
1371
1372 2011-08-16  Pavel Feldman  <pfeldman@google.com>
1373
1374         Web Inspector: convert DOM breakpoint types to strings.
1375         https://bugs.webkit.org/show_bug.cgi?id=66304
1376
1377         Reviewed by Yury Semikhatsky.
1378
1379         * inspector/Inspector.json:
1380         * inspector/InspectorDOMDebuggerAgent.cpp:
1381         (WebCore::domTypeForName):
1382         (WebCore::InspectorDOMDebuggerAgent::setDOMBreakpoint):
1383         (WebCore::InspectorDOMDebuggerAgent::removeDOMBreakpoint):
1384         * inspector/InspectorDOMDebuggerAgent.h:
1385         * inspector/front-end/DOMBreakpointsSidebarPane.js:
1386         (WebInspector.DOMBreakpointsSidebarPane):
1387
1388 2011-08-16  Pavel Feldman  <pfeldman@google.com>
1389
1390         Web Inspector: force pseudo element state when checking it in the styles sidebar.
1391         https://bugs.webkit.org/show_bug.cgi?id=66292
1392
1393         This reverts http://trac.webkit.org/changeset/89132 and introduces InspectorInstrumentation
1394         calls from the CSSStyleSelector for pseudo state processing. These calls are very fast:
1395         they are guarded with the inline checks for the front-end count.
1396
1397         Reviewed by David Hyatt.
1398
1399         * css/CSSStyleSelector.cpp:
1400         (WebCore::CSSStyleSelector::initForStyleResolve):
1401         (WebCore::CSSStyleSelector::styleRulesForElement):
1402         (WebCore::CSSStyleSelector::pseudoStyleRulesForElement):
1403         (WebCore::CSSStyleSelector::checkSelector):
1404         (WebCore::CSSStyleSelector::SelectorChecker::checkSelector):
1405         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
1406         * css/CSSStyleSelector.h:
1407         * inspector/InspectorCSSAgent.cpp:
1408         (WebCore::computePseudoClassMask):
1409         (WebCore::InspectorCSSAgent::InspectorCSSAgent):
1410         (WebCore::InspectorCSSAgent::clearFrontend):
1411         (WebCore::InspectorCSSAgent::forcePseudoState):
1412         (WebCore::InspectorCSSAgent::getStylesForNode):
1413         (WebCore::InspectorCSSAgent::didRemoveDocument):
1414         (WebCore::InspectorCSSAgent::didRemoveDOMNode):
1415         (WebCore::InspectorCSSAgent::clearPseudoState):
1416         * inspector/InspectorCSSAgent.h:
1417         * inspector/InspectorController.cpp:
1418         (WebCore::InspectorController::disconnectFrontend):
1419         * inspector/InspectorInstrumentation.cpp:
1420         (WebCore::InspectorInstrumentation::forcePseudoStateImpl):
1421         * inspector/InspectorInstrumentation.h:
1422         (WebCore::InspectorInstrumentation::forcePseudoState):
1423
1424 2011-08-16  Tony Chang  <tony@chromium.org>
1425
1426         Unreviewed, rolling out r93114.
1427         http://trac.webkit.org/changeset/93114
1428         https://bugs.webkit.org/show_bug.cgi?id=66226
1429
1430         broke the chromium mac compile
1431
1432         * platform/ScrollView.cpp:
1433         (WebCore::ScrollView::wheelEvent):
1434         * platform/ScrollbarTheme.h:
1435         * platform/ScrollbarThemeComposite.cpp:
1436         * platform/ScrollbarThemeComposite.h:
1437         * platform/chromium/ScrollbarThemeChromiumMac.h:
1438         * platform/chromium/ScrollbarThemeChromiumMac.mm:
1439         (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac):
1440         (WebCore::scrollbarStateToThemeState):
1441         (WebCore::ScrollbarThemeChromiumMac::paintTickmarks):
1442         * platform/mac/ScrollbarThemeMac.h:
1443
1444 2011-08-16  Alexei Svitkine  <asvitkine@chromium.org>
1445
1446         Chromium Mac: Rubber banding gutter drawing
1447         https://bugs.webkit.org/show_bug.cgi?id=66226
1448
1449         Make ScrollView::paintOverhangAreas() use the ScrollbarTheme::nativeTheme() to
1450         draw the overhang areas.
1451         Move default implementation to ScrollbarThemeComposite::paintOverhangAreas().
1452         Add a different implementation for Chromium Mac.
1453
1454         Reviewed by Dimitri Glazkov.
1455
1456         No new tests since this is just refactoring code and adding a Chromium-specific path for overhang drawing.
1457
1458         * platform/ScrollView.cpp:
1459         (WebCore::ScrollView::wheelEvent):
1460         * platform/ScrollbarTheme.h:
1461         (WebCore::ScrollbarTheme::paintOverhangAreas):
1462         * platform/ScrollbarThemeComposite.cpp:
1463         (WebCore::ScrollbarThemeComposite::paintOverhangAreas):
1464         * platform/ScrollbarThemeComposite.h:
1465         * platform/chromium/ScrollbarThemeChromiumMac.h:
1466         * platform/chromium/ScrollbarThemeChromiumMac.mm:
1467         (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac):
1468         (WebCore::scrollbarStateToThemeState):
1469         (WebCore::ScrollbarThemeChromiumMac::paintTickmarks):
1470         (WebCore::ScrollbarThemeChromiumMac::paintOverhangAreas):
1471
1472 2011-08-16  Luke Macpherson   <macpherson@chromium.org>
1473
1474         Support cast between CSSPrimitiveValue and ETransformStyle3D and use in CSSStyleSelector.
1475         https://bugs.webkit.org/show_bug.cgi?id=66273
1476
1477         Reviewed by Simon Fraser.
1478
1479         No new tests - no functionality changed - refactoring only.
1480
1481         * css/CSSPrimitiveValueMappings.h:
1482         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1483         Define cast from CSSPrimitiveValue to ETransformStyle3D.
1484         (WebCore::CSSPrimitiveValue::operator ETransformStyle3D):
1485         Define cast from ETransformStyle3D to CSSPrimitiveValue.
1486         * css/CSSStyleSelector.cpp:
1487         (WebCore::CSSStyleSelector::applyProperty):
1488         Use appropriate macro to handle CSSPropertyWebkitTransformStyle.
1489
1490 2011-08-16  Luke Macpherson   <macpherson@chromium.org>
1491
1492         Use appropriate macro to handle CSSPropertyWebkitContentOrder in CSSStyleSelector::applyProperty()
1493         https://bugs.webkit.org/show_bug.cgi?id=66279
1494
1495         Reviewed by Simon Fraser.
1496
1497         No new tests - no functionality changed - simple refactoring only.
1498
1499         * css/CSSStyleSelector.cpp:
1500         (WebCore::CSSStyleSelector::applyProperty):
1501         Use HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro to handle CSSPropertyWebkitContentOrder.
1502         This works because PrimitiveValue now supports cast to int.
1503
1504 2011-08-16  Eric Carlson  <eric.carlson@apple.com>
1505
1506         [REGRESSION] Media controls should always be enabled when scripting is disabled
1507         https://bugs.webkit.org/show_bug.cgi?id=66303
1508
1509         Reviewed by Dimitri Glazkov.
1510
1511         Tests: media/video-controls-no-scripting-iframe.html
1512                media/video-controls-no-scripting.html
1513
1514         * html/HTMLMediaElement.cpp:
1515         (WebCore::HTMLMediaElement::attributeChanged): Move the controls enabling/disabling code
1516             to configureMediaControls.
1517         (WebCore::HTMLMediaElement::prepareForLoad): Call configureMediaControls.
1518         (WebCore::HTMLMediaElement::configureMediaControls): New, move code duplicated in 
1519             attributeChanged and preDispatchEventHandler here.
1520         (WebCore::HTMLMediaElement::preDispatchEventHandler): Move the controls enabling/disabling code
1521             to configureMediaControls.
1522         * html/HTMLMediaElement.h:
1523
1524 2011-08-16  Pavel Feldman  <pfeldman@google.com>
1525
1526         Web Inspector: hide non-conservative methods from the protocol documentation.
1527         https://bugs.webkit.org/show_bug.cgi?id=66301
1528
1529         Reviewed by Yury Semikhatsky.
1530
1531         * inspector/Inspector.json:
1532
1533 2011-08-16  Andras Becsi  <abecsi@webkit.org>
1534
1535         Web Inspector: nuke background events collection (dead feature)
1536         https://bugs.webkit.org/show_bug.cgi?id=66296
1537
1538         Fix the GTK build after r93095.
1539
1540         Unreviewed build fix.
1541
1542         No new tests neede.
1543
1544         * GNUmakefile.list.am: Remove nonexistent sources.
1545
1546 2011-08-16  Andras Becsi  <abecsi@webkit.org>
1547
1548         Reviewed by Csaba Osztrogonác.
1549
1550         Need AtomicStrings for the various font family names
1551         https://bugs.webkit.org/show_bug.cgi?id=28024
1552
1553         Unify the usage of '-webkit' prefixed font family names by using
1554         global AtomicStrings.
1555         Use a .in file to generate the needed sources through make_names.pl.
1556
1557         No new tests needed.
1558
1559         * CMakeLists.txt:
1560         * CodeGenerators.pri:
1561         * DerivedSources.make:
1562         * GNUmakefile.am:
1563         * GNUmakefile.list.am:
1564         * WebCore.gyp/WebCore.gyp:
1565         * WebCore.gyp/scripts/action_makenames.py:
1566         * WebCore.gypi:
1567         * WebCore.vcproj/WebCore.vcproj:
1568         * WebCore.xcodeproj/project.pbxproj:
1569         * css/CSSComputedStyleDeclaration.cpp:
1570         (WebCore::identifierForFamily):
1571         * css/CSSFontSelector.cpp:
1572         (WebCore::CSSFontSelector::addFontFaceRule):
1573         (WebCore::fontDataForGenericFamily):
1574         * css/CSSStyleSelector.cpp:
1575         (WebCore::CSSStyleSelector::applyProperty):
1576         * css/WebKitFontFamilyNames.in: Added.
1577         * dom/make_names.pl:
1578         * page/Frame.cpp:
1579         (WebCore::Frame::Frame):
1580         * platform/graphics/FontCache.cpp:
1581         (WebCore::FontCache::getFontData):
1582         * platform/graphics/FontDescription.h:
1583         (WebCore::FontDescription::useFixedDefaultSize):
1584
1585 2011-08-16  Pavel Feldman  <pfeldman@google.com>
1586
1587         Web Inspector: nuke background events collection (dead feature)
1588         https://bugs.webkit.org/show_bug.cgi?id=66296
1589
1590         Reviewed by Yury Semikhatsky.
1591
1592         * CMakeLists.txt:
1593         * WebCore.gypi:
1594         * WebCore.pro:
1595         * WebCore.vcproj/WebCore.vcproj:
1596         * WebCore.xcodeproj/project.pbxproj:
1597         * inspector/EventsCollector.cpp: Removed.
1598         * inspector/EventsCollector.h: Removed.
1599         * inspector/Inspector.json:
1600         * inspector/InspectorFrontendProxy.cpp: Removed.
1601         * inspector/InspectorFrontendProxy.h: Removed.
1602         * inspector/InspectorResourceAgent.cpp:
1603         (WebCore::InspectorResourceAgent::setFrontend):
1604         (WebCore::InspectorResourceAgent::clearFrontend):
1605         (WebCore::InspectorResourceAgent::InspectorResourceAgent):
1606         * inspector/InspectorResourceAgent.h:
1607         * inspector/front-end/NetworkPanel.js:
1608         (WebInspector.NetworkLogView):
1609
1610 2011-08-16  Lindsay Mathieson   <lindsay.mathieson@gmail.com>
1611
1612         [Qt] Missing spell check support
1613         https://bugs.webkit.org/show_bug.cgi?id=44114
1614
1615         Reviewed by Benjamin Poulain.
1616
1617         Add drawErrorUnderline() from Cairo to render the line for text checking on the Qt port.
1618
1619         * platform/graphics/qt/GraphicsContextQt.cpp:
1620         (WebCore::drawErrorUnderline):
1621         (WebCore::GraphicsContext::drawLineForTextChecking):
1622
1623 2011-08-15  MORITA Hajime  <morrita@google.com>
1624
1625         REGRESSION(r70598): [Chromium] Style changes in textInput event can prevent from updating <textarea> value.
1626         https://bugs.webkit.org/show_bug.cgi?id=66216
1627
1628         Reviewed by Ryosuke Niwa.
1629
1630         Element::spellcheckAttributeState() uses Element::hasAttribute(),
1631         which calls updateStyleAttribute(), which potentially makes style
1632         dirty. But that is problematic since Editor calls spellcheckAttributeState()
1633         during the spell-checking phase and make the style dirty,
1634         which can trigger re-layout, which wipes the shadow tree of a textarea
1635         out by pre-committed "value" text.
1636
1637         This change removes the hasAttribute() call from
1638         spellcheckAttributeState().
1639
1640         Test: editing/input/style-change-during-input.html
1641
1642         * dom/Element.cpp:
1643         (WebCore::Element::spellcheckAttributeState):
1644
1645 2011-08-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1646
1647         [CMAKE] Wrap files of websocket and worker in each macro.
1648         https://bugs.webkit.org/show_bug.cgi?id=65012
1649
1650         Move files of web socket and workers into each macro block in CMakeList.txt.
1651         And, header files related to WORKER and SHARED_WORKER are wrapped by macro in cpp files.
1652
1653         Reviewed by Daniel Bates.
1654
1655         * CMakeLists.txt:
1656         * UseJSC.cmake:
1657         * bindings/js/JSDOMWindowCustom.cpp:
1658         * bindings/js/JSWorkerContextBase.cpp:
1659         * bindings/js/ScriptState.cpp:
1660         * bindings/js/WorkerScriptController.cpp:
1661
1662 2011-08-15  Jeffrey Pfau  <jpfau@apple.com>
1663
1664         New XML parser: add xml namespace to the default map of namespaces
1665         https://bugs.webkit.org/show_bug.cgi?id=66266
1666
1667         Reviewed by Adam Barth.
1668
1669         * xml/parser/XMLTreeBuilder.cpp:
1670         (WebCore::XMLTreeBuilder::NodeStackItem::NodeStackItem):
1671
1672 2011-08-15  Hayato Ito  <hayato@chromium.org>
1673
1674         Fix crash when mouse moves from <summary> element to parent <details> element.
1675         https://bugs.webkit.org/show_bug.cgi?id=66210
1676
1677         Reviewed by Dimitri Glazkov.
1678
1679         This is a regression caused by r92922, which wrongly assumes that
1680         a shadow host always has a shadow root as an immediate child in
1681         ancestors chain. This assumption does not apply to <details>
1682         element. <details> element is implemented as a shadow host, but
1683         may have a <summary> element as an immediate child element in
1684         ancestors chain.
1685
1686         Test: fast/dom/shadow/details-summary-mouseover.html
1687
1688         * dom/EventDispatcher.cpp:
1689         (WebCore::EventDispatcher::adjustToShadowBoundaries):
1690
1691 2011-08-15  Jeffrey Pfau  <jpfau@apple.com>
1692
1693         New XML parser: Use xmlnsAtom instead of redundant xmlnsPrefix
1694         https://bugs.webkit.org/show_bug.cgi?id=66264
1695
1696         Reviewed by Adam Barth.
1697
1698         * xml/parser/XMLTreeBuilder.cpp:
1699         (WebCore::XMLTreeBuilder::processNamespaces):
1700         (WebCore::XMLTreeBuilder::processAttributes):
1701
1702 2011-08-15  Emil A Eklund  <eae@chromium.org>
1703
1704         Switch Element/Node to to new layout types
1705         https://bugs.webkit.org/show_bug.cgi?id=66260
1706
1707         Reviewed by Eric Seidel.
1708
1709         Convert Element, Node, ElementRareData and ContainerNode to new layout
1710         abstraction as a part of the ongoing conversion work.
1711
1712         No new tests, no new functionality.
1713
1714         * dom/ContainerNode.cpp:
1715         (WebCore::ContainerNode::getLowerRightCorner):
1716         (WebCore::ContainerNode::getRect):
1717         * dom/ContainerNode.h:
1718         * dom/Element.cpp:
1719         (WebCore::Element::scrollIntoView):
1720         (WebCore::Element::scrollIntoViewIfNeeded):
1721         (WebCore::adjustForLocalZoom):
1722         (WebCore::Element::boundsInWindowSpace):
1723         (WebCore::Element::getClientRects):
1724         (WebCore::Element::getBoundingClientRect):
1725         (WebCore::Element::screenRect):
1726         (WebCore::Element::minimumSizeForResizing):
1727         (WebCore::Element::setMinimumSizeForResizing):
1728         * dom/Element.h:
1729         * dom/ElementRareData.h:
1730         * dom/Node.cpp:
1731         (WebCore::Node::getRect):
1732         (WebCore::Node::renderRect):
1733         (WebCore::Node::hasNonEmptyBoundingBox):
1734         * dom/Node.h:
1735
1736 2011-08-15  Alexey Proskuryakov  <ap@apple.com>
1737
1738         Regional indicator symbols that are combined should behave as a single character when editing
1739         https://bugs.webkit.org/show_bug.cgi?id=65395
1740
1741         Reviewed by Dan Bernstein.
1742
1743         Part one: make backspace work.
1744
1745         Test: editing/deleting/regional-indicators.html
1746
1747         * rendering/RenderText.cpp:
1748         (WebCore::isRegionalIndicator):
1749         (WebCore::RenderText::previousOffsetForBackwardDeletion): Added a special case for regional
1750         indicator symbols.
1751
1752 2011-08-15  Jeffrey Pfau  <jpfau@apple.com>
1753
1754         New XML parser: Re-entering a character node should not clobber the buffered characters
1755         https://bugs.webkit.org/show_bug.cgi?id=66257
1756
1757         Reviewed by Adam Barth.
1758
1759         * xml/parser/XMLTreeBuilder.cpp:
1760         (WebCore::XMLTreeBuilder::enterText):
1761
1762 2011-08-15  Dmitry Titov  <dimich@chromium.org>
1763
1764         FrameLoaderClient::transferLoadingResourceFromPage does not have enough parameters
1765         https://bugs.webkit.org/show_bug.cgi?id=66165
1766
1767         Reviewed by Darin Fisher.
1768
1769         No new tests since no change in behavior.
1770         The original issue is only reproducible on Chromium in multi-process mode
1771         and is tested there by a browsertest.
1772
1773         * loader/DocumentLoader.cpp:
1774         (WebCore::DocumentLoader::transferLoadingResourcesFromPage):
1775         Passing ResourceLoader* into the FrameLoaderClient notification.
1776         Also, fixed the bug where the same ResourceRequest was passed for all subresources.
1777         * loader/EmptyClients.h:
1778         (WebCore::EmptyFrameLoaderClient::transferLoadingResourceFromPage):
1779         * loader/FrameLoader.cpp:
1780         (WebCore::FrameLoader::dispatchTransferLoadingResourceFromPage):
1781         * loader/FrameLoader.h:
1782         * loader/FrameLoaderClient.h:
1783         * loader/ResourceLoadNotifier.cpp:
1784         (WebCore::ResourceLoadNotifier::dispatchTransferLoadingResourceFromPage):
1785         * loader/ResourceLoadNotifier.h:
1786         * loader/ResourceLoader.cpp:
1787         (WebCore::ResourceLoader::init):
1788         * loader/ResourceLoader.h:
1789         (WebCore::ResourceLoader::originalRequest): Added the originalRequest() accessor that
1790         returns the request as it existed before redirects (but after client's will SendRequest).
1791         This is to be able to pass the original request for loading subresources into
1792         FrameLoaderClient::transferLoadingResourceFromPage, since that one is used to invoke
1793         assignIdentifierToInitialRequest, which needs original request.
1794
1795 2011-08-15  Mark Hahnenberg  <mhahnenberg@apple.com>
1796
1797         Refactor JS objects to allocate in static create methods rather than constructors
1798         https://bugs.webkit.org/show_bug.cgi?id=65347
1799
1800         Reviewed by Geoffrey Garen.
1801
1802         No new tests.
1803
1804         Removed all calls to deprecatedGetDOMObject from initialization lists as part of a 
1805         larger refactoring to get rid of all allocation during initialization.
1806
1807         * bindings/js/JSDOMBinding.h:
1808         * bridge/c/CRuntimeObject.cpp:
1809         (JSC::Bindings::CRuntimeObject::CRuntimeObject):
1810         * bridge/c/CRuntimeObject.h:
1811         (JSC::Bindings::CRuntimeObject::create):
1812         * bridge/c/c_instance.cpp:
1813         (JSC::Bindings::CRuntimeMethod::create):
1814         (JSC::Bindings::CRuntimeMethod::CRuntimeMethod):
1815         * bridge/jni/jsc/JavaInstanceJSC.cpp:
1816         (JavaRuntimeMethod::create):
1817         (JavaRuntimeMethod::JavaRuntimeMethod):
1818         * bridge/jni/jsc/JavaRuntimeObject.cpp:
1819         (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
1820         * bridge/jni/jsc/JavaRuntimeObject.h:
1821         (JSC::Bindings::JavaRuntimeObject::create):
1822         * bridge/objc/objc_runtime.h:
1823         (JSC::Bindings::ObjcFallbackObjectImp::create):
1824         * bridge/objc/objc_runtime.mm:
1825         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
1826         * bridge/qt/qt_instance.cpp:
1827         (JSC::Bindings::QtRuntimeObject::create):
1828         (JSC::Bindings::QtRuntimeObject::QtRuntimeObject):
1829         * bridge/qt/qt_pixmapruntime.cpp:
1830         (JSC::Bindings::QtPixmapRuntimeObject::create):
1831         (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject):
1832         * bridge/qt/qt_runtime.cpp:
1833         (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
1834         (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
1835         (JSC::Bindings::QtRuntimeConnectionMethod::QtRuntimeConnectionMethod):
1836         * bridge/qt/qt_runtime.h:
1837         (JSC::Bindings::QtRuntimeMetaMethod::create):
1838         (JSC::Bindings::QtRuntimeConnectionMethod::create):
1839         * bridge/runtime_array.cpp:
1840         (JSC::RuntimeArray::RuntimeArray):
1841         * bridge/runtime_array.h:
1842         (JSC::RuntimeArray::create):
1843         * bridge/runtime_object.cpp:
1844
1845 2011-08-15  Adam Roben  <aroben@apple.com>
1846
1847         Update pages' style and content scale when the window's backing scale factor changes
1848
1849         Unfortunately, I couldn't think of a way to test this in an automated fashion.
1850
1851         Fixes <http://webkit.org/b/66229> <rdar://problem/9906269> WebKit doesn't react to device
1852         scale factor changes
1853
1854         Reviewed by Simon Fraser.
1855
1856         * WebCore.exp.in: Export Frame::deviceOrScaleFactorChanged.
1857
1858         * page/Frame.cpp:
1859         (WebCore::Frame::deviceScaleFactorChanged):
1860         * page/Frame.h:
1861         Added this new function. We recalc style so that, e.g., device-scale-factor-dependent media
1862         queries will be reevaluated, and we tell compositing layers about the new scale factor so
1863         they can rerender at the new resolution.
1864
1865 2011-08-15  Cary Clark  <caryclark@google.com>
1866
1867         Revise Skia on Chrome Mac to return fallback fonts.
1868         https://bugs.webkit.org/show_bug.cgi?id=62986
1869
1870         Reviewed by Darin Fisher.
1871
1872         Since Skia on Chrome Mac uses CoreText to determine
1873         text metrics, CG font architecture is used to return
1874         fallback fonts.
1875
1876         This improves many existing layout tests, including
1877         justify-ideograph-simple and t0905-c414-flt-04-c 
1878
1879         * platform/graphics/skia/FontSkia.cpp:
1880         (WebCore::Font::canReturnFallbackFontsForComplexText):
1881
1882 2011-08-15  Aaron Boodman  <aa@chromium.org>
1883
1884         Pass additional details to client in didCreateIsolatedContext
1885         https://bugs.webkit.org/show_bug.cgi?id=66037
1886
1887         Reviewed by Darin Fisher.
1888
1889         * bindings/v8/IsolatedWorld.cpp:
1890         (WebCore::IsolatedWorld::IsolatedWorld):
1891         * bindings/v8/IsolatedWorld.h:
1892         (WebCore::IsolatedWorld::create):
1893         (WebCore::IsolatedWorld::id):
1894         * bindings/v8/V8IsolatedContext.cpp:
1895         (WebCore::V8IsolatedContext::V8IsolatedContext):
1896         * bindings/v8/V8IsolatedContext.h:
1897         * bindings/v8/V8Proxy.cpp:
1898         (WebCore::V8Proxy::evaluateInIsolatedWorld):
1899         * loader/EmptyClients.h:
1900         (WebCore::EmptyFrameLoaderClient::didCreateIsolatedScriptContext):
1901         * loader/FrameLoaderClient.h:
1902
1903 2011-08-15  Chris Rogers  <crogers@google.com>
1904
1905         Add shell implementation for Web Audio API's MediaElementAudioSourceNode
1906         https://bugs.webkit.org/show_bug.cgi?id=66175
1907
1908         Reviewed by Kenneth Russell.
1909
1910         Test: webaudio/mediaelementaudiosourcenode.html
1911
1912         * DerivedSources.make:
1913         * WebCore.gypi:
1914         * WebCore.xcodeproj/project.pbxproj:
1915         * html/HTMLMediaElement.idl:
1916         * webaudio/AudioContext.cpp:
1917         (WebCore::AudioContext::createMediaElementSource):
1918         * webaudio/AudioContext.h:
1919         * webaudio/AudioContext.idl:
1920         * webaudio/AudioNode.h:
1921         * webaudio/MediaElementAudioSourceNode.cpp: Added.
1922         (WebCore::MediaElementAudioSourceNode::create):
1923         (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode):
1924         (WebCore::MediaElementAudioSourceNode::process):
1925         (WebCore::MediaElementAudioSourceNode::reset):
1926         * webaudio/MediaElementAudioSourceNode.h: Added.
1927         (WebCore::MediaElementAudioSourceNode::mediaElement):
1928         * webaudio/MediaElementAudioSourceNode.idl: Added.
1929
1930 2011-08-15  Emil A Eklund  <eae@chromium.org>
1931
1932         Switch mouse events to to new layout types
1933         https://bugs.webkit.org/show_bug.cgi?id=66179
1934
1935         Reviewed by Eric Seidel.
1936
1937         Convert mouse events to new layout abstraction as a part of the ongoing
1938         conversion work.
1939
1940         No new tests, no new functionality.
1941
1942         * dom/MouseRelatedEvent.cpp:
1943         (WebCore::contentsScrollOffset):
1944         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
1945         (WebCore::MouseRelatedEvent::initCoordinates):
1946         (WebCore::MouseRelatedEvent::computePageLocation):
1947         (WebCore::MouseRelatedEvent::computeRelativePosition):
1948         (WebCore::MouseRelatedEvent::pageLocation):
1949         * dom/MouseRelatedEvent.h:
1950         (WebCore::MouseRelatedEvent::screenLocation):
1951         (WebCore::MouseRelatedEvent::clientLocation):
1952         (WebCore::MouseRelatedEvent::absoluteLocation):
1953         (WebCore::MouseRelatedEvent::setAbsoluteLocation):
1954         * page/EventHandler.cpp:
1955         (WebCore::EventHandler::clear):
1956         (WebCore::EventHandler::handleMousePressEventSingleClick):
1957         (WebCore::selectionExtentRespectingEditingBoundary):
1958         (WebCore::EventHandler::hitTestResultAtPoint):
1959         (WebCore::EventHandler::currentMousePosition):
1960         (WebCore::documentPointForWindowPoint):
1961         (WebCore::EventHandler::handleMousePressEvent):
1962         (WebCore::EventHandler::mouseMoved):
1963         (WebCore::EventHandler::handleWheelEvent):
1964         (WebCore::EventHandler::sendContextMenuEvent):
1965         (WebCore::EventHandler::sendContextMenuEventForKey):
1966         (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
1967         (WebCore::EventHandler::dragHysteresisExceeded):
1968         (WebCore::EventHandler::handleDrag):
1969         (WebCore::EventHandler::handleTouchEvent):
1970         * page/EventHandler.h:
1971         * platform/PlatformMouseEvent.h:
1972         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1973         (WebCore::PlatformMouseEvent::pos):
1974         (WebCore::PlatformMouseEvent::x):
1975         (WebCore::PlatformMouseEvent::y):
1976         (WebCore::PlatformMouseEvent::globalX):
1977         (WebCore::PlatformMouseEvent::globalY):
1978         * platform/mac/PlatformMouseEventMac.mm:
1979         (WebCore::globalPoint):
1980         (WebCore::pointForEvent):
1981         (WebCore::globalPointForEvent):
1982
1983 2011-08-15  Ryosuke Niwa  <rniwa@webkit.org>
1984
1985         webkit-indent-blockquote is unnecessary
1986         https://bugs.webkit.org/show_bug.cgi?id=66195
1987
1988         Reviewed by Tony Chang.
1989
1990         Stop adding class="webkit-indent-blockquote" on blockquotes created by execCommand('Indent') and
1991         execCommand('Outdent'). Also removed the code to add the class attribute in ApplyBlockElementCommand
1992         since no other class inherited from ApplyBlockElementCommand uses this feature.
1993
1994         * editing/ApplyBlockElementCommand.cpp:
1995         (WebCore::ApplyBlockElementCommand::ApplyBlockElementCommand):
1996         (WebCore::ApplyBlockElementCommand::createBlockElement):
1997         * editing/ApplyBlockElementCommand.h:
1998         * editing/IndentOutdentCommand.cpp:
1999         (WebCore::IndentOutdentCommand::IndentOutdentCommand):
2000
2001 2011-08-15  Levi Weintraub  <leviw@chromium.org>
2002
2003         Switch remaining SVG Rendering methods to LayoutUnits
2004         https://bugs.webkit.org/show_bug.cgi?id=66169
2005
2006         Reviewed by Eric Seidel.
2007
2008         Changing remaining integer SVG methods to use the LayoutUnits abstraction.
2009
2010         No tests as no change in functionality.
2011
2012         * rendering/svg/RenderSVGBlock.cpp:
2013         (WebCore::RenderSVGBlock::visualOverflowRect):
2014         * rendering/svg/RenderSVGBlock.h:
2015         * rendering/svg/RenderSVGContainer.cpp:
2016         (WebCore::RenderSVGContainer::paint):
2017         * rendering/svg/RenderSVGForeignObject.cpp:
2018         (WebCore::RenderSVGForeignObject::paint):
2019         (WebCore::RenderSVGForeignObject::clippedOverflowRectForRepaint):
2020         (WebCore::RenderSVGForeignObject::computeRectForRepaint):
2021         * rendering/svg/RenderSVGHiddenContainer.cpp:
2022         (WebCore::RenderSVGHiddenContainer::paint):
2023         * rendering/svg/RenderSVGImage.cpp:
2024         (WebCore::RenderSVGImage::paint):
2025         * rendering/svg/RenderSVGInlineText.cpp:
2026         (WebCore::RenderSVGInlineText::linesBoundingBox):
2027         * rendering/svg/RenderSVGInlineText.h:
2028         * rendering/svg/RenderSVGModelObject.cpp:
2029         (WebCore::RenderSVGModelObject::outlineBoundsForRepaint):
2030         * rendering/svg/RenderSVGPath.cpp:
2031         (WebCore::RenderSVGPath::paint):
2032         * rendering/svg/RenderSVGRoot.cpp:
2033         (WebCore::RenderSVGRoot::localToBorderBoxTransform):
2034         (WebCore::RenderSVGRoot::parentOriginToBorderBox):
2035         (WebCore::RenderSVGRoot::borderOriginToContentBox):
2036         (WebCore::RenderSVGRoot::localToRepaintContainerTransform):
2037         (WebCore::RenderSVGRoot::localToParentTransform):
2038         (WebCore::RenderSVGRoot::clippedOverflowRectForRepaint):
2039         (WebCore::RenderSVGRoot::computeRectForRepaint):
2040         * rendering/svg/RenderSVGRoot.h:
2041         * rendering/svg/RenderSVGText.cpp:
2042         (WebCore::RenderSVGText::paint):
2043         * rendering/svg/SVGInlineFlowBox.cpp:
2044         (WebCore::SVGInlineFlowBox::paint):
2045         * rendering/svg/SVGInlineTextBox.cpp:
2046         (WebCore::SVGInlineTextBox::paint):
2047         * rendering/svg/SVGRenderSupport.cpp:
2048         (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
2049         (WebCore::SVGRenderSupport::computeRectForRepaint):
2050         * rendering/svg/SVGRenderSupport.h:
2051         * rendering/svg/SVGRootInlineBox.cpp:
2052         (WebCore::SVGRootInlineBox::paint):
2053         (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
2054         (WebCore::SVGRootInlineBox::layoutChildBoxes):
2055         (WebCore::SVGRootInlineBox::layoutRootBox):
2056         (WebCore::SVGRootInlineBox::closestLeafChildForPosition):
2057         * rendering/svg/SVGRootInlineBox.h:
2058
2059 2011-08-12  Jeff Miller  <jeffm@apple.com>
2060
2061         MediaPlayerPrivateAVFoundationCF::playerItemStatus() should return MediaPlayerAVPlayerItemStatusDoesNotExist if there is no AVPlayerItem
2062         https://bugs.webkit.org/show_bug.cgi?id=66171
2063         
2064         MediaPlayerPrivateAVFoundationCF::playerItemStatus() should return MediaPlayerAVPlayerItemStatusDoesNotExist if there is no AVPlayerItem
2065         to match the Mac implementation in MediaPlayerPrivateAVFoundationObjC.  I also added better logging to notificationCallback().
2066
2067         Reviewed by Jon Honeycutt.
2068
2069         No new tests, uses existing media tests.
2070
2071         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.cpp:
2072         (WebCore::MediaPlayerPrivateAVFoundationCF::playerItemStatus): Return MediaPlayerAVPlayerItemStatusDoesNotExist if no AVPlayerItem.
2073         (WebCore::AVFWrapper::notificationCallback): Log the name of the received notification.
2074
2075 2011-08-15  Adam Roben  <aroben@apple.com>
2076
2077         Rename an instance of pageScaleFactorChanged I missed in r93040
2078
2079         I tried to make a test for this but failed. It would probably have been easier if we dumped
2080         layers' content scales in layerTreeAsText output.
2081
2082         Followup to <http://webkit.org/b/55787> WebKit uses multiple conflicting names to refer to
2083         the device scale factor
2084
2085         * platform/graphics/ca/GraphicsLayerCA.cpp:
2086         (WebCore::GraphicsLayerCA::deviceOrPageScaleFactorChanged):
2087         * platform/graphics/ca/GraphicsLayerCA.h:
2088         Renamed from pageScaleFactorChanged to match the base class.
2089
2090 2011-08-15  Pavel Feldman  <pfeldman@google.com>
2091
2092         Web Inspector: [V8] crash upon stepIn while not on pause.
2093         https://bugs.webkit.org/show_bug.cgi?id=66221
2094
2095         Reviewed by Yury Semikhatsky.
2096
2097         * inspector/InspectorDebuggerAgent.cpp:
2098         (WebCore::InspectorDebuggerAgent::resume):
2099         (WebCore::InspectorDebuggerAgent::stepOver):
2100         (WebCore::InspectorDebuggerAgent::stepInto):
2101         (WebCore::InspectorDebuggerAgent::stepOut):
2102         (WebCore::InspectorDebuggerAgent::assertPaused):
2103         * inspector/InspectorDebuggerAgent.h:
2104         * inspector/front-end/ScriptsPanel.js:
2105         (WebInspector.ScriptsPanel.prototype._stepOverClicked):
2106         (WebInspector.ScriptsPanel.prototype._stepIntoClicked):
2107         (WebInspector.ScriptsPanel.prototype._stepOutClicked):
2108
2109 2011-08-15  Vsevolod Vlasov  <vsevik@chromium.org>
2110
2111         Web Inspector: Network panel: display the current search match index in the toolbar.
2112         https://bugs.webkit.org/show_bug.cgi?id=66051
2113
2114         Reviewed by Pavel Feldman.
2115
2116         * inspector/front-end/NetworkPanel.js:
2117         (WebInspector.NetworkLogView.prototype._highlightNthMatchedResource):
2118         (WebInspector.NetworkLogView.prototype.performSearch):
2119         (WebInspector.NetworkPanel):
2120         (WebInspector.NetworkPanel.prototype._onSearchCountUpdated):
2121         (WebInspector.NetworkPanel.prototype._onSearchIndexUpdated):
2122
2123 2011-08-10  Adam Roben  <aroben@apple.com>
2124
2125         Clear up scale factor terminology
2126
2127         WebKit by and large deals with two scale factors: one intrinsic to the device on which the
2128         software is running, and one that is per-Page and can be controlled via API calls. This
2129         patch names the former "deviceScaleFactor" and the latter "pageScaleFactor", and makes the
2130         code use those names. It should introduce no behavior changes.
2131
2132         Fixes <http://webkit.org/b/55787> WebKit uses multiple conflicting names to refer to the
2133         device scale factor
2134
2135         Reviewed by Simon Fraser.
2136
2137         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2138         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2139         Removed an unused member. This is unrelated to this patch.
2140
2141         * css/MediaQueryEvaluator.cpp:
2142         * html/HTMLCanvasElement.cpp:
2143         * html/HTMLCanvasElement.h:
2144         * loader/EmptyClients.h:
2145         * page/Chrome.cpp:
2146         * page/Chrome.h:
2147         * page/ChromeClient.h:
2148         * page/DOMWindow.cpp:
2149         * page/Frame.cpp:
2150         * page/Frame.h:
2151         * platform/graphics/GraphicsLayer.cpp:
2152         * platform/graphics/GraphicsLayer.h:
2153         * platform/graphics/GraphicsLayerClient.h:
2154         * platform/graphics/ca/GraphicsLayerCA.cpp:
2155         * rendering/RenderInline.cpp:
2156         * rendering/RenderLayerBacking.cpp:
2157         * rendering/RenderLayerBacking.h:
2158         * rendering/RenderLayerCompositor.cpp:
2159         * rendering/RenderLayerCompositor.h:
2160         * rendering/RenderObject.cpp:
2161
2162 2011-08-15  Oliver Varga  <Varga.Oliver@stud.u-szeged.hu>
2163
2164         Reviewed by Nikolas Zimmermann.
2165
2166         Speed up SVGSMILElement::findInstanceTime.
2167         https://bugs.webkit.org/show_bug.cgi?id=61025
2168
2169         Replace the linear search to binary search on ordered list because
2170         the previous searches from the beginning was not efficient.
2171         Out of index error fixed by Renata Hodovan.
2172
2173         No new tests this is only a performance tweak.
2174
2175         * svg/animation/SVGSMILElement.cpp:
2176         (WebCore::extractTimeFromVector):
2177         (WebCore::SVGSMILElement::findInstanceTime):
2178
2179 2011-08-15  Hayato Ito  <hayato@chromium.org>
2180
2181         Implement proper handling of focusin/focusout events in regard to shadow DOM boundaries.
2182         https://bugs.webkit.org/show_bug.cgi?id=64249
2183
2184         Reviewed by Dimitri Glazkov.
2185
2186         Introduces FocusInEventDispatchMediator/FocusOutEventDispatchMediator so
2187         that we can shrink ancestors of event target node considering shadow
2188         DOM boundaries before dispatching focusin/focusout events.
2189
2190         Test: fast/dom/shadow/shadow-boundary-events.html
2191
2192         * dom/Document.cpp:
2193         (WebCore::Document::setFocusedNode):
2194         * dom/Node.cpp:
2195         (WebCore::Node::dispatchFocusInEvent):
2196         (WebCore::Node::dispatchFocusOutEvent):
2197         (WebCore::Node::dispatchDOMActivateEvent):
2198         (WebCore::Node::defaultEventHandler):
2199         * dom/Node.h:
2200         * dom/UIEvent.cpp:
2201         (WebCore::FocusInEventDispatchMediator::create):
2202         (WebCore::FocusInEventDispatchMediator::FocusInEventDispatchMediator):
2203         (WebCore::FocusInEventDispatchMediator::dispatchEvent):
2204         (WebCore::FocusOutEventDispatchMediator::create):
2205         (WebCore::FocusOutEventDispatchMediator::FocusOutEventDispatchMediator):
2206         (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
2207         * dom/UIEvent.h:
2208
2209 2011-08-15  Pavel Feldman  <pfeldman@google.com>
2210
2211         Web Inspector: not all of the properties have valid descriptors on all platforms.
2212         Includes PropertyDescriptor protocol documentation fixes.
2213         https://bugs.webkit.org/show_bug.cgi?id=66215
2214
2215         Activations, LocalStorage and some other properties potentially don't have
2216         valid property descriptors. InjectedScript should use conservative getter in order to
2217         mitigate this.
2218
2219         Reviewed by Yury Semikhatsky.
2220
2221         * inspector/InjectedScriptSource.js:
2222         * inspector/Inspector.json:
2223
2224 2011-08-15  Pavel Feldman  <pfeldman@google.com>
2225
2226         Web Inspector: context menu on the link in the console does not have standard link options.
2227         https://bugs.webkit.org/show_bug.cgi?id=66214
2228
2229         Reviewed by Yury Semikhatsky.
2230
2231         * English.lproj/localizedStrings.js:
2232         * inspector/front-end/ConsoleView.js:
2233         * inspector/front-end/ElementsPanel.js:
2234         * inspector/front-end/ElementsTreeOutline.js:
2235         (WebInspector.ElementsTreeOutline.prototype.populateContextMenu):
2236         * inspector/front-end/NetworkPanel.js:
2237         (WebInspector.NetworkLogView.prototype._contextMenu):
2238         * inspector/front-end/StylesSidebarPane.js:
2239         (WebInspector.StylesSidebarPane.prototype._contextMenuEventFired):
2240         * inspector/front-end/inspector.js:
2241         (WebInspector.openLinkExternallyLabel):
2242         (WebInspector.copyLinkAddressLabel):
2243         (WebInspector.populateHrefContextMenu):
2244
2245 2011-08-14  Pavel Feldman  <pfeldman@chromium.org>
2246
2247         Web Inspector: showContextMenu missing in Remote DevTools
2248         https://bugs.webkit.org/show_bug.cgi?id=63725
2249
2250         Reviewed by Yury Semikhatsky.
2251
2252         * WebCore.gypi:
2253         * WebCore.vcproj/WebCore.vcproj:
2254         * inspector/front-end/ConsoleView.js:
2255         * inspector/front-end/SoftContextMenu.js: Added.
2256         (.WebInspector.SoftContextMenu):
2257         (.WebInspector.SoftContextMenu.prototype.show):
2258         (.WebInspector.SoftContextMenu.prototype._createMenuItem):
2259         (.WebInspector.SoftContextMenu.prototype._createSeparator):
2260         (.WebInspector.SoftContextMenu.prototype._menuItemMouseDown):
2261         (.WebInspector.SoftContextMenu.prototype._menuItemMouseUp):
2262         (.WebInspector.SoftContextMenu.prototype._triggerAction):
2263         (.WebInspector.SoftContextMenu.prototype._menuItemMouseOver):
2264         (.WebInspector.SoftContextMenu.prototype._menuItemMouseOut):
2265         (.WebInspector.SoftContextMenu.prototype._highlightMenuItem):
2266         (.WebInspector.SoftContextMenu.prototype._highlightPrevious):
2267         (.WebInspector.SoftContextMenu.prototype._highlightNext):
2268         (.WebInspector.SoftContextMenu.prototype._menuKeyDown):
2269         (.WebInspector.SoftContextMenu.prototype._glassPaneMouseUp):
2270         (.WebInspector.SoftContextMenu.prototype._discardMenu):
2271         (.InspectorFrontendHost.showContextMenu):
2272         * inspector/front-end/WebKit.qrc:
2273         * inspector/front-end/inspector.css:
2274         (.soft-context-menu-glass-pane):
2275         (.soft-context-menu):
2276         (.soft-context-menu-item):
2277         (.soft-context-menu-separator):
2278         (.soft-context-menu-item-mouse-over):
2279         * inspector/front-end/inspector.html:
2280
2281 2011-08-13  Abhishek Arya  <inferno@chromium.org>
2282
2283         Crash in HTMLTreeBuilder::processAnyOtherEndTagForInBody
2284         https://bugs.webkit.org/show_bug.cgi?id=66187
2285
2286         Reviewed by Adam Barth.
2287
2288         RefPtr a few ContainerNodes to prevent premature deletion.
2289
2290         Test: fast/html/process-end-tag-for-inbody-crash.html
2291
2292         * html/parser/HTMLTreeBuilder.cpp:
2293         (WebCore::HTMLTreeBuilder::processCloseWhenNestedTag):
2294         (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
2295         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
2296
2297 2011-08-14  Kalev Lember  <kalevlember@gmail.com>
2298
2299         Fix GTK Windows build after r92308.
2300         https://bugs.webkit.org/show_bug.cgi?id=66140
2301
2302         Reviewed by Xan Lopez.
2303
2304         * config.h: Don't try to include WebCoreHeaderDetection.h for GTK.
2305
2306 2011-08-13  Sam Weinig  <sam@webkit.org>
2307
2308         Remove forward declaration of -[WebUndefined dealloc] to appease the bot gods.
2309
2310         * bindings/objc/WebScriptObject.mm:
2311
2312 2011-08-13  Sam Weinig  <sam@webkit.org>
2313
2314         Remove assertion from -[WebUndefined dealloc] to try to mollify the bots.
2315
2316         * bindings/objc/WebScriptObject.mm:
2317         (-[WebUndefined dealloc]):
2318
2319 2011-08-13  Sam Weinig  <sam@webkit.org>
2320
2321         Remove unused variables from WebVideoFullscreenController.h
2322         https://bugs.webkit.org/show_bug.cgi?id=66192
2323
2324         Reviewed by Dan Bernstein.
2325
2326         * platform/mac/WebVideoFullscreenController.h:
2327         Remove _isWindowLoaded, _savedUIMode and _savedUIOptions which were not used.
2328
2329 2011-08-13  Sam Weinig  <sam@webkit.org>
2330
2331         Fix incorrect objective-c initialize in WebCore
2332         https://bugs.webkit.org/show_bug.cgi?id=66191
2333
2334         Reviewed by David Kilzer.
2335
2336         * accessibility/mac/AccessibilityObjectWrapper.mm:
2337         (-[AccessibilityObjectWrapper initWithAccessibilityObject:]):
2338         * rendering/RenderThemeMac.mm:
2339         (-[WebCoreRenderThemeNotificationObserver initWithTheme:WebCore::]):
2340         Correctly initialize by assigning to self and nil checking the result.
2341
2342 2011-08-13  Adam Barth  <abarth@webkit.org>
2343
2344         Fix clang build.
2345
2346         * platform/chromium/PopupMenuChromium.h:
2347
2348 2011-08-13  David Kilzer  <ddkilzer@apple.com>
2349
2350         <http://webkit.org/b/66188> WebCore.xcodeproj has duplicate entries again
2351
2352         Reviewed by Dan Bernstein.
2353
2354         * WebCore.xcodeproj/project.pbxproj: Remove duplicate entries
2355         by using uniq.  Originally noticed by Xcode 4.
2356
2357 2011-08-12  Dan Bernstein  <mitz@apple.com>
2358
2359         <rdar://problem/7337717> Add an option to automatically show tooltips (with the full text) over truncated text
2360         https://bugs.webkit.org/show_bug.cgi?id=66178
2361
2362         Reviewed by Simon Fraser.
2363
2364         * WebCore.exp.in: Export setShowsToolTipOverTruncatedText().
2365         * page/Chrome.cpp:
2366         (WebCore::Chrome::setToolTip): If no title is found, and the page is set to show tooltips over
2367         truncated text, try to set the tooltip to the full text of the truncated text, if any.
2368         * page/Settings.cpp:
2369         (WebCore::Settings::Settings): Initialize new member variable.
2370         (WebCore::Settings::setShowsToolTipOverTruncatedText): Added this setter.
2371         * page/Settings.h:
2372         (WebCore::Settings::showsToolTipOverTruncatedText): Added this getter.
2373         * rendering/HitTestResult.cpp:
2374         (WebCore::HitTestResult::innerTextIfTruncated): Added. If the inner node or its nearest enclosing
2375         block has text-overflow: ellipsis and has truncated lines, return the node’s (full) inner text.
2376         * rendering/HitTestResult.h:
2377         * rendering/RootInlineBox.h:
2378         (WebCore::RootInlineBox::hasEllipsisBox): Made this public.
2379
2380 2011-08-12  Stephen White  <senorblanco@chromium.org>
2381
2382         Ownership of canvas's GraphicsContext3D should be moved to PlatformContextSkia
2383         https://bugs.webkit.org/show_bug.cgi?id=66154
2384
2385         Reviewed by Kenneth Russell.
2386
2387         Covered by existing tests in fast/canvas and canvas/philip.
2388
2389         * html/canvas/CanvasRenderingContext2D.cpp:
2390         (WebCore::CanvasRenderingContext2D::isAccelerated):
2391         Plumb this call through GraphicsContext::isAcceleratedContext().
2392         (WebCore::CanvasRenderingContext2D::paintsIntoCanvasBuffer):
2393         For the ACCELERATED_2D_CANVAS path, plumb this call through
2394         (the new) GraphicsContext::paintsIntoCanvasBuffer().
2395         (WebCore::CanvasRenderingContext2D::clearAcceleration):
2396         (WebCore::CanvasRenderingContext2D::resetAcceleration):
2397         Remove the use of the m_context3D member; use a temporary instead.
2398         * html/canvas/CanvasRenderingContext2D.h:
2399         Remove the m_context3D member.
2400         * platform/graphics/GraphicsContext.cpp:
2401         (WebCore::GraphicsContext::isAcceleratedContext):
2402         (WebCore::GraphicsContext::paintsIntoImageBuffer):
2403         Implement stub versions of these functions for other platforms.
2404         * platform/graphics/GraphicsContext.h:
2405         Expose isAcceleratedContext() to all platforms.  Add
2406         paintsIntoImageBuffer() member function.
2407         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
2408         (WebCore::SharedGraphicsContext3D::create):
2409         * platform/graphics/gpu/SharedGraphicsContext3D.h:
2410         * platform/graphics/skia/GraphicsContextSkia.cpp:
2411         (WebCore::GraphicsContext::setGraphicsContext3D):
2412         (WebCore::GraphicsContext::isAcceleratedContext):
2413         (WebCore::GraphicsContext::paintsIntoImageBuffer):
2414         Basically gut this class leaving only a static creation function.
2415         * platform/graphics/skia/ImageSkia.cpp:
2416         (WebCore::paintSkBitmap):
2417         (WebCore::Image::drawPattern):
2418         Use isAccelerated() in place of useSkiaGpu().
2419         * platform/graphics/skia/PlatformContextSkia.cpp:
2420         (WebCore::PlatformContextSkia::isNativeFontRenderingAllowed):
2421         (WebCore::PlatformContextSkia::paintsIntoImageBuffer):
2422         * platform/graphics/skia/PlatformContextSkia.h:
2423         (WebCore::PlatformContextSkia::isAccelerated):
2424         Rename useSkiaGpu() to isAccelerated().  Plumb through 
2425         paintsIntoImageBuffer() to GraphicsContext3D.
2426
2427 2011-08-12  Sam Weinig  <sam@webkit.org>
2428
2429         Use __builtin_trap() for CRASH when building with clang
2430         https://bugs.webkit.org/show_bug.cgi?id=66152
2431
2432         Reviewed by Anders Carlsson.
2433
2434         * bindings/js/SerializedScriptValue.cpp:
2435         (WebCore::CloneBase::fail):
2436         * bindings/objc/WebScriptObject.mm:
2437         * platform/mac/BlockExceptions.h:
2438         * platform/text/cf/StringImplCF.cpp:
2439         Add NO_RETURN_DUE_TO_ASSERT.
2440
2441         * bridge/IdentifierRep.h:
2442         Don't define the destructor since it is never called,
2443
2444 2011-08-12  Joseph Pecoraro  <joepeck@webkit.org>
2445
2446         Abandoned Memory: Temporary CSS Fonts May Never Be Purged
2447         https://bugs.webkit.org/show_bug.cgi?id=66153
2448
2449         Reviewed by Dan Bernstein.
2450
2451         No new tests, this is not a functional change.
2452
2453         * css/CSSFontFaceSource.cpp:
2454         (WebCore::CSSFontFaceSource::getFontData):
2455         If the CSS font-face is loading from a URL then immediately
2456         fallback to a system font matching the description, since we
2457         cannot determine a reasonable family name from the m_string
2458         URL. The URL could be a dataURI.
2459
2460 2011-08-12  Fady Samuel  <fsamuel@chromium.org>
2461
2462         Refactoring of PopupMenuChromium For Readability and Maintainability
2463         https://bugs.webkit.org/show_bug.cgi?id=66009
2464
2465         Reviewed by Darin Fisher.
2466
2467         Split PopupMenuChromium into three sets of files: PopupMenuChromium.{h|cpp}, PopupContainer.{h|cpp},
2468         and PopupLisBox.{h|cpp}  for readability and maintainability.
2469
2470         No new tests as there's no change in functionality.
2471
2472         * WebCore.gypi:
2473         * platform/chromium/PopupContainer.cpp: Added.
2474         (WebCore::constructRelativeMouseEvent):
2475         (WebCore::constructRelativeWheelEvent):
2476         (WebCore::PopupContainer::create):
2477         (WebCore::PopupContainer::PopupContainer):
2478         (WebCore::PopupContainer::~PopupContainer):
2479         (WebCore::PopupContainer::layoutAndCalculateWidgetRect):
2480         (WebCore::PopupContainer::showPopup):
2481         (WebCore::PopupContainer::hidePopup):
2482         (WebCore::PopupContainer::notifyPopupHidden):
2483         (WebCore::PopupContainer::layoutAndGetRTLOffset):
2484         (WebCore::PopupContainer::handleMouseDownEvent):
2485         (WebCore::PopupContainer::handleMouseMoveEvent):
2486         (WebCore::PopupContainer::handleMouseReleaseEvent):
2487         (WebCore::PopupContainer::handleWheelEvent):
2488         (WebCore::PopupContainer::handleTouchEvent):
2489         (WebCore::PopupContainer::handleGestureEvent):
2490         (WebCore::PopupContainer::handleKeyEvent):
2491         (WebCore::PopupContainer::hide):
2492         (WebCore::PopupContainer::paint):
2493         (WebCore::PopupContainer::paintBorder):
2494         (WebCore::PopupContainer::isInterestedInEventForKey):
2495         (WebCore::PopupContainer::chromeClientChromium):
2496         (WebCore::PopupContainer::showInRect):
2497         (WebCore::PopupContainer::refresh):
2498         (WebCore::PopupContainer::isRTL):
2499         (WebCore::PopupContainer::selectedIndex):
2500         (WebCore::PopupContainer::menuItemHeight):
2501         (WebCore::PopupContainer::menuItemFontSize):
2502         (WebCore::PopupContainer::menuStyle):
2503         (WebCore::popupData):
2504         (WebCore::PopupContainer::getSelectedItemToolTip):
2505         * platform/chromium/PopupContainer.h: Added.
2506         (WebCore::PopupContainer::listBox):
2507         (WebCore::PopupContainer::popupType):
2508         * platform/chromium/PopupListBox.cpp: Added.
2509         (WebCore::PopupListBox::PopupListBox):
2510         (WebCore::PopupListBox::handleMouseDownEvent):
2511         (WebCore::PopupListBox::handleMouseMoveEvent):
2512         (WebCore::PopupListBox::handleMouseReleaseEvent):
2513         (WebCore::PopupListBox::handleWheelEvent):
2514         (WebCore::PopupListBox::isInterestedInEventForKey):
2515         (WebCore::PopupListBox::handleTouchEvent):
2516         (WebCore::PopupListBox::handleGestureEvent):
2517         (WebCore::isCharacterTypeEvent):
2518         (WebCore::PopupListBox::handleKeyEvent):
2519         (WebCore::PopupListBox::hostWindow):
2520         (WebCore::stripLeadingWhiteSpace):
2521         (WebCore::PopupListBox::typeAheadFind):
2522         (WebCore::PopupListBox::paint):
2523         (WebCore::PopupListBox::paintRow):
2524         (WebCore::PopupListBox::getRowFont):
2525         (WebCore::PopupListBox::abandon):
2526         (WebCore::PopupListBox::pointToRowIndex):
2527         (WebCore::PopupListBox::acceptIndex):
2528         (WebCore::PopupListBox::selectIndex):
2529         (WebCore::PopupListBox::setOriginalIndex):
2530         (WebCore::PopupListBox::getRowHeight):
2531         (WebCore::PopupListBox::getRowBounds):
2532         (WebCore::PopupListBox::invalidateRow):
2533         (WebCore::PopupListBox::scrollToRevealRow):
2534         (WebCore::PopupListBox::isSelectableItem):
2535         (WebCore::PopupListBox::clearSelection):
2536         (WebCore::PopupListBox::selectNextRow):
2537         (WebCore::PopupListBox::selectPreviousRow):
2538         (WebCore::PopupListBox::adjustSelectedIndex):
2539         (WebCore::PopupListBox::hidePopup):
2540         (WebCore::PopupListBox::updateFromElement):
2541         (WebCore::PopupListBox::setMaxWidthAndLayout):
2542         (WebCore::PopupListBox::layout):
2543         (WebCore::PopupListBox::clear):
2544         (WebCore::PopupListBox::isPointInBounds):
2545         * platform/chromium/PopupListBox.h: Added.
2546         (WebCore::PopupItem::PopupItem):
2547         (WebCore::PopupListBox::create):
2548         (WebCore::PopupListBox::selectedIndex):
2549         (WebCore::PopupListBox::numItems):
2550         (WebCore::PopupListBox::setBaseWidth):
2551         (WebCore::PopupListBox::setMaxHeight):
2552         (WebCore::PopupListBox::setMaxWidth):
2553         (WebCore::PopupListBox::disconnectClient):
2554         (WebCore::PopupListBox::items):
2555         (WebCore::PopupListBox::~PopupListBox):
2556         (WebCore::PopupListBox::scrollToRevealSelection):
2557         * platform/chromium/PopupMenuChromium.cpp:
2558         * platform/chromium/PopupMenuChromium.h:
2559
2560 2011-08-12  Mark Rowe  <mrowe@apple.com>
2561
2562         Be more forward-looking in the choice of compiler.
2563
2564         Rubber-stamped by Jon Honeycutt.
2565
2566         * Configurations/CompilerVersion.xcconfig:
2567
2568 2011-08-12  Nat Duca  <nduca@chromium.org>
2569
2570         [chromium] Fix comile warning on CCLayerTreeHost
2571
2572         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2573         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
2574
2575 2011-08-12  Ryosuke Niwa  <rniwa@webkit.org>
2576
2577         Apple-style-span class seems unnecessary
2578         https://bugs.webkit.org/show_bug.cgi?id=12248
2579
2580         Reviewed by Justin Garcia.
2581
2582         Stop generating span or font elements with class="Apple-style-span" given WebKit's editing component
2583         no longer depends on Apple-style-span since r92823 removed the dependency of copy and paste code on
2584         style spans. WebKit continues to recognize Apple style spans to remove them.
2585
2586         Also renamed isSpanWithoutAttributesOrUnstyleStyleSpan to isSpanWithoutAttributesOrUnstyle*d*StyleSpan.
2587
2588         * editing/ApplyStyleCommand.cpp:
2589         (WebCore::isLegacyAppleStyleSpan): Renamed from isStyleSpan.
2590         (WebCore::isSpanWithoutAttributesOrUnstyledStyleSpan): Renamed from isSpanWithoutAttributesOr*Unstyle*StyleSpan.
2591         (WebCore::createFontElement): No longer adds class="Apple-style-span".
2592         (WebCore::createStyleSpanElement): Ditto.
2593         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): Calls isSpanWithoutAttributesOrUnstyleStyleSpan
2594         instead of isUnstyledStyleSpan since there won't be any Apple style spans.
2595         (WebCore::dummySpanAncestorForNode):
2596         (WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans): Ditto.
2597         (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock): Ditto.
2598         (WebCore::ApplyStyleCommand::removeImplicitlyStyledElement):
2599         (WebCore::ApplyStyleCommand::removeCSSStyle):
2600         * editing/ApplyStyleCommand.h:
2601         * editing/EditingStyle.cpp:
2602         (WebCore::EditingStyle::removeStyleFromRulesAndContext): Ditto.
2603         * editing/ReplaceSelectionCommand.cpp:
2604         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): Calls isLegacyAppleStyleSpan instead
2605         of isStyleSpan.
2606         (WebCore::handleStyleSpansBeforeInsertion): Ditto.
2607         (WebCore::ReplaceSelectionCommand::handleStyleSpans): Ditto.
2608         (WebCore::ReplaceSelectionCommand::doApply): Ditto.
2609         * editing/markup.cpp:
2610         (WebCore::StyledMarkupAccumulator::appendStyleNodeOpenTag): No longer adds class="Apple-style-span".
2611
2612 2011-08-12  Nat Duca  <nduca@chromium.org>
2613
2614         [chromium] Fix compositor breakage due to duplicate context creation AND by context-lost
2615         https://bugs.webkit.org/show_bug.cgi?id=66168
2616
2617         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2618         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
2619         (WebCore::CCLayerTreeHost::initialize):
2620
2621 2011-08-12  Levi Weintraub  <leviw@chromium.org>
2622
2623         Switch RenderMenuList, RenderListBox, and RenderFieldSet to new layout units
2624         https://bugs.webkit.org/show_bug.cgi?id=66149
2625
2626         Reviewed by Eric Seidel.
2627
2628         Changing RenderMenuList, RenderListBox, and RenderFieldSet to the LayoutUnit
2629         abstraction from ints.
2630
2631         No tests as no change in functionality.
2632
2633         * rendering/RenderFieldset.cpp:
2634         (WebCore::RenderFieldset::layoutSpecialExcludedChild):
2635         * rendering/RenderListBox.cpp:
2636         (WebCore::RenderListBox::numVisibleItems):
2637         (WebCore::RenderListBox::listHeight):
2638         (WebCore::RenderListBox::baselinePosition):
2639         (WebCore::RenderListBox::itemBoundingBoxRect):
2640         (WebCore::itemOffsetForAlignment):
2641         (WebCore::RenderListBox::panScroll):
2642         (WebCore::RenderListBox::scrollToward):
2643         (WebCore::RenderListBox::autoscroll):
2644         (WebCore::RenderListBox::scrollSize):
2645         (WebCore::RenderListBox::scrollPosition):
2646         (WebCore::RenderListBox::setScrollOffset):
2647         (WebCore::RenderListBox::itemHeight):
2648         (WebCore::RenderListBox::verticalScrollbarWidth):
2649         (WebCore::RenderListBox::scrollWidth):
2650         (WebCore::RenderListBox::scrollHeight):
2651         (WebCore::RenderListBox::scrollLeft):
2652         (WebCore::RenderListBox::setScrollLeft):
2653         (WebCore::RenderListBox::scrollTop):
2654         (WebCore::RenderListBox::setScrollTop):
2655         (WebCore::RenderListBox::controlClipRect):
2656         (WebCore::RenderListBox::invalidateScrollbarRect):
2657         (WebCore::RenderListBox::convertFromScrollbarToContainingView):
2658         (WebCore::RenderListBox::convertFromContainingViewToScrollbar):
2659         (WebCore::RenderListBox::contentsSize):
2660         (WebCore::RenderListBox::currentMousePosition):
2661         * rendering/RenderListBox.h:
2662         (WebCore::RenderListBox::scrollCornerRect):
2663         (WebCore::RenderListBox::invalidateScrollCornerRect):
2664         * rendering/RenderMenuList.cpp:
2665         (WebCore::RenderMenuList::controlClipRect):
2666         (WebCore::RenderMenuList::showPopup):
2667         * rendering/RenderMenuList.h:
2668
2669 2011-08-12  David Hyatt  <hyatt@apple.com>
2670
2671         https://bugs.webkit.org/show_bug.cgi?id=66133
2672         
2673         Make hit testing work on RenderRegions. Pass off the hit testing to the RenderFlowThread
2674         layer tree (just as we did with painting).
2675
2676         Reviewed by Sam Weinig.
2677
2678         Added hit-test-float.html to demonstrate basic hit testing of content flowed into regions.
2679
2680         * rendering/HitTestRequest.h:
2681         (WebCore::HitTestRequest::type):
2682         * rendering/RenderFlowThread.cpp:
2683         (WebCore::RenderFlowThread::hitTestRegion):
2684         * rendering/RenderFlowThread.h:
2685         * rendering/RenderRegion.cpp:
2686         (WebCore::RenderRegion::paintReplaced):
2687         (WebCore::RenderRegion::nodeAtPoint):
2688         * rendering/RenderRegion.h:
2689
2690 2011-08-12  Levi Weintraub  <leviw@chromium.org>
2691
2692         Switch RenderTable* to new layout types
2693         https://bugs.webkit.org/show_bug.cgi?id=66146
2694
2695         Reviewed by Eric Seidel.
2696
2697         Converting RenderTable* classes to new LayoutUnits from ints.
2698
2699         No new tests as no new functionality.
2700
2701         * rendering/RenderTable.cpp:
2702         (WebCore::RenderTable::firstLineBoxBaseline):
2703         (WebCore::RenderTable::overflowClipRect):
2704         * rendering/RenderTable.h:
2705         (WebCore::RenderTable::columnPositions):
2706         * rendering/RenderTableCol.cpp:
2707         (WebCore::RenderTableCol::clippedOverflowRectForRepaint):
2708         * rendering/RenderTableRow.cpp:
2709         (WebCore::RenderTableRow::clippedOverflowRectForRepaint):
2710         * rendering/RenderTableSection.cpp:
2711         (WebCore::RenderTableSection::setCellLogicalWidths):
2712         (WebCore::RenderTableSection::calcRowLogicalHeight):
2713         (WebCore::RenderTableSection::layoutRows):
2714         (WebCore::RenderTableSection::calcOuterBorderBefore):
2715         (WebCore::RenderTableSection::calcOuterBorderAfter):
2716         (WebCore::RenderTableSection::calcOuterBorderStart):
2717         (WebCore::RenderTableSection::calcOuterBorderEnd):
2718         (WebCore::RenderTableSection::firstLineBoxBaseline):
2719         (WebCore::RenderTableSection::paintObject):
2720         (WebCore::RenderTableSection::nodeAtPoint):
2721         * rendering/RenderTableSection.h:
2722         (WebCore::RenderTableSection::outerBorderBefore):
2723         (WebCore::RenderTableSection::outerBorderAfter):
2724         (WebCore::RenderTableSection::outerBorderStart):
2725         (WebCore::RenderTableSection::outerBorderEnd):
2726         (WebCore::RenderTableSection::getBaseline):
2727
2728 2011-08-12  Adam Bergkvist  <adam.bergkvist@ericsson.com>
2729
2730         Reviewed by Alexey Proskuryakov.
2731
2732         EventSource loader should not buffer data
2733         https://bugs.webkit.org/show_bug.cgi?id=61863
2734
2735         Disabled buffering in the EventSource loader.
2736
2737         Added a manual test.
2738
2739         * manual-tests/eventsource/eventsource-loader-buffering.html: Added.
2740         * manual-tests/eventsource/eventsource-loader-buffering.php: Added.
2741         * page/EventSource.cpp:
2742         (WebCore::EventSource::connect):
2743
2744 2011-08-11  Pratik Solanki  <psolanki@apple.com>
2745
2746         ResourceLoader::didReceiveDataArray() does not handle m_shouldBufferData correctly
2747         https://bugs.webkit.org/show_bug.cgi?id=65926
2748
2749         Reviewed by Alexey Proskuryakov.
2750
2751         * loader/mac/ResourceLoaderMac.mm:
2752         (WebCore::ResourceLoader::didReceiveDataArray): Make sure we call the client callbacks when
2753         m_shouldBufferData is set to false.
2754
2755 2011-08-12  Sheriff Bot  <webkit.review.bot@gmail.com>
2756
2757         Unreviewed, rolling out r92976.
2758         http://trac.webkit.org/changeset/92976
2759         https://bugs.webkit.org/show_bug.cgi?id=66159
2760
2761         Does not compile on chromium-win (Requested by abarth|gardener
2762         on #webkit).
2763
2764         * WebCore.gypi:
2765         * platform/chromium/PopupContainer.cpp: Removed.
2766         * platform/chromium/PopupContainer.h: Removed.
2767         * platform/chromium/PopupListBox.cpp: Removed.
2768         * platform/chromium/PopupListBox.h: Removed.
2769         * platform/chromium/PopupMenuChromium.cpp:
2770         (WebCore::PopupListBox::create):
2771         (WebCore::PopupListBox::selectedIndex):
2772         (WebCore::PopupListBox::numItems):
2773         (WebCore::PopupListBox::setBaseWidth):
2774         (WebCore::PopupListBox::setMaxHeight):
2775         (WebCore::PopupListBox::setMaxWidth):
2776         (WebCore::PopupListBox::disconnectClient):
2777         (WebCore::PopupListBox::items):
2778         (WebCore::PopupListBox::PopupListBox):
2779         (WebCore::PopupListBox::~PopupListBox):
2780         (WebCore::PopupListBox::scrollToRevealSelection):
2781         (WebCore::constructRelativeMouseEvent):
2782         (WebCore::constructRelativeWheelEvent):
2783         (WebCore::PopupContainer::create):
2784         (WebCore::PopupContainer::PopupContainer):
2785         (WebCore::PopupContainer::~PopupContainer):
2786         (WebCore::PopupContainer::layoutAndCalculateWidgetRect):
2787         (WebCore::PopupContainer::showPopup):
2788         (WebCore::PopupContainer::hidePopup):
2789         (WebCore::PopupContainer::notifyPopupHidden):
2790         (WebCore::PopupContainer::layoutAndGetRTLOffset):
2791         (WebCore::PopupContainer::handleMouseDownEvent):
2792         (WebCore::PopupContainer::handleMouseMoveEvent):
2793         (WebCore::PopupContainer::handleMouseReleaseEvent):
2794         (WebCore::PopupContainer::handleWheelEvent):
2795         (WebCore::PopupContainer::handleTouchEvent):
2796         (WebCore::PopupContainer::handleGestureEvent):
2797         (WebCore::PopupContainer::handleKeyEvent):
2798         (WebCore::PopupContainer::hide):
2799         (WebCore::PopupContainer::paint):
2800         (WebCore::PopupContainer::paintBorder):
2801         (WebCore::PopupContainer::isInterestedInEventForKey):
2802         (WebCore::PopupContainer::chromeClientChromium):
2803         (WebCore::PopupContainer::showInRect):
2804         (WebCore::PopupContainer::refresh):
2805         (WebCore::PopupContainer::isRTL):
2806         (WebCore::PopupContainer::selectedIndex):
2807         (WebCore::PopupContainer::menuItemHeight):
2808         (WebCore::PopupContainer::menuItemFontSize):
2809         (WebCore::PopupContainer::menuStyle):
2810         (WebCore::popupData):
2811         (WebCore::PopupContainer::getSelectedItemToolTip):
2812         (WebCore::PopupListBox::handleMouseDownEvent):
2813         (WebCore::PopupListBox::handleMouseMoveEvent):
2814         (WebCore::PopupListBox::handleMouseReleaseEvent):
2815         (WebCore::PopupListBox::handleWheelEvent):
2816         (WebCore::PopupListBox::isInterestedInEventForKey):
2817         (WebCore::PopupListBox::handleTouchEvent):
2818         (WebCore::PopupListBox::handleGestureEvent):
2819         (WebCore::isCharacterTypeEvent):
2820         (WebCore::PopupListBox::handleKeyEvent):
2821         (WebCore::PopupListBox::hostWindow):
2822         (WebCore::stripLeadingWhiteSpace):
2823         (WebCore::PopupListBox::typeAheadFind):
2824         (WebCore::PopupListBox::paint):
2825         (WebCore::PopupListBox::paintRow):
2826         (WebCore::PopupListBox::getRowFont):
2827         (WebCore::PopupListBox::abandon):
2828         (WebCore::PopupListBox::pointToRowIndex):
2829         (WebCore::PopupListBox::acceptIndex):
2830         (WebCore::PopupListBox::selectIndex):
2831         (WebCore::PopupListBox::setOriginalIndex):
2832         (WebCore::PopupListBox::getRowHeight):
2833         (WebCore::PopupListBox::getRowBounds):
2834         (WebCore::PopupListBox::invalidateRow):
2835         (WebCore::PopupListBox::scrollToRevealRow):
2836         (WebCore::PopupListBox::isSelectableItem):
2837         (WebCore::PopupListBox::clearSelection):
2838         (WebCore::PopupListBox::selectNextRow):
2839         (WebCore::PopupListBox::selectPreviousRow):
2840         (WebCore::PopupListBox::adjustSelectedIndex):
2841         (WebCore::PopupListBox::hidePopup):
2842         (WebCore::PopupListBox::updateFromElement):
2843         (WebCore::PopupListBox::setMaxWidthAndLayout):
2844         (WebCore::PopupListBox::layout):
2845         (WebCore::PopupListBox::clear):
2846         (WebCore::PopupListBox::isPointInBounds):
2847         * platform/chromium/PopupMenuChromium.h:
2848         (WebCore::PopupItem::PopupItem):
2849         (WebCore::PopupContainer::listBox):
2850         (WebCore::PopupContainer::popupType):
2851
2852 2011-08-12  Andy Estes  <aestes@apple.com>
2853
2854         Cancel in onbeforeunload dialog sometime causes a button to stop working.
2855         https://bugs.webkit.org/show_bug.cgi?id=26211
2856
2857         Reviewed by Alexey Proskuryakov.
2858
2859         Test: fast/loader/form-submission-after-beforeunload-cancel.html
2860
2861         If an onbeforeunload handler cancels a navigation that was triggered by
2862         a form submission, WebCore's multiple form submission protection
2863         prevents the form from being submitted a second time even though no
2864         first submission actually took place. Fix this by clearing
2865         m_submittedFormURL if the onbeforeunload handler cancels the load. This
2866         allows the submission to be retried.
2867
2868         * loader/FrameLoader.cpp:
2869         (WebCore::FrameLoader::shouldClose): Set m_submittedFormURL to KURL()
2870         if shouldClose() will return false.
2871
2872 2011-08-12  David Hyatt  <hyatt@apple.com>
2873
2874         https://bugs.webkit.org/show_bug.cgi?id=66130
2875         
2876         RenderRegions need to paint the entire RenderFlowThread layer tree. Instead of just calling
2877         paintBlock, make sure RenderRegions paint the flow thread's layer tree instead with the appropriate
2878         offset.
2879         
2880         Fix RenderRegions to derive from RenderReplaced instead of RenderBox, since it simplifies the code.
2881         They no longer have to subclass their own layout method or worry about all of the painting logic
2882         for anything other than the content area.
2883
2884         Reviewed by Anders Carlsson.
2885
2886         Existing tests have a layer tree example, and so those results are updated to show the tree now.
2887
2888         * rendering/RenderFlowThread.cpp:
2889         (WebCore::RenderFlowThread::createFlowThreadStyle):
2890         (WebCore::RenderFlowThread::paintIntoRegion):
2891         * rendering/RenderLayer.cpp:
2892         (WebCore::RenderLayer::collectLayers):
2893         * rendering/RenderRegion.cpp:
2894         (WebCore::RenderRegion::RenderRegion):
2895         (WebCore::RenderRegion::paintReplaced):
2896         (WebCore::RenderRegion::styleDidChange):
2897         * rendering/RenderRegion.h:
2898
2899 2011-08-12  Chris Rogers  <crogers@google.com>
2900
2901         Fix mac build when web audio is enabled
2902         https://bugs.webkit.org/show_bug.cgi?id=66150
2903
2904         Unreviewed build fix.
2905
2906         * platform/audio/mac/AudioFileReaderMac.cpp:
2907         (WebCore::AudioFileReader::createBus):
2908
2909 2011-08-12  Jeff Miller  <jeffm@apple.com>
2910
2911         Need to handle kCACFContextNeedsFlushNotification notifications that arrive after the AVFWrapper has been disposed
2912         https://bugs.webkit.org/show_bug.cgi?id=65724
2913
2914         Instead of using a pointer to the AVFWrapper object as the context for various callbacks, assign each object an
2915         ID and use that instead. Keep track of the mapping between object IDs and AVFWrapper objects in a HashMap, and manage
2916         access to this map using a Mutex since it can be accessed from multiple threads. This allows us to actually delete
2917         AVFWrapper objects instead of leaking them (which we were doing before to prevent crashes).
2918
2919         Reviewed by Eric Carlson.
2920
2921         No new tests, uses existing media tests.
2922
2923         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.cpp:
2924         (WebCore::AVFWrapper::callbackContext): Added.
2925         (WebCore::AVFWrapper::AVFWrapper): Initialize m_objectID and add it to the HashMap.
2926         (WebCore::AVFWrapper::~AVFWrapper): Log object ID and remove obsolete assert.
2927         (WebCore::AVFWrapper::mapLock): Added.
2928         (WebCore::AVFWrapper::map): Added.
2929         (WebCore::AVFWrapper::addToMap): Added.
2930         (WebCore::AVFWrapper::removeFromMap): Added.
2931         (WebCore::AVFWrapper::avfWrapperForCallbackContext): Added.
2932         (WebCore::AVFWrapper::scheduleDisconnectAndDelete): Remove AVFWrapper from HashMap instead of zeroing m_owner.
2933         (WebCore::AVFWrapper::disconnectAndDeleteAVFWrapper): Use callbackContext(), delete the AVFWrapper here.
2934         (WebCore::AVFWrapper::createPlayer): Use callbackContext().
2935         (WebCore::AVFWrapper::createPlayerItem): Use callbackContext().
2936         (WebCore::AVFWrapper::periodicTimeObserverCallback): Retrieve AVFWrapper using the HashMap.
2937         (WebCore::AVFWrapper::notificationCallback): Retrieve AVFWrapper using the HashMap.
2938         (WebCore::AVFWrapper::loadPlayableCompletionCallback): Retrieve AVFWrapper using the HashMap.
2939         (WebCore::AVFWrapper::checkPlayability): Use callbackContext().
2940         (WebCore::AVFWrapper::loadMetadataCompletionCallback): Retrieve AVFWrapper using the HashMap.
2941         (WebCore::AVFWrapper::beginLoadingMetadata): Use callbackContext().
2942         (WebCore::AVFWrapper::seekCompletedCallback): Retrieve AVFWrapper using the HashMap.
2943         (WebCore::AVFWrapper::seekToTime): Use callbackContext().
2944         (WebCore::AVFWrapper::platformLayer): Remove overly noisy LOG().
2945
2946 2011-08-12  Fady Samuel  <fsamuel@chromium.org>
2947
2948         Refactoring of PopupMenuChromium
2949         https://bugs.webkit.org/show_bug.cgi?id=66009
2950
2951         Reviewed by Darin Fisher.
2952
2953         Split PopupMenuChromium into three sets of files: PopupMenuChromium.{h|cpp}, PopupContainer.{h|cpp}, and PopupLisBox.{h|cpp}
2954         for readability and maintainability.
2955
2956         No new tests as no functionality has changed.
2957
2958         * WebCore.gypi:
2959         * platform/chromium/PopupContainer.cpp: Added.
2960         (WebCore::constructRelativeMouseEvent):
2961         (WebCore::constructRelativeWheelEvent):
2962         (WebCore::PopupContainer::create):
2963         (WebCore::PopupContainer::PopupContainer):
2964         (WebCore::PopupContainer::~PopupContainer):
2965         (WebCore::PopupContainer::layoutAndCalculateWidgetRect):
2966         (WebCore::PopupContainer::showPopup):
2967         (WebCore::PopupContainer::hidePopup):
2968         (WebCore::PopupContainer::notifyPopupHidden):
2969         (WebCore::PopupContainer::layoutAndGetRTLOffset):
2970         (WebCore::PopupContainer::handleMouseDownEvent):
2971         (WebCore::PopupContainer::handleMouseMoveEvent):
2972         (WebCore::PopupContainer::handleMouseReleaseEvent):
2973         (WebCore::PopupContainer::handleWheelEvent):
2974         (WebCore::PopupContainer::handleTouchEvent):
2975         (WebCore::PopupContainer::handleGestureEvent):
2976         (WebCore::PopupContainer::handleKeyEvent):
2977         (WebCore::PopupContainer::hide):
2978         (WebCore::PopupContainer::paint):
2979         (WebCore::PopupContainer::paintBorder):
2980         (WebCore::PopupContainer::isInterestedInEventForKey):
2981         (WebCore::PopupContainer::chromeClientChromium):
2982         (WebCore::PopupContainer::showInRect):
2983         (WebCore::PopupContainer::refresh):
2984         (WebCore::PopupContainer::isRTL):
2985         (WebCore::PopupContainer::selectedIndex):
2986         (WebCore::PopupContainer::menuItemHeight):
2987         (WebCore::PopupContainer::menuItemFontSize):
2988         (WebCore::PopupContainer::menuStyle):
2989         (WebCore::popupData):
2990         (WebCore::PopupContainer::getSelectedItemToolTip):
2991         * platform/chromium/PopupContainer.h: Added.
2992         (WebCore::PopupContainer::listBox):
2993         (WebCore::PopupContainer::popupType):
2994         * platform/chromium/PopupListBox.cpp: Added.
2995         (WebCore::PopupListBox::PopupListBox):
2996         (WebCore::PopupListBox::handleMouseDownEvent):
2997         (WebCore::PopupListBox::handleMouseMoveEvent):
2998         (WebCore::PopupListBox::handleMouseReleaseEvent):
2999         (WebCore::PopupListBox::handleWheelEvent):
3000         (WebCore::PopupListBox::isInterestedInEventForKey):
3001         (WebCore::PopupListBox::handleTouchEvent):
3002         (WebCore::PopupListBox::handleGestureEvent):
3003         (WebCore::isCharacterTypeEvent):
3004         (WebCore::PopupListBox::handleKeyEvent):
3005         (WebCore::PopupListBox::hostWindow):
3006         (WebCore::stripLeadingWhiteSpace):
3007         (WebCore::PopupListBox::typeAheadFind):
3008         (WebCore::PopupListBox::paint):
3009         (WebCore::PopupListBox::paintRow):
3010         (WebCore::PopupListBox::getRowFont):
3011         (WebCore::PopupListBox::abandon):
3012         (WebCore::PopupListBox::pointToRowIndex):
3013         (WebCore::PopupListBox::acceptIndex):
3014         (WebCore::PopupListBox::selectIndex):
3015         (WebCore::PopupListBox::setOriginalIndex):
3016         (WebCore::PopupListBox::getRowHeight):
3017         (WebCore::PopupListBox::getRowBounds):
3018         (WebCore::PopupListBox::invalidateRow):
3019         (WebCore::PopupListBox::scrollToRevealRow):
3020         (WebCore::PopupListBox::isSelectableItem):
3021         (WebCore::PopupListBox::clearSelection):
3022         (WebCore::PopupListBox::selectNextRow):
3023         (WebCore::PopupListBox::selectPreviousRow):
3024         (WebCore::PopupListBox::adjustSelectedIndex):
3025         (WebCore::PopupListBox::hidePopup):
3026         (WebCore::PopupListBox::updateFromElement):
3027         (WebCore::PopupListBox::setMaxWidthAndLayout):
3028         (WebCore::PopupListBox::layout):
3029         (WebCore::PopupListBox::clear):
3030         (WebCore::PopupListBox::isPointInBounds):
3031         * platform/chromium/PopupListBox.h: Added.
3032         (WebCore::PopupItem::PopupItem):
3033         (WebCore::PopupListBox::create):
3034         (WebCore::PopupListBox::selectedIndex):
3035         (WebCore::PopupListBox::numItems):
3036         (WebCore::PopupListBox::setBaseWidth):
3037         (WebCore::PopupListBox::setMaxHeight):
3038         (WebCore::PopupListBox::setMaxWidth):
3039         (WebCore::PopupListBox::disconnectClient):
3040         (WebCore::PopupListBox::items):
3041         (WebCore::PopupListBox::~PopupListBox):
3042         (WebCore::PopupListBox::scrollToRevealSelection):
3043         * platform/chromium/PopupMenuChromium.cpp:
3044         * platform/chromium/PopupMenuChromium.h:
3045
3046 2011-08-12  Sam Weinig  <sam@webkit.org>
3047
3048         Move compiler specific macros to their own header
3049         https://bugs.webkit.org/show_bug.cgi?id=66119
3050
3051         Reviewed by Anders Carlsson.
3052
3053         * ForwardingHeaders/wtf/Compiler.h: Added.
3054
3055 2011-08-12  No'am Rosenthal  <noam.rosenthal@nokia.com>
3056
3057         [Qt][REGRESSION] composited content doesn't render since r92651
3058         https://bugs.webkit.org/show_bug.cgi?id=66108
3059
3060         Reviewed by Benjamin Poulain.
3061
3062         Changed the signature for GraphicsLayerTextureMapper::syncCompositingState to match
3063         the new signature in GraphicsLayer.h.
3064
3065         No new tests. This is a regression that's covered by existing pixel tests.
3066
3067         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
3068         (WebCore::GraphicsLayerTextureMapper::syncCompositingState):
3069         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
3070
3071 2011-08-12  Alexandru Chiculita  <achicu@adobe.com>
3072
3073         Original patch by Mihnea Ovidenie <mihnea@adobe.com>.
3074         Also contains some improvements done by Dave Hyatt <hyatt@apple.com>.
3075
3076         [CSSRegions]RenderFlowThread should display its content using RenderRegion
3077         https://bugs.webkit.org/show_bug.cgi?id=65627
3078
3079         RenderFlowThread collects RenderObjects from a flow. These objects are displayed by means
3080         of RenderRegion objects that get the content from the same flow.
3081
3082         Reviewed by David Hyatt.
3083
3084         Tests: fast/regions/content-flowed-into-regions-dynamically-added.html
3085                fast/regions/content-flowed-into-regions-dynamically-removed.html
3086                fast/regions/content-flowed-into-regions-with-dyn-index.html
3087                fast/regions/content-flowed-into-regions-with-index-dom.html
3088                fast/regions/content-flowed-into-regions-with-index.html
3089                fast/regions/content-flowed-into-regions.html
3090                fast/regions/flow-content-basic-vertical-rl.html
3091                fast/regions/flow-content-basic-vertical.html
3092
3093         * dom/Node.cpp:
3094         (WebCore::Node::diff):
3095         * rendering/RenderFlowThread.cpp:
3096         (WebCore::RenderFlowThread::RenderFlowThread):
3097         (WebCore::RenderFlowThread::createFlowThreadStyle):
3098         (WebCore::RenderFlowThread::styleDidChange):
3099         (WebCore::compareRenderRegions):
3100         (WebCore::RenderFlowThread::addRegionToThread):
3101         (WebCore::RenderFlowThread::removeRegionFromThread):
3102         (WebCore::RenderFlowThread::layout):
3103         (WebCore::RenderFlowThread::computeLogicalWidth):
3104         (WebCore::RenderFlowThread::computeLogicalHeight):
3105         (WebCore::RenderFlowThread::paintIntoRegion):
3106         * rendering/RenderFlowThread.h:
3107         * rendering/RenderObject.cpp:
3108         (WebCore::RenderObject::createObject):
3109         * rendering/RenderRegion.cpp:
3110         (WebCore::RenderRegion::RenderRegion):
3111         (WebCore::RenderRegion::~RenderRegion):
3112         (WebCore::RenderRegion::paint):
3113         (WebCore::RenderRegion::styleDidChange):
3114         * rendering/RenderRegion.h:
3115         (WebCore::RenderRegion::setRegionRect):
3116         (WebCore::RenderRegion::regionRect):
3117         * rendering/RenderTreeAsText.cpp:
3118         (WebCore::writeLayers):
3119         * rendering/RenderView.cpp:
3120         (WebCore::RenderView::styleDidChange):
3121         (WebCore::RenderView::renderFlowThreadWithName):
3122         * rendering/RenderView.h:
3123
3124 2011-08-12  Abhishek Arya  <inferno@chromium.org>
3125
3126         Crash in WebCore::editingIgnoresContent
3127         https://bugs.webkit.org/show_bug.cgi?id=66125
3128
3129         Reviewed by Ryosuke Niwa.
3130
3131         RefPtr a few nodes in case they get blown away in
3132         dispatchEvent calls.
3133
3134         Test: editing/selection/select-start-remove-root-crash.html
3135
3136         * editing/FrameSelection.cpp:
3137         (WebCore::FrameSelection::selectAll):
3138         * editing/ReplaceSelectionCommand.cpp:
3139         (WebCore::ReplacementFragment::ReplacementFragment):
3140
3141 2011-08-11  Pavel Podivilov  <podivilov@chromium.org>
3142
3143         Web Inspector: properly update console message count in source frames and resources panel.
3144         https://bugs.webkit.org/show_bug.cgi?id=57009
3145
3146         Reviewed by Yury Semikhatsky.
3147
3148         * inspector/front-end/ConsoleView.js:
3149         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageRepeatCountUpdated):
3150         * inspector/front-end/SourceFrame.js:
3151         (WebInspector.SourceFrame.prototype.show):
3152         (WebInspector.SourceFrame.prototype.addMessageToSource):
3153         (WebInspector.SourceFrame.prototype._updateMessageRepeatCount):
3154
3155 2011-08-12  Pavel Feldman  <pfeldman@google.com>
3156
3157         Not reviewed: follow up to inspector test breakage.
3158
3159         * inspector/front-end/ScriptsPanel.js:
3160         (WebInspector.ScriptsPanel.prototype._showScriptFoldersSettingChanged):
3161
3162 2011-08-12  Yury Semikhatsky  <yurys@chromium.org>
3163
3164         Web Inspector: expand exception properties when wrapping it as object.
3165         https://bugs.webkit.org/show_bug.cgi?id=66035
3166
3167         Use toString() value as a description for value thrown during eval.
3168
3169         Reviewed by Pavel Feldman.
3170
3171         * inspector/InjectedScriptSource.js:
3172         (.):
3173
3174 2011-08-12  Pavel Feldman  <pfeldman@google.com>
3175
3176         Web Inspector: make folders optional in the Scripts' panel file selector.
3177         https://bugs.webkit.org/show_bug.cgi?id=66100
3178
3179         Reviewed by Yury Semikhatsky.
3180
3181         * English.lproj/localizedStrings.js:
3182         * inspector/front-end/ScriptsPanel.js:
3183         (WebInspector.ScriptsPanel.prototype._showScriptFoldersSettingChanged):
3184         (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect.insertOrdered.optionCompare):
3185         (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect.insertOrdered):
3186         (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect):
3187         (WebInspector.ScriptsPanel.prototype.reset):
3188         (WebInspector.ScriptsPanel.prototype._resetFilesSelect):
3189         * inspector/front-end/Settings.js:
3190         (WebInspector.Settings):
3191         * inspector/front-end/SettingsScreen.js:
3192         (WebInspector.SettingsScreen):
3193
3194 2011-08-12  Pavel Podivilov  <podivilov@chromium.org>
3195
3196         Web Inspector: add space between error info and error message in source frame message bubble.
3197         https://bugs.webkit.org/show_bug.cgi?id=65069
3198
3199         Reviewed by Pavel Feldman.
3200
3201         * inspector/front-end/ConsoleView.js:
3202         (WebInspector.ConsoleMessage.prototype._formatMessage):
3203
3204 2011-08-12  Pavel Feldman  <pfeldman@google.com>
3205
3206         Web Inspector: console loses focus upon reloading the page from the inspector.
3207         https://bugs.webkit.org/show_bug.cgi?id=66068
3208
3209         Reviewed by Yury Semikhatsky.
3210
3211         * inspector/front-end/AuditsPanel.js:
3212         (WebInspector.AuditsPanel.prototype._auditFinishedCallback):
3213         (WebInspector.AuditsPanel.prototype._clearButtonClicked):
3214         * inspector/front-end/DataGrid.js:
3215         (WebInspector.DataGrid.prototype.revealAndSelect):
3216         (WebInspector.DataGridNode.prototype.revealAndSelect):
3217         * inspector/front-end/DetailedHeapshotView.js:
3218         (WebInspector.DetailedHeapshotView.prototype._jumpToSearchResult):
3219         * inspector/front-end/ElementsPanel.js:
3220         (WebInspector.ElementsPanel.this.treeOutline.selectedNodeChanged):
3221         (WebInspector.ElementsPanel.get this):
3222         (WebInspector.ElementsPanel):
3223         (WebInspector.ElementsPanel.prototype._reset):
3224         (WebInspector.ElementsPanel.prototype._setDocument.selectNode):
3225         (WebInspector.ElementsPanel.prototype._setDocument.selectLastSelectedNode):
3226         (WebInspector.ElementsPanel.prototype._setDocument):
3227         (WebInspector.ElementsPanel.prototype._domWordWrapSettingChanged):
3228         (WebInspector.ElementsPanel.prototype.populateHrefContextMenu):
3229         (WebInspector.ElementsPanel.prototype.switchToAndFocus):
3230         (WebInspector.ElementsPanel.prototype.selectedDOMNode):
3231         (WebInspector.ElementsPanel.prototype.selectDOMNode):
3232         (WebInspector.ElementsPanel.prototype.updateModifiedNodes):
3233         (WebInspector.ElementsPanel.prototype.updateBreadcrumb.selectCrumbFunction):
3234         (WebInspector.ElementsPanel.prototype.updateBreadcrumb):
3235         (WebInspector.ElementsPanel.prototype.updateStyles):
3236         (WebInspector.ElementsPanel.prototype.updateMetrics):
3237         (WebInspector.ElementsPanel.prototype.updateProperties):
3238         (WebInspector.ElementsPanel.prototype.updateEventListeners):
3239         (WebInspector.ElementsPanel.prototype.handleCopyEvent):
3240         (WebInspector.ElementsPanel.prototype.updateFocusedNode):
3241         * inspector/front-end/ElementsTreeOutline.js:
3242         (WebInspector.ElementsTreeOutline):
3243         (WebInspector.ElementsTreeOutline.prototype.selectedDOMNode):
3244         (WebInspector.ElementsTreeOutline.prototype.selectDOMNode):
3245         (WebInspector.ElementsTreeOutline.prototype.update):
3246         (WebInspector.ElementsTreeOutline.prototype._revealAndSelectNode):
3247         (WebInspector.ElementsTreeOutline.prototype._ondrop.callback):
3248         (WebInspector.ElementsTreeOutline.prototype._ondrop):
3249         (WebInspector.ElementsTreeElement.prototype._updateChildren.updateChildrenOfNode):
3250         (WebInspector.ElementsTreeElement.prototype._updateChildren):
3251         (WebInspector.ElementsTreeElement.prototype.onselect):
3252         (WebInspector.ElementsTreeElement.prototype.selectOnMouseDown):
3253         (WebInspector.ElementsTreeElement.prototype._startEditingTarget):
3254         (WebInspector.ElementsTreeElement.prototype._startEditing):
3255         * inspector/front-end/Panel.js:
3256         (WebInspector.Panel.prototype.reset):
3257         * inspector/front-end/ProfileView.js:
3258         (WebInspector.CPUProfileView.prototype._jumpToSearchResult):
3259         * inspector/front-end/ProfilesPanel.js:
3260         (WebInspector.ProfilesPanel.prototype._addProfileHeader):
3261         (WebInspector.ProfilesPanel.prototype.showProfile):
3262         (WebInspector.ProfileSidebarTreeElement.prototype.onselect):
3263         * inspector/front-end/ResourcesPanel.js:
3264         (WebInspector.ResourcesPanel.prototype._initDefaultSelection.get if):
3265         (WebInspector.ResourcesPanel.prototype._initDefaultSelection):
3266         (WebInspector.ResourcesPanel.prototype.reset):
3267         (WebInspector.ResourcesPanel.prototype.showResource):
3268         * inspector/front-end/StylesSidebarPane.js:
3269         (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted):
3270         (WebInspector.StylePropertyTreeElement.prototype.updateTitle.linkifyURL):
3271         * inspector/front-end/TimelinePanel.js:
3272         (WebInspector.TimelinePanel.prototype._createTopPane):
3273         * inspector/front-end/inspector.js:
3274         * inspector/front-end/inspectorCommon.css:
3275         (body):
3276         * inspector/front-end/treeoutline.js:
3277         (TreeOutline.prototype.revealAndSelect):
3278         (TreeElement.prototype.selectOnMouseDown):
3279         (TreeElement.prototype.revealAndSelect):
3280         (TreeElement.prototype.select):
3281
3282 2011-08-12  Yury Semikhatsky  <yurys@chromium.org>
3283
3284         Unreviewed. Inspector clean-up: remove unused method declaration from InspectorAgent.h
3285
3286         * inspector/InspectorAgent.h:
3287
3288 2011-08-12  Vsevolod Vlasov  <vsevik@chromium.org>
3289
3290         Web Inspector: Network resource identifier should have RequestId type and requestId name in protocol.
3291         https://bugs.webkit.org/show_bug.cgi?id=66061
3292
3293         Reviewed by Pavel Feldman.
3294
3295         * inspector/ConsoleMessage.cpp:
3296         (WebCore::ConsoleMessage::ConsoleMessage):
3297         (WebCore::ConsoleMessage::addToFrontend):
3298         * inspector/ConsoleMessage.h:
3299         * inspector/IdentifiersFactory.cpp:
3300         (WebCore::IdentifiersFactory::requestId):
3301         * inspector/IdentifiersFactory.h:
3302         * inspector/Inspector.json:
3303         * inspector/InspectorConsoleAgent.cpp:
3304         (WebCore::InspectorConsoleAgent::didReceiveResponse):
3305         (WebCore::InspectorConsoleAgent::didFailLoading):
3306         * inspector/InspectorResourceAgent.cpp:
3307         (WebCore::InspectorResourceAgent::willSendRequest):
3308         (WebCore::InspectorResourceAgent::markResourceAsCached):
3309         (WebCore::InspectorResourceAgent::didReceiveResponse):
3310         (WebCore::InspectorResourceAgent::didReceiveData):
3311         (WebCore::InspectorResourceAgent::didFinishLoading):
3312         (WebCore::InspectorResourceAgent::didFailLoading):
3313         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
3314         (WebCore::InspectorResourceAgent::setInitialScriptContent):
3315         (WebCore::InspectorResourceAgent::didReceiveScriptResponse):
3316         (WebCore::InspectorResourceAgent::setInitialXHRContent):
3317         (WebCore::InspectorResourceAgent::didReceiveXHRResponse):
3318         (WebCore::InspectorResourceAgent::didCreateWebSocket):
3319         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
3320         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
3321         (WebCore::InspectorResourceAgent::didCloseWebSocket):
3322         (WebCore::InspectorResourceAgent::getResourceContent):
3323         * inspector/InspectorResourceAgent.h:
3324         * inspector/InspectorTimelineAgent.cpp:
3325         (WebCore::InspectorTimelineAgent::willSendResourceRequest):
3326         (WebCore::InspectorTimelineAgent::willReceiveResourceData):
3327         (WebCore::InspectorTimelineAgent::willReceiveResourceResponse):
3328         (WebCore::InspectorTimelineAgent::didFinishLoadingResource):
3329         * inspector/NetworkResourcesData.cpp:
3330         (WebCore::NetworkResourcesData::ResourceData::ResourceData):
3331         (WebCore::NetworkResourcesData::resourceCreated):
3332         (WebCore::NetworkResourcesData::responseReceived):
3333         (WebCore::NetworkResourcesData::setResourceType):
3334         (WebCore::NetworkResourcesData::resourceType):
3335         (WebCore::NetworkResourcesData::setResourceContent):
3336         (WebCore::NetworkResourcesData::maybeAddResourceData):
3337         (WebCore::NetworkResourcesData::maybeDecodeDataToContent):
3338         (WebCore::NetworkResourcesData::addCachedResource):
3339         (WebCore::NetworkResourcesData::addResourceSharedBuffer):
3340         (WebCore::NetworkResourcesData::data):
3341         (WebCore::NetworkResourcesData::clear):
3342         (WebCore::NetworkResourcesData::ensureNoDataForRequestId):
3343         (WebCore::NetworkResourcesData::ensureFreeSpace):
3344         * inspector/NetworkResourcesData.h:
3345         (WebCore::NetworkResourcesData::ResourceData::requestId):
3346         * inspector/TimelineRecordFactory.cpp:
3347         (WebCore::TimelineRecordFactory::createResourceSendRequestData):
3348         (WebCore::TimelineRecordFactory::createResourceReceiveResponseData):
3349         (WebCore::TimelineRecordFactory::createResourceFinishData):
3350         (WebCore::TimelineRecordFactory::createReceiveResourceData):
3351         * inspector/TimelineRecordFactory.h:
3352         * inspector/front-end/ConsoleView.js:
3353         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageAdded):
3354         * inspector/front-end/ExtensionAPI.js:
3355         (WebInspector.injectedExtensionAPI.Resources.prototype.getHAR):
3356         * inspector/front-end/ExtensionServer.js:
3357         (WebInspector.ExtensionServer):
3358         (WebInspector.ExtensionServer.prototype._notifyResourceFinished):
3359         (WebInspector.ExtensionServer.prototype._onGetHAR):
3360         (WebInspector.ExtensionServer.prototype._requestId):
3361         * inspector/front-end/NetworkManager.js:
3362         (WebInspector.NetworkManager.prototype.requestContent):
3363         (WebInspector.NetworkDispatcher.prototype.requestWillBeSent):
3364         (WebInspector.NetworkDispatcher.prototype.resourceMarkedAsCached):
3365         (WebInspector.NetworkDispatcher.prototype.responseReceived):
3366         (WebInspector.NetworkDispatcher.prototype.dataReceived):
3367         (WebInspector.NetworkDispatcher.prototype.loadingFinished):
3368         (WebInspector.NetworkDispatcher.prototype.loadingFailed):
3369         (WebInspector.NetworkDispatcher.prototype.resourceLoadedFromMemoryCache):
3370         (WebInspector.NetworkDispatcher.prototype.webSocketCreated):
3371         (WebInspector.NetworkDispatcher.prototype.webSocketWillSendHandshakeRequest):
3372         (WebInspector.NetworkDispatcher.prototype.webSocketHandshakeResponseReceived):
3373         (WebInspector.NetworkDispatcher.prototype.webSocketClosed):
3374         (WebInspector.NetworkDispatcher.prototype._appendRedirect):
3375         (WebInspector.NetworkDispatcher.prototype._startResource):
3376         (WebInspector.NetworkDispatcher.prototype._finishResource):
3377         (WebInspector.NetworkDispatcher.prototype._createResource):
3378         * inspector/front-end/NetworkPanel.js:
3379         (WebInspector.NetworkLogView.prototype._appendResource):
3380         (WebInspector.NetworkLogView.prototype._matchResource):
3381         (WebInspector.NetworkLogView.prototype._updateSearchMatchedListAfterRequestIdChanged):
3382         (WebInspector.NetworkLogView.prototype.performSearch):
3383         * inspector/front-end/Resource.js:
3384         (WebInspector.Resource):
3385         * inspector/front-end/TimelinePanel.js:
3386         (WebInspector.TimelinePanel.prototype._addRecordToTimeline):
3387         (WebInspector.TimelinePanel.prototype._findParentRecord):
3388         (WebInspector.TimelinePanel.FormattedRecord):
3389
3390 2011-08-11  Hans Wennborg  <hans@chromium.org>
3391
3392         IndexedDB: Object store records don't need to have keys in all indexes
3393         https://bugs.webkit.org/show_bug.cgi?id=66049
3394
3395         Reviewed by Tony Chang.
3396
3397         Allow inserting records in an object store even though they don't
3398         yield keys in some index. The spec has changed in this regard.
3399
3400         * storage/IDBObjectStoreBackendImpl.cpp:
3401         (WebCore::IDBObjectStoreBackendImpl::putInternal):
3402
3403 2011-08-10  Hans Wennborg  <hans@chromium.org>
3404
3405         IndexedDB: Overwriting key in unique index should be possible
3406         https://bugs.webkit.org/show_bug.cgi?id=65993
3407
3408         Reviewed by Tony Chang.
3409
3410         It should be possible to overwrite an object store record even if
3411         there is a derived key for that record in an index with the unique flag set.
3412
3413         * storage/IDBBackingStore.h:
3414         * storage/IDBIndexBackendImpl.cpp:
3415         (WebCore::IDBIndexBackendImpl::addingKeyAllowed):
3416         * storage/IDBIndexBackendImpl.h:
3417         * storage/IDBLevelDBBackingStore.cpp:
3418         (WebCore::IDBLevelDBBackingStore::keyExistsInIndex):
3419         * storage/IDBLevelDBBackingStore.h:
3420         * storage/IDBObjectStoreBackendImpl.cpp:
3421         (WebCore::IDBObjectStoreBackendImpl::putInternal):
3422         * storage/IDBSQLiteBackingStore.cpp:
3423         (WebCore::IDBSQLiteBackingStore::keyExistsInIndex):
3424         * storage/IDBSQLiteBackingStore.h:
3425
3426 2011-08-11  Yuta Kitamura  <yutak@chromium.org>
3427
3428         WebSocket: Implement "protocol" attribute
3429         https://bugs.webkit.org/show_bug.cgi?id=65248
3430
3431         Reviewed by Kent Tamura.
3432
3433         Tests: http/tests/websocket/tests/hybi/no-subprotocol.html (added)
3434                http/tests/websocket/tests/hybi/set-protocol.html (added)
3435                http/tests/websocket/tests/hybi/workers/no-subprotocol.html (added)
3436                http/tests/websocket/tests/hixie76/undefined-attributes.html (updated)
3437                http/tests/websocket/tests/hybi/multiple-subprotocols.html (updated)
3438                http/tests/websocket/tests/hybi/workers/multiple-subprotocols.html (updated)
3439
3440         * websockets/ThreadableWebSocketChannel.h:
3441         Added subprotocol() function. This function is named differently from the counterpart of
3442         WebSocket class, because the name "protocol" can be confused with the WebSocket protocol.
3443         Added m_useHixie76Protocol and m_subprotocol, because these value may be used after
3444         m_channel has been released. Using bool should be fine, because boolean literals do not
3445         appear in ambiguous context.
3446         * websockets/ThreadableWebSocketChannelClientWrapper.cpp:
3447         (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
3448         (WebCore::ThreadableWebSocketChannelClientWrapper::subprotocol):
3449         (WebCore::ThreadableWebSocketChannelClientWrapper::setSubprotocol):
3450         * websockets/ThreadableWebSocketChannelClientWrapper.h:
3451         * websockets/WebSocket.cpp:
3452         (WebCore::WebSocket::WebSocket):
3453         (WebCore::WebSocket::connect):
3454         (WebCore::WebSocket::protocol):
3455         The "protocol" attribute is available only when the hybi-10 protocol is chosen.
3456         (WebCore::WebSocket::binaryType):
3457         (WebCore::WebSocket::setBinaryType):
3458         (WebCore::WebSocket::didConnect):
3459         * websockets/WebSocket.h:
3460         * websockets/WebSocket.idl:
3461         * websockets/WebSocketChannel.cpp:
3462         (WebCore::WebSocketChannel::subprotocol):
3463         * websockets/WebSocketChannel.h:
3464         * websockets/WorkerThreadableWebSocketChannel.cpp:
3465         (WebCore::WorkerThreadableWebSocketChannel::subprotocol):
3466         (WebCore::workerContextDidConnect):
3467         Subprotocol value is saved in the client wrapper object after the WebSocket connection is
3468         established.
3469         (WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect):
3470         * websockets/WorkerThreadableWebSocketChannel.h:
3471
3472 2011-08-11  Hayato Ito  <hayato@chromium.org>
3473
3474         Implement proper handling of events with a related target in regard to shadow DOM boundaries.
3475         https://bugs.webkit.org/show_bug.cgi?id=65899
3476
3477         Reviewed by Dimitri Glazkov.
3478
3479         Fixes issues in the following corner cases:
3480         1. When both a target node and a relatedTarget node are immediate children of
3481         the same shadow root, an event is not dispatched.
3482         2. If a target node is an ancestor of a relatedTarget node, crossing
3483         shadow boundaries, or vice verse, an event is not dispatched or wrongly
3484         dispatched.
3485
3486         Test: fast/dom/shadow/shadow-boundary-events.html
3487
3488         * dom/EventDispatcher.cpp:
3489         (WebCore::EventDispatcher::adjustToShadowBoundaries):
3490
3491 2011-08-11  John Bauman  <jbauman@chromium.org>
3492
3493         Readback composited webgl results for printing
3494         https://bugs.webkit.org/show_bug.cgi?id=65658
3495
3496         Reviewed by James Robinson.
3497
3498         The real composited results may be locked inside the compositor
3499         context's version of a texture because the drawing buffer was
3500         automatically cleared, so read from there to get the actual presented
3501         version to draw.
3502
3503         * html/canvas/WebGLRenderingContext.cpp:
3504         (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas):
3505         * platform/graphics/GraphicsContext3D.h:
3506         * platform/graphics/chromium/Extensions3DChromium.h:
3507         * platform/graphics/chromium/WebGLLayerChromium.cpp:
3508         (WebCore::WebGLLayerChromium::paintRenderedResultsToCanvas):
3509         * platform/graphics/chromium/WebGLLayerChromium.h:
3510         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
3511         (WebCore::GraphicsContext3D::paintCompositedResultsToCanvas):
3512
3513 2011-08-11  Andrew Wason  <rectalogic@rectalogic.com>
3514
3515         REGRESSION: Qt JavaScript bridge signal connection fails
3516         https://bugs.webkit.org/show_bug.cgi?id=66097
3517
3518         Reviewed by Gavin Barraclough.
3519
3520         Tests in WebKit/qt/tests/qwebframe
3521
3522         Call toThisObject() on exec->lexicalGlobalObject() so the correct
3523         object is passed to the JS signal handler.
3524
3525         * bridge/qt/qt_runtime.cpp:
3526         (JSC::Bindings::QtRuntimeConnectionMethod::call):
3527
3528 2011-08-11  Nico Weber  <thakis@chromium.org>
3529
3530         Remove incorrect comment about m_wheelEventHandlerCount
3531         https://bugs.webkit.org/show_bug.cgi?id=66117
3532
3533         Reviewed by Simon Fraser.
3534
3535         From what I can tell, this number is changed only in
3536         Frame::notifyChromeClientWheelEventHandlerCountChanged(),
3537         and there it just reads the number modified in
3538         Document::didAdd/RemoveWheelEventHandler(). So this is just the number
3539         of event handlers (and not related to horizontal scrollbars), and the
3540         variable name expresses that already.
3541
3542         * dom/Document.h:
3543
3544 2011-08-11  James Robinson  <jamesr@chromium.org>
3545
3546         [chromium] Defer managed texture creation and destruction until updateCompositorResources
3547         https://bugs.webkit.org/show_bug.cgi?id=64772
3548
3549         Reviewed by Kenneth Russell.
3550
3551         This adds support for deferring GraphicsContext3D calls for texture creation and destruction for managed
3552         textures and defers these calls until updateCompositorResources() for contents textures.  The primary benefit of
3553         this change is that it decouples managing the texture budget for the next frame (which has to happen before
3554         painting layer contents) from the actual GL calls that create/destroy textures.  That way, in the threaded
3555         compositing world we can continue to use textures from the previous frame while software painting contents for
3556         the next frame into software buffers or SkPictures.
3557
3558         Also renames LayerTexture to ManagedTexture to better reflect what it is.  Not all ManagedTextures we create are
3559         necessarily associated with layers, but they are all managed by a TextureManager.
3560
3561         Covered by compositing/ layout tests.
3562
3563         * WebCore.gypi:
3564         * platform/graphics/chromium/ContentLayerChromium.h:
3565         * platform/graphics/chromium/ImageLayerChromium.cpp:
3566         (WebCore::ImageLayerTextureUpdater::updateTextureRect):
3567         * platform/graphics/chromium/LayerRendererChromium.cpp:
3568         (WebCore::LayerRendererChromium::releaseTextures):
3569         (WebCore::LayerRendererChromium::drawLayers):
3570         (WebCore::LayerRendererChromium::updateLayers):
3571         (WebCore::LayerRendererChromium::getOffscreenLayerTexture):
3572         (WebCore::LayerRendererChromium::useRenderSurface):
3573         (WebCore::LayerRendererChromium::initializeSharedObjects):
3574         * platform/graphics/chromium/LayerRendererChromium.h:
3575         * platform/graphics/chromium/LayerTextureUpdater.h:
3576         * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
3577         (WebCore::LayerTextureUpdaterBitmap::updateTextureRect):
3578         (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect):
3579         * platform/graphics/chromium/LayerTextureUpdaterCanvas.h:
3580         * platform/graphics/chromium/LayerTilerChromium.cpp:
3581         (WebCore::LayerTilerChromium::getSingleTexture):
3582         (WebCore::LayerTilerChromium::createTile):
3583         (WebCore::LayerTilerChromium::updateRect):
3584         (WebCore::LayerTilerChromium::drawTiles):
3585         * platform/graphics/chromium/LayerTilerChromium.h:
3586         (WebCore::LayerTilerChromium::Tile::Tile):
3587         (WebCore::LayerTilerChromium::Tile::texture):
3588         * platform/graphics/chromium/ManagedTexture.cpp: Renamed from Source/WebCore/platform/graphics/chromium/LayerTexture.cpp.
3589         (WebCore::ManagedTexture::ManagedTexture):
3590         (WebCore::ManagedTexture::~ManagedTexture):
3591         (WebCore::ManagedTexture::isValid):
3592         (WebCore::ManagedTexture::reserve):
3593         (WebCore::ManagedTexture::unreserve):
3594         (WebCore::ManagedTexture::bindTexture):
3595         (WebCore::ManagedTexture::framebufferTexture2D):
3596         * platform/graphics/chromium/ManagedTexture.h: Renamed from Source/WebCore/platform/graphics/chromium/LayerTexture.h.
3597         (WebCore::ManagedTexture::create):
3598         (WebCore::ManagedTexture::format):
3599         (WebCore::ManagedTexture::isReserved):
3600         * platform/graphics/chromium/RenderSurfaceChromium.h:
3601         * platform/graphics/chromium/TextureManager.cpp:
3602         (WebCore::TextureManager::TextureManager):
3603         (WebCore::TextureManager::deleteEvictedTextures):
3604         (WebCore::TextureManager::removeTexture):
3605         (WebCore::TextureManager::allocateTexture):
3606         (WebCore::TextureManager::requestTexture):
3607         * platform/graphics/chromium/TextureManager.h:
3608         (WebCore::TextureManager::create):
3609         (WebCore::TextureManager::setAssociatedContextDebugOnly):
3610         (WebCore::TextureManager::associatedContextDebugOnly):
3611         * platform/graphics/chromium/TiledLayerChromium.h:
3612         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
3613         (WebCore::CCHeadsUpDisplay::draw):
3614         * platform/graphics/chromium/cc/CCHeadsUpDisplay.h:
3615         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
3616         (WebCore::CCRenderSurface::prepareContentsTexture):
3617         (WebCore::CCRenderSurface::drawSurface):
3618         * platform/graphics/chromium/cc/CCRenderSurface.h:
3619         (WebCore::CCRenderSurface::contentsTexture):
3620         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
3621         (WebCore::CCTiledLayerImpl::bindContentsTexture):
3622
3623 2011-08-11  David Kilzer  <ddkilzer@apple.com>
3624
3625         <http://webkit.org/b/66113> [CFNetwork] willCacheResponse() leaks CFCachedURLResponseRef if delegate changes CacheStoragePolicy
3626
3627         Reviewed by Joseph Pecoraro.
3628
3629         This first appeared in ToT WebKit r23462 (Windows merge).
3630
3631         * platform/network/cf/ResourceHandleCFNet.cpp:
3632         (WebCore::willCacheResponse): Only retain cachedResponse if we
3633         are returning the same object passed into the method, otherwise
3634         we end up double-retaining the new object created.
3635
3636 2011-08-05  Nat Duca  <nduca@chromium.org>
3637
3638         [chromium] Make WebViewImpl point at CCLayerTreeHost and related separation
3639         https://bugs.webkit.org/show_bug.cgi?id=65791
3640
3641         With this patch, LayerRendererChromium becomes increasingly responsible
3642         for rendering, while render scheduling and tree hosting moves into the
3643         CCLayerTreeHost.
3644
3645         Reviewed by James Robinson.
3646
3647         * platform/graphics/chromium/ContentLayerChromium.cpp:
3648         (WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded):
3649         * platform/graphics/chromium/LayerChromium.h:
3650         * platform/graphics/chromium/LayerRendererChromium.cpp:
3651         (WebCore::LayerRendererChromium::create):
3652         (WebCore::LayerRendererChromium::LayerRendererChromium):
3653         (WebCore::LayerRendererChromium::initialize):
3654         (WebCore::LayerRendererChromium::releaseTextures):
3655         (WebCore::LayerRendererChromium::updateRootLayerContents):
3656         (WebCore::LayerRendererChromium::drawRootLayer):
3657         (WebCore::LayerRendererChromium::invalidateRootLayerRect):
3658         (WebCore::LayerRendererChromium::rootLayerChanged):
3659         (WebCore::LayerRendererChromium::viewportChanged):
3660         (WebCore::LayerRendererChromium::updateLayers):
3661         (WebCore::LayerRendererChromium::drawLayers):
3662         (WebCore::LayerRendererChromium::drawLayersInternal):
3663         (WebCore::LayerRendererChromium::getFramebufferPixels):
3664         (WebCore::LayerRendererChromium::getOffscreenLayerTexture):
3665         (WebCore::LayerRendererChromium::copyOffscreenTextureToDisplay):
3666         (WebCore::LayerRendererChromium::useRenderSurface):
3667         (WebCore::LayerRendererChromium::setScissorToRect):
3668         (WebCore::LayerRendererChromium::layerTreeAsText):
3669         (WebCore::LayerRendererChromium::dumpRenderSurfaces):
3670         * platform/graphics/chromium/LayerRendererChromium.h:
3671         (WebCore::LayerRendererChromium::settings):
3672         (WebCore::LayerRendererChromium::owner):
3673         (WebCore::LayerRendererChromium::rootLayer):
3674         (WebCore::LayerRendererChromium::skiaContext):
3675         * platform/graphics/chromium/WebGLLayerChromium.cpp:
3676         (WebCore::WebGLLayerChromium::setTextureUpdated):
3677         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
3678         (WebCore::CCHeadsUpDisplay::draw):
3679         (WebCore::CCHeadsUpDisplay::enabled):
3680         * platform/graphics/chromium/cc/CCHeadsUpDisplay.h:
3681         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3682         (WebCore::CCLayerTreeHost::create):
3683         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
3684         (WebCore::CCLayerTreeHost::initialize):
3685         (WebCore::CCLayerTreeHost::animateAndLayout):
3686         (WebCore::CCLayerTreeHost::createLayerTreeHostCommitter):
3687         (WebCore::CCLayerTreeHost::createLayerTreeHostImpl):
3688         (WebCore::CCLayerTreeHost::context):
3689         (WebCore::CCLayerTreeHost::compositeAndReadback):
3690         (WebCore::CCLayerTreeHost::createRootLayerPainter):
3691         (WebCore::CCLayerTreeHost::finishAllRendering):
3692         (WebCore::CCLayerTreeHost::invalidateRootLayerRect):
3693         (WebCore::CCLayerTreeHost::setNeedsCommitAndRedraw):
3694         (WebCore::CCLayerTreeHost::setNeedsRedraw):
3695         (WebCore::CCLayerTreeHost::setRootLayer):
3696         (WebCore::CCLayerTreeHost::setViewport):
3697         (WebCore::CCLayerTreeHost::setVisible):
3698         (WebCore::CCLayerTreeHost::doComposite):
3699         (WebCore::CCLayerTreeHost::composite):
3700         (WebCore::CCLayerTreeHost::reallocateRenderer):
3701         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3702         (WebCore::CCLayerTreeHost::animating):
3703         (WebCore::CCLayerTreeHost::setAnimating):
3704         (WebCore::CCLayerTreeHost::rootLayer):
3705         (WebCore::CCLayerTreeHost::settings):
3706         (WebCore::CCLayerTreeHost::viewportContentRect):
3707         (WebCore::CCLayerTreeHost::viewportScrollPosition):
3708         (WebCore::CCLayerTreeHost::viewportVisibleRect):
3709         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3710         (WebCore::CCLayerTreeHostImpl::create):
3711         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
3712         (WebCore::CCLayerTreeHostImpl::drawLayers):
3713         (WebCore::CCLayerTreeHostImpl::drawLayersOnMainThread):
3714         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3715         * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp:
3716         (WebCore::CCLayerTreeHostImplProxy::initImplOnCCThread):
3717
3718 2011-08-11  Jeff Miller  <jeffm@apple.com>
3719
3720         WebCore::AVFWrapper fails to remove observer for kCACFContextNeedsFlushNotification
3721         https://bugs.webkit.org/show_bug.cgi?id=66116
3722
3723         We need to pass 0 as the object parameter to CFNotificationCenterRemoveObserver() when removing
3724         kCACFContextNeedsFlushNotification to match what we do when we registered for the same
3725         notification with CFNotificationCenterAddObserver().
3726
3727         Reviewed by John Sullivan.
3728
3729         No new tests, uses existing media tests.
3730
3731         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.cpp:
3732         (WebCore::AVFWrapper::disconnectAndDeleteAVFWrapper): Pass 0 as the object parameter to CFNotificationCenterRemoveObserver().
3733         (WebCore::AVFWrapper::notificationCallback): Remove obsolete FIXME comment.
3734
3735 2011-08-11  Ryosuke Niwa  <rniwa@webkit.org>
3736
3737         Share code between isStyleSpanOrSpanWithOnlyStyleAttribute, isUnstyledStyleSpan,
3738         isSpanWithoutAttributesOrUnstyleStyleSpan and replaceWithSpanOrRemoveIfWithoutAttributes
3739         https://bugs.webkit.org/show_bug.cgi?id=66091
3740
3741         Reviewed by Tony Chang.
3742
3743         Extracted common code as hasNoAttributeOrOnlyStyleAttribute. The only behavioral difference is that
3744         replaceWithSpanOrRemoveIfWithoutAttributes will now remove elements with class="Apple-style-span",
3745         for which I'm adding a test.
3746
3747         Test: editing/style/remove-styled-element-with-style-span.html
3748
3749         * editing/ApplyStyleCommand.cpp:
3750         (WebCore::hasNoAttributeOrOnlyStyleAttribute):
3751         (WebCore::isStyleSpanOrSpanWithOnlyStyleAttribute):
3752         (WebCore::isUnstyledStyleSpan):
3753         (WebCore::isSpanWithoutAttributesOrUnstyleStyleSpan):
3754         (WebCore::ApplyStyleCommand::replaceWithSpanOrRemoveIfWithoutAttributes):
3755
3756 2011-08-11  Tom Zakrajsek  <tomz@codeaurora.org>
3757
3758         Add HTMLUnknownElement interface as defined in
3759         http://www.w3.org/TR/html5/elements.html#elements-in-the-dom.
3760         https://bugs.webkit.org/show_bug.cgi?id=41841
3761
3762         Reviewed by Adam Barth.
3763
3764         Test: fast/html/unknown-tag.html
3765
3766         * CMakeLists.txt:
3767         * CodeGenerators.pri:
3768         * DerivedSources.cpp:
3769         * DerivedSources.make:
3770         * GNUmakefile.list.am:
3771         * WebCore.gypi:
3772         * WebCore.vcproj/WebCore.vcproj:
3773         * WebCore.xcodeproj/project.pbxproj:
3774         * bindings/scripts/CodeGeneratorV8.pm:
3775         (IsDOMNodeType):
3776         * dom/make_names.pl:
3777         (defaultParametersHash):
3778         (buildConstructorMap):
3779         (printJSElementIncludes):
3780         (printElementIncludes):
3781         (printWrapperFunctions):
3782         (printWrapperFactoryCppFile):
3783         * html/HTMLTagNames.in:
3784         * html/HTMLUnknownElement.h: Added.
3785         (WebCore::HTMLUnknownElement::create):
3786         (WebCore::HTMLUnknownElement::HTMLUnknownElement):
3787         * html/HTMLUnknownElement.idl: Added.
3788         * mathml/mathtags.in:
3789         * page/DOMWindow.idl:
3790         * svg/svgtags.in:
3791
3792 2011-08-11  Levi Weintraub  <leviw@chromium.org>
3793
3794         Remove dead code: borderInnerRect
3795         https://bugs.webkit.org/show_bug.cgi?id=66087
3796
3797         Reviewed by Adam Barth.
3798
3799         Removing an old and currently unused function: RenderObject::borderInnerRect.
3800
3801         No new tests since I'm just pruning dead code.
3802
3803         * rendering/RenderObject.cpp:
3804         * rendering/RenderObject.h:
3805
3806 2011-08-11  Simon Fraser  <simon.fraser@apple.com>
3807
3808         Avoid adding the visible wash layer twice
3809         https://bugs.webkit.org/show_bug.cgi?id=66098
3810
3811         Reviewed by Chris Marrin.
3812
3813         Fix two issues; only create a m_visibleTileWashLayer if we don't have one
3814         already, and avoid adding multiple m_visibleTileWashLayers to the sublayers
3815         array when flipping between tiled and non-tiled.
3816
3817         * platform/graphics/ca/GraphicsLayerCA.cpp:
3818         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
3819
3820 2011-08-11  Benjamin Poulain  <benjamin@webkit.org>
3821
3822         The PageSerializer should always use absolute URL
3823         https://bugs.webkit.org/show_bug.cgi?id=66006
3824
3825         Reviewed by Adam Barth.
3826
3827         Page serializer resolves every URL for storing the resources.
3828         The MarkupAccumulator used there should use the same rules in order to
3829         create a valid file.
3830
3831         No new tests because the test infrastructure for this
3832         does not exist with layout tests and the Chromium unit test for
3833         the serializer are disabled.
3834
3835         * page/PageSerializer.cpp:
3836         (WebCore::SerializerMarkupAccumulator::SerializerMarkupAccumulator):
3837
3838 2011-08-01  Adrienne Walker  <enne@google.com>
3839
3840         Enable fast path scrolling for composited iframes
3841         https://bugs.webkit.org/show_bug.cgi?id=65056
3842
3843         Reviewed by James Robinson.
3844
3845         iframes with composited layers for content should be able to do fast
3846         path scrolling because they draw into their own backing. To enable
3847         this, useSlowRepaints is modified to return true only for the cases
3848         that apply to composited layers. The fast path scrolling function is
3849         modified to send the invalidation to the backing itself rather than to
3850         the window.
3851
3852         Renamed a number of "slow repaint" functions to be the more accurate
3853         "cannot blit to window" as it will not always force slow path
3854         scrolling.
3855
3856         * page/FrameView.cpp:
3857         (WebCore::FrameView::reset):
3858         (WebCore::FrameView::useSlowRepaints):
3859         (WebCore::FrameView::useSlowRepaintsIfNotOverlapped):
3860         (WebCore::FrameView::contentsInCompositedLayer):
3861         (WebCore::FrameView::setCannotBlitToWindow):
3862         (WebCore::FrameView::scrollContentsFastPath):
3863         (WebCore::FrameView::scrollContentsSlowPath):
3864         * page/FrameView.h:
3865         * rendering/RenderLayer.cpp:
3866         (WebCore::RenderLayer::cannotBlitToWindow):
3867         * rendering/RenderLayer.h:
3868         * rendering/RenderView.cpp:
3869         (WebCore::RenderView::paintBoxDecorations):
3870
3871 2011-08-10  Adrienne Walker  <enne@google.com>
3872
3873         Support creating compositing layers for scrollable frames and iframes
3874         https://bugs.webkit.org/show_bug.cgi?id=55257
3875
3876         Reviewed by James Robinson.
3877
3878         When force compositing mode is turned on, iframes with overflow will
3879         become composited (in order to enable faster scrolling).
3880
3881         This patch was originally by Daniel Sievers <sievers@chromium.org>.
3882
3883         Tests: platform/chromium/compositing/force-compositing-mode/no-overflow-iframe-layer.html
3884                platform/chromium/compositing/force-compositing-mode/overflow-hidden-iframe-layer.html
3885                platform/chromium/compositing/force-compositing-mode/overflow-iframe-enter-compositing.html
3886                platform/chromium/compositing/force-compositing-mode/overflow-iframe-layer.html
3887                platform/chromium/compositing/force-compositing-mode/overflow-iframe-leave-compositing.html
3888
3889         * rendering/RenderLayerCompositor.cpp:
3890         (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
3891         (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame):
3892         * rendering/RenderLayerCompositor.h:
3893
3894 2011-08-11  Yong Li  <yoli@rim.com>
3895
3896         https://bugs.webkit.org/show_bug.cgi?id=65944
3897         Replace QuotesData::operator==() with QuotesData::equal(const QuotesData*
3898         , const QuotesData*) because QuotesData::operator==() were using non-standard
3899         C++ code that is not supported by all compilers.
3900
3901         Reviewed by Alexey Proskuryakov.
3902
3903         No new tests because some existing test cases can show the issue,
3904         for example, fast/css/content/content-quotes-01.html.
3905
3906         * rendering/RenderQuote.cpp:
3907         (WebCore::RenderQuote::styleDidChange):
3908         * rendering/style/QuotesData.cpp:
3909         (WebCore::QuotesData::equal):
3910         * rendering/style/QuotesData.h:
3911         * rendering/style/RenderStyle.cpp:
3912         (WebCore::RenderStyle::setQuotes):
3913         * rendering/style/StyleRareInheritedData.cpp:
3914         (WebCore::StyleRareInheritedData::operator==):
3915
3916 2011-08-11  David Hyatt  <hyatt@apple.com>
3917
3918         https://bugs.webkit.org/show_bug.cgi?id=66075
3919
3920         Turn on regions and exclusions by default. Fix one stray ifdef that I missed.
3921
3922         Reviewed by James Robinson.
3923
3924         * css/CSSComputedStyleDeclaration.cpp:
3925         (WebCore::contentToCSSValue):
3926
3927 2011-08-11  David Reveman  <reveman@chromium.org>
3928
3929         [Chromium] Temporarily disable layer anti-aliasing on ChromeOS.
3930         https://bugs.webkit.org/show_bug.cgi?id=65922
3931
3932         Reviewed by James Robinson.
3933
3934         No new tests.
3935
3936         * platform/graphics/chromium/LayerTilerChromium.cpp:
3937         (WebCore::LayerTilerChromium::draw):
3938
3939 2011-08-11  Benjamin Poulain  <benjamin@webkit.org>
3940
3941         [Qt] PageSerializer is specific to MHTML, we should not compile it
3942         https://bugs.webkit.org/show_bug.cgi?id=66054
3943
3944         Reviewed by Noam Rosenthal.
3945
3946         PageSerializer is specific to MHTML. Do not build PageSerializer unless MHTML is enabled.
3947
3948         * WebCore.pro:
3949
3950 2011-08-11  Andrey Kosyakov  <caseq@chromium.org>
3951
3952         Web Inspector: [refactoring] make tabbed pane a view
3953         https://bugs.webkit.org/show_bug.cgi?id=66060
3954
3955         Reviewed by Pavel Feldman.
3956
3957         * inspector/front-end/NetworkItemView.js:
3958         (WebInspector.NetworkItemView):
3959         (WebInspector.NetworkItemView.prototype.show):
3960         (WebInspector.NetworkItemView.prototype._selectTab.get if):
3961         (WebInspector.NetworkItemView.prototype._selectTab):
3962         * inspector/front-end/TabbedPane.js:
3963         (WebInspector.TabbedPane):
3964         * inspector/front-end/inspector.html:
3965
3966 2011-08-11  Andrey Kosyakov  <caseq@chromium.org>
3967
3968         Web Inspector: source frame popover simetimes pops up after user switches from Scripts panel
3969         https://bugs.webkit.org/show_bug.cgi?id=66057
3970
3971         Reviewed by Pavel Feldman.
3972
3973         * inspector/front-end/SourceFrame.js: remove popover timer when removing popover.
3974         (WebInspector.SourceFrame.prototype._mouseDown):
3975         (WebInspector.SourceFrame.prototype._hidePopup):
3976
3977 2011-08-11  Vsevolod Vlasov  <vsevik@chromium.org>
3978
3979         Web Inspector: Scripts panel: display the current search match index in the toolbar.
3980         https://bugs.webkit.org/show_bug.cgi?id=66048
3981
3982         Reviewed by Pavel Feldman.
3983
3984         * English.lproj/localizedStrings.js:
3985         * inspector/front-end/ScriptsPanel.js:
3986         (WebInspector.ScriptsPanel.prototype.performSearch.finishedCallback):
3987         (WebInspector.ScriptsPanel.prototype.performSearch):
3988         (WebInspector.ScriptsPanel.prototype.jumpToNextSearchResult):
3989         (WebInspector.ScriptsPanel.prototype.jumpToPreviousSearchResult):
3990         * inspector/front-end/SearchController.js:
3991         (WebInspector.SearchController.prototype.updateSearchMatchesCount):
3992         (WebInspector.SearchController.prototype.updateCurrentMatchIndex):
3993         (WebInspector.SearchController.prototype.activePanelChanged.performPanelSearch):
3994         (WebInspector.SearchController.prototype.activePanelChanged):
3995         (WebInspector.SearchController.prototype._updateSearchMatchesCountAndCurrentMatchIndex):
3996         (WebInspector.SearchController.prototype._performSearch):
3997         * inspector/front-end/SourceFrame.js:
3998         (WebInspector.SourceFrame.prototype.get currentSearchResultIndex):
3999
4000 2011-08-11  Xan Lopez  <xlopez@igalia.com>
4001
4002         [GTK] Add another missing file to GNUmakefile
4003
4004         Reviewed by Gustavo Noronha.
4005
4006         * GNUmakefile.list.am:
4007
4008 2011-08-11  Xan Lopez  <xlopez@igalia.com>
4009
4010         [GTK] Add missing files to GNUMakefile
4011
4012         Reviewed by Gustavo Noronha.
4013
4014         * GNUmakefile.am:
4015         * GNUmakefile.list.am:
4016
4017 2011-08-11  Yuta Kitamura  <yutak@chromium.org>
4018
4019         WebSocket: Use PassRefPtr<> in function arguments in WorkerThreadableWebSocketChannel.cpp
4020         https://bugs.webkit.org/show_bug.cgi?id=66047
4021
4022         Reviewed by Kent Tamura.
4023
4024         It's safe to use PassRefPtr<> in these functions because:
4025         - CrossThreadTask knows how to pass a RefPtr<> across threads, and
4026         - Call sites do not pass the pointers to anywhere else.
4027
4028         No change in functionality, thus no new tests.
4029
4030         * websockets/WorkerThreadableWebSocketChannel.cpp:
4031         (WebCore::workerContextDidSend):
4032         (WebCore::workerContextDidGetBufferedAmount):
4033         (WebCore::workerContextDidConnect):
4034         (WebCore::workerContextDidReceiveMessage):
4035         (WebCore::workerContextDidStartClosingHandshake):
4036         (WebCore::workerContextDidClose):
4037
4038 2011-08-11  Pavel Feldman  <pfeldman@google.com>
4039
4040         Web Inspector: [Mac] search as you type does not work with the new indent in the script selector.
4041         https://bugs.webkit.org/show_bug.cgi?id=66039
4042
4043         Reviewed by Yury Semikhatsky.
4044
4045         * inspector/front-end/ScriptsPanel.js:
4046         (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect):
4047         * inspector/front-end/inspector.css:
4048         (select.status-bar-item):
4049
4050 2011-08-11  Alexis Menard  <alexis.menard@openbossa.org>
4051
4052         Unreviewed build fix for Qt.
4053
4054         Make sure we build when Qt is namespaced.
4055
4056         * platform/graphics/gstreamer/PlatformVideoWindowPrivate.h:
4057
4058 2011-08-11  Pavel Podivilov  <podivilov@chromium.org>
4059
4060         Web Inspector: use source-file-replaced instead of source-file-changed event.
4061         https://bugs.webkit.org/show_bug.cgi?id=65551
4062
4063         Reviewed by Pavel Feldman.
4064
4065         Test: inspector/debugger/source-frame-count.html
4066
4067         * inspector/front-end/DebuggerPresentationModel.js:
4068         (WebInspector.DebuggerPresentationModel.prototype._addScript):
4069         (WebInspector.DebuggerPresentationModel.prototype._uiSourceCodeReplaced):
<