2090dbfa3b14d73b9fc577e765636349e094b846
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-08-19  Pavel Podivilov  <podivilov@chromium.org>
2
3         Web Inspector: update scope variables upon value changes via console.
4         https://bugs.webkit.org/show_bug.cgi?id=54720
5
6         Reviewed by Pavel Feldman.
7
8         * inspector/front-end/ScriptsPanel.js:
9         (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame):
10
11 2011-08-18  Pavel Podivilov  <podivilov@chromium.org>
12
13         Web Inspector: extract breakpoint management code to a separate class and add tests.
14         https://bugs.webkit.org/show_bug.cgi?id=66224
15
16         Reviewed by Pavel Feldman.
17
18         Test: inspector/debugger/breakpoint-manager.html
19
20         * WebCore.gypi:
21         * WebCore.vcproj/WebCore.vcproj:
22         * inspector/front-end/BreakpointManager.js: Added.
23         (WebInspector.BreakpointManager):
24         (WebInspector.BreakpointManager.prototype.uiSourceCodeAdded):
25         (WebInspector.BreakpointManager.prototype.breakpointsForUISourceCode):
26         (WebInspector.BreakpointManager.prototype.setBreakpoint):
27         (WebInspector.BreakpointManager.prototype.removeBreakpoint):
28         (WebInspector.BreakpointManager.prototype._materializeBreakpoint):
29         (WebInspector.BreakpointManager.prototype._breakpointDebuggerLocationChanged):
30         (WebInspector.BreakpointManager.prototype._addBreakpointToUI):
31         (WebInspector.BreakpointManager.prototype._deleteBreakpointFromUI):
32         (WebInspector.BreakpointManager.prototype._moveBreakpointInUI):
33         (WebInspector.BreakpointManager.prototype._breakpoints):
34         (WebInspector.BreakpointManager.prototype._breakpoint):
35         (WebInspector.BreakpointManager.prototype._forEachBreakpoint):
36         (WebInspector.BreakpointManager.prototype._setBreakpointInDebugger):
37         (WebInspector.BreakpointManager.prototype._removeBreakpointFromDebugger):
38         (WebInspector.BreakpointManager.prototype._breakpointResolved):
39         (WebInspector.BreakpointManager.prototype.serializeBreakpoints):
40         (WebInspector.BreakpointManager.prototype.reset):
41         (WebInspector.BreakpointManager.prototype.debuggerReset):
42         (WebInspector.Breakpoint):
43         (WebInspector.Breakpoint.prototype.serialize):
44         (WebInspector.Breakpoint.deserialize):
45         * inspector/front-end/DebuggerModel.js:
46         (WebInspector.DebuggerModel.prototype.setBreakpointByScriptLocation):
47         * inspector/front-end/SourceFile.js:
48         (WebInspector.RawSourceCode.prototype.get rawSourceCode):
49         * inspector/front-end/WebKit.qrc:
50         * inspector/front-end/inspector.html:
51
52 2011-08-19  Adam Roben  <aroben@apple.com>
53
54         Fix typo
55
56         * dom/DOMAllInOne.cpp:
57
58 2011-08-19  Adam Roben  <aroben@apple.com>
59
60         Windows build fix after r93385
61
62         * dom/DOMAllInOne.cpp: Added EventDispatcMediator.cpp.
63
64 2011-08-19  Pavel Feldman  <pfeldman@google.com>
65
66         Web Inspector: getAttributes should work on a single node, not array.
67         https://bugs.webkit.org/show_bug.cgi?id=66544
68
69         Reviewed by Adam Roben.
70
71         * inspector/Inspector.json:
72         * inspector/InspectorDOMAgent.cpp:
73         (WebCore::InspectorDOMAgent::getAttributes):
74         * inspector/InspectorDOMAgent.h:
75         * inspector/front-end/DOMAgent.js:
76         (WebInspector.DOMAgent.prototype._loadNodeAttributes):
77
78 2011-08-19  Anton Muhin  <antonm@chromium.org>
79
80         [v8] CSS wrapper objects retention
81         https://bugs.webkit.org/show_bug.cgi?id=66377
82
83         Reviewed by Pavel Feldman.
84
85         Disable object grouping for CSS object wrappers.
86         This logic leads to hard to debug use-after-free problems.
87
88         * bindings/v8/V8GCController.cpp:
89         (WebCore::GrouperVisitor::visitDOMWrapper):
90
91 2011-08-19  Pavel Feldman  <pfeldman@google.com>
92
93         Web Inspector: introduce NodeId inherited from integer in the DOM domain description.
94         https://bugs.webkit.org/show_bug.cgi?id=66491
95
96         Drive-by rename of couple of DOM domain protocol methods.
97
98         Reviewed by Adam Roben.
99
100         * inspector/Inspector.json:
101         * inspector/InspectorDOMAgent.cpp:
102         (WebCore::InspectorDOMAgent::requestChildNodes):
103         (WebCore::InspectorDOMAgent::getAttributes):
104         (WebCore::InspectorDOMAgent::requestNode):
105         (WebCore::InspectorDOMAgent::buildObjectForNode):
106         * inspector/InspectorDOMAgent.h:
107         * inspector/front-end/DOMAgent.js:
108         (WebInspector.DOMNode):
109         (WebInspector.DOMNode.prototype.getChildNodes):
110         (WebInspector.DOMAgent.prototype.pushNodeToFrontend):
111         (WebInspector.DOMAgent.prototype._loadNodeAttributes):
112         (WebInspector.DOMAgent.prototype._setDocument):
113         (WebInspector.DOMAgent.prototype._setDetachedRoot):
114         * inspector/generate-inspector-idl:
115
116 2011-08-19  Jochen Eisinger  <jochen@chromium.org>
117
118         IDBSQLiteBackingStore::deleteObjectStore should maintain referential integrity.
119         https://bugs.webkit.org/show_bug.cgi?id=66470
120
121         Reviewed by Tony Gentilcore.
122
123         * storage/IDBSQLiteBackingStore.cpp:
124         (WebCore::IDBSQLiteBackingStore::deleteObjectStore):
125
126 2011-08-19  Takashi Toyoshima  <toyoshim@chromium.org>
127
128         [WebSocket] CloseEvent's code and reason properties support.
129         https://bugs.webkit.org/show_bug.cgi?id=66362
130
131         Reviewed by Kent Tamura.
132
133         Current WebSocket implementation miss code and reason properties
134         in CloseEvent. This change expose incoming closing frame's code
135         and reason to JavaScript API.
136
137         Tests: http/tests/websocket/tests/hybi/close-code-and-reason.html
138                http/tests/websocket/tests/hybi/workers/close-code-and-reason.html
139
140         * websockets/CloseEvent.h:
141         (WebCore::CloseEvent::initCloseEvent):
142         (WebCore::CloseEvent::code):
143         (WebCore::CloseEvent::reason):
144         (WebCore::CloseEvent::CloseEvent):
145         * websockets/CloseEvent.idl:
146         Add code and reason properies.
147         * websockets/ThreadableWebSocketChannelClientWrapper.cpp:
148         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
149         (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback):
150         * websockets/ThreadableWebSocketChannelClientWrapper.h:
151         * websockets/WebSocket.cpp:
152         (WebCore::WebSocket::didConnect):
153         (WebCore::WebSocket::didClose):
154         * websockets/WebSocket.h:
155         Add implement to handle code and reason.
156         * websockets/WebSocketChannel.cpp:
157         (WebCore::WebSocketChannel::WebSocketChannel):
158         (WebCore::WebSocketChannel::didCloseSocketStream):
159         (WebCore::WebSocketChannel::processFrame):
160         * websockets/WebSocketChannel.h:
161         Add closing frame payload parser.
162         * websockets/WebSocketChannelClient.h:
163         (WebCore::WebSocketChannelClient::didClose):
164         * websockets/WorkerThreadableWebSocketChannel.cpp:
165         (WebCore::workerContextDidClose):
166         (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
167         * websockets/WorkerThreadableWebSocketChannel.h:
168         Add implement to handle code and reason.
169
170 2011-08-19  MORITA Hajime  <morrita@google.com>
171
172         Spell-checking doesn't recognize word boundaries on contests inserted by execCommand('insertHTML')
173         https://bugs.webkit.org/show_bug.cgi?id=65902
174
175         Reviewed by Ryosuke Niwa.
176         
177         markMisspellingsAndBadGrammar() was using markSpelling() and markBadGrammar().
178         But these are low-level API and caller should take care of word boundary.
179         This change replaced these call with overloaded version of markMisspellingsAndBadGrammar(),
180         which handles word boundary correctly.
181         
182         Test: editing/spelling/spelling-insert-html.html
183
184         * WebCore.exp.in:
185         * editing/Editor.cpp:
186         (WebCore::Editor::markMisspellingsAndBadGrammar):
187         * testing/Internals.cpp:
188         (WebCore::Internals::markerCountOf): Added.
189         (WebCore::Internals::markedRangeAt): Added.
190         * testing/Internals.h:
191         * testing/Internals.idl:
192
193 2011-08-19  Nayan Kumar K  <nayankk@motorola.com>
194
195         Run-time error fix in WebKit-GTK with video support disabled.
196         https://bugs.webkit.org/show_bug.cgi?id=66541
197
198         Definition of the function extraFullScreenStyleSheet() in webkit-gtk
199         lies outside ENABLE(VIDEO) guard, resulting in runtime error while
200         trying to launch GtkLauncher with video support disabled.
201
202         Reviewed by Philippe Normand.
203
204         Run-time error fix. No test cases were added.
205
206         * platform/gtk/RenderThemeGtk.h:
207
208 2011-08-19  Shinya Kawanaka  <shinyak@google.com>
209
210         input[maxlength=0] should ignore text input.
211         https://bugs.webkit.org/show_bug.cgi?id=65497
212
213         Reviewed by Kent Tamura.
214
215         Changed the valid range of maxlength.
216
217         * html/HTMLInputElement.cpp:
218         (WebCore::HTMLInputElement::parseMaxLengthAttribute):
219           Changed maxlength check condition.
220
221 2011-08-19  Ilya Tikhonovsky  <loislo@chromium.org>
222
223         Web Inspector: backend js api: an ability to skip optional arguments in the middle of the argument list is required.
224         https://bugs.webkit.org/show_bug.cgi?id=66482
225
226         There are functions in the API with multiple optional arguments.
227         When we call it we have to specify an optional argument as 'undefined' if we want to pass non default value for the next one.
228         This can be solved with passing the arguments as an object.
229
230         Reviewed by Pavel Feldman.
231
232         * inspector/CodeGeneratorInspector.pm:
233         * inspector/front-end/RemoteObject.js:
234
235 2011-08-19  Zoltan Horvath  <zoltan@webkit.org>
236
237         [Qt] Build fix after r93384.
238
239         * rendering/RenderBlockLineLayout.cpp:
240         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
241
242 2011-08-18  Shawn Singh  <shawnsingh@chromium.org>
243
244         Computing screen-space transform for LayerChromium and CCLayerImpl
245         https://bugs.webkit.org/show_bug.cgi?id=66114
246
247         Added a data member to LayerChromium and CCLayerImpl that holds
248         the screen-space transform.   The transform is computed in
249         calculateDrawTransformsAndVisibility(), which is used during
250         updating (LayerChromium) and drawing (CCLayerImpl).
251
252         Also fixed a FIXME in LayerRendererChromium::drawLayer, which
253         was not computing the entire hierarchy of transforms to determine
254         back-face visibility.  Now it simply uses the world space transform.
255
256         Reviewed by James Robinson.
257
258         Test: compositing/backface-visibility-hierarchical-transform.html
259
260         * platform/graphics/chromium/LayerChromium.h:
261         (WebCore::LayerChromium::screenSpaceTransform):
262         (WebCore::LayerChromium::setScreenSpaceTransform):
263         * platform/graphics/chromium/LayerRendererChromium.cpp:
264         (WebCore::LayerRendererChromium::updateLayers):
265         (WebCore::LayerRendererChromium::drawLayersInternal):
266         (WebCore::LayerRendererChromium::drawLayer):
267         * platform/graphics/chromium/cc/CCLayerImpl.h:
268         (WebCore::CCLayerImpl::screenSpaceTransform):
269         (WebCore::CCLayerImpl::setScreenSpaceTransform):
270
271 2011-08-18  Ben Wells  <benwells@chromium.org>
272
273         [skia] -webkit-transform breaks -webkit-mask
274         https://bugs.webkit.org/show_bug.cgi?id=66442
275
276         The problem here is that in RenderBox::paintMaskImages, if we are in
277         a transform with a rotation, scale or skew we set the composite mode to
278         be DestinationIn and then create a transparency layer, then paint the
279         mask with SourceOver and end the transparency layer. (The normal case
280         is just to use DestinationIn to paint the mask.)
281
282         In skia when we create transparency layers we don't pass on the composite
283         mode, so when we end the transparency layer it is composited back using
284         SourceOver. The fix is to pass on the composite mode when creating
285         transparency layers in skia.
286
287         Reviewed by Stephen White.
288
289         * platform/graphics/skia/GraphicsContextSkia.cpp:
290         (WebCore::GraphicsContext::beginTransparencyLayer):
291         * platform/graphics/skia/PlatformContextSkia.cpp:
292         (WebCore::PlatformContextSkia::getXfermodeMode):
293         * platform/graphics/skia/PlatformContextSkia.h:
294
295 2011-08-18  Hayato Ito  <hayato@chromium.org>
296
297         Isolate EventDispatchMediator into a separate file.
298         https://bugs.webkit.org/show_bug.cgi?id=66458
299
300         Reviewed by Ryosuke Niwa.
301
302         Extracted EventDispatchMediator.h and EventDispatchMediator.cpp
303         out of Event.h and Event.cpp Also moved FocusEventDispatchMediator
304         and BlurEventDispatchMediator from Event.{h|cpp} to
305         EventDispatchMediator.{h|cpp}.
306
307         No new tests since this is just refactoring.
308
309         * CMakeLists.txt:
310         * GNUmakefile.list.am:
311         * WebCore.gypi:
312         * WebCore.pro:
313         * WebCore.vcproj/WebCore.vcproj:
314         * WebCore.xcodeproj/project.pbxproj:
315         * dom/Event.cpp:
316         * dom/Event.h:
317         * dom/EventDispatchMediator.cpp: Added.
318         (WebCore::EventDispatchMediator::create):
319         (WebCore::EventDispatchMediator::EventDispatchMediator):
320         (WebCore::EventDispatchMediator::dispatchEvent):
321         (WebCore::FocusEventDispatchMediator::create):
322         (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
323         (WebCore::FocusEventDispatchMediator::dispatchEvent):
324         (WebCore::BlurEventDispatchMediator::create):
325         (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
326         (WebCore::BlurEventDispatchMediator::dispatchEvent):
327         * dom/EventDispatchMediator.h: Added.
328         (WebCore::EventDispatchMediator::~EventDispatchMediator):
329         (WebCore::EventDispatchMediator::event):
330         (WebCore::EventDispatchMediator::EventDispatchMediator):
331         (WebCore::EventDispatchMediator::setEvent):
332         * dom/EventDispatcher.cpp:
333         * dom/KeyboardEvent.h:
334         * dom/MouseEvent.h:
335         * dom/Node.cpp:
336         * dom/ScopedEventQueue.cpp:
337         * dom/UIEvent.h:
338         * dom/WheelEvent.h:
339
340 2011-08-18  Dan Bernstein  <mitz@apple.com>
341
342         Mid-word break can occur between a character and a combining mark
343         https://bugs.webkit.org/show_bug.cgi?id=66529
344
345         Reviewed by Simon Fraser.
346
347         No test added because I could not find a combining mark with a non-zero advance in
348         any of the system fonts and tests fonts. 
349
350         * rendering/RenderBlockLineLayout.cpp:
351         (WebCore::RenderBlock::LineBreaker::nextLineBreak): Disallow a mid-word break before a
352         combining mark.
353
354 2011-08-18  Kent Tamura  <tkent@chromium.org>
355
356         REGRESSION(r90971): Null pointer dereference with placeholder and webkit-scrollbar-corner
357         https://bugs.webkit.org/show_bug.cgi?id=66453
358
359         Reviewed by Simon Fraser.
360
361         Test: fast/forms/placeholder-crash-with-scrollbar-corner.html
362
363         * rendering/RenderObjectChildList.cpp:
364         (WebCore::RenderObjectChildList::removeChildNode): Add a NULL check for owner's layer.
365
366 2011-08-18  Jeffrey Pfau  <jpfau@apple.com>
367
368         New XML parser: scripting support
369         https://bugs.webkit.org/show_bug.cgi?id=66406
370
371         Reviewed by Adam Barth.
372
373         * xml/parser/NewXMLDocumentParser.cpp:
374         (WebCore::NewXMLDocumentParser::NewXMLDocumentParser):
375         (WebCore::NewXMLDocumentParser::resumeParsing):
376         (WebCore::NewXMLDocumentParser::processScript):
377         (WebCore::NewXMLDocumentParser::append): Add support for pausing the parsing
378         (WebCore::NewXMLDocumentParser::finish): Add support for pausing the parsing
379         (WebCore::NewXMLDocumentParser::notifyFinished):
380         * xml/parser/NewXMLDocumentParser.h:
381         (WebCore::NewXMLDocumentParser::pauseParsing):
382         * xml/parser/XMLTreeBuilder.cpp: Add a shared function between self-closing and end tags
383         (WebCore::XMLTreeBuilder::closeElement): Registers scripts and pops the stack
384         (WebCore::XMLTreeBuilder::processStartTag):
385         (WebCore::XMLTreeBuilder::processEndTag):
386         * xml/parser/XMLTreeBuilder.h:
387
388 2011-08-18  Mark Hahnenberg  <mhahnenberg@apple.com>
389
390         Move allocation in constructors into separate constructorBody() methods
391         https://bugs.webkit.org/show_bug.cgi?id=66265
392
393         Reviewed by Oliver Hunt.
394
395         No new tests.
396
397         Refactoring to put all allocations that need to be done after the object's 
398         initialization list has executed but before the object is ready for use 
399         into a separate constructorBody() method.  This method is still called by the constructor, 
400         so the patch doesn't resolve any potential issues, it's just to set up the code for further refactoring.
401
402         * bridge/objc/ObjCRuntimeObject.h:
403         (JSC::Bindings::ObjCRuntimeObject::create):
404         * bridge/objc/ObjCRuntimeObject.mm:
405         * bridge/objc/objc_instance.mm:
406         (ObjCRuntimeMethod::create):
407         (ObjCRuntimeMethod::ObjCRuntimeMethod):
408         * bridge/runtime_array.cpp:
409         * bridge/runtime_array.h:
410         (JSC::RuntimeArray::create):
411
412 2011-08-18  Beth Dakin  <bdakin@apple.com>
413
414         https://bugs.webkit.org/show_bug.cgi?id=66495
415         Lion-specific scroller SPIs can use forward declaration instead of 
416         WebKitSystemInterface
417
418         Reviewed by Sam Weinig.
419
420         * WebCore.exp.in:
421         * WebCore.xcodeproj/project.pbxproj:
422         * platform/mac/NSScrollerImpDetails.h: Added.
423         * platform/mac/ScrollAnimatorMac.h:
424         * platform/mac/ScrollAnimatorMac.mm:
425         (-[ScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
426         (-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
427         (-[ScrollbarPartAnimation initWithScrollbarPainter:part:WebCore::scrollAnimator:WebCore::animateAlphaTo:duration:]):
428         (-[ScrollbarPartAnimation setCurrentProgress:]):
429         (-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
430         (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
431         (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
432         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
433         (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
434         (WebCore::ScrollAnimatorMac::notifyPositionChanged):
435         (WebCore::ScrollAnimatorMac::contentAreaWillPaint):
436         (WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
437         (WebCore::ScrollAnimatorMac::mouseExitedContentArea):
438         (WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
439         (WebCore::ScrollAnimatorMac::willStartLiveResize):
440         (WebCore::ScrollAnimatorMac::contentsResized):
441         (WebCore::ScrollAnimatorMac::willEndLiveResize):
442         (WebCore::ScrollAnimatorMac::contentAreaDidShow):
443         (WebCore::ScrollAnimatorMac::contentAreaDidHide):
444         (WebCore::ScrollAnimatorMac::didBeginScrollGesture):
445         (WebCore::ScrollAnimatorMac::didEndScrollGesture):
446         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
447         (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
448         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
449         (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
450         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
451         (WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
452         * platform/mac/ScrollbarThemeMac.h:
453         * platform/mac/ScrollbarThemeMac.mm:
454         (WebCore::ScrollbarThemeMac::registerScrollbar):
455         (WebCore::ScrollbarThemeMac::scrollbarThickness):
456         (WebCore::ScrollbarThemeMac::usesOverlayScrollbars):
457         (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
458         (WebCore::ScrollbarThemeMac::hasThumb):
459         (WebCore::ScrollbarThemeMac::minimumThumbLength):
460         (WebCore::ScrollbarThemeMac::updateEnabledState):
461         (WebCore::scrollbarPainterPaint):
462         (WebCore::ScrollbarThemeMac::paint):
463         * platform/mac/WebCoreSystemInterface.h:
464         * platform/mac/WebCoreSystemInterface.mm:
465
466 2011-08-18  Dan Bernstein  <mitz@apple.com>
467
468         <rdar://problem/9973194> Fonts that specify a positive descender value are treated as having descenders ending above the baseline
469         https://bugs.webkit.org/show_bug.cgi?id=66515
470
471         Reviewed by Darin Adler.
472
473         No test because none of the system fonts and test fonts have an incorrectly-specified descender value.
474
475         * platform/graphics/mac/SimpleFontDataMac.mm:
476         (WebCore::SimpleFontData::platformInit): If the font specifies a positive descender, assume that it meant
477         the same amount, but negative. This is consistent with what Core Text does.
478
479 2011-08-18  Ryosuke Niwa  <rniwa@webkit.org>
480
481         positionForPoint returns wrong VisiblePosition at bidi boundaries
482         https://bugs.webkit.org/show_bug.cgi?id=65356
483
484         Reviewed by David Hyatt.
485
486         The bug was caused by RenderText::positionForPoint's assuming that the position will always reside
487         inside the inline box that contains the point, which is not true at the boundaries of bidi-runs.
488
489         For example, in aDC12BAb where AB12CD is a RTL text, the offset on the right of A is 7 even though
490         the inline box for "BA" only contains offsets 1, 2, and 3. We must traverse the bidi-run "DC12BA"
491         until the end to obtain the offset 7 from the inline box for "DC".
492
493         Fixed the bug by introducing createVisiblePositionAfterAdjustingOffsetForBiDi which traverses runs
494         on the left or the right of the position to compute the appropriate offset following the NSTextView convention.
495
496         This patch also fixes a regression from r74971 that caret is placed incorrectly between inline boxes of
497         LTR or RTL text in a RTL or LTR block respectively.
498
499         Test: editing/selection/caret-at-bidi-boundary.html
500
501         * rendering/InlineTextBox.cpp:
502         (WebCore::InlineTextBox::offsetForPosition):
503         * rendering/RenderText.cpp:
504         (WebCore::lineDirectionPointFitsInBox): Takes ShouldAffinityBeDownstream instead of EAfinity.
505         (WebCore::createVisiblePositionForBox):
506         (WebCore::createVisiblePositionAfterAdjustingOffsetForBiDi):
507         (WebCore::RenderText::positionForPoint):
508
509 2011-08-18  Xiaomei Ji  <xji@chromium.org>
510
511         --webkit-visual-word renaming right/leftWordPositionAcrossBoundary
512         https://bugs.webkit.org/show_bug.cgi?id=66436
513
514         Reviewed by Ryosuke Niwa.
515
516         Rename them to right/leftWordPositionIgnoringEditingBoundary.
517
518         * editing/visible_units.cpp:
519         (WebCore::leftWordPositionIgnoringEditingBoundary):
520         (WebCore::rightWordPositionIgnoringEditingBoundary):
521         (WebCore::leftWordPosition):
522         (WebCore::rightWordPosition):
523
524 2011-08-18  Jeff Miller  <jeffm@apple.com>
525
526         Soft link against AVFoundationCF and CoreMedia
527         https://bugs.webkit.org/show_bug.cgi?id=65725
528         
529         Add new macros to SoftLinking.h to support soft-linking to functions and variables decorated with __declspec(dllimport),
530         and use them to soft-link to AVFoundationCF and CoreMedia. I verified that the WebProcess doesn't load these DLLs
531         until a media element is used.
532
533         Reviewed by Eric Carlson.
534
535         No new tests as no change in functionality.
536
537         * WebCore.vcproj/WebCore.vcproj: Added AVFoundationCFSoftLinking.h and CoreMediaSoftLinking.h.
538         * WebCore.vcproj/WebCoreMediaQT.vsprops: Removed DelayLoadDLLs linker option which is no longer needed.
539         * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Added.
540         * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h: Added.
541         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Stop linking against AVFoundationCF.lib and CoreMedia.lib and include AVFoundationCFSoftLinking.h and CoreMediaSoftLinking.h.
542         * platform/win/SoftLinking.h: Added SOFT_LINK_DLL_IMPORT() and SOFT_LINK_VARIABLE_DLL_IMPORT() macros.
543
544 2011-08-18  Sailesh Agrawal  <sail@chromium.org>
545
546         Chromium Mac: Show scrollbar when doing search
547         https://bugs.webkit.org/show_bug.cgi?id=66209
548
549         Reviewed by James Robinson.
550
551         Updated the Lion scrollbar drawing code to force the scrollbar to be visible when we have tickmarks for search results.
552
553         No tests because there are no Mac 10.7 chromium bots yet.
554
555         * platform/chromium/ScrollbarThemeChromiumMac.h:
556         * platform/chromium/ScrollbarThemeChromiumMac.mm:
557         (WebCore::ScrollbarThemeChromiumMac::paint):
558         (WebCore::ScrollbarThemeChromiumMac::paintTickmarks):
559
560 2011-08-18  James Robinson  <jamesr@chromium.org>
561
562         [chromium] Draw the root/"non-composited content" in compositor side
563         https://bugs.webkit.org/show_bug.cgi?id=58834
564
565         Reviewed by Kenneth Russell.
566
567         Handle the root or non-composited content with a GraphicsLayer rather than special case logic in
568         LayerRendererChromium. This layer's client is the NonCompositedContentHost, which routes the paint callbacks
569         through the LayerPainterChromium interface out to the WebView.  The root layer is special in two ways:
570         *) The root layer has a scroll offset, which changes how the visibleLayerRect maps to content space and applies a
571             draw-time transform.
572         *) The root layer masks the alpha channel and disable blending when drawing because of concerns about subpixel
573             AA trashing the alpha channel.  The root layer is always opaque so this is fine.
574         *) The root layer does not have border texels and does have subpixel AA for text.
575
576         Covered by compositing/
577
578         * WebCore.gypi:
579         * platform/graphics/chromium/ContentLayerChromium.cpp:
580         (WebCore::ContentLayerChromium::paintContentsIfDirty):
581         * platform/graphics/chromium/ImageLayerChromium.cpp:
582         (WebCore::ImageLayerChromium::paintContentsIfDirty):
583         * platform/graphics/chromium/LayerChromium.cpp:
584         (WebCore::LayerChromium::pushPropertiesTo):
585         * platform/graphics/chromium/LayerChromium.h:
586         (WebCore::LayerChromium::scrollPosition):
587         (WebCore::LayerChromium::setScrollPosition):
588         * platform/graphics/chromium/LayerRendererChromium.cpp:
589         (WebCore::LayerRendererChromium::initialize):
590         (WebCore::LayerRendererChromium::releaseTextures):
591         (WebCore::LayerRendererChromium::viewportChanged):
592         (WebCore::LayerRendererChromium::updateLayers):
593         (WebCore::LayerRendererChromium::drawLayers):
594         (WebCore::LayerRendererChromium::drawLayersInternal):
595         (WebCore::LayerRendererChromium::getFramebufferPixels):
596         (WebCore::LayerRendererChromium::cleanupSharedObjects):
597         (WebCore::LayerRendererChromium::layerTreeAsText):
598         * platform/graphics/chromium/LayerRendererChromium.h:
599         (WebCore::LayerRendererChromium::rootLayer):
600         (WebCore::LayerRendererChromium::viewportSize):
601         (WebCore::LayerRendererChromium::viewportWidth):
602         (WebCore::LayerRendererChromium::viewportHeight):
603         * platform/graphics/chromium/NonCompositedContentHost.cpp: Added.
604         (WebCore::NonCompositedContentHost::NonCompositedContentHost):
605         (WebCore::NonCompositedContentHost::~NonCompositedContentHost):
606         (WebCore::NonCompositedContentHost::invalidateRect):
607         (WebCore::NonCompositedContentHost::invalidateEntireLayer):
608         (WebCore::NonCompositedContentHost::setScrollPosition):
609         (WebCore::NonCompositedContentHost::notifyAnimationStarted):
610         (WebCore::NonCompositedContentHost::notifySyncRequired):
611         (WebCore::NonCompositedContentHost::paintContents):
612         (WebCore::NonCompositedContentHost::showDebugBorders):
613         (WebCore::NonCompositedContentHost::showRepaintCounter):
614         * platform/graphics/chromium/NonCompositedContentHost.h: Added.
615         (WebCore::NonCompositedContentHost::create):
616         (WebCore::NonCompositedContentHost::graphicsLayer):
617         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
618         (WebCore::CCHeadsUpDisplay::draw):
619         * platform/graphics/chromium/cc/CCLayerImpl.h:
620         (WebCore::CCLayerImpl::scrollPosition):
621         (WebCore::CCLayerImpl::setScrollPosition):
622         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
623         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
624         (WebCore::CCLayerTreeHost::initialize):
625         (WebCore::CCLayerTreeHost::invalidateRootLayerRect):
626         (WebCore::CCLayerTreeHost::setRootLayer):
627         (WebCore::CCLayerTreeHost::setViewport):
628         (WebCore::CCLayerTreeHost::reallocateRenderer):
629         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
630         (WebCore::CCLayerTreeHost::rootLayer):
631         (WebCore::CCLayerTreeHost::viewportSize):
632
633 2011-08-18  Sheriff Bot  <webkit.review.bot@gmail.com>
634
635         Unreviewed, rolling out r93354.
636         http://trac.webkit.org/changeset/93354
637         https://bugs.webkit.org/show_bug.cgi?id=66503
638
639         "consensus was not reached" (Requested by senorblanco on
640         #webkit).
641
642         * html/canvas/CanvasRenderingContext2D.cpp:
643         (WebCore::CanvasRenderingContext2D::drawImage):
644         * platform/graphics/cg/GraphicsContextCG.cpp:
645         (WebCore::GraphicsContext::drawNativeImage):
646
647 2011-08-18  Sadrul Habib Chowdhury  <sadrul@chromium.org>
648
649         GestureRecognizer: Update how gesture-scroll works.
650
651         Instead of just sending a series of 'GestureUpdate' events, send a
652         single 'GestureBegin' event, followed by a series of 'GestureUpdate' events,
653         and end with a 'GestureEnd' event.
654         https://bugs.webkit.org/show_bug.cgi?id=66267
655
656         Reviewed by Adam Barth.
657
658         * page/EventHandler.cpp:
659         (WebCore::EventHandler::handleGestureEvent):
660         * platform/chromium/GestureRecognizerChromium.cpp:
661         (WebCore::InnerGestureRecognizer::InnerGestureRecognizer):
662         (WebCore::InnerGestureRecognizer::appendScrollGestureBegin):
663         (WebCore::InnerGestureRecognizer::appendScrollGestureEnd):
664         (WebCore::InnerGestureRecognizer::appendScrollGestureUpdate):
665         (WebCore::scrollEnd):
666         (WebCore::isClickOrScroll):
667         (WebCore::inScroll):
668         * platform/chromium/GestureRecognizerChromium.h:
669         (WebCore::InnerGestureRecognizer::firstTouchPosition):
670
671 2011-08-18  Sailesh Agrawal  <sail@chromium.org>
672
673         Chromium: Update forked ScrollbarThemeChromiumMac.mm
674         https://bugs.webkit.org/show_bug.cgi?id=65555
675
676         Reviewed by James Robinson.
677
678         Merge recent changes to ScrollbarThemeMac.mm to ScrollbarThemeChromiumMac.mm.
679
680         * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h:
681         * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm:
682         (wkScrollbarPainterSetEnabled):
683         * platform/chromium/ScrollbarThemeChromiumMac.h:
684         (WebCore::ScrollbarThemeChromiumMac::maxOverlapBetweenPages):
685         * platform/chromium/ScrollbarThemeChromiumMac.mm:
686         (WebCore::ScrollbarThemeChromiumMac::registerScrollbar):
687         (WebCore::ScrollbarThemeChromiumMac::setNewPainterForScrollbar):
688         (WebCore::toScrollbarPainterKnobStyle):
689         (WebCore::ScrollbarThemeChromiumMac::updateScrollbarOverlayStyle):
690         (WebCore::ScrollbarThemeChromiumMac::updateEnabledState):
691         (WebCore::ScrollbarThemeChromiumMac::paint):
692
693 2011-08-18  Justin Novosad  <junov@chromium.org>
694
695         Unwarranted DOM Exception when when canvas2D drawImage is called with src
696         rect out of bounds
697         https://bugs.webkit.org/show_bug.cgi?id=65709
698
699         Reviewed by Stephen White.
700
701         Test: fast/canvas/drawImage-clipped-source.html
702
703         * html/canvas/CanvasRenderingContext2D.cpp:
704         (WebCore::CanvasRenderingContext2D::drawImage):
705         Removed the unnecessary dom exceptions for out of bounds source rectangles
706         The overloads that receive video and image elements as source images
707         now use the normalized versions of the source rectangle, which
708         GraphicsContext (and its various platform flavors) can handle correctly.
709         The normalized rectangle is the equivalent rectangle with width and height
710         greater than 0.  The canvas version of this method, which had better layout 
711         test coverage, was already correctly using the normalized rectangle. The
712         newly added layout test verifies correct behavior with negative
713         source rectangle dimensions.
714         * platform/graphics/cg/GraphicsContextCG.cpp:
715         (WebCore::GraphicsContext::drawNativeImage):
716         Fixed algorithm that adjusts the destination rectangle to match the clipping
717         applied to the source rect. The case of scaled filtered images with source
718         rectangles that overlap the edge of the image was not being handled
719         correctly. This use case was previously unsupported and used to trigger
720         a DOM exception.
721
722 2011-08-18  Sheriff Bot  <webkit.review.bot@gmail.com>
723
724         Unreviewed, rolling out r93329.
725         http://trac.webkit.org/changeset/93329
726         https://bugs.webkit.org/show_bug.cgi?id=66497
727
728         Turned text on chromium win blue (Requested by jamesr_ on
729         #webkit).
730
731         * WebCore.gypi:
732         * platform/graphics/chromium/ContentLayerChromium.cpp:
733         * platform/graphics/chromium/ContentLayerChromium.h:
734         * platform/graphics/chromium/ImageLayerChromium.cpp:
735         (WebCore::ImageLayerTextureUpdater::prepareToUpdate):
736         * platform/graphics/chromium/LayerChromium.cpp:
737         (WebCore::LayerChromium::LayerChromium):
738         (WebCore::LayerChromium::pushPropertiesTo):
739         (WebCore::LayerChromium::dumpLayerProperties):
740         * platform/graphics/chromium/LayerChromium.h:
741         * platform/graphics/chromium/LayerRendererChromium.cpp:
742         (WebCore::LayerRendererChromium::initialize):
743         (WebCore::LayerRendererChromium::releaseTextures):
744         (WebCore::LayerRendererChromium::updateRootLayerContents):
745         (WebCore::LayerRendererChromium::drawRootLayer):
746         (WebCore::LayerRendererChromium::invalidateRootLayerRect):
747         (WebCore::LayerRendererChromium::rootLayerChanged):
748         (WebCore::LayerRendererChromium::viewportChanged):
749         (WebCore::LayerRendererChromium::updateLayers):
750         (WebCore::LayerRendererChromium::drawLayers):
751         (WebCore::LayerRendererChromium::paintLayerContents):
752         (WebCore::LayerRendererChromium::drawLayersInternal):
753         (WebCore::LayerRendererChromium::getFramebufferPixels):
754         (WebCore::LayerRendererChromium::cleanupSharedObjects):
755         (WebCore::LayerRendererChromium::layerTreeAsText):
756         (WebCore::LayerRendererChromium::dumpRenderSurfaces):
757         * platform/graphics/chromium/LayerRendererChromium.h:
758         (WebCore::LayerRendererChromium::rootLayer):
759         * platform/graphics/chromium/NonCompositedContentHost.cpp: Removed.
760         * platform/graphics/chromium/NonCompositedContentHost.h: Removed.
761         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
762         (WebCore::RenderSurfaceChromium::dumpSurface):
763         * platform/graphics/chromium/TiledLayerChromium.cpp:
764         (WebCore::TiledLayerChromium::createTilerIfNeeded):
765         (WebCore::TiledLayerChromium::tilingTransform):
766         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
767         (WebCore::CCHeadsUpDisplay::draw):
768         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
769         (WebCore::CCLayerImpl::CCLayerImpl):
770         * platform/graphics/chromium/cc/CCLayerImpl.h:
771         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
772         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
773         (WebCore::CCLayerTreeHost::initialize):
774         (WebCore::CCLayerTreeHost::createRootLayerPainter):
775         (WebCore::CCLayerTreeHost::invalidateRootLayerRect):
776         (WebCore::CCLayerTreeHost::setRootLayer):
777         (WebCore::CCLayerTreeHost::setViewport):
778         (WebCore::CCLayerTreeHost::reallocateRenderer):
779         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
780         (WebCore::CCLayerTreeHost::rootLayer):
781         (WebCore::CCLayerTreeHost::viewportContentRect):
782         (WebCore::CCLayerTreeHost::viewportScrollPosition):
783         (WebCore::CCLayerTreeHost::viewportVisibleRect):
784         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
785         (WebCore::CCTiledLayerImpl::draw):
786
787 2011-08-18  Ryosuke Niwa  <rniwa@webkit.org>
788
789         SimplifiedBackwardsTextIterator returns incorrect offset with first-letter rule
790         https://bugs.webkit.org/show_bug.cgi?id=66086
791
792         Reviewed by Darin Adler.
793
794         The bug was caused by SimplifiedBackwardsTextIterator's not taking care of first-letter at all.
795         Fixing the bug by detecting RenderTextFragment in handleTextNode.
796
797         Also added m_shouldHandleFirstLetter to SimplifiedBackwardsTextIterator to keep track of whether or not
798         the next call to handleTextNode needs to process the first-letter part of the text fragment.
799
800         Test: editing/text-iterator/backward-textiterator-first-letter-crash.html
801
802         * editing/TextIterator.cpp:
803         (WebCore::firstRenderTextInFirstLetter): Extracted from handleTextNodeFirstLetter.
804         (WebCore::TextIterator::handleTextNodeFirstLetter): Calls firstRenderTextInFirstLetter.
805         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
806         (WebCore::SimplifiedBackwardsTextIterator::handleTextNode):
807         (WebCore::SimplifiedBackwardsTextIterator::handleFirstLetter): Added.
808         * editing/TextIterator.h:
809
810 2011-08-18  Iain Merrick  <husky@google.com>
811
812         [chromium] Assert that main thread and compositor thread are used safely
813         https://bugs.webkit.org/show_bug.cgi?id=66145
814
815         CCLayerTreeHostImplProxy now has public static methods isMainThread()
816         and isImplThread(), and we ASSERT these in various places. If threaded
817         compositing is disabled, we fake isImplThread() by setting a flag for
818         the duration of compositing, so the assert is still valid.
819
820         Reviewed by James Robinson.
821
822         Covered by existing tests.
823
824         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
825         (WebCore::CCCanvasLayerImpl::draw):
826         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
827         (WebCore::CCLayerTreeHost::doComposite):
828         * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp:
829         (WebCore::CCLayerTreeHostImplProxy::postDrawLayersTaskOnCCThread):
830         (WebCore::CCLayerTreeHostImplProxy::requestFrameAndCommitOnCCThread):
831         (WebCore::CCLayerTreeHostImplProxy::isMainThread):
832         (WebCore::CCLayerTreeHostImplProxy::isImplThread):
833         (WebCore::CCLayerTreeHostImplProxy::setImplThread):
834         (WebCore::CCLayerTreeHostImplProxy::commitOnCCThread):
835         (WebCore::CCLayerTreeHostImplProxy::drawLayersOnCCThread):
836         (WebCore::CCLayerTreeHostImplProxy::setNeedsCommitAndRedrawOnCCThread):
837         (WebCore::CCLayerTreeHostImplProxy::setNeedsRedrawOnCCThread):
838         (WebCore::CCLayerTreeHostImplProxy::initImplOnCCThread):
839         (WebCore::CCLayerTreeHostImplProxy::layerTreeHostClosedOnCCThread):
840         * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.h:
841         * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
842         (WebCore::CCPluginLayerImpl::draw):
843         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
844         (WebCore::CCTiledLayerImpl::draw):
845         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
846         (WebCore::CCVideoLayerImpl::draw):
847
848 2011-08-18  Alexey Proskuryakov  <ap@apple.com>
849
850         Regional indicator symbols that are combined should behave as a single character when editing
851         https://bugs.webkit.org/show_bug.cgi?id=65395
852
853         Reviewed by Dan Bernstein.
854
855         Part two: make cursor movement iterator work. This fixes the problem for strings that don't
856         contain more than two flags in a row, as fixing it completely doesn't seem possible with ICU.
857
858         Test: editing/selection/regional-indicators.html
859
860         * platform/text/TextBreakIteratorICU.cpp: (WebCore::cursorMovementIterator): Added custom
861         rules for regional indicator symbols.
862
863 2011-08-18  Cary Clark  <caryclark@google.com>
864
865         Fix rubber band gutter drawing for Skia on Chromium Mac
866         https://bugs.webkit.org/show_bug.cgi?id=66478
867
868         Reviewed by James Robinson.
869
870         No new tests. The Skia on Chromium Mac platform has
871         not been enabled.
872
873         This break was detected at compile time; there is no
874         behavior change.
875
876         * platform/chromium/ScrollbarThemeChromiumMac.mm:
877         (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac):
878         Convert the CGImage into an SkBitmap if Skia is present.
879
880 2011-08-18  Julien Chaffraix  <jchaffraix@webkit.org>
881
882         Implement a faster path for painting tables with overflowing cells
883         https://bugs.webkit.org/show_bug.cgi?id=65491
884
885         This change introduces a smarter way of painting if the table is big enough and we have a small amount
886         of overflowing cells in the table. The new path does a binary search of the cells to repaint but adds
887         the overflowing cells to the repainting cells.
888
889         This saves ~50% when doing programmatic scrolling throught JS on a 500x100 table with some overflowing
890         cells. Also we cap the memory usage to a ratio of the total size of the table to avoid blowing up the
891         memory.
892
893         Reviewed by David Hyatt.
894
895         No new tests as the behavior should be the same.
896
897         * rendering/RenderTableSection.cpp:
898         (WebCore::RenderTableSection::RenderTableSection):
899         (WebCore::RenderTableSection::layoutRows): Added some code to accumulate the overflowing cells
900         in an internal HashSet (we don't need to keep them sorted and it makes it easier to use them during
901         painting). If we hit the cap, flip the boolean value and clear the HashSet as the slow path does not
902         care about the cell's information. Make sure that the "has overflowing cells" information is still
903         properly encoded on our 2 values.
904
905         (WebCore::compareCellPositionsWithOverflowingCells): Added this method as we are doing a more
906         complicated sort:
907             * the old path would sort one (mostly sorted) array by rows only as the stable sort would
908               take care of keeping the column ordering inside a row.
909             * the new path basically has to sort an unsorted array (taken partly from the HashSet).
910
911         (WebCore::RenderTableSection::paintObject): Tweaked the logic to account for difference between
912         m_forceSlowPaintPathWithOverflowingCell and has some overflowing cells. Also we make sure we don't
913         repaint the same cell twice.
914
915         (WebCore::RenderTableSection::nodeAtPoint): Changed to hasOverflowingCell(). We don't apply our
916         fast path optimization here.
917
918         * rendering/RenderTableSection.h: Transformed our original boolean into
919         a HashSet and a boolean. The HashSet holds up the CellStruct that are overflowing
920         until we reach the memory threshold. After this is hit, we just set the boolean
921         to avoid using too much memory.
922
923         (WebCore::RenderTableSection::hasOverflowingCell): This is the new way to determine
924         if we have any overflowing cell, used only for hit testing.
925
926 2011-08-18  Kentaro Hara  <haraken@google.com>
927
928         An EventSource constructor should throw TypeError, when the number of arguments is not enough.
929         https://bugs.webkit.org/show_bug.cgi?id=66454
930
931         Reviewed by Adam Barth.
932
933         The spec is here: http://www.w3.org/TR/WebIDL/#es-operations.
934
935         Test: fast/eventsource/eventsource-constructor.html
936
937         * bindings/js/JSEventSourceCustom.cpp:
938         (WebCore::JSEventSourceConstructor::constructJSEventSource): Changed SyntaxError to TypeError.
939         * bindings/v8/custom/V8EventSourceConstructor.cpp:
940         (WebCore::V8EventSource::constructorCallback): Changed SyntaxError to TypeError.
941
942 2011-08-18  Kentaro Hara  <haraken@google.com>
943
944         A SharedWorker constructor should throw TypeError, when the number of arguments is not enough.
945         https://bugs.webkit.org/show_bug.cgi?id=66455
946
947         Reviewed by Adam Barth.
948
949         The spec is here: http://www.w3.org/TR/WebIDL/#es-operations.
950
951         Test: fast/workers/shared-worker-constructor.html
952
953         * bindings/js/JSSharedWorkerCustom.cpp:
954         (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker): Changed SyntaxError to TypeError.
955         * bindings/v8/custom/V8SharedWorkerCustom.cpp:
956         (WebCore::V8SharedWorker::constructorCallback): Changed SyntaxError to TypeError.
957
958 2011-08-17  Alejandro G. Castro  <alex@igalia.com>
959
960         [GTK] Fix compilation problems with deprecations in gtk+
961         https://bugs.webkit.org/show_bug.cgi?id=66073
962
963         Reviewed by Martin Robinson.
964
965         * platform/gtk/GtkAuthenticationDialog.cpp:
966         (WebCore::GtkAuthenticationDialog::GtkAuthenticationDialog): Added
967         gtk_box_new conditional compilation for gtk+-3.
968         * platform/gtk/RenderThemeGtk3.cpp:
969         (WebCore::RenderThemeGtk::adjustRepaintRect):
970         (WebCore::RenderThemeGtk::paintSliderTrack):
971         (WebCore::RenderThemeGtk::paintSliderThumb):
972         (WebCore::RenderThemeGtk::adjustSliderThumbSize): Now we have have
973         GTK_TYPE_SCALE in gtk+3.
974
975 2011-08-18  Kentaro Hara  <haraken@google.com>
976
977         A Worker constructor should throw TypeError, when the number of arguments is not enough
978         https://bugs.webkit.org/show_bug.cgi?id=66456
979
980         Reviewed by Adam Barth.
981
982         Spec is here: http://www.w3.org/TR/WebIDL/#es-operations.
983
984         Test: fast/workers/worker-constructor.html
985
986         * bindings/js/JSWorkerCustom.cpp:
987         (WebCore::JSWorkerConstructor::constructJSWorker): Changed SyntaxError to TypeError.
988         * bindings/v8/custom/V8WorkerCustom.cpp:
989         (WebCore::V8Worker::constructorCallback): Changed SyntaxError to TypeError.
990
991 2011-08-18  John Bates  <jbates@google.com>
992
993         Fix logic error causing reverse of desired WebGL rate limiting behavior
994         https://bugs.webkit.org/show_bug.cgi?id=66445
995
996         Reviewed by Kenneth Russell.
997
998         * platform/graphics/chromium/WebGLLayerChromium.cpp:
999         (WebCore::WebGLLayerChromium::setTextureUpdated):
1000
1001 2011-08-18  Levi Weintraub  <leviw@chromium.org>
1002
1003         Switch RenderTextControl* to new layout types
1004         https://bugs.webkit.org/show_bug.cgi?id=66250
1005
1006         Reviewed by Eric Seidel.
1007
1008         Convertikng the RenderTextControl* classes to use the LayoutUnit abstraction.
1009
1010         No new tests as no change in behavior.
1011
1012         * rendering/LayoutTypes.h:
1013         (WebCore::layoutMod): Added a function to perform the modulo operation on LayoutUnits.
1014         * rendering/RenderTextControl.cpp:
1015         (WebCore::RenderTextControl::hitInnerTextElement):
1016         * rendering/RenderTextControl.h:
1017         * rendering/RenderTextControlMultiLine.cpp:
1018         (WebCore::RenderTextControlMultiLine::preferredContentWidth):
1019         (WebCore::RenderTextControlMultiLine::baselinePosition):
1020         * rendering/RenderTextControlMultiLine.h:
1021         * rendering/RenderTextControlSingleLine.cpp:
1022         (WebCore::RenderTextControlSingleLine::layout):
1023         (WebCore::RenderTextControlSingleLine::controlClipRect):
1024         (WebCore::RenderTextControlSingleLine::preferredContentWidth):
1025         (WebCore::RenderTextControlSingleLine::scrollWidth):
1026         (WebCore::RenderTextControlSingleLine::scrollHeight):
1027         (WebCore::RenderTextControlSingleLine::scrollLeft):
1028         (WebCore::RenderTextControlSingleLine::scrollTop):
1029         (WebCore::RenderTextControlSingleLine::setScrollLeft):
1030         (WebCore::RenderTextControlSingleLine::setScrollTop):
1031         * rendering/RenderTextControlSingleLine.h:
1032
1033 2011-08-18  Levi Weintraub  <leviw@chromium.org>
1034
1035         Switch Inline rendering classes to new layout types
1036         https://bugs.webkit.org/show_bug.cgi?id=66239
1037
1038         Reviewed by Eric Seidel.
1039
1040         Converting inline rendering classes to use the LayoutUnit abstraction from ints.
1041
1042         No new tests as no change in functionality.
1043
1044         * rendering/InlineBox.h:
1045         (WebCore::InlineBox::logicalFrameRect):
1046         (WebCore::InlineBox::baselinePosition):
1047         (WebCore::InlineBox::lineHeight):
1048         * rendering/InlineFlowBox.h:
1049         * rendering/InlineTextBox.cpp:
1050         (WebCore::InlineTextBox::logicalOverflowRect):
1051         (WebCore::InlineTextBox::setLogicalOverflowRect):
1052         (WebCore::InlineTextBox::baselinePosition):
1053         (WebCore::InlineTextBox::lineHeight):
1054         * rendering/InlineTextBox.h:
1055         (WebCore::InlineTextBox::logicalTopVisualOverflow):
1056         (WebCore::InlineTextBox::logicalBottomVisualOverflow):
1057         (WebCore::InlineTextBox::logicalLeftVisualOverflow):
1058         (WebCore::InlineTextBox::logicalRightVisualOverflow):
1059         * rendering/RenderInline.cpp:
1060         (WebCore::RenderInline::culledInlineAbsoluteRects):
1061         (WebCore::computeMargin):
1062         (WebCore::RenderInline::culledInlineBoundingBox):
1063         (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
1064         (WebCore::RenderInline::linesVisualOverflowBoundingBox):
1065         (WebCore::RenderInline::clippedOverflowRectForRepaint):
1066         (WebCore::RenderInline::rectWithOutlineForRepaint):
1067         (WebCore::RenderInline::computeRectForRepaint):
1068         (WebCore::RenderInline::mapLocalToContainer):
1069         (WebCore::RenderInline::lineHeight):
1070         (WebCore::RenderInline::baselinePosition):
1071         (WebCore::RenderInline::addDashboardRegions):
1072         * rendering/RenderInline.h:
1073
1074 2011-08-18  Jeffrey Pfau  <jpfau@apple.com>
1075
1076         New XML parser: add doctype to DOM tree
1077         https://bugs.webkit.org/show_bug.cgi?id=66408
1078
1079         Reviewed by Adam Barth.
1080
1081         * xml/parser/XMLTreeBuilder.cpp:
1082         (WebCore::XMLTreeBuilder::processDOCTYPE):
1083
1084 2011-08-18  James Robinson  <jamesr@chromium.org>
1085
1086         [chromium] Draw the root/"non-composited content" in compositor side
1087         https://bugs.webkit.org/show_bug.cgi?id=58834
1088
1089         Reviewed by Darin Fisher.
1090
1091         Handle the root or non-composited content with a GraphicsLayer rather than special case logic in
1092         LayerRendererChromium. This layer's client is the NonCompositedContentHost, which routes the paint callbacks
1093         through the LayerPainterChromium interface out to the WebView.  The root layer is special in two ways:
1094         *) The root layer has a scroll offset, which changes how the visibleLayerRect maps to content space and applies a
1095             draw-time transform.
1096         *) The root layer masks the alpha channel when drawing because of concerns about subpixel AA trashing the alpha
1097             channel.  The root layer is always opaque so this is fine.
1098         *) The root layer does not have border texels and does have subpixel AA for text.
1099
1100         Covered by compositing/
1101
1102         * WebCore.gypi:
1103         * platform/graphics/chromium/ContentLayerChromium.cpp:
1104         (WebCore::ContentLayerChromium::paintContentsIfDirty):
1105         * platform/graphics/chromium/ImageLayerChromium.cpp:
1106         (WebCore::ImageLayerChromium::paintContentsIfDirty):
1107         * platform/graphics/chromium/LayerChromium.cpp:
1108         (WebCore::LayerChromium::pushPropertiesTo):
1109         * platform/graphics/chromium/LayerChromium.h:
1110         (WebCore::LayerChromium::scrollPosition):
1111         (WebCore::LayerChromium::setScrollPosition):
1112         * platform/graphics/chromium/LayerRendererChromium.cpp:
1113         (WebCore::LayerRendererChromium::initialize):
1114         (WebCore::LayerRendererChromium::releaseTextures):
1115         (WebCore::LayerRendererChromium::viewportChanged):
1116         (WebCore::LayerRendererChromium::updateLayers):
1117         (WebCore::LayerRendererChromium::drawLayers):
1118         (WebCore::LayerRendererChromium::drawLayersInternal):
1119         (WebCore::LayerRendererChromium::getFramebufferPixels):
1120         (WebCore::LayerRendererChromium::cleanupSharedObjects):
1121         (WebCore::LayerRendererChromium::layerTreeAsText):
1122         * platform/graphics/chromium/LayerRendererChromium.h:
1123         (WebCore::LayerRendererChromium::rootLayer):
1124         (WebCore::LayerRendererChromium::viewportSize):
1125         (WebCore::LayerRendererChromium::viewportWidth):
1126         (WebCore::LayerRendererChromium::viewportHeight):
1127         * platform/graphics/chromium/NonCompositedContentHost.cpp: Added.
1128         (WebCore::NonCompositedContentHost::NonCompositedContentHost):
1129         (WebCore::NonCompositedContentHost::~NonCompositedContentHost):
1130         (WebCore::NonCompositedContentHost::invalidateRect):
1131         (WebCore::NonCompositedContentHost::invalidateEntireLayer):
1132         (WebCore::NonCompositedContentHost::setScrollPosition):
1133         (WebCore::NonCompositedContentHost::notifyAnimationStarted):
1134         (WebCore::NonCompositedContentHost::notifySyncRequired):
1135         (WebCore::NonCompositedContentHost::paintContents):
1136         (WebCore::NonCompositedContentHost::showDebugBorders):
1137         (WebCore::NonCompositedContentHost::showRepaintCounter):
1138         * platform/graphics/chromium/NonCompositedContentHost.h: Added.
1139         (WebCore::NonCompositedContentHost::create):
1140         (WebCore::NonCompositedContentHost::graphicsLayer):
1141         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
1142         (WebCore::CCHeadsUpDisplay::draw):
1143         * platform/graphics/chromium/cc/CCLayerImpl.h:
1144         (WebCore::CCLayerImpl::scrollPosition):
1145         (WebCore::CCLayerImpl::setScrollPosition):
1146         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1147         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
1148         (WebCore::CCLayerTreeHost::initialize):
1149         (WebCore::CCLayerTreeHost::invalidateRootLayerRect):
1150         (WebCore::CCLayerTreeHost::setRootLayer):
1151         (WebCore::CCLayerTreeHost::setViewport):
1152         (WebCore::CCLayerTreeHost::reallocateRenderer):
1153         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1154         (WebCore::CCLayerTreeHost::rootLayer):
1155         (WebCore::CCLayerTreeHost::viewportSize):
1156
1157 2011-08-18  Nico Weber  <thakis@chromium.org>
1158
1159         Fix "missing return" gcc warning in ScrollAnimatorNone
1160         https://bugs.webkit.org/show_bug.cgi?id=66480
1161
1162         Reviewed by Tony Chang.
1163
1164         * platform/ScrollAnimatorNone.cpp:
1165         (WebCore::ScrollAnimatorNone::PerAxisData::curveAt):
1166         (WebCore::ScrollAnimatorNone::PerAxisData::curveDerivativeAt):
1167
1168 2011-08-18  James Simonsen  <simonjam@chromium.org>
1169
1170         Revalidate expired resources if they're requested after the initial document load
1171         https://bugs.webkit.org/show_bug.cgi?id=52153
1172
1173         Reviewed by Antti Koivisto.
1174
1175         Test: http/tests/cache/subresource-multiple-instances.html
1176
1177         * loader/cache/CachedResourceLoader.cpp:
1178         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
1179
1180 2011-08-18  Anders Carlsson  <andersca@apple.com>
1181
1182         Fix clang libc++ C++0x build
1183         https://bugs.webkit.org/show_bug.cgi?id=66475
1184
1185         Reviewed by Adam Roben.
1186
1187         Remove calls to isnan and isfinite with integer arguments.
1188
1189         * css/CSSPrimitiveValue.cpp:
1190         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1191         * html/canvas/WebGLRenderingContext.cpp:
1192         (WebCore::WebGLRenderingContext::viewport):
1193
1194 2011-08-18  Andrey Kosyakov  <caseq@chromium.org>
1195
1196         Web Inspector: [Extensions API] rename webInspector.resources to webInspector.network
1197         https://bugs.webkit.org/show_bug.cgi?id=66460
1198
1199         Reviewed by Pavel Feldman.
1200
1201         Tests: http/tests/inspector/extensions-network-redirect.html
1202                inspector/extensions/extensions-network.html
1203
1204         * inspector/front-end/ExtensionAPI.js:
1205         (WebInspector.injectedExtensionAPI.InspectorExtensionAPI):
1206         (WebInspector.injectedExtensionAPI.Network.requestDispatch):
1207         (WebInspector.injectedExtensionAPI):
1208         (WebInspector.injectedExtensionAPI.Network.prototype.getHAR):
1209         (WebInspector.injectedExtensionAPI.defineDeprecatedProperty.getter):
1210         (WebInspector.injectedExtensionAPI.defineDeprecatedProperty):
1211         * inspector/front-end/ExtensionServer.js:
1212         (WebInspector.ExtensionServer):
1213         (WebInspector.ExtensionServer.prototype._inspectedURLChanged):
1214         (WebInspector.ExtensionServer.prototype._notifyRequestFinished):
1215         (WebInspector.ExtensionServer.prototype._onGetHAR):
1216         (WebInspector.ExtensionServer.prototype._onGetResourceContent):
1217         (WebInspector.ExtensionServer.prototype._requestId):
1218         (WebInspector.ExtensionServer.prototype._requestById):
1219         (WebInspector.ExtensionServer.prototype._onAddAuditCategory):
1220         (WebInspector.ExtensionServer.prototype._onAddAuditResult):
1221         (WebInspector.ExtensionServer.prototype._onStopAuditCategoryRun):
1222         (WebInspector.ExtensionServer.prototype.initExtensions):
1223         (WebInspector.ExtensionServer.prototype._onmessage):
1224
1225 2011-08-18  Pavel Podivilov  <podivilov@chromium.org>
1226
1227         Web Inspector: extract content loading functions from RawSourceCode to ContentProvider implementations.
1228         https://bugs.webkit.org/show_bug.cgi?id=66237
1229
1230         Reviewed by Pavel Feldman.
1231
1232         Test: inspector/debugger/content-providers.html
1233
1234         * inspector/front-end/SourceFile.js:
1235         (WebInspector.RawSourceCode.prototype._loadResourceContent):
1236         (WebInspector.RawSourceCode.prototype._loadScriptContent):
1237         (WebInspector.RawSourceCode.prototype._loadAndConcatenateScriptsContent):
1238         (WebInspector.ScriptContentProvider):
1239         (WebInspector.ScriptContentProvider.prototype.requestContent):
1240         (WebInspector.ConcatenatedScriptsContentProvider):
1241         (WebInspector.ConcatenatedScriptsContentProvider.prototype.requestContent):
1242         (WebInspector.ConcatenatedScriptsContentProvider.prototype._concatenateScriptsContent):
1243         (WebInspector.ResourceContentProvider):
1244         (WebInspector.ResourceContentProvider.prototype.requestContent):
1245
1246 2011-08-18  Alexandru Chiculita  <achicu@adobe.com>
1247
1248         [CSSRegions] RenderRegion should not reference a parent RenderFlowThread
1249         https://bugs.webkit.org/show_bug.cgi?id=66142
1250
1251         Added code that checks the parent RenderFlowThread of a RenderRegion and creates
1252         a dependency for its referenced RenderFlowThread (from CSS style).
1253
1254         There are two cases:
1255         1. A RenderRegion tries to display the flow thread that laid it out. In this case
1256         the region will be ignored and will not participate in the flow threads regions list.
1257         2. A RenderRegion tries to display a flow thread that contains another region that
1258         tries to display the first region's flow thread. This one can be generalized with any
1259         number of intermediate flow threads. In this case the recursion is detected and only the
1260         first added region will actually be selected. The other region will be ignored. However,
1261         when the recursion is removed the invalid regions will be recovered.
1262
1263         Reviewed by David Hyatt.
1264
1265         Tests: fast/regions/flows-dependency-dynamic-remove.html
1266                fast/regions/flows-dependency-same-flow.html
1267
1268         * rendering/RenderBlock.cpp:
1269         (WebCore::RenderBlock::insertPositionedObject):
1270         * rendering/RenderFlowThread.cpp:
1271         (WebCore::RenderFlowThread::dependsOn):
1272         (WebCore::RenderFlowThread::addRegionToThread):
1273         (WebCore::RenderFlowThread::removeRegionFromThread):
1274         (WebCore::RenderFlowThread::checkInvalidRegions):
1275         (WebCore::RenderFlowThread::addDependencyOnFlowThread):
1276         (WebCore::RenderFlowThread::removeDependencyOnFlowThread):
1277         (WebCore::RenderFlowThread::pushDependencies):
1278         (WebCore::RenderFlowThread::layout):
1279         (WebCore::RenderFlowThread::computeLogicalWidth):
1280         (WebCore::RenderFlowThread::computeLogicalHeight):
1281         (WebCore::RenderFlowThread::repaintRectangleInRegions):
1282         * rendering/RenderFlowThread.h:
1283         * rendering/RenderObjectChildList.cpp:
1284         (WebCore::RenderObjectChildList::removeChildNode):
1285         (WebCore::RenderObjectChildList::appendChildNode):
1286         * rendering/RenderRegion.cpp:
1287         (WebCore::RenderRegion::RenderRegion):
1288         (WebCore::RenderRegion::~RenderRegion):
1289         (WebCore::RenderRegion::paintReplaced):
1290         (WebCore::RenderRegion::nodeAtPoint):
1291         (WebCore::RenderRegion::attachRegion):
1292         (WebCore::RenderRegion::detachRegion):
1293         * rendering/RenderRegion.h:
1294         (WebCore::RenderRegion::parentFlowThread):
1295         (WebCore::RenderRegion::isValid):
1296         (WebCore::RenderRegion::setIsValid):
1297         * rendering/RenderTreeAsText.cpp:
1298         (WebCore::writeRenderFlowThreads):
1299         (WebCore::writeLayers):
1300         * rendering/RenderView.cpp:
1301         (WebCore::RenderView::RenderView):
1302         (WebCore::RenderView::layout):
1303         (WebCore::RenderView::renderFlowThreadWithName):
1304         (WebCore::RenderView::layoutRenderFlowThreads):
1305         * rendering/RenderView.h:
1306         (WebCore::RenderView::hasRenderFlowThreads):
1307         (WebCore::RenderView::isRenderFlowThreadOrderDirty):
1308         (WebCore::RenderView::setIsRenderFlowThreadOrderDirty):
1309         (WebCore::RenderView::renderFlowThreadList):
1310
1311 2011-08-18  Pavel Podivilov  <podivilov@chromium.org>
1312
1313         Web Inspector: add UISourceCode class.
1314         https://bugs.webkit.org/show_bug.cgi?id=66233
1315
1316         This is a next step towards splitting SourceFile into RawSourceCode and UISourceCode.
1317         UISourceCode is a part of SourceFile's interface that is visible to ScriptsPanel.
1318         UISourceCode represents a single entry in scripts panel's files select.
1319
1320         Reviewed by Pavel Feldman.
1321
1322         Test: inspector/debugger/ui-source-code.html
1323
1324         * WebCore.gypi:
1325         * WebCore.vcproj/WebCore.vcproj:
1326         * inspector/front-end/UISourceCode.js: Added.
1327         (WebInspector.UISourceCode):
1328         (WebInspector.UISourceCode.prototype.get id):
1329         (WebInspector.UISourceCode.prototype.get url):
1330         (WebInspector.UISourceCode.prototype.get isContentScript):
1331         (WebInspector.UISourceCode.prototype.requestContent):
1332         (WebInspector.UISourceCode.prototype._didRequestContent):
1333         (WebInspector.ContentProvider):
1334         (WebInspector.ContentProvider.prototype.requestContent):
1335         * inspector/front-end/WebKit.qrc:
1336         * inspector/front-end/inspector.html:
1337
1338 2011-08-17  Adam Roben  <aroben@apple.com>
1339
1340         Make WebCore keep track of the current device scale factor
1341
1342         Fixes <http://webkit.org/b/66413> WebCore requires every WebKit port to keep track of the
1343         device scale factor
1344
1345         Reviewed by Darin Adler.
1346
1347         * WebCore.exp.in: Removed Frame::deviceScaleFactorChanged, added Page::setDeviceScaleFactor.
1348
1349         * css/MediaQueryEvaluator.cpp:
1350         (WebCore::device_pixel_ratioMediaFeatureEval):
1351         * html/HTMLCanvasElement.cpp:
1352         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
1353         * page/DOMWindow.cpp:
1354         (WebCore::DOMWindow::devicePixelRatio):
1355         * rendering/RenderInline.cpp:
1356         (WebCore::RenderInline::addDashboardRegions):
1357         * rendering/RenderLayerCompositor.cpp:
1358         (WebCore::RenderLayerCompositor::deviceScaleFactor):
1359         * rendering/RenderObject.cpp:
1360         (WebCore::RenderObject::addDashboardRegions):
1361         Changed to get the device scale factor from Page.
1362
1363         * loader/EmptyClients.h:
1364         * page/Chrome.cpp:
1365         * page/Chrome.h:
1366         * page/ChromeClient.h:
1367         Removed Chrome[Client]::deviceScaleFactor.
1368
1369         * page/Frame.cpp:
1370         * page/Frame.h:
1371         Removed deviceScaleFactorChanged. Made deviceOrPageScaleFactorChanged public.
1372
1373         * page/Page.cpp:
1374         (WebCore::Page::Page): Initialize m_deviceScaleFactor.
1375         (WebCore::Page::setDeviceScaleFactor): Added. Code came from
1376         Frame::deviceScaleFactorChanged.
1377
1378         * page/Page.h: Added m_deviceScaleFactor.
1379         (WebCore::Page::deviceScaleFactor): Added simple getter.
1380
1381 2011-08-18  Darin Adler  <darin@apple.com>
1382
1383         SVG and HTML editing have conflicting inline isWhitespace functions
1384         https://bugs.webkit.org/show_bug.cgi?id=65145
1385
1386         Reviewed by Nikolas Zimmermann.
1387
1388         Renamed the SVG-specific whitespace functions to call it "SVG space"
1389         rather than just "whitespace". An alternative would have been to put
1390         the functions into an SVG namespace instead of the top level WebCore
1391         namespace.
1392
1393         * svg/SVGAnimateMotionElement.cpp:
1394         (WebCore::parsePoint): Call skipOptionalSVGSpaces.
1395         * svg/SVGAnimationElement.cpp:
1396         (WebCore::parseKeySplines): Ditto.
1397         * svg/SVGFitToViewBox.cpp:
1398         (WebCore::SVGFitToViewBox::parseViewBox): Ditto.
1399         * svg/SVGLengthList.cpp:
1400         (WebCore::SVGLengthList::parse): Call isSVGSpace and
1401         skipOptionalSVGSpacesOrDelimiter.
1402         * svg/SVGParserUtilities.cpp:
1403         (WebCore::genericParseNumber): Call skipOptionalSVGSpacesOrDelimiter.
1404         (WebCore::parseArcFlag): Ditto.
1405         (WebCore::parseRect): Call skipOptionalSVGSpaces.
1406         (WebCore::pointsListFromSVGData): Ditto.
1407         (WebCore::parseGlyphName): Call skipOptionalSVGSpaces, isSVGSpace,
1408         and skipOptionalSVGSpacesOrDelimiter.
1409         (WebCore::parseDelimitedString): Call skipOptionalSVGSpaces.
1410
1411         * svg/SVGParserUtilities.h:
1412         (WebCore::isSVGSpace): Renamed from isWhitespace. This better matches
1413         the comment which specifically talks about SVG.
1414         (WebCore::skipOptionalSVGSpaces): Renamed from skipOptionalSpaces.
1415         (WebCore::skipOptionalSVGSpacesOrDelimiter): Renamed from
1416         skipOptionalSVGSpacesOrDelimiter.
1417
1418         * svg/SVGPathStringSource.cpp:
1419         (WebCore::SVGPathStringSource::moveToNextToken): Call skipOptionalSVGSpaces.
1420         * svg/SVGPreserveAspectRatio.cpp:
1421         (WebCore::SVGPreserveAspectRatio::parsePreserveAspectRatio): Ditto.
1422         * svg/SVGStringList.cpp:
1423         (WebCore::SVGStringList::parse): Call isSVGSpace and
1424         skipOptionalSVGSpacesOrDelimiter.
1425         * svg/SVGTransformable.cpp:
1426         (WebCore::parseTransformParamList): Call skipOptionalSVGSpaces and
1427         skipOptionalSVGSpacesOrDelimiter.
1428         (WebCore::SVGTransformable::parseTransformAttribute): Call skipOptionalSVGSpaces.
1429
1430 2011-08-18  Gavin Peters  <gavinp@chromium.org>
1431
1432         Prepare frames for history navigation.
1433
1434         Before beginning an explicit history navigation in a newly initialized
1435         frame, it's important to give a "previous" item to avoid crashes, and
1436         give a state to the state machine to avoid extra validating loads.
1437
1438         https://bugs.webkit.org/show_bug.cgi?id=66322
1439
1440         Reviewed by Darin Fisher.
1441
1442         No new tests, as history navigation is very difficult to test in
1443         DumpRenderTree.
1444
1445         * loader/FrameLoader.cpp:
1446         (WebCore::FrameLoader::prepareForHistoryNavigation):
1447         * loader/FrameLoader.h:
1448
1449 2011-08-18  Jing Zhao  <jingzhao@chromium.org>
1450
1451         When changing the size of a menulist from x (x>1) to 1, the first item should be selected.
1452         https://bugs.webkit.org/show_bug.cgi?id=66282
1453
1454         Reviewed by Kent Tamura.
1455
1456         No new tests since it only changes the behavior in Android Browser.
1457
1458         * html/HTMLSelectElement.cpp:
1459         (WebCore::HTMLSelectElement::parseMappedAttribute):
1460
1461 2011-08-18  Adam Klein  <adamk@chromium.org>
1462
1463         Handle "form" attribute updates in parseMappedAttribute() instead of attributeChanged() to better match HTMLElement practices
1464         https://bugs.webkit.org/show_bug.cgi?id=66321
1465
1466         Reviewed by Darin Adler.
1467
1468         This is simply a cleanup change: there's no need that I can see for
1469         HTMLFormControlElement and HTMLObjectElement to override
1470         Element::attributeChanged since they can properly handle form
1471         attribute changes in parseMappedAttribute, which they also override.
1472
1473         Though no change in behavior, I've added test coverage of the moved
1474         code to an existing test (fast/forms/form-attribute.html) and added
1475         a new test.
1476
1477         Test: fast/forms/radio-remove-form-attr.html
1478
1479         * html/HTMLFormControlElement.cpp:
1480         (WebCore::HTMLFormControlElement::parseMappedAttribute):
1481         * html/HTMLFormControlElement.h:
1482         * html/HTMLObjectElement.cpp:
1483         (WebCore::HTMLObjectElement::parseMappedAttribute):
1484         * html/HTMLObjectElement.h:
1485
1486 2011-08-18  Chang Shu  <cshu@webkit.org>
1487
1488         Add support of setPasswordEchoEnabled and setPasswordEchoDuration for password echo feature
1489         https://bugs.webkit.org/show_bug.cgi?id=66052
1490
1491         Reviewed by Alexey Proskuryakov.
1492
1493         Added runtime settings in WebCore.
1494         Added support in window.internals for testing.
1495
1496         Tests: editing/input/password-echo-passnode.html
1497                editing/input/password-echo-passnode2.html
1498                editing/input/password-echo-passnode3.html
1499                editing/input/password-echo-textnode.html
1500
1501         * page/Settings.cpp:
1502         (WebCore::Settings::Settings):
1503         * page/Settings.h:
1504         (WebCore::Settings::setPasswordEchoEnabled):
1505         (WebCore::Settings::passwordEchoEnabled):
1506         (WebCore::Settings::setPasswordEchoDurationInSeconds):
1507         (WebCore::Settings::passwordEchoDurationInSeconds):
1508         * testing/Internals.cpp:
1509         (WebCore::Internals::Internals):
1510         (WebCore::Internals::setPasswordEchoEnabled):
1511         (WebCore::Internals::setPasswordEchoDurationInSeconds):
1512         (WebCore::Internals::reset):
1513         * testing/Internals.h:
1514         * testing/Internals.idl:
1515
1516 2011-08-18  Wyatt Carss  <wcarss@chromium.org>
1517
1518         Selecting all and inserting text into a page with a frameset leads to a NULL ptr
1519         https://bugs.webkit.org/show_bug.cgi?id=66288
1520
1521         Reviewed by Tony Chang.
1522
1523         VisibleSelection returns a NoSelection to InsertTextCommand::doApply as
1524         a new endingSelection, which isn't a sane state to be in. The code
1525         tries to get a position on a higher node for a better selection, but
1526         cannot go above the frameset (which exists in place of the body tag),
1527         which lacks a renderer, and therefore cannot have a non-NoSelection
1528         VisibleSelection.
1529
1530         Because this is a rare corner case, it seemed more reasonable to bail
1531         out in this circumstance than to change the way VisibleSelection
1532         canonicalization works. The new behavior is to delete the content, but
1533         insert nothing. I investigated the possibility of trying to move above
1534         or below the frameset in this particular case, but there still isn't a
1535         renderer, so it didn't prevent the crash.
1536
1537         Test: editing/inserting/insert-text-into-empty-frameset-crash.html
1538
1539         * editing/InsertTextCommand.cpp:
1540         (WebCore::InsertTextCommand::doApply):
1541
1542 2011-08-18  Takashi Toyoshima  <toyoshim@chromium.org>
1543
1544         Remove arguments from CloseEvent::create().
1545         https://bugs.webkit.org/show_bug.cgi?id=66294
1546
1547         Reviewed by Kent Tamura.
1548
1549         CloseEvent objects are initialized by initCloseEvent() in all cases.
1550         Initialization in create() is redundant.
1551
1552         No new tests for no functional difference.
1553
1554         * websockets/CloseEvent.h:
1555         (WebCore::CloseEvent::create):
1556         (WebCore::CloseEvent::CloseEvent):
1557         * websockets/WebSocket.cpp:
1558         (WebCore::WebSocket::didClose):
1559
1560 2011-08-18  Fady Samuel  <fsamuel@chromium.org>
1561
1562         iframe and frameset scaling is broken
1563         https://bugs.webkit.org/show_bug.cgi?id=57785
1564
1565         Reviewed by Simon Fraser.
1566
1567         Fixed two iframe and frameset scaling bugs:
1568           #1 iframes and frameset backgrounds and scroll areas are doubly scaled when they are styled with -webkit-transform.
1569           #2 frameset does not respect -webkit-transform-origin when scaled
1570
1571         Tests: fast/frames/frame-set-scaling-3d.html
1572                fast/frames/frame-set-scaling-centered.html
1573                fast/frames/frame-set-scaling-rotate.html
1574                fast/frames/frame-set-scaling-skew.html
1575                fast/frames/frame-set-scaling.html
1576                fast/frames/iframe-scaling-with-scroll.html
1577
1578         * rendering/RenderFrameSet.cpp:
1579         (WebCore::RenderFrameSet::layout):
1580         Update the FrameSet's layer transform after we've computed size to correctly account for the transform origin.
1581         * rendering/RenderLayer.cpp:
1582         (WebCore::RenderLayer::childrenClipRect):
1583         The dirty rect should be the document's unscaled size.
1584         * rendering/RenderWidget.cpp:
1585         (WebCore::RenderWidget::setWidget):
1586         (WebCore::RenderWidget::updateWidgetPosition):
1587         Don't scale the FrameView rect here. Scaling is done within the FrameView.
1588
1589 2011-08-18  Csaba Osztrogon√°c  <ossy@webkit.org>
1590
1591         Unreviewed buildfix after r93268.
1592
1593         * dom/Document.cpp:
1594         (WebCore::disableRangeMutation):
1595
1596 2011-08-17  Emil A Eklund  <eae@chromium.org>
1597
1598         Switch RenderBox to to new layout types
1599         https://bugs.webkit.org/show_bug.cgi?id=66156
1600
1601         Reviewed by Eric Seidel.
1602
1603         Convert RenderBox to new layout abstraction as a part of the ongoing
1604         conversion work.
1605
1606         No new tests as no new functionality.
1607
1608         * rendering/RenderBox.cpp:
1609         (WebCore::RenderBox::scrollWidth):
1610         (WebCore::RenderBox::scrollHeight):
1611         (WebCore::RenderBox::scrollLeft):
1612         (WebCore::RenderBox::scrollTop):
1613         (WebCore::RenderBox::setScrollLeft):
1614         (WebCore::RenderBox::setScrollTop):
1615         (WebCore::RenderBox::absoluteRects):
1616         (WebCore::RenderBox::absoluteContentBox):
1617         (WebCore::RenderBox::absoluteContentQuad):
1618         (WebCore::RenderBox::outlineBoundsForRepaint):
1619         (WebCore::RenderBox::reflectionBox):
1620         (WebCore::RenderBox::reflectedRect):
1621         (WebCore::RenderBox::verticalScrollbarWidth):
1622         (WebCore::RenderBox::horizontalScrollbarHeight):
1623         (WebCore::RenderBox::computeContentBoxLogicalWidth):
1624         (WebCore::RenderBox::computeContentBoxLogicalHeight):
1625         (WebCore::RenderBox::maskClipRect):
1626         (WebCore::RenderBox::repaintLayerRectsForImage):
1627         (WebCore::RenderBox::pushContentsClip):
1628         (WebCore::RenderBox::overflowClipRect):
1629         (WebCore::RenderBox::clipRect):
1630         (WebCore::RenderBox::containingBlockLogicalWidthForContent):
1631         (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
1632         (WebCore::RenderBox::positionLineBox):
1633         (WebCore::RenderBox::clippedOverflowRectForRepaint):
1634         (WebCore::RenderBox::computeRectForRepaint):
1635         (WebCore::RenderBox::computeLogicalWidth):
1636         (WebCore::RenderBox::computeInlineDirectionMargins):
1637         (WebCore::RenderBox::computeLogicalHeight):
1638         (WebCore::RenderBox::computeLogicalHeightUsing):
1639         (WebCore::RenderBox::computePercentageLogicalHeight):
1640         (WebCore::RenderBox::computeBlockDirectionMargins):
1641         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
1642         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
1643         (WebCore::computeInlineStaticDistance):
1644         (WebCore::RenderBox::computePositionedLogicalWidth):
1645         (WebCore::computeLogicalLeftPositionedOffset):
1646         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
1647         (WebCore::computeBlockStaticDistance):
1648         (WebCore::RenderBox::computePositionedLogicalHeight):
1649         (WebCore::computeLogicalTopPositionedOffset):
1650         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
1651         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
1652         (WebCore::RenderBox::computePositionedLogicalHeightReplaced):
1653         (WebCore::RenderBox::localCaretRect):
1654         (WebCore::RenderBox::lineHeight):
1655         (WebCore::RenderBox::baselinePosition):
1656         (WebCore::RenderBox::logicalVisualOverflowRectForPropagation):
1657         (WebCore::RenderBox::visualOverflowRectForPropagation):
1658         (WebCore::RenderBox::logicalLayoutOverflowRectForPropagation):
1659         (WebCore::RenderBox::layoutOverflowRectForPropagation):
1660         (WebCore::RenderBox::locationOffsetIncludingFlipping):
1661         * rendering/RenderBox.h:
1662         (WebCore::RenderBox::borderFitAdjust):
1663         (WebCore::RenderBox::intrinsicSize):
1664         (WebCore::RenderBox::intrinsicLogicalWidth):
1665         (WebCore::RenderBox::intrinsicLogicalHeight):
1666         (WebCore::RenderBox::scrollbarLogicalHeight):
1667         (WebCore::RenderBox::controlClipRect):
1668         (WebCore::RenderBox::firstLineBoxBaseline):
1669         (WebCore::RenderBox::lastLineBoxBaseline):
1670
1671 2011-08-17  Annie Sullivan  <sullivan@chromium.org>
1672
1673         Reduce usages of String::createUninitialized
1674         https://bugs.webkit.org/show_bug.cgi?id=66399
1675
1676         Constructs Strings with StringBuilder instead of calling createUninitialized.
1677
1678         Reviewed by Adam Barth.
1679
1680         No new tests; no functional change.
1681
1682         * dom/StyleElement.cpp:
1683         (WebCore::StyleElement::process):
1684         * dom/Text.cpp:
1685         (WebCore::Text::wholeText):
1686         * html/parser/HTMLSourceTracker.cpp:
1687         (WebCore::HTMLSourceTracker::sourceForToken):
1688         * platform/graphics/Font.cpp:
1689         (WebCore::Font::normalizeSpaces):
1690         * platform/text/TextCodecUserDefined.cpp:
1691         (WebCore::TextCodecUserDefined::decode):
1692
1693 2011-08-17  Emil A Eklund  <eae@chromium.org>
1694
1695         Switch FrameView to to new layout types
1696         https://bugs.webkit.org/show_bug.cgi?id=66147
1697
1698         Reviewed by Eric Seidel.
1699
1700         Convert Frame & FrameView to new layout abstraction as a part of the
1701         ongoing conversion work.
1702
1703         No new tests, no new functionality.
1704
1705         * page/Frame.cpp:
1706         (WebCore::Frame::visiblePositionForPoint):
1707         (WebCore::Frame::documentAtPoint):
1708         (WebCore::Frame::rangeForPoint):
1709         (WebCore::Frame::setPageAndTextZoomFactors):
1710         (WebCore::Frame::scalePage):
1711         * page/Frame.h:
1712         * page/FrameView.cpp:
1713         (WebCore::FrameView::create):
1714         (WebCore::FrameView::reset):
1715         (WebCore::FrameView::init):
1716         (WebCore::FrameView::invalidateRect):
1717         (WebCore::FrameView::setFrameRect):
1718         (WebCore::FrameView::setMarginWidth):
1719         (WebCore::FrameView::setMarginHeight):
1720         (WebCore::FrameView::setContentsSize):
1721         (WebCore::FrameView::adjustViewSize):
1722         (WebCore::FrameView::scrollXForFixedPosition):
1723         (WebCore::FrameView::scrollYForFixedPosition):
1724         (WebCore::FrameView::scrollOffsetForFixedPosition):
1725         (WebCore::FrameView::currentMousePosition):
1726         (WebCore::FrameView::scrollContentsFastPath):
1727         (WebCore::FrameView::scrollContentsSlowPath):
1728         (WebCore::FrameView::setScrollPosition):
1729         (WebCore::FrameView::repaintContentRectangle):
1730         (WebCore::FrameView::scrollToAnchor):
1731         (WebCore::FrameView::performPostLayoutTasks):
1732         (WebCore::FrameView::windowClipRect):
1733         (WebCore::FrameView::windowClipRectForLayer):
1734         (WebCore::FrameView::scrollTo):
1735         (WebCore::FrameView::invalidateScrollbarRect):
1736         (WebCore::FrameView::getTickmarks):
1737         (WebCore::FrameView::windowResizerRect):
1738         (WebCore::FrameView::setVisibleScrollerThumbRect):
1739         (WebCore::FrameView::paintScrollCorner):
1740         (WebCore::FrameView::paintContents):
1741         (WebCore::FrameView::paintOverhangAreas):
1742         (WebCore::FrameView::forceLayoutForPagination):
1743         (WebCore::FrameView::convertFromRenderer):
1744         (WebCore::FrameView::convertToRenderer):
1745         (WebCore::FrameView::convertToContainingView):
1746         (WebCore::FrameView::convertFromContainingView):
1747         * page/FrameView.h:
1748         (WebCore::FrameView::marginWidth):
1749         (WebCore::FrameView::marginHeight):
1750         * page/mac/FrameMac.mm:
1751         (WebCore::Frame::snapshotDragImage):
1752         (WebCore::Frame::nodeImage):
1753
1754 2011-08-17  Emil A Eklund  <eae@chromium.org>
1755
1756         Switch html/* to to new layout types
1757         https://bugs.webkit.org/show_bug.cgi?id=66347
1758
1759         Reviewed by Eric Seidel.
1760
1761         Convert HTML* and shadow element to new layout abstraction as a part of
1762         the ongoing conversion work.
1763
1764         No new tests, no new functionality.
1765
1766         * html/HTMLAreaElement.cpp:
1767         (WebCore::HTMLAreaElement::invalidateCachedRegion):
1768         (WebCore::HTMLAreaElement::mapMouseEvent):
1769         (WebCore::HTMLAreaElement::computePath):
1770         (WebCore::HTMLAreaElement::computeRect):
1771         (WebCore::HTMLAreaElement::getRegion):
1772         * html/HTMLAreaElement.h:
1773         * html/HTMLCanvasElement.cpp:
1774         (WebCore::HTMLCanvasElement::paint):
1775         * html/HTMLCanvasElement.h:
1776         * html/HTMLMapElement.cpp:
1777         (WebCore::HTMLMapElement::mapMouseEvent):
1778         * html/HTMLMapElement.h:
1779         * html/ImageDocument.cpp:
1780         (WebCore::ImageDocumentParser::finish):
1781         (WebCore::ImageDocument::scale):
1782         (WebCore::ImageDocument::resizeImageToFit):
1783         (WebCore::ImageDocument::imageFitsInWindow):
1784         * html/ValidationMessage.cpp:
1785         (WebCore::adjustBubblePosition):
1786         * html/canvas/CanvasRenderingContext2D.cpp:
1787         (WebCore::size):
1788         (WebCore::CanvasRenderingContext2D::drawImage):
1789         * html/shadow/MediaControlElements.cpp:
1790         (WebCore::MediaControlPanelElement::startDrag):
1791         (WebCore::MediaControlPanelElement::continueDrag):
1792         (WebCore::MediaControlPanelElement::setPosition):
1793         (WebCore::MediaControlPanelElement::defaultEventHandler):
1794         * html/shadow/MediaControlElements.h:
1795         * html/shadow/SliderThumbElement.cpp:
1796         (WebCore::SliderThumbElement::dragFrom):
1797         (WebCore::SliderThumbElement::setPositionFromPoint):
1798         * html/shadow/SliderThumbElement.h:
1799         * rendering/RenderImage.cpp:
1800         (WebCore::RenderImage::nodeAtPoint):
1801
1802 2011-08-17  David Grogan  <dgrogan@chromium.org>
1803
1804         Change references to leveldb.gyp to leveldatabase.gyp as part of the
1805         leveldb refactoring going on in chromium: crbug.com/89378
1806         https://bugs.webkit.org/show_bug.cgi?id=66332
1807
1808         Reviewed by Tony Gentilcore.
1809
1810         Tests: new-run-webkit-tests --debug --chromium --no-retry-failures --build-directory=llvm storage/indexeddb
1811
1812         * WebCore.gyp/WebCore.gyp:
1813
1814 2011-08-17  Hayato Ito  <hayato@chromium.org>
1815
1816         Implement proper handling of focus/blur events in regard to shadow DOM boundaries.
1817         https://bugs.webkit.org/show_bug.cgi?id=61421
1818
1819         Reviewed by Dimitri Glazkov.
1820
1821         Introduces FocusEventDispatchMediator/BlurEventDispatchMediator so
1822         that focus/blue events are stopped at the lowest common shadow boundary.
1823
1824         * dom/Document.cpp:
1825         (WebCore::Document::setFocusedNode):
1826         * dom/Event.cpp:
1827         (WebCore::FocusEventDispatchMediator::create):
1828         (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
1829         (WebCore::FocusEventDispatchMediator::dispatchEvent):
1830         (WebCore::BlurEventDispatchMediator::create):
1831         (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
1832         (WebCore::BlurEventDispatchMediator::dispatchEvent):
1833         * dom/Event.h:
1834         * dom/Node.cpp:
1835         (WebCore::Node::dispatchFocusEvent):
1836         (WebCore::Node::dispatchBlurEvent):
1837         * dom/Node.h:
1838         * html/HTMLFormControlElement.cpp:
1839         (WebCore::HTMLFormControlElement::dispatchBlurEvent):
1840         * html/HTMLFormControlElement.h:
1841         * html/HTMLSelectElement.cpp:
1842         (WebCore::HTMLSelectElement::dispatchFocusEvent):
1843         (WebCore::HTMLSelectElement::dispatchBlurEvent):
1844         * html/HTMLSelectElement.h:
1845         * html/HTMLTextFormControlElement.cpp:
1846         (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
1847         (WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
1848         * html/HTMLTextFormControlElement.h:
1849         * page/FocusController.cpp:
1850         (WebCore::dispatchEventsOnWindowAndFocusedNode):
1851
1852 2011-08-17  Ben Wells  <benwells@chromium.org>
1853
1854         Canvas fill and fillRect with SourceIn, DestinationIn, SourceOut, DestinationAtop and Copy have errors
1855         https://bugs.webkit.org/show_bug.cgi?id=66036
1856
1857         These modes cannot be passed straight through to the underlying graphics context as the graphics context
1858         and the HTML5 canvas spec have different interpretations to them. In the graphics context, the compositing
1859         modes are applied just over the area being filled. In the HTML5 spec, the compositing modes are applied over
1860         the entire canvas.
1861
1862         The SourceIn, DestinationIn, SourceOut, DestinationAtop and Copy modes all need some kind of extra action
1863         to just performing the composited fill on the canvas, as they need t he canvas to be cleared outside of the 
1864         area being filled.
1865
1866         Previous to this change the Copy mode did not do this clearing at all. The other modes did but if the
1867         transformed path being filled contained anti-aliasing at its edges artifacts were introduced.
1868
1869         With this change, Copy now does a complete erase of the canvas before performing a fill as per normal.
1870         The other modes use a temporary buffer just big enough for the transformed path (in device coordinates).
1871         The fill is first done there in SourceOver mode. Then this is drawn into the canvas context using the
1872         appropriate mode, with any areas outside the draw area being cleared.
1873
1874         Reviewed by James Robinson.
1875
1876         Test: fast/canvas/canvas-composite-transformclip.html
1877
1878         * html/HTMLCanvasElement.h:
1879         * html/canvas/CanvasRenderingContext2D.cpp:
1880         (WebCore::CanvasRenderingContext2D::fill):
1881         (WebCore::CanvasRenderingContext2D::fillRect):
1882         (WebCore::CanvasRenderingContext2D::clearCanvas):
1883         (WebCore::CanvasRenderingContext2D::transformAreaToDevice):
1884         (WebCore::CanvasRenderingContext2D::fillAndDisplayTransparencyElsewhere):
1885         * html/canvas/CanvasRenderingContext2D.h:
1886         * platform/graphics/skia/ImageBufferSkia.cpp:
1887         (WebCore::ImageBuffer::ImageBuffer):
1888
1889 2011-08-17  Emil A Eklund  <eae@chromium.org>
1890
1891         Switch inspector to to new layout types
1892         https://bugs.webkit.org/show_bug.cgi?id=66358
1893
1894         Reviewed by Eric Seidel.
1895
1896         Convert inspector code to new layout abstraction as a part of the ongoing
1897         conversion work.
1898
1899         No new tests, no new functionality.
1900
1901         * inspector/DOMNodeHighlighter.cpp:
1902         (WebCore::DOMNodeHighlighter::drawNodeHighlight):
1903         * inspector/InspectorInstrumentation.cpp:
1904         (WebCore::InspectorInstrumentation::willPaintImpl):
1905         * inspector/InspectorInstrumentation.h:
1906         (WebCore::InspectorInstrumentation::willPaint):
1907         * inspector/InspectorTimelineAgent.cpp:
1908         (WebCore::InspectorTimelineAgent::willPaint):
1909         * inspector/InspectorTimelineAgent.h:
1910         * inspector/TimelineRecordFactory.cpp:
1911         (WebCore::TimelineRecordFactory::createPaintData):
1912         * inspector/TimelineRecordFactory.h:
1913
1914 2011-08-17  Levi Weintraub  <leviw@chromium.org>
1915
1916         Switch Editing code to new layout types
1917         https://bugs.webkit.org/show_bug.cgi?id=66355
1918
1919         Reviewed by Eric Seidel.
1920
1921         Converting remaining editing code to the LayoutUnit abstraction.
1922
1923         No new tests, no change in functionality.
1924
1925         * editing/Editor.cpp:
1926         (WebCore::Editor::rangeForPoint):
1927         (WebCore::Editor::insideVisibleArea):
1928         (WebCore::Editor::countMatchesForText):
1929         * editing/Editor.h:
1930         * editing/mac/FrameSelectionMac.mm:
1931         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
1932
1933 2011-08-17  Levi Weintraub  <leviw@chromium.org>
1934
1935         Switch Accessibility code to new layout types
1936         https://bugs.webkit.org/show_bug.cgi?id=66348
1937
1938         Reviewed by Eric Seidel.
1939
1940         Converting remaining Accessibility code to the LayoutUnit abstraction.
1941
1942         No new tests, no change in functionality
1943
1944         * accessibility/AccessibilityImageMapLink.cpp:
1945         (WebCore::AccessibilityImageMapLink::elementRect):
1946         * accessibility/AccessibilityImageMapLink.h:
1947         * accessibility/AccessibilityListBox.cpp:
1948         (WebCore::AccessibilityListBox::elementAccessibilityHitTest):
1949         * accessibility/AccessibilityListBox.h:
1950         * accessibility/AccessibilityListBoxOption.cpp:
1951         (WebCore::AccessibilityListBoxOption::elementRect):
1952         * accessibility/AccessibilityListBoxOption.h:
1953         * accessibility/AccessibilityMenuListOption.cpp:
1954         (WebCore::AccessibilityMenuListOption::elementRect):
1955         * accessibility/AccessibilityMenuListOption.h:
1956         (WebCore::AccessibilityMenuListOption::size):
1957         * accessibility/AccessibilityMenuListPopup.h:
1958         (WebCore::AccessibilityMenuListPopup::elementRect):
1959         (WebCore::AccessibilityMenuListPopup::size):
1960         * accessibility/AccessibilityObject.cpp:
1961         (WebCore::AccessibilityObject::clickPoint):
1962         (WebCore::AccessibilityObject::orientation):
1963         (WebCore::AccessibilityObject::elementAccessibilityHitTest):
1964         * accessibility/AccessibilityObject.h:
1965         (WebCore::AccessibilityObject::accessibilityHitTest):
1966         (WebCore::AccessibilityObject::boundingBoxRect):
1967         (WebCore::AccessibilityObject::size):
1968         (WebCore::AccessibilityObject::boundsForVisiblePositionRange):
1969         (WebCore::AccessibilityObject::doAXBoundsForRange):
1970         * accessibility/AccessibilityRenderObject.cpp:
1971         (WebCore::AccessibilityRenderObject::isOffScreen):
1972         (WebCore::AccessibilityRenderObject::boundingBoxRect):
1973         (WebCore::AccessibilityRenderObject::checkboxOrRadioRect):
1974         (WebCore::AccessibilityRenderObject::elementRect):
1975         (WebCore::AccessibilityRenderObject::size):
1976         (WebCore::AccessibilityRenderObject::clickPoint):
1977         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
1978         (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
1979         (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
1980         (WebCore::AccessibilityRenderObject::doAXBoundsForRange):
1981         * accessibility/AccessibilityRenderObject.h:
1982         * accessibility/AccessibilityScrollView.cpp:
1983         (WebCore::AccessibilityScrollView::accessibilityHitTest):
1984         (WebCore::AccessibilityScrollView::elementRect):
1985         * accessibility/AccessibilityScrollView.h:
1986         * accessibility/AccessibilityScrollbar.cpp:
1987         (WebCore::AccessibilityScrollbar::elementRect):
1988         * accessibility/AccessibilityScrollbar.h:
1989         * accessibility/AccessibilitySlider.cpp:
1990         (WebCore::AccessibilitySliderThumb::elementRect):
1991         (WebCore::AccessibilitySliderThumb::size):
1992         * accessibility/AccessibilitySlider.h:
1993         * accessibility/AccessibilityTableColumn.cpp:
1994         (WebCore::AccessibilityTableColumn::elementRect):
1995         (WebCore::AccessibilityTableColumn::size):
1996         * accessibility/AccessibilityTableColumn.h:
1997         * accessibility/AccessibilityTableHeaderContainer.cpp:
1998         (WebCore::AccessibilityTableHeaderContainer::elementRect):
1999         (WebCore::AccessibilityTableHeaderContainer::size):
2000         * accessibility/AccessibilityTableHeaderContainer.h:
2001         * accessibility/mac/AccessibilityObjectWrapper.mm:
2002         (-[AccessibilityObjectWrapper position]):
2003         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
2004         (-[AccessibilityObjectWrapper accessibilityShowContextMenu]):
2005
2006 2011-08-17  Emil A Eklund  <eae@chromium.org>
2007
2008         Switch focus handling to to new layout types
2009         https://bugs.webkit.org/show_bug.cgi?id=66331
2010
2011         Reviewed by Eric Seidel.
2012
2013         Convert FocusController and SpatialNavigation to new layout abstraction
2014         as a part of the ongoing conversion work.
2015
2016         No new tests, no new functionality.
2017
2018         * page/FocusController.cpp:
2019         (WebCore::updateFocusCandidateIfNeeded):
2020         (WebCore::FocusController::findFocusCandidateInContainer):
2021         (WebCore::FocusController::advanceFocusDirectionallyInContainer):
2022         (WebCore::FocusController::advanceFocusDirectionally):
2023         * page/FocusController.h:
2024         * page/SpatialNavigation.cpp:
2025         (WebCore::alignmentForRects):
2026         (WebCore::start):
2027         (WebCore::middle):
2028         (WebCore::end):
2029         (WebCore::areRectsFullyAligned):
2030         (WebCore::areRectsPartiallyAligned):
2031         (WebCore::areRectsMoreThanFullScreenApart):
2032         (WebCore::below):
2033         (WebCore::rightOf):
2034         (WebCore::isRectInDirection):
2035         (WebCore::hasOffscreenRect):
2036         (WebCore::scrollInDirection):
2037         (WebCore::deflateIfOverlapped):
2038         (WebCore::canScrollInDirection):
2039         (WebCore::rectToAbsoluteCoordinates):
2040         (WebCore::nodeRectInAbsoluteCoordinates):
2041         (WebCore::frameRectInAbsoluteCoordinates):
2042         (WebCore::entryAndExitPointsForDirection):
2043         (WebCore::distanceDataForNode):
2044         (WebCore::canBeScrolledIntoView):
2045         (WebCore::virtualRectForDirection):
2046         (WebCore::virtualRectForAreaElementAndDirection):
2047         * page/SpatialNavigation.h:
2048
2049 2011-08-17  Levi Weintraub  <leviw@chromium.org>
2050
2051         Switch Document, DocumentMarker, Clipboard, and Range to new layout types
2052         https://bugs.webkit.org/show_bug.cgi?id=66330
2053
2054         Reviewed by Eric Seidel.
2055
2056         Converting the remaining DOM classes to use the LayoutUnit abstraction.
2057
2058         No new tests, no new behavior.
2059
2060         * dom/Clipboard.h:
2061         (WebCore::Clipboard::dragLocation):
2062         * dom/Document.cpp:
2063         (WebCore::Document::nodesFromRect):
2064         (WebCore::nodeFromPoint):
2065         (WebCore::Document::caretRangeFromPoint):
2066         (WebCore::Document::prepareMouseEvent):
2067         * dom/Document.h:
2068         * dom/DocumentMarkerController.cpp:
2069         (WebCore::DocumentMarkerController::markerContainingPoint):
2070         (WebCore::DocumentMarkerController::renderedRectsForMarkers):
2071         (WebCore::DocumentMarkerController::invalidateRenderedRectsForMarkersInRect):
2072         * dom/DocumentMarkerController.h:
2073         * dom/Range.cpp:
2074         (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoomAndPageScale):
2075         * dom/RenderedDocumentMarker.h:
2076         (WebCore::RenderedDocumentMarker::contains):
2077         (WebCore::RenderedDocumentMarker::setRenderedRect):
2078         (WebCore::RenderedDocumentMarker::renderedRect):
2079         (WebCore::RenderedDocumentMarker::invalidMarkerRect):
2080         (WebCore::RenderedDocumentMarker::invalidate):
2081
2082 2011-08-17  Dan Bernstein  <mitz@apple.com>
2083
2084         Removed an unused setting.
2085
2086         Reviewed by Anders Carlsson.
2087
2088         * WebCore.exp.in:
2089         * page/Settings.cpp:
2090         (WebCore::Settings::Settings): Removed initializer for m_needsTigerMailQuirks.
2091         * page/Settings.h: Removed accessors.
2092
2093 2011-08-17  Oliver Hunt  <oliver@apple.com>
2094
2095         Move towards supporting user controlled prototypes on CanvasPixelArray
2096         https://bugs.webkit.org/show_bug.cgi?id=66429
2097
2098         Reviewed by Gavin Barraclough.
2099
2100         Start using a per-global object structure for canvas pixel array.
2101
2102         * bindings/js/JSImageDataCustom.cpp:
2103         (WebCore::toJS):
2104
2105 2011-08-17  Luke Macpherson   <macpherson@chromium.org>
2106
2107         Support cast from CSSPrimitiveValue to unsigned, and use in appropriate places in CSSStyleSelector::applyProperty
2108         https://bugs.webkit.org/show_bug.cgi?id=66281
2109
2110         Reviewed by Eric Seidel.
2111
2112         No new tests - refactoring only.
2113
2114         The return if type!=CSS_NUMBER case becomes an ASSERT because it is unreachable unless there is an error in the parser.
2115
2116         * css/CSSPrimitiveValueMappings.h:
2117         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2118         Support cast from unsigned to CSSPrimitiveValue
2119         (WebCore::CSSPrimitiveValue::operator unsigned):
2120         Support cast from CSSPrimitiveValue to unsigned
2121         * css/CSSStyleSelector.cpp:
2122         (WebCore::CSSStyleSelector::applyProperty):
2123         Use HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro for CSSPropertyWebkitBoxFlex,
2124         CSSPropertyWebkitBoxFlexGroup and CSSPropertyWebkitBoxOrdinalGroup properties.
2125
2126 2011-08-17  Scott Byer  <scottbyer@chromium.org>
2127
2128         ScrollAnimatorNone: Remove unused field
2129         https://bugs.webkit.org/show_bug.cgi?id=66312
2130
2131         Reviewed by Adam Barth.
2132
2133         No functional change; no test needed.
2134
2135         * platform/ScrollAnimatorNone.cpp:
2136         (WebCore::ScrollAnimatorNone::PerAxisData::updateDataFromParameters):
2137         (WebCore::ScrollAnimatorNone::scroll):
2138         * platform/ScrollAnimatorNone.h:
2139
2140 2011-08-17  Jeff Miller  <jeffm@apple.com>
2141
2142         Work-in-progress on Soft link against AVFoundationCF and CoreMedia
2143         https://bugs.webkit.org/show_bug.cgi?id=65725
2144         
2145         Don't bother with SOFT_LINK_LIBRARY(libdispatch), we're going to continue to statically link to it since
2146         the DLL will have already been loaded by other parts of AAS and is guaranteed to be available if AVFoundation
2147         is enabled.
2148
2149         Reviewed by Anders Carlsson.
2150
2151         No new tests; no functional change.
2152
2153         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Removed SOFT_LINK_DEBUG_LIBRARY(libdispatch) and SOFT_LINK_LIBRARY(libdispatch).
2154         (WebCore::MediaPlayerPrivateAVFoundationCF::isAvailable): Don't check for libdispatch.
2155
2156 2011-08-17  Brady Eidson  <beidson@apple.com>
2157
2158         https://bugs.webkit.org/show_bug.cgi?id=66354 and <rdar://problem/9965209>
2159         Regression:  On Lion, redirects lose HTTP authentication headers
2160
2161         Reviewed by Alexey Proskuryakov and Darin Adler.
2162
2163         This changes makes WebCore try to apply basic credentials after a redirect if the redirect is to the same origin,
2164         assuming the redirected URL did not contain credentials directly.
2165
2166         Tests: http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin.html
2167                http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin.html
2168                http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html
2169
2170         * platform/network/cf/ResourceHandleCFNet.cpp:
2171         (WebCore::applyBasicAuthorizationHeader): Apply the user/password from a credential to the HTTP headers for a request.
2172         (WebCore::ResourceHandle::createCFURLConnection): Use the applyBasicAuthorizationHeader helper.
2173         (WebCore::ResourceHandle::willSendRequest): If this is a redirect within the same origin, apply any stored target credentials to the new request.
2174
2175         * platform/network/mac/ResourceHandleMac.mm:
2176         (WebCore::applyBasicAuthorizationHeader): Apply the user/password from a credential to the HTTP headers for a request.
2177         (WebCore::ResourceHandle::createNSURLConnection): Use the applyBasicAuthorizationHeader helper.
2178         (WebCore::ResourceHandle::willSendRequest): If this is a redirect within the same origin, apply any stored target credentials to the new request.
2179
2180 2011-08-17  Chris Fleizach  <cfleizach@apple.com>
2181
2182         Accessibility stack exhaustion using role attribute
2183         https://bugs.webkit.org/show_bug.cgi?id=65174
2184
2185         Reviewed by Darin Adler.
2186
2187         Forgot to commit review comments.
2188
2189         * accessibility/AccessibilityRenderObject.cpp:
2190         (WebCore::AccessibilityRenderObject::remapAriaRoleDueToParent):
2191
2192 2011-08-17  Chris Fleizach  <cfleizach@apple.com>
2193
2194         Accessibility stack exhaustion using role attribute
2195         https://bugs.webkit.org/show_bug.cgi?id=65174
2196
2197         Make sure we do not call accessibilityIsIgnored() during the AccessibilityObject
2198         creation flow. That can lead to loops.
2199    
2200         Reviewed by Darin Adler.
2201
2202         Tests: accessibility/crash-determining-aria-role-when-label-present.html
2203
2204         * accessibility/AccessibilityObject.cpp:
2205         (WebCore::createARIARoleMap):
2206         * accessibility/AccessibilityRenderObject.cpp:
2207         (WebCore::AccessibilityRenderObject::remapAriaRoleDueToParent):
2208         (WebCore::AccessibilityRenderObject::determineAriaRoleAttribute):
2209         * accessibility/AccessibilityRenderObject.h:
2210
2211 2011-08-17  James Robinson  <jamesr@chromium.org>
2212
2213         [chromium] Crash if compositing is disabled during updateLayers()
2214         https://bugs.webkit.org/show_bug.cgi?id=66353
2215
2216         Reviewed by Kenneth Russell.
2217
2218         If compositing is turned off during LayerRendererChromium::updateLayers(), the rootLayer() will become null.
2219         Sicne CCLayerTreeHost::doComposite() calls updateLayers() and then drawLayers() without checking for this case,
2220         drawLayers() has to return without doing anything if the root layer is null.
2221
2222         Crash fixed based on crash reports.  No known reliably repro case, unfortunately.
2223
2224         * platform/graphics/chromium/LayerRendererChromium.cpp:
2225         (WebCore::LayerRendererChromium::drawLayers):
2226
2227 2011-08-17  Dan Bernstein  <mitz@apple.com>
2228
2229         <rdar://problem/9971293> Mid-word breaks can occur in the middle of a surrogate pair
2230         https://bugs.webkit.org/show_bug.cgi?id=66402
2231
2232         Reviewed by Dave Hyatt.
2233
2234         Test: fast/text/midword-break-before-surrogate-pair-2.html
2235
2236         * rendering/RenderBlockLineLayout.cpp:
2237         (WebCore::RenderBlock::LineBreaker::nextLineBreak): Just never allow a mid-word
2238         break before a trailing surrogate.
2239
2240 2011-08-16  Chang Shu  <cshu@webkit.org>
2241
2242         Support reset in WebCore::Internals
2243         https://bugs.webkit.org/show_bug.cgi?id=66307
2244
2245         Reviewed by Dimitri Glazkov.
2246
2247         New tests will be added when function reset is implemented.
2248
2249         Added framework code in WebCoreTestSupport. The real implementation of
2250         Internals::reset() depends on the need from the settings that require a reset.
2251
2252         * testing/Internals.cpp:
2253         (WebCore::Internals::reset):
2254         * testing/Internals.h:
2255         * testing/js/WebCoreTestSupport.cpp:
2256         (WebCoreTestSupport::resetInternalsObject):
2257         * testing/js/WebCoreTestSupport.h:
2258         * testing/v8/WebCoreTestSupport.cpp:
2259         (WebCoreTestSupport::resetInternalsObject):
2260         * testing/v8/WebCoreTestSupport.h:
2261
2262 2011-08-17  Tony Chang  <tony@chromium.org>
2263
2264         Fix chromium mac compile.  MediaPlayerPrivateAVFoundationObjC.* moved
2265         and the WebCore.gypi file wasn't updated.
2266
2267         * WebCore.gypi:
2268
2269 2011-08-17  Abhishek Arya  <inferno@chromium.org>
2270
2271         Crash in Document::recalcStyleSelector
2272         https://bugs.webkit.org/show_bug.cgi?id=66335
2273
2274         Reviewed by Simon Fraser.
2275
2276         When node is getting destroyed and its removedFromDocument
2277         is not called due to entire document structure torn down(using
2278         removeAllChildren), make sure to clear out the stylesheet
2279         candidate node from document's structures in its destructor.
2280
2281         Test: svg/dom/stylesheet-candidate-node-crash-main.html
2282
2283         * dom/ProcessingInstruction.cpp:
2284         (WebCore::ProcessingInstruction::~ProcessingInstruction):
2285         * html/HTMLLinkElement.cpp:
2286         (WebCore::HTMLLinkElement::~HTMLLinkElement):
2287         * html/HTMLStyleElement.cpp:
2288         (WebCore::HTMLStyleElement::~HTMLStyleElement):
2289         * svg/SVGStyleElement.cpp:
2290         (WebCore::SVGStyleElement::~SVGStyleElement):
2291
2292 2011-08-17  Sam White  <samuel.white@rochester.edu>
2293
2294         AccessibilityObject levels are inconsistent
2295         https://bugs.webkit.org/show_bug.cgi?id=66180
2296         
2297         Updated accessibilityTable to return level values consistent with other accessibilityObjects that
2298         return level values. This means a value of 0 is now only returned when tableLevel() is called on a
2299         non-table element.
2300
2301         Reviewed by Chris Fleizach.
2302
2303         Test: platform/mac/accessibility/element-level.html
2304
2305         * accessibility/AccessibilityTable.cpp:
2306         (WebCore::AccessibilityTable::tableLevel):
2307         * accessibility/mac/AccessibilityObjectWrapper.mm:
2308         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
2309
2310 2011-08-17  Ryosuke Niwa  <rniwa@webkit.org>
2311
2312         An arrow key collapses directionless selection range in the wrong direction in BiDi
2313         https://bugs.webkit.org/show_bug.cgi?id=64626
2314
2315         Reviewed by Darin Adler.
2316
2317         The bug was caused by willBeModified's always using block direction to determine
2318         the direction to which the selection is collapsed. Fixed the bug by calling directionOfSelection
2319         in willBeModified, which will return the text direction of the surrounding context when
2320         the start and the end have the same direction. When the text directions at the start and at the end
2321         of selection do not match, it uses the block's text direction.
2322
2323         Test: editing/selection/collapse-selection-in-bidi.html
2324
2325         * editing/FrameSelection.cpp:
2326         (WebCore::FrameSelection::directionOfSelection): Added.
2327         (WebCore::FrameSelection::willBeModified): Calls directionOfSelection.
2328         (WebCore::FrameSelection::modifyMovingRight): Ditto.
2329         (WebCore::FrameSelection::modifyMovingLeft): Ditto.
2330         * editing/FrameSelection.h:
2331
2332 2011-08-17  Jeff Miller  <jeffm@apple.com>
2333
2334         Some AVFoundation source files should be in platform-specific directories
2335         https://bugs.webkit.org/show_bug.cgi?id=66352
2336         
2337         Moved platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.* files to platform/graphics/avfoundation/cf,
2338         and moved platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.* files to platform/graphics/avfoundation/objc/.
2339         
2340         While I was at it, added svn:eol-style property to the MediaPlayerPrivateAVFoundationObjC.* files.
2341         
2342         Also, for some reason, Visual Studio decided to re-sort a couple files in \inspector\front-end\ in WebCore.vcproj, even though
2343         I just re-sorted the project in r93215.
2344
2345         Reviewed by Eric Carlson.
2346
2347         No new tests; no functional change.
2348
2349         * WebCore.vcproj/WebCore.vcproj: Moved platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.* files to platform/graphics/avfoundation/cf.
2350
2351         * WebCore.vcproj/WebCoreMediaQT.vsprops: Added $(ProjectDir)..\platform\graphics\avfoundation\cf to include paths.
2352
2353         * WebCore.xcodeproj/project.pbxproj: Moved platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.* files to platform/graphics/avfoundation/objc/.
2354
2355         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.cpp: Removed.
2356         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.h: Removed.
2357         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h: Removed.
2358         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm: Removed.
2359
2360         * platform/graphics/avfoundation/cf: Added.
2361         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Copied from Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.cpp.
2362         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: Copied from Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.h.
2363
2364         * platform/graphics/avfoundation/objc: Added.
2365         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: Copied from Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h.
2366         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: Copied from Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm.
2367
2368 2011-08-17  Luke Macpherson   <macpherson@chromium.org>
2369
2370         Only set m_fontDirty if TextSizeAdjust is actually changed.
2371         https://bugs.webkit.org/show_bug.cgi?id=66022
2372
2373         Reviewed by Darin Adler.
2374
2375         No new tests. Refactoring only.
2376
2377         Reduces instances where the font information is dirtied to save recalculation where it is not necessary.
2378
2379         * css/CSSStyleSelector.cpp:
2380         (WebCore::CSSStyleSelector::applyProperty):
2381         Call new setTextSizeAdjust function.
2382         * css/CSSStyleSelector.h:
2383         (WebCore::CSSStyleSelector::setTextSizeAdjust):
2384         Add wrapper for RenderStyle::setTextSizeAdjust() that automatically updates m_fontDirty.
2385         * rendering/style/RenderStyle.h:
2386         (WebCore::RenderStyle::setTextSizeAdjust):
2387         Make setTextSizeAdjust return true if the unlderlying value was changed.
2388
2389 2011-08-17  Kenichi Ishibashi  <bashi@chromium.org>
2390
2391         [Chromium] Crash in HarfbuzzFace::~HarfbuzzFace
2392         https://bugs.webkit.org/show_bug.cgi?id=66211
2393
2394         Holds Skia's unique font ID instead of FontPlatformData to avoid accessing freed FontPlatformData.
2395
2396         Reviewed by Tony Chang.
2397
2398         No new tests; no functional change.
2399
2400         * platform/graphics/chromium/HarfbuzzSkia.cpp:
2401         (WebCore::releaseCachedHarfbuzzFace): Changed the argument.
2402         (WebCore::HarfbuzzFace::HarfbuzzFace): Changed to have Skia's font uniqueID instead of FontPlatformData.
2403         (WebCore::HarfbuzzFace::~HarfbuzzFace): Uses m_uniqueID to call releaseCachedHarfbuzzFace.
2404         * platform/graphics/chromium/HarfbuzzSkia.h:
2405
2406 2011-08-17  Jeff Miller  <jeffm@apple.com>
2407
2408         Re-sort the WebCore project with Visual Studio after recent changes that I assume were done by manually editing the XML.
2409
2410         * WebCore.vcproj/WebCore.vcproj:
2411
2412 2011-08-17  Sailesh Agrawal  <sail@chromium.org>
2413
2414         Chromium Mac: Fix implementation of wkScrollbarMinimumTotalLengthNeededForThumb to match WebKitSystemInterface
2415         https://bugs.webkit.org/show_bug.cgi?id=66311
2416
2417         Reviewed by Dimitri Glazkov.
2418
2419         Updated wkScrollbarMinimumTotalLengthNeededForThumb() based on the latest disassembly of libWebKitSystemInterfaceLion.a.
2420
2421         * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm:
2422         (wkScrollbarMinimumTotalLengthNeededForThumb):
2423
2424 2011-08-17  Steve Block  <steveblock@google.com>
2425
2426         Unreviewed, rolling out r93186.
2427         http://trac.webkit.org/changeset/93186
2428         https://bugs.webkit.org/show_bug.cgi?id=66114
2429
2430         Breaks LayoutTests on Chromium canary bots
2431
2432         * platform/graphics/chromium/LayerChromium.h:
2433         * platform/graphics/chromium/LayerRendererChromium.cpp:
2434         (WebCore::LayerRendererChromium::updateLayers):
2435         (WebCore::LayerRendererChromium::drawLayersInternal):
2436         (WebCore::LayerRendererChromium::drawLayer):
2437         * platform/graphics/chromium/cc/CCLayerImpl.h:
2438
2439 2011-08-17  Ryosuke Niwa  <rniwa@webkit.org>
2440
2441         Get rid of calls to deprecatedNode and deprecatedEditingOffset in
2442         AccessibilityRenderObject.cpp and InsertTextCommand.cpp
2443         https://bugs.webkit.org/show_bug.cgi?id=66014
2444
2445         Reviewed by Hajime Morita.
2446
2447         Removed calls to deprecatedNode and deprecatedEditingOffsets in the following files.
2448
2449         * accessibility/AccessibilityRenderObject.cpp:
2450         (WebCore::AccessibilityRenderObject::indexForVisiblePosition): Calls Position::rootEditableElement
2451         and Range::setEnd(const Position&, ExceptionCode) instead of manually pulling deprecatedNode
2452         and deprecatedEditingOffset.
2453         (WebCore::AccessibilityRenderObject::index): Abstracted the logic to loop through render objects
2454         from deprecatedNodes' renderer to m_renderer as renderObjectContainsPosition.
2455         * dom/Position.h:
2456         (WebCore::Position::rootEditableElement): Added.
2457         * dom/Range.cpp:
2458         (WebCore::Range::setStart): Added.
2459         (WebCore::Range::setEnd): Added.
2460         * dom/Range.h:
2461         * editing/InsertTextCommand.cpp:
2462         (WebCore::InsertTextCommand::insertTab):
2463         * editing/RenderedPosition.cpp:
2464         (WebCore::renderObjectContainsPosition): Extracted from AccessibilityRenderObject::index.
2465         * editing/RenderedPosition.h:
2466
2467 2011-08-17  Sailesh Agrawal  <sail@chromium.org>
2468
2469         Chromium Mac: Fix issue where scrollbar wouldn't be drawn until page finished loading
2470         https://bugs.webkit.org/show_bug.cgi?id=66238
2471
2472         Reviewed by Dimitri Glazkov.
2473
2474         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:
2475           1. -[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:] is called
2476           2. animation is delayed because shouldSuspendScrollAnimations() is true
2477           3. ScrollAnimatorChromiumMac::scroll() is called before the ScrollAnimatorChromiumMac::m_initialScrollbarPaintTimer is fired.
2478           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.
2479         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.
2480
2481         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.
2482
2483         * platform/chromium/ScrollAnimatorChromiumMac.mm:
2484         (WebCore::ScrollAnimatorChromiumMac::initialScrollbarPaintTimerFired):
2485         * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm:
2486         (wkScrollbarPainterForceFlashScrollers):
2487
2488 2011-08-16  Andrey Kosyakov  <caseq@chromium.org>
2489
2490         Web Inspector: maintain visible view hierarchy and dispatch common view events automatically
2491         https://bugs.webkit.org/show_bug.cgi?id=66131
2492
2493         Reviewed by Pavel Feldman.
2494
2495         Test: inspector/view-events.html
2496
2497         - added a notion of an optional parent to a View
2498         - maintain a list of View children
2499         - dispatch common view events, such as show/hide/resize automatically through the hierarchy of visible views.
2500         - promoted Panel's logic of (re)storing scroll positions to view
2501         - demoted inheritScrollPositionFromView to a couple of views that need it.
2502
2503         * inspector/front-end/ApplicationCacheItemsView.js:
2504         (WebInspector.ApplicationCacheItemsView.prototype.onResize):
2505         * inspector/front-end/ConsoleView.js:
2506         (WebInspector.ConsoleView.prototype.populateStatusBar):
2507         (WebInspector.ConsoleView.prototype.elementsToRestoreScrollPositionsFor):
2508         * inspector/front-end/CookieItemsView.js:
2509         (WebInspector.CookieItemsView.prototype.onResize):
2510         (WebInspector.SimpleCookiesTable.prototype.onResize):
2511         * inspector/front-end/DOMStorageItemsView.js:
2512         (WebInspector.DOMStorageItemsView.prototype.onResize):
2513         * inspector/front-end/DetailedHeapshotView.js:
2514         (WebInspector.DetailedHeapshotView.prototype.onResize):
2515         * inspector/front-end/Drawer.js:
2516         (WebInspector.Drawer.prototype.set visibleView):
2517         (WebInspector.Drawer.prototype.show):
2518         (WebInspector.Drawer.prototype.hide):
2519         (WebInspector.Drawer.prototype.onResize):
2520         (WebInspector.Drawer.prototype._animateDrawerHeight.animationFinished):
2521         (WebInspector.Drawer.prototype._animateDrawerHeight):
2522         (WebInspector.Drawer.prototype._statusBarDragging):
2523         (WebInspector.Drawer.prototype._endStatusBarDragging):
2524         * inspector/front-end/ElementsPanel.js:
2525         (WebInspector.ElementsPanel.prototype.onResize):
2526         * inspector/front-end/ExtensionPanel.js:
2527         * inspector/front-end/FontView.js:
2528         (WebInspector.FontView.prototype.onResize):
2529         * inspector/front-end/IFrameView.js:
2530         (WebInspector.IFrameView):
2531         * inspector/front-end/NetworkItemView.js:
2532         (WebInspector.NetworkItemView.prototype._installHighlightSupport):
2533         * inspector/front-end/NetworkPanel.js:
2534         (WebInspector.NetworkLogView):
2535         (WebInspector.NetworkLogView.prototype.elementsToRestoreScrollPositionsFor):
2536         (WebInspector.NetworkLogView.prototype.onResize):
2537         (WebInspector.NetworkLogView.prototype.wasShown):
2538         (WebInspector.NetworkLogView.prototype.willHide):
2539         (WebInspector.NetworkPanel):
2540         (WebInspector.NetworkPanel.prototype.show):
2541         (WebInspector.NetworkPanel.prototype._showResource):
2542         (WebInspector.NetworkPanel.prototype._closeVisibleResource):
2543         * inspector/front-end/Panel.js:
2544         (WebInspector.Panel.prototype.show):
2545         (WebInspector.Panel.prototype.hide):
2546         (WebInspector.Panel.prototype.performSearch.processChunk):
2547         (WebInspector.Panel.prototype.performSearch):
2548         (WebInspector.Panel.prototype.updateSidebarWidth):
2549         * inspector/front-end/PanelEnablerView.js:
2550         (WebInspector.PanelEnablerView.prototype.show):
2551         (WebInspector.PanelEnablerView.prototype.onResize):
2552         * inspector/front-end/ProfileView.js:
2553         (WebInspector.CPUProfileView.prototype.onResize):
2554         * inspector/front-end/ProfilesPanel.js:
2555         (WebInspector.ProfilesPanel.prototype.updateMainViewWidth):
2556         * inspector/front-end/ResourceCookiesView.js:
2557         (WebInspector.ResourceCookiesView.prototype.onResize):
2558         * inspector/front-end/ResourcePreviewView.js:
2559         (WebInspector.ResourcePreviewView.prototype.contentLoaded):
2560         * inspector/front-end/ResourceResponseView.js:
2561         (WebInspector.ResourceResponseView.prototype.contentLoaded):
2562         * inspector/front-end/ResourceTimingView.js:
2563         (WebInspector.ResourceTimingView.prototype.show):
2564         * inspector/front-end/ResourcesPanel.js:
2565         (WebInspector.ResourcesPanel.prototype.show):
2566         (WebInspector.ResourcesPanel.prototype._innerShowView):
2567         (WebInspector.ResourcesPanel.prototype.closeVisibleView):
2568         (WebInspector.ResourcesPanel.prototype.updateMainViewWidth):
2569         (WebInspector.FrameResourceTreeElement.prototype._recreateSourceView):
2570         * inspector/front-end/ScriptsPanel.js:
2571         (WebInspector.ScriptsPanel.prototype.show):
2572         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
2573         (WebInspector.ScriptsPanel.prototype._removeSourceFrame):
2574         (WebInspector.ScriptsPanel.prototype.setSidebarWidth):
2575         * inspector/front-end/SourceFrame.js:
2576         (WebInspector.SourceFrame):
2577         (WebInspector.SourceFrame.prototype.show):
2578         (WebInspector.SourceFrame.prototype.willHide):
2579         (WebInspector.SourceFrame.prototype.clearMessages):
2580         (WebInspector.SourceFrame.prototype._setTextViewerDecorations):
2581         (WebInspector.SourceFrame.prototype.inheritScrollPositions):
2582         * inspector/front-end/TabbedPane.js:
2583         (WebInspector.TabbedPane.prototype.appendTab):
2584         * inspector/front-end/TextViewer.js:
2585         (WebInspector.TextViewer.prototype.elementsToRestoreScrollPositionsFor):
2586         (WebInspector.TextViewer.prototype.inheritScrollPositions):
2587         (WebInspector.TextViewer.prototype.onResize):
2588         * inspector/front-end/TimelinePanel.js:
2589         (WebInspector.TimelinePanel.prototype.onResize):
2590         (WebInspector.TimelinePanel.prototype.elementsToRestoreScrollPositionsFor):
2591         (WebInspector.TimelinePanel.prototype.show):
2592         * inspector/front-end/View.js:
2593         (WebInspector.View):
2594         (WebInspector.View.prototype.wasShown):
2595         (WebInspector.View.prototype.willHide):
2596         (WebInspector.View.prototype._innerShow):
2597         (WebInspector.View.prototype.show):
2598         (WebInspector.View.prototype._innerHide):
2599         (WebInspector.View.prototype.hide):
2600         (WebInspector.View.prototype._detach):
2601         (WebInspector.View.prototype.elementsToRestoreScrollPositionsFor):
2602         (WebInspector.View.prototype.storeScrollPositions):
2603         (WebInspector.View.prototype.restoreScrollPositions):
2604         (WebInspector.View.prototype.addChildView):
2605         (WebInspector.View.prototype.removeChildView):
2606         (WebInspector.View.prototype.onResize):
2607         (WebInspector.View.prototype.doResize):
2608         (WebInspector.View.prototype.dispatchToSelfAndVisibleChildren):
2609         (WebInspector.View.prototype.dispatchToVisibleChildren):
2610         * inspector/front-end/inspector.js:
2611         (WebInspector.windowResize):
2612
2613 2011-08-16  Luke Macpherson   <macpherson@chromium.org>
2614
2615         Represent RenderStyle::textOverflow property using an enum instead of a bool.
2616         https://bugs.webkit.org/show_bug.cgi?id=66356
2617
2618         Reviewed by Dan Bernstein.
2619
2620         No new tests - no behavioral changes.
2621
2622         * css/CSSPrimitiveValueMappings.h:
2623         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2624         Support cast from TextOverflow to CSSPrimitiveValue.
2625         (WebCore::CSSPrimitiveValue::operator TextOverflow):
2626         Support cast from CSSPrimitiveValue to TextOverflow.
2627         * css/CSSStyleSelector.cpp:
2628         (WebCore::CSSStyleSelector::applyProperty):
2629         Use HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro for text overflow.
2630         * rendering/style/RenderStyle.h:
2631         (WebCore::InheritedFlags::textOverflow):
2632         Return TextOverflow enum.
2633         (WebCore::InheritedFlags::setTextOverflow):
2634         Accept TextOverflow enum parameter.
2635         (WebCore::InheritedFlags::initialTextOverflow):
2636         Return TextOverflowClip.
2637         * rendering/style/RenderStyleConstants.h:
2638         Define TextOverflow enum.
2639         * rendering/style/StyleRareNonInheritedData.h:
2640         Change representation of text overflow from bool to one-bit unsigned.
2641
2642 2011-08-16  Jeff Miller  <jeffm@apple.com>
2643
2644         Apple's Windows production build should fail to compile if AVFoundation is not enabled
2645         https://bugs.webkit.org/show_bug.cgi?id=66339
2646         
2647         Generate a compile-time error for Production builds if !USE(AVFOUNDATION).
2648
2649         Reviewed by Darin Adler.
2650
2651         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.cpp: Generate a compile-time error for Production builds if !USE(AVFOUNDATION).
2652
2653 2011-08-16  David Levin  <levin@chromium.org>
2654
2655         REGRESSION (r89086): All worker xhr requests trigger preflight requests.
2656         https://bugs.webkit.org/show_bug.cgi?id=66340
2657
2658         Reviewed by Adam Barth.
2659
2660         Test coming in a more comprehensive patch shortly. This is just a very targetted
2661         patch to allow for easier merging.
2662
2663         * loader/CrossOriginAccessControl.cpp:
2664         (WebCore::isOnAccessControlSimpleRequestHeaderWhitelist): Add referer to the list
2665         of whitelisted headers. It can't be set by xhr so it is ok to whitelist it, but it is
2666         set before calling this function. This is similar to what is done for "origin" in here.
2667
2668 2011-08-16  Shawn Singh  <shawnsingh@chromium.org>
2669
2670         Computing screen-space transform for LayerChromium and CCLayerImpl
2671         https://bugs.webkit.org/show_bug.cgi?id=66114
2672
2673         Reviewed by James Robinson.
2674
2675         Test: compositing/backface-visibility-hierarchical-transform.html
2676
2677         Added a data member to LayerChromium and CCLayerImpl that holds
2678         the screen-space transform.   The transform is computed in
2679         calculateDrawTransformsAndVisibility(), which is used during
2680         updating (LayerChromium) and drawing (CCLayerImpl).  This transform
2681         will also be used for other things, such as HUD drawing, in upcoming
2682         patches.
2683
2684         Also fixed a FIXME in LayerRendererChromium::drawLayer, which
2685         was not computing the entire hierarchy of transforms to determine
2686         back-face visibility.  Now it simply uses the screen space transform.
2687
2688         * platform/graphics/chromium/LayerChromium.h:
2689         (WebCore::LayerChromium::screenSpaceDrawTransform):
2690         (WebCore::LayerChromium::setScreenSpaceDrawTransform):
2691         * platform/graphics/chromium/LayerRendererChromium.cpp:
2692         (WebCore::LayerRendererChromium::updateLayers):
2693         (WebCore::LayerRendererChromium::drawLayersInternal):
2694         (WebCore::LayerRendererChromium::drawLayer):
2695         (WebCore::calculateDrawTransformsAndVisibility):
2696         * platform/graphics/chromium/cc/CCLayerImpl.h:
2697         (WebCore::CCLayerImpl::screenSpaceDrawTransform):
2698         (WebCore::CCLayerImpl::setScreenSpaceDrawTransform):
2699
2700 2011-08-16  Hayato Ito  <hayato@chromium.org>
2701
2702         Implement proper handling of events which happen in children of shadow hosts.
2703         https://bugs.webkit.org/show_bug.cgi?id=66285
2704
2705         Reviewed by Dimitri Glazkov.
2706
2707         Fix the issue where a shadow host stops an event propagation if an
2708         event happens at the children of shadow hosts, outside of the shadow root.
2709
2710         Test: fast/dom/shadow/shadow-contents-event.html
2711
2712         * dom/EventDispatcher.cpp:
2713         (WebCore::EventDispatcher::adjustToShadowBoundaries):
2714
2715 2011-08-16  Per-Erik Brodin  <per-erik.brodin@ericsson.com>
2716
2717         Make it possible to explicitly prevent a preflight via ThreadableLoaderOptions
2718         https://bugs.webkit.org/show_bug.cgi?id=65694
2719
2720         Reviewed by Alexey Proskuryakov.
2721
2722         No new tests since there is no change in behavior.
2723
2724         * fileapi/FileReaderLoader.cpp:
2725         (WebCore::FileReaderLoader::start):
2726         * loader/DocumentThreadableLoader.cpp:
2727         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
2728         (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
2729         * loader/ThreadableLoader.h:
2730         (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions):
2731         * notifications/Notification.cpp:
2732         (WebCore::Notification::startLoading):
2733         * xml/XMLHttpRequest.cpp:
2734         (WebCore::XMLHttpRequest::createRequest):
2735
2736 2011-08-16  Scott Byer  <scottbyer@chromium.org>
2737
2738         Fix spelling error.
2739         https://bugs.webkit.org/show_bug.cgi?id=66261
2740
2741         Reviewed by Adam Barth.
2742
2743         No functional change, no tests needed.
2744
2745         * platform/ScrollAnimator.cpp:
2746         (WebCore::ScrollAnimator::scroll):
2747         (WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation):
2748         (WebCore::ScrollAnimator::notifyPositionChanged):
2749         * platform/ScrollAnimator.h:
2750         * platform/ScrollAnimatorNone.cpp:
2751         (WebCore::ScrollAnimatorNone::scrollToOffsetWithoutAnimation):
2752         (WebCore::ScrollAnimatorNone::animationTimerFired):
2753         * platform/ScrollAnimatorWin.cpp:
2754         (WebCore::ScrollAnimatorWin::scrollToOffsetWithoutAnimation):
2755         (WebCore::ScrollAnimatorWin::animateScroll):
2756         * platform/chromium/ScrollAnimatorChromiumMac.h:
2757         * platform/chromium/ScrollAnimatorChromiumMac.mm:
2758         (WebCore::ScrollAnimatorChromiumMac::immediateScrollToPoint):
2759         (WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaX):
2760         (WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaY):
2761         (WebCore::ScrollAnimatorChromiumMac::notifyPositionChanged):
2762         * platform/mac/ScrollAnimatorMac.h:
2763         * platform/mac/ScrollAnimatorMac.mm:
2764         (WebCore::ScrollAnimatorMac::immediateScrollToPoint):
2765         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaX):
2766         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaY):
2767         (WebCore::ScrollAnimatorMac::notifyPositionChanged):
2768
2769 2011-08-16  Joseph Pecoraro  <joepeck@webkit.org>
2770
2771         ASSERT in fast/css/custom-font-xheight.html
2772         https://bugs.webkit.org/show_bug.cgi?id=66328
2773
2774         Reviewed by Dan Bernstein.
2775
2776         In r93140 the temporary font created for a remote CSS font face
2777         was created without being retained. We need to protect the
2778         font from being purged while we hold onto it, so add a font cache
2779         purge preventer.
2780
2781         * css/CSSFontFaceSource.cpp:
2782         (WebCore::CSSFontFaceSource::getFontData):
2783
2784 2011-08-16  Joseph Pecoraro  <joepeck@webkit.org>
2785
2786         Unreviewed Chromium Windows build fix after r93140. Take 4.
2787         Namespace the now public enum as FontCache::ShouldRetain.
2788
2789         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
2790         (WebCore::GetLastResortFallbackFontProcData::GetLastResortFallbackFontProcData):
2791
2792 2011-08-15  Stephen White  <senorblanco@chromium.org>
2793
2794         Canvas resizing can be slow
2795         https://bugs.webkit.org/show_bug.cgi?id=66251
2796
2797         Canvas resizing was slow due to re-allocation of the ImageBuffer on
2798         each size change (width or height).  This was introduced inadvertently
2799         by calls to isAccelerated() during canvas reset().  Since we won't 
2800         know if we have successfully accelerated until ImageBuffer creation,
2801         move the compositor invalidation to createImageBuffer() as well.
2802         This patch also attempts to unify the Skia and CG accelerated canvas
2803         paths.  The DrawingBuffer used by the Skia path is now owned by 
2804         ImageBuffer[Skia], similar to how the IOSurface is owned by
2805         ImageBuffer[CG].  Some of the logic for when to accelerate was moved
2806         into HTMLCanvasElement and unified with the CG path.  Acceleration is
2807         also now enabled by the same "Accelerated" ImageBuffer create flag
2808         used by the CG path.  DrawingBuffer is now re-created even for a 
2809         same-size change (same as the memory buffer), but we speed it up
2810         by calling GraphicsContext3D::texImage2D() with a NULL pixels ptr
2811         instead of GraphicsContext3D::teximage2DResourceSafe() (no need to
2812         clear it, since it's done with a glClear anyway).
2813
2814         Reviewed by Kenneth Russell.
2815
2816         Covered by existing tests in fast/canvas and canvas/philip.
2817
2818         * html/HTMLCanvasElement.cpp:
2819         (WebCore::HTMLCanvasElement::reset):
2820         Don't call isAccelerated() from reset(), since we don't want to
2821         inadvertently create the ImageBuffer.  Also, since we won't know if
2822         we have successfully accelerated until createImageBuffer() is
2823         called, defer the compositor invalidation to createImageBuffer() as
2824         well.
2825         (WebCore::HTMLCanvasElement::shouldAccelerate):
2826         Unify the CG and Skia ports' logic for when to accelerate (Skia
2827         logic moved in from CanvasRenderingContext2D).
2828         (WebCore::HTMLCanvasElement::createImageBuffer):
2829         Use the unified shouldAccelerate() logic, and pass it as a flag
2830         to ImageBuffer.  Do compositor invalidation as well.
2831         * html/HTMLCanvasElement.h:
2832         (WebCore::HTMLCanvasElement::hasCreatedImageBuffer):
2833         Expose hasCreatedImageBuffer() publically, so
2834         CanvasRenderingContext2D::isAccelerated() doesn't inadvertently create
2835         it.
2836         * html/canvas/CanvasRenderingContext2D.cpp:
2837         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
2838         (WebCore::CanvasRenderingContext2D::~CanvasRenderingContext2D):
2839         Remove all acceleration setting and resetting, since it's now done
2840         during ImageBuffer creation.
2841         (WebCore::CanvasRenderingContext2D::isAccelerated):
2842         Check if the image buffer was created, so we don't inadvertently
2843         create it here.
2844         (WebCore::CanvasRenderingContext2D::paintsIntoCanvasBuffer):
2845         Don't call GraphicsContext3D::paintsIntoCanvasBuffer(), since its
2846         WebViewImpl may be null.  Ask the render tree instead.
2847         (WebCore::CanvasRenderingContext2D::reset):
2848         Don't reset acceleration here, since we don't own it anymore.
2849         (WebCore::CanvasRenderingContext2D::platformLayer):
2850         Call into the ImageBuffer to get our PlatformLayer.
2851         * html/canvas/CanvasRenderingContext2D.h:
2852         Remove m_drawingBuffer, and all acceleration-related calls.
2853         * platform/graphics/GraphicsContext.cpp:
2854         * platform/graphics/GraphicsContext.h:
2855         Remove setGraphicsContext3D(), and paintsIntoImageBuffer().
2856         * platform/graphics/ImageBuffer.cpp:
2857         (WebCore::ImageBuffer::platformLayer):
2858         Implement a dummy platformLayer() call for non-skia ports.
2859         * platform/graphics/ImageBuffer.h:
2860         Declare a platformLayer() call (USE(ACCELERATED_COMPOSITING) only).
2861         * platform/graphics/chromium/ImageBufferDataSkia.h:
2862         Add a DrawingBuffer data member.
2863         * platform/graphics/gpu/DrawingBuffer.cpp:
2864         (WebCore::DrawingBuffer::reset):
2865         Use texImage2D() with a NULL ptr, not texImage2DResourceSafe().
2866         Since we immediately clear the framebuffer via glClear(), this whole
2867         resource safe business is overkill.
2868         * platform/graphics/skia/GraphicsContextSkia.cpp:
2869         Remove setGraphicsContext3D() and paintsIntoImageBuffer().  This
2870         functionality is handled by ImageBuffer now.
2871         * platform/graphics/skia/ImageBufferSkia.cpp:
2872         (WebCore::ImageBuffer::ImageBuffer):
2873         Give the ImageBufferData ownership of the DrawingBuffer.
2874         (WebCore::ImageBuffer::platformLayer):
2875         Implement an accessor for the DrawingBuffer's PlatformLayer.
2876         * platform/graphics/skia/PlatformContextSkia.cpp:
2877         (WebCore::PlatformContextSkia::setGraphicsContext3D):
2878         * platform/graphics/skia/PlatformContextSkia.h:
2879         Remove isPathSkiaSafe() extern (unused).
2880         Remove paintsIntoImageBuffer() (now unused).  Remove IntSize param
2881         from setGraphicsContext3D() (unused).
2882
2883 2011-08-16  Joseph Pecoraro  <joepeck@webkit.org>
2884
2885         Unreviewed Chromium Windows build fix after r93140. Take 3.
2886         Include the proper includes!
2887
2888         * platform/graphics/FontCache.h:
2889
2890 2011-08-16  Mihnea Ovidenie  <mihnea@adobe.com>
2891
2892         Unmatrix algorithm implementation is wrong
2893         https://bugs.webkit.org/show_bug.cgi?id=66080
2894
2895         Reviewed by Dean Jackson.
2896
2897         Current version of the algorithm negates only the scaleX while
2898         it should negate also scaleY and scaleZ when appropriate.
2899
2900         Test: animations/animation-matrix-negative-scale-unmatrix.html
2901
2902         * platform/graphics/transforms/TransformationMatrix.cpp:
2903         (WebCore::decompose):
2904
2905 2011-08-16  Joseph Pecoraro  <joepeck@webkit.org>
2906
2907         Unreviewed Chromium Windows build fix after r93140.
2908
2909         This just makes the troublesome enum public. If this
2910         fixes the build I will file a follow-up bug to clean-up
2911         these build issues and either keep the enum public and
2912         cleanup other functions or restore the enum to private.
2913         There is no harm in making the enum public right now.
2914
2915         * platform/graphics/FontCache.h:
2916
2917 2011-08-16  Joseph Pecoraro  <joepeck@webkit.org>
2918
2919         Unreviewed Chromium Windows build fix after r93140.
2920
2921         * platform/graphics/FontCache.h:
2922
2923 2011-08-16  Joseph Pecoraro  <joepeck@webkit.org>
2924
2925         Unreviewed Windows and Chromium Windows build fix after r93140.
2926
2927         * platform/graphics/FontCache.h:
2928         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
2929         (WebCore::FontCache::fontDataFromDescriptionAndLogFont):
2930         (WebCore::getLastResortFallbackFontProc):
2931         (WebCore::FontCache::getLastResortFallbackFont):
2932         * platform/graphics/win/FontCacheWin.cpp:
2933         (WebCore::FontCache::fontDataFromDescriptionAndLogFont):
2934         (WebCore::FontCache::getLastResortFallbackFont):
2935
2936 2011-08-16  Adam Roben  <aroben@apple.com>
2937
2938         Make placeholder text remain visible until a character is typed on Windows
2939
2940         Fixes <http://webkit.org/b/66319> Placeholder text in text fields disappears when the field
2941         is focused on Windows, which doesn't match Lion or Windows native text fields
2942
2943         Covered by existing tests (which are currently failing on the bots until this patch lands).
2944
2945         Reviewed by Dave Hyatt.
2946
2947         * rendering/RenderThemeSafari.h:
2948         (WebCore::RenderThemeSafari::shouldShowPlaceholderWhenFocused):
2949         * rendering/RenderThemeWin.h:
2950         (WebCore::RenderThemeWin::shouldShowPlaceholderWhenFocused):
2951         Added overrides to return true.
2952
2953 2011-08-16  David Hyatt  <hyatt@apple.com>
2954
2955         https://bugs.webkit.org/show_bug.cgi?id=66254
2956
2957         Make region invalidation and repainting work properly. We do this by making RenderFlowThreads into
2958         repaint containers and then issuing new repaints in the regions that contain the invalidated flow thread
2959         content.
2960
2961         Reviewed by Simon Fraser.
2962
2963         Added new tests in fast/repaint.
2964
2965         * rendering/RenderFlowThread.cpp:
2966         (WebCore::RenderFlowThread::repaintRectangleInRegions):
2967         * rendering/RenderFlowThread.h:
2968         * rendering/RenderObject.cpp:
2969         (WebCore::RenderObject::enclosingRenderFlowThread):
2970         (WebCore::RenderObject::containerForRepaint):
2971         (WebCore::RenderObject::repaintUsingContainer):
2972         * rendering/RenderObject.h:
2973         * rendering/RenderView.cpp:
2974         (WebCore::RenderView::RenderView):
2975         (WebCore::RenderView::renderFlowThreadWithName):
2976         * rendering/RenderView.h:
2977         (WebCore::RenderView::hasRenderFlowThreads):
2978
2979 2011-08-16  Joseph Pecoraro  <joepeck@webkit.org>
2980
2981         Abandoned Memory: Temporary CSS Fonts May Never Be Purged
2982         https://bugs.webkit.org/show_bug.cgi?id=66153
2983
2984         Reviewed by Dan Bernstein.
2985
2986         While a remote CSS font face is loading we fallback to a
2987         temporary font. We don't want to retain the fallback font
2988         because noone takes ownership of the temporary font. This
2989         patch adds a way to get an uncached fallback font, which
2990         plumbs the ShouldRetain enum through the different platform
2991         implementations of getLastResortFallbackFont.
2992
2993         No new tests, no functional change.
2994
2995         * css/CSSFontFaceSource.cpp:
2996         (WebCore::CSSFontFaceSource::getFontData):
2997         * platform/graphics/FontCache.cpp:
2998         (WebCore::FontCache::getNonRetainedLastResortFallbackFont):
2999         * platform/graphics/FontCache.h:
3000         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
3001         (WebCore::fontDataFromDescriptionAndLogFont):
3002         (WebCore::GetLastResortFallbackFontProcData::GetLastResortFallbackFontProcData):
3003         (WebCore::getLastResortFallbackFontProc):
3004         (WebCore::FontCache::getLastResortFallbackFont):
3005         * platform/graphics/chromium/FontCacheLinux.cpp:
3006         (WebCore::FontCache::getLastResortFallbackFont):
3007         * platform/graphics/freetype/FontCacheFreeType.cpp:
3008         (WebCore::FontCache::getLastResortFallbackFont):
3009         * platform/graphics/haiku/FontCacheHaiku.cpp:
3010         (WebCore::FontCache::getLastResortFallbackFont):
3011         * platform/graphics/mac/FontCacheMac.mm:
3012         (WebCore::FontCache::getLastResortFallbackFont):
3013         * platform/graphics/pango/FontCachePango.cpp:
3014         (WebCore::FontCache::getLastResortFallbackFont):
3015         * platform/graphics/qt/FontCacheQt.cpp:
3016         (WebCore::FontCache::getLastResortFallbackFont):
3017         * platform/graphics/win/FontCacheWin.cpp:
3018         (WebCore::fontDataFromDescriptionAndLogFont):
3019         (WebCore::FontCache::getLastResortFallbackFont):
3020         * platform/graphics/wince/FontCacheWinCE.cpp:
3021         * platform/graphics/wx/FontCacheWx.cpp:
3022         (WebCore::FontCache::getLastResortFallbackFont):
3023
3024 2011-08-16  Alexei Svitkine  <asvitkine@chromium.org>
3025
3026         Chromium Mac: Rubber banding gutter drawing
3027         https://bugs.webkit.org/show_bug.cgi?id=66226
3028
3029         Make ScrollView::paintOverhangAreas() use the ScrollbarTheme::nativeTheme() to
3030         draw the overhang areas.
3031         Move default implementation to ScrollbarThemeComposite::paintOverhangAreas().
3032         Add a different implementation for Chromium Mac.
3033
3034         Reviewed by Dimitri Glazkov.
3035
3036         No new tests since this is just refactoring code and adding a Chromium-specific path for overhang drawing.
3037
3038         * platform/ScrollView.cpp:
3039         (WebCore::ScrollView::wheelEvent):
3040         * platform/ScrollbarTheme.h:
3041         (WebCore::ScrollbarTheme::paintOverhangAreas):
3042         * platform/ScrollbarThemeComposite.cpp:
3043         (WebCore::ScrollbarThemeComposite::paintOverhangAreas):
3044         * platform/ScrollbarThemeComposite.h:
3045         * platform/chromium/ScrollbarThemeChromiumMac.h:
3046         * platform/chromium/ScrollbarThemeChromiumMac.mm:
3047         (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac):
3048         (WebCore::scrollbarStateToThemeState):
3049         (WebCore::ScrollbarThemeChromiumMac::paintTickmarks):
3050         (WebCore::ScrollbarThemeChromiumMac::paintOverhangAreas):
3051
3052 2011-08-12  Wyatt Carss  <wcarss@chromium.org>
3053
3054         Programmatically set selection should not have direction on Mac
3055         https://bugs.webkit.org/show_bug.cgi?id=60529
3056
3057         Reviewed by Ryosuke Niwa.
3058
3059         Modified default value of VisibleSelection->m_isDirectional from 'true'
3060         to 'false' by adding a defaulted argument to several VisibleSelection 
3061         constructors to make programmatic selection be directionless by default 
3062         on Mac. Also modified several calls to VisibleSelection's constructors
3063         to correctly preserve directionality.
3064         
3065         Near the end of FrameSelection::modify (presently FrameSelection.cpp:869)
3066         a call to setExtent triggers an editing delegate that uses the
3067         FrameSelection. The direction here should have been preserved from before,
3068         but setIsDirectional was not called until after FrameSelection.cpp:869. It
3069         has been moved up to make things behave.
3070
3071         * WebCore.exp.in:
3072         * editing/ApplyBlockElementCommand.cpp:
3073         (WebCore::ApplyBlockElementCommand::doApply):
3074         (WebCore::ApplyBlockElementCommand::formatSelection):
3075         * editing/ApplyStyleCommand.cpp:
3076         (WebCore::ApplyStyleCommand::updateStartEnd):
3077         * editing/BreakBlockquoteCommand.cpp:
3078         (WebCore::BreakBlockquoteCommand::doApply):
3079         * editing/CompositeEditCommand.cpp:
3080         (WebCore::CompositeEditCommand::moveParagraphWithClones):
3081         (WebCore::CompositeEditCommand::moveParagraphs):
3082         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
3083         (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph):
3084         * editing/CreateLinkCommand.cpp:
3085         (WebCore::CreateLinkCommand::doApply):
3086         * editing/DeleteSelectionCommand.cpp:
3087         (WebCore::DeleteSelectionCommand::setStartingSelectionOnSmartDelete):
3088         (WebCore::DeleteSelectionCommand::doApply):
3089         * editing/Editor.cpp:
3090         (WebCore::Editor::selectionForCommand):
3091         * editing/FrameSelection.cpp:
3092         (WebCore::shouldAlwaysUseDirectionalSelection):
3093         (WebCore::FrameSelection::FrameSelection):
3094         (WebCore::FrameSelection::moveTo):
3095         (WebCore::FrameSelection::setNonDirectionalSelectionIfNeeded):
3096         (WebCore::FrameSelection::modify):
3097         (WebCore::FrameSelection::setBase):
3098         (WebCore::FrameSelection::setExtent):
3099         * editing/FrameSelection.h:
3100         * editing/InsertLineBreakCommand.cpp:
3101         (WebCore::InsertLineBreakCommand::doApply):
3102         * editing/InsertListCommand.cpp:
3103         (WebCore::InsertListCommand::doApply):
3104         * editing/InsertParagraphSeparatorCommand.cpp:
3105         (WebCore::InsertParagraphSeparatorCommand::doApply):
3106         * editing/InsertTextCommand.cpp:
3107         (WebCore::InsertTextCommand::performTrivialReplace):
3108         (WebCore::InsertTextCommand::doApply):
3109         * editing/MoveSelectionCommand.cpp:
3110         (WebCore::MoveSelectionCommand::doApply):
3111         * editing/ReplaceSelectionCommand.cpp:
3112         (WebCore::ReplaceSelectionCommand::completeHTMLReplacement):
3113         * editing/TypingCommand.cpp:
3114         (WebCore::TypingCommand::makeEditableRootEmpty):
3115         (WebCore::TypingCommand::deleteKeyPressed):
3116         (WebCore::TypingCommand::forwardDeleteKeyPressed):
3117         * editing/VisibleSelection.cpp:
3118         (WebCore::VisibleSelection::VisibleSelection):
3119         * editing/VisibleSelection.h:
3120         * page/EventHandler.cpp:
3121         (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart):
3122         (WebCore::EventHandler::updateSelectionForMouseDrag):
3123
3124 2011-08-16  Jeffrey Pfau  <jpfau@apple.com>
3125
3126         New XML parser: Add document fragment parser
3127         https://bugs.webkit.org/show_bug.cgi?id=66317
3128
3129         Reviewed by Adam Barth.
3130
3131         * dom/DocumentFragment.cpp:
3132         (WebCore::DocumentFragment::parseXML):
3133         * xml/parser/NewXMLDocumentParser.cpp:
3134         (WebCore::NewXMLDocumentParser::NewXMLDocumentParser):
3135         (WebCore::NewXMLDocumentParser::parseDocumentFragment):
3136         * xml/parser/NewXMLDocumentParser.h:
3137         (WebCore::NewXMLDocumentParser::create):
3138         * xml/parser/XMLTokenizer.h:
3139         * xml/parser/XMLTreeBuilder.cpp:
3140         (WebCore::XMLTreeBuilder::XMLTreeBuilder):
3141         (WebCore::XMLTreeBuilder::pushCurrentNode):
3142         * xml/parser/XMLTreeBuilder.h:
3143         (WebCore::XMLTreeBuilder::create):
3144         (WebCore::XMLTreeBuilder::NodeStackItem::node):
3145
3146 2011-08-16  Jeffrey Pfau  <jpfau@apple.com>
3147
3148         New XML parser: Replace assertions regarding character data in the prolog with proper checks
3149         https://bugs.webkit.org/show_bug.cgi?id=66269
3150
3151         Reviewed by Adam Barth.
3152
3153         This patch checks for character data in the prolog (which is illegal in XML) and discards it, instead of failing an assertion.
3154
3155         * xml/parser/XMLTreeBuilder.cpp:
3156         (WebCore::XMLTreeBuilder::processProcessingInstruction):
3157         (WebCore::XMLTreeBuilder::processXMLDeclaration):
3158         (WebCore::XMLTreeBuilder::processDOCTYPE):
3159         (WebCore::XMLTreeBuilder::enterText):
3160         (WebCore::XMLTreeBuilder::failOnText):
3161         * xml/parser/XMLTreeBuilder.h:
3162
3163 2011-08-16  Alexander Pavlov  <apavlov@chromium.org>
3164
3165         Web Inspector: word wrap long edits
3166         https://bugs.webkit.org/show_bug.cgi?id=65512
3167
3168         Reviewed by Pavel Feldman.
3169
3170         * inspector/front-end/inspector.css:
3171         (.styles-section .properties li.child-editing):
3172
3173 2011-08-16  Pavel Feldman  <pfeldman@google.com>
3174
3175         Web Inspector: convert DOM breakpoint types to strings.
3176         https://bugs.webkit.org/show_bug.cgi?id=66304
3177
3178         Reviewed by Yury Semikhatsky.
3179
3180         * inspector/Inspector.json:
3181         * inspector/InspectorDOMDebuggerAgent.cpp:
3182         (WebCore::domTypeForName):
3183         (WebCore::InspectorDOMDebuggerAgent::setDOMBreakpoint):
3184         (WebCore::InspectorDOMDebuggerAgent::removeDOMBreakpoint):
3185         * inspector/InspectorDOMDebuggerAgent.h:
3186         * inspector/front-end/DOMBreakpointsSidebarPane.js:
3187         (WebInspector.DOMBreakpointsSidebarPane):
3188
3189 2011-08-16  Pavel Feldman  <pfeldman@google.com>
3190
3191         Web Inspector: force pseudo element state when checking it in the styles sidebar.
3192         https://bugs.webkit.org/show_bug.cgi?id=66292
3193
3194         This reverts http://trac.webkit.org/changeset/89132 and introduces InspectorInstrumentation
3195         calls from the CSSStyleSelector for pseudo state processing. These calls are very fast:
3196         they are guarded with the inline checks for the front-end count.
3197
3198         Reviewed by David Hyatt.
3199
3200         * css/CSSStyleSelector.cpp:
3201         (WebCore::CSSStyleSelector::initForStyleResolve):
3202         (WebCore::CSSStyleSelector::styleRulesForElement):
3203         (WebCore::CSSStyleSelector::pseudoStyleRulesForElement):
3204         (WebCore::CSSStyleSelector::checkSelector):
3205         (WebCore::CSSStyleSelector::SelectorChecker::checkSelector):
3206         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
3207         * css/CSSStyleSelector.h:
3208         * inspector/InspectorCSSAgent.cpp:
3209         (WebCore::computePseudoClassMask):
3210         (WebCore::InspectorCSSAgent::InspectorCSSAgent):
3211         (WebCore::InspectorCSSAgent::clearFrontend):
3212         (WebCore::InspectorCSSAgent::forcePseudoState):
3213         (WebCore::InspectorCSSAgent::getStylesForNode):
3214         (WebCore::InspectorCSSAgent::didRemoveDocument):
3215         (WebCore::InspectorCSSAgent::didRemoveDOMNode):
3216         (WebCore::InspectorCSSAgent::clearPseudoState):
3217         * inspector/InspectorCSSAgent.h:
3218         * inspector/InspectorController.cpp:
3219         (WebCore::InspectorController::disconnectFrontend):
3220         * inspector/InspectorInstrumentation.cpp:
3221         (WebCore::InspectorInstrumentation::forcePseudoStateImpl):
3222         * inspector/InspectorInstrumentation.h:
3223         (WebCore::InspectorInstrumentation::forcePseudoState):
3224
3225 2011-08-16  Tony Chang  <tony@chromium.org>
3226
3227         Unreviewed, rolling out r93114.
3228         http://trac.webkit.org/changeset/93114
3229         https://bugs.webkit.org/show_bug.cgi?id=66226
3230
3231         broke the chromium mac compile
3232
3233         * platform/ScrollView.cpp:
3234         (WebCore::ScrollView::wheelEvent):
3235         * platform/ScrollbarTheme.h:
3236         * platform/ScrollbarThemeComposite.cpp:
3237         * platform/ScrollbarThemeComposite.h:
3238         * platform/chromium/ScrollbarThemeChromiumMac.h:
3239         * platform/chromium/ScrollbarThemeChromiumMac.mm:
3240         (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac):
3241         (WebCore::scrollbarStateToThemeState):
3242         (WebCore::ScrollbarThemeChromiumMac::paintTickmarks):
3243         * platform/mac/ScrollbarThemeMac.h:
3244
3245 2011-08-16  Alexei Svitkine  <asvitkine@chromium.org>
3246
3247         Chromium Mac: Rubber banding gutter drawing
3248         https://bugs.webkit.org/show_bug.cgi?id=66226
3249
3250         Make ScrollView::paintOverhangAreas() use the ScrollbarTheme::nativeTheme() to
3251         draw the overhang areas.
3252         Move default implementation to ScrollbarThemeComposite::paintOverhangAreas().
3253         Add a different implementation for Chromium Mac.
3254
3255         Reviewed by Dimitri Glazkov.
3256
3257         No new tests since this is just refactoring code and adding a Chromium-specific path for overhang drawing.
3258
3259         * platform/ScrollView.cpp:
3260         (WebCore::ScrollView::wheelEvent):
3261         * platform/ScrollbarTheme.h:
3262         (WebCore::ScrollbarTheme::paintOverhangAreas):
3263         * platform/ScrollbarThemeComposite.cpp:
3264         (WebCore::ScrollbarThemeComposite::paintOverhangAreas):
3265         * platform/ScrollbarThemeComposite.h:
3266         * platform/chromium/ScrollbarThemeChromiumMac.h:
3267         * platform/chromium/ScrollbarThemeChromiumMac.mm:
3268         (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac):
3269         (WebCore::scrollbarStateToThemeState):
3270         (WebCore::ScrollbarThemeChromiumMac::paintTickmarks):
3271         (WebCore::ScrollbarThemeChromiumMac::paintOverhangAreas):
3272
3273 2011-08-16  Luke Macpherson   <macpherson@chromium.org>
3274
3275         Support cast between CSSPrimitiveValue and ETransformStyle3D and use in CSSStyleSelector.
3276         https://bugs.webkit.org/show_bug.cgi?id=66273
3277
3278         Reviewed by Simon Fraser.
3279
3280         No new tests - no functionality changed - refactoring only.
3281
3282         * css/CSSPrimitiveValueMappings.h:
3283         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3284         Define cast from CSSPrimitiveValue to ETransformStyle3D.
3285         (WebCore::CSSPrimitiveValue::operator ETransformStyle3D):
3286         Define cast from ETransformStyle3D to CSSPrimitiveValue.
3287         * css/CSSStyleSelector.cpp:
3288         (WebCore::CSSStyleSelector::applyProperty):
3289         Use appropriate macro to handle CSSPropertyWebkitTransformStyle.
3290
3291 2011-08-16  Luke Macpherson   <macpherson@chromium.org>
3292
3293         Use appropriate macro to handle CSSPropertyWebkitContentOrder in CSSStyleSelector::applyProperty()
3294         https://bugs.webkit.org/show_bug.cgi?id=66279
3295
3296         Reviewed by Simon Fraser.
3297
3298         No new tests - no functionality changed - simple refactoring only.
3299
3300         * css/CSSStyleSelector.cpp:
3301         (WebCore::CSSStyleSelector::applyProperty):
3302         Use HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro to handle CSSPropertyWebkitContentOrder.
3303         This works because PrimitiveValue now supports cast to int.
3304
3305 2011-08-16  Eric Carlson  <eric.carlson@apple.com>
3306
3307         [REGRESSION] Media controls should always be enabled when scripting is disabled
3308         https://bugs.webkit.org/show_bug.cgi?id=66303
3309
3310         Reviewed by Dimitri Glazkov.
3311
3312         Tests: media/video-controls-no-scripting-iframe.html
3313                media/video-controls-no-scripting.html
3314
3315         * html/HTMLMediaElement.cpp:
3316         (WebCore::HTMLMediaElement::attributeChanged): Move the controls enabling/disabling code
3317             to configureMediaControls.
3318         (WebCore::HTMLMediaElement::prepareForLoad): Call configureMediaControls.
3319         (WebCore::HTMLMediaElement::configureMediaControls): New, move code duplicated in 
3320             attributeChanged and preDispatchEventHandler here.
3321         (WebCore::HTMLMediaElement::preDispatchEventHandler): Move the controls enabling/disabling code
3322             to configureMediaControls.
3323         * html/HTMLMediaElement.h:
3324
3325 2011-08-16  Pavel Feldman  <pfeldman@google.com>
3326
3327         Web Inspector: hide non-conservative methods from the protocol documentation.
3328         https://bugs.webkit.org/show_bug.cgi?id=66301
3329
3330         Reviewed by Yury Semikhatsky.
3331
3332         * inspector/Inspector.json:
3333
3334 2011-08-16  Andras Becsi  <abecsi@webkit.org>
3335
3336         Web Inspector: nuke background events collection (dead feature)
3337         https://bugs.webkit.org/show_bug.cgi?id=66296
3338
3339         Fix the GTK build after r93095.
3340
3341         Unreviewed build fix.
3342
3343         No new tests neede.
3344
3345         * GNUmakefile.list.am: Remove nonexistent sources.
3346
3347 2011-08-16  Andras Becsi  <abecsi@webkit.org>
3348
3349         Reviewed by Csaba Osztrogon√°c.
3350
3351         Need AtomicStrings for the various font family names
3352         https://bugs.webkit.org/show_bug.cgi?id=28024
3353
3354         Unify the usage of '-webkit' prefixed font family names by using
3355         global AtomicStrings.
3356         Use a .in file to generate the needed sources through make_names.pl.
3357
3358         No new tests needed.
3359
3360         * CMakeLists.txt:
3361         * CodeGenerators.pri:
3362         * DerivedSources.make:
3363         * GNUmakefile.am:
3364         * GNUmakefile.list.am:
3365         * WebCore.gyp/WebCore.gyp:
3366         * WebCore.gyp/scripts/action_makenames.py:
3367         * WebCore.gypi:
3368         * WebCore.vcproj/WebCore.vcproj:
3369         * WebCore.xcodeproj/project.pbxproj:
3370         * css/CSSComputedStyleDeclaration.cpp:
3371         (WebCore::identifierForFamily):
3372         * css/CSSFontSelector.cpp:
3373         (WebCore::CSSFontSelector::addFontFaceRule):
3374         (WebCore::fontDataForGenericFamily):
3375         * css/CSSStyleSelector.cpp:
3376         (WebCore::CSSStyleSelector::applyProperty):
3377         * css/WebKitFontFamilyNames.in: Added.
3378         * dom/make_names.pl:
3379         * page/Frame.cpp:
3380         (WebCore::Frame::Frame):
3381         * platform/graphics/FontCache.cpp:
3382         (WebCore::FontCache::getFontData):
3383         * platform/graphics/FontDescription.h:
3384         (WebCore::FontDescription::useFixedDefaultSize):
3385
3386 2011-08-16  Pavel Feldman  <pfeldman@google.com>
3387
3388         Web Inspector: nuke background events collection (dead feature)
3389         https://bugs.webkit.org/show_bug.cgi?id=66296
3390
3391         Reviewed by Yury Semikhatsky.
3392
3393         * CMakeLists.txt:
3394         * WebCore.gypi:
3395         * WebCore.pro:
3396         * WebCore.vcproj/WebCore.vcproj:
3397         * WebCore.xcodeproj/project.pbxproj:
3398         * inspector/EventsCollector.cpp: Removed.
3399         * inspector/EventsCollector.h: Removed.
3400         * inspector/Inspector.json:
3401         * inspector/InspectorFrontendProxy.cpp: Removed.
3402         * inspector/InspectorFrontendProxy.h: Removed.
3403         * inspector/InspectorResourceAgent.cpp:
3404         (WebCore::InspectorResourceAgent::setFrontend):
3405         (WebCore::InspectorResourceAgent::clearFrontend):
3406         (WebCore::InspectorResourceAgent::InspectorResourceAgent):
3407         * inspector/InspectorResourceAgent.h:
3408         * inspector/front-end/NetworkPanel.js:
3409         (WebInspector.NetworkLogView):
3410
3411 2011-08-16  Lindsay Mathieson   <lindsay.mathieson@gmail.com>
3412
3413         [Qt] Missing spell check support
3414         https://bugs.webkit.org/show_bug.cgi?id=44114
3415
3416         Reviewed by Benjamin Poulain.
3417
3418         Add drawErrorUnderline() from Cairo to render the line for text checking on the Qt port.
3419
3420         * platform/graphics/qt/GraphicsContextQt.cpp:
3421         (WebCore::drawErrorUnderline):
3422         (WebCore::GraphicsContext::drawLineForTextChecking):
3423
3424 2011-08-15  MORITA Hajime  <morrita@google.com>
3425
3426         REGRESSION(r70598): [Chromium] Style changes in textInput event can prevent from updating <textarea> value.
3427         https://bugs.webkit.org/show_bug.cgi?id=66216
3428
3429         Reviewed by Ryosuke Niwa.
3430
3431         Element::spellcheckAttributeState() uses Element::hasAttribute(),
3432         which calls updateStyleAttribute(), which potentially makes style
3433         dirty. But that is problematic since Editor calls spellcheckAttributeState()
3434         during the spell-checking phase and make the style dirty,
3435         which can trigger re-layout, which wipes the shadow tree of a textarea
3436         out by pre-committed "value" text.
3437
3438         This change removes the hasAttribute() call from
3439         spellcheckAttributeState().
3440
3441         Test: editing/input/style-change-during-input.html
3442
3443         * dom/Element.cpp:
3444         (WebCore::Element::spellcheckAttributeState):
3445
3446 2011-08-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3447
3448         [CMAKE] Wrap files of websocket and worker in each macro.
3449         https://bugs.webkit.org/show_bug.cgi?id=65012
3450
3451         Move files of web socket and workers into each macro block in CMakeList.txt.
3452         And, header files related to WORKER and SHARED_WORKER are wrapped by macro in cpp files.
3453
3454         Reviewed by Daniel Bates.
3455
3456         * CMakeLists.txt:
3457         * UseJSC.cmake:
3458         * bindings/js/JSDOMWindowCustom.cpp:
3459         * bindings/js/JSWorkerContextBase.cpp:
3460         * bindings/js/ScriptState.cpp:
3461         * bindings/js/WorkerScriptController.cpp:
3462
3463 2011-08-15  Jeffrey Pfau  <jpfau@apple.com>
3464
3465         New XML parser: add xml namespace to the default map of namespaces
3466         https://bugs.webkit.org/show_bug.cgi?id=66266
3467
3468         Reviewed by Adam Barth.
3469
3470         * xml/parser/XMLTreeBuilder.cpp:
3471         (WebCore::XMLTreeBuilder::NodeStackItem::NodeStackItem):
3472
3473 2011-08-15  Hayato Ito  <hayato@chromium.org>
3474
3475         Fix crash when mouse moves from <summary> element to parent <details> element.
3476         https://bugs.webkit.org/show_bug.cgi?id=66210
3477
3478         Reviewed by Dimitri Glazkov.
3479
3480         This is a regression caused by r92922, which wrongly assumes that
3481         a shadow host always has a shadow root as an immediate child in
3482         ancestors chain. This assumption does not apply to <details>
3483         element. <details> element is implemented as a shadow host, but
3484         may have a <summary> element as an immediate child element in
3485         ancestors chain.
3486
3487         Test: fast/dom/shadow/details-summary-mouseover.html
3488
3489         * dom/EventDispatcher.cpp:
3490         (WebCore::EventDispatcher::adjustToShadowBoundaries):
3491
3492 2011-08-15  Jeffrey Pfau  <jpfau@apple.com>
3493
3494         New XML parser: Use xmlnsAtom instead of redundant xmlnsPrefix
3495         https://bugs.webkit.org/show_bug.cgi?id=66264
3496
3497         Reviewed by Adam Barth.
3498
3499         * xml/parser/XMLTreeBuilder.cpp:
3500         (WebCore::XMLTreeBuilder::processNamespaces):
3501         (WebCore::XMLTreeBuilder::processAttributes):
3502
3503 2011-08-15  Emil A Eklund  <eae@chromium.org>
3504
3505         Switch Element/Node to to new layout types
3506         https://bugs.webkit.org/show_bug.cgi?id=66260
3507
3508         Reviewed by Eric Seidel.
3509
3510         Convert Element, Node, ElementRareData and ContainerNode to new layout
3511         abstraction as a part of the ongoing conversion work.
3512
3513         No new tests, no new functionality.
3514
3515         * dom/ContainerNode.cpp:
3516         (WebCore::ContainerNode::getLowerRightCorner):
3517         (WebCore::ContainerNode::getRect):
3518         * dom/ContainerNode.h:
3519         * dom/Element.cpp:
3520         (WebCore::Element::scrollIntoView):
3521         (WebCore::Element::scrollIntoViewIfNeeded):
3522         (WebCore::adjustForLocalZoom):
3523         (WebCore::Element::boundsInWindowSpace):
3524         (WebCore::Element::getClientRects):
3525         (WebCore::Element::getBoundingClientRect):
3526         (WebCore::Element::screenRect):
3527         (WebCore::Element::minimumSizeForResizing):
3528         (WebCore::Element::setMinimumSizeForResizing):
3529         * dom/Element.h:
3530         * dom/ElementRareData.h:
3531         * dom/Node.cpp:
3532         (WebCore::Node::getRect):
3533         (WebCore::Node::renderRect):
3534         (WebCore::Node::hasNonEmptyBoundingBox):
3535         * dom/Node.h:
3536
3537 2011-08-15  Alexey Proskuryakov  <ap@apple.com>
3538
3539         Regional indicator symbols that are combined should behave as a single character when editing
3540         https://bugs.webkit.org/show_bug.cgi?id=65395
3541
3542         Reviewed by Dan Bernstein.
3543
3544         Part one: make backspace work.
3545
3546         Test: editing/deleting/regional-indicators.html
3547
3548         * rendering/RenderText.cpp:
3549         (WebCore::isRegionalIndicator):
3550         (WebCore::RenderText::previousOffsetForBackwardDeletion): Added a special case for regional
3551         indicator symbols.
3552
3553 2011-08-15  Jeffrey Pfau  <jpfau@apple.com>
3554
3555         New XML parser: Re-entering a character node should not clobber the buffered characters
3556         https://bugs.webkit.org/show_bug.cgi?id=66257
3557
3558         Reviewed by Adam Barth.
3559
3560         * xml/parser/XMLTreeBuilder.cpp:
3561         (WebCore::XMLTreeBuilder::enterText):
3562
3563 2011-08-15  Dmitry Titov  <dimich@chromium.org>
3564
3565         FrameLoaderClient::transferLoadingResourceFromPage does not have enough parameters
3566         https://bugs.webkit.org/show_bug.cgi?id=66165
3567
3568         Reviewed by Darin Fisher.
3569
3570         No new tests since no change in behavior.
3571         The original issue is only reproducible on Chromium in multi-process mode
3572         and is tested there by a browsertest.
3573
3574         * loader/DocumentLoader.cpp:
3575         (WebCore::DocumentLoader::transferLoadingResourcesFromPage):
3576         Passing ResourceLoader* into the FrameLoaderClient notification.
3577         Also, fixed the bug where the same ResourceRequest was passed for all subresources.
3578         * loader/EmptyClients.h:
3579         (WebCore::EmptyFrameLoaderClient::transferLoadingResourceFromPage):
3580         * loader/FrameLoader.cpp:
3581         (WebCore::FrameLoader::dispatchTransferLoadingResourceFromPage):
3582         * loader/FrameLoader.h:
3583         * loader/FrameLoaderClient.h:
3584         * loader/ResourceLoadNotifier.cpp:
3585         (WebCore::ResourceLoadNotifier::dispatchTransferLoadingResourceFromPage):
3586         * loader/ResourceLoadNotifier.h:
3587         * loader/ResourceLoader.cpp:
3588         (WebCore::ResourceLoader::init):
3589         * loader/ResourceLoader.h:
3590         (WebCore::ResourceLoader::originalRequest): Added the originalRequest() accessor that
3591         returns the request as it existed before redirects (but after client's will SendRequest).
3592         This is to be able to pass the original request for loading subresources into
3593         FrameLoaderClient::transferLoadingResourceFromPage, since that one is used to invoke
3594         assignIdentifierToInitialRequest, which needs original request.
3595
3596 2011-08-15  Mark Hahnenberg  <mhahnenberg@apple.com>
3597
3598         Refactor JS objects to allocate in static create methods rather than constructors
3599         https://bugs.webkit.org/show_bug.cgi?id=65347
3600
3601         Reviewed by Geoffrey Garen.
3602
3603         No new tests.
3604
3605         Removed all calls to deprecatedGetDOMObject from initialization lists as part of a 
3606         larger refactoring to get rid of all allocation during initialization.
3607
3608         * bindings/js/JSDOMBinding.h:
3609         * bridge/c/CRuntimeObject.cpp:
3610         (JSC::Bindings::CRuntimeObject::CRuntimeObject):
3611         * bridge/c/CRuntimeObject.h:
3612         (JSC::Bindings::CRuntimeObject::create):
3613         * bridge/c/c_instance.cpp:
3614         (JSC::Bindings::CRuntimeMethod::create):
3615         (JSC::Bindings::CRuntimeMethod::CRuntimeMethod):
3616         * bridge/jni/jsc/JavaInstanceJSC.cpp:
3617         (JavaRuntimeMethod::create):
3618         (JavaRuntimeMethod::JavaRuntimeMethod):
3619         * bridge/jni/jsc/JavaRuntimeObject.cpp:
3620         (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
3621         * bridge/jni/jsc/JavaRuntimeObject.h:
3622         (JSC::Bindings::JavaRuntimeObject::create):
3623         * bridge/objc/objc_runtime.h:
3624         (JSC::Bindings::ObjcFallbackObjectImp::create):
3625         * bridge/objc/objc_runtime.mm:
3626         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
3627         * bridge/qt/qt_instance.cpp:
3628         (JSC::Bindings::QtRuntimeObject::create):
3629         (JSC::Bindings::QtRuntimeObject::QtRuntimeObject):
3630         * bridge/qt/qt_pixmapruntime.cpp:
3631         (JSC::Bindings::QtPixmapRuntimeObject::create):
3632         (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject):
3633         * bridge/qt/qt_runtime.cpp:
3634         (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
3635         (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
3636         (JSC::Bindings::QtRuntimeConnectionMethod::QtRuntimeConnectionMethod):
3637         * bridge/qt/qt_runtime.h:
3638         (JSC::Bindings::QtRuntimeMetaMethod::create):
3639         (JSC::Bindings::QtRuntimeConnectionMethod::create):
3640         * bridge/runtime_array.cpp:
3641         (JSC::RuntimeArray::RuntimeArray):
3642         * bridge/runtime_array.h:
3643         (JSC::RuntimeArray::create):
3644         * bridge/runtime_object.cpp:
3645
3646 2011-08-15  Adam Roben  <aroben@apple.com>
3647
3648         Update pages' style and content scale when the window's backing scale factor changes
3649
3650         Unfortunately, I couldn't think of a way to test this in an automated fashion.
3651
3652         Fixes <http://webkit.org/b/66229> <rdar://problem/9906269> WebKit doesn't react to device
3653         scale factor changes
3654
3655         Reviewed by Simon Fraser.
3656
3657         * WebCore.exp.in: Export Frame::deviceOrScaleFactorChanged.
3658
3659         * page/Frame.cpp:
3660         (WebCore::Frame::deviceScaleFactorChanged):
3661         * page/Frame.h:
3662         Added this new function. We recalc style so that, e.g., device-scale-factor-dependent media
3663         queries will be reevaluated, and we tell compositing layers about the new scale factor so
3664         they can rerender at the new resolution.
3665
3666 2011-08-15  Cary Clark  <caryclark@google.com>
3667
3668         Revise Skia on Chrome Mac to return fallback fonts.
3669         https://bugs.webkit.org/show_bug.cgi?id=62986
3670
3671         Reviewed by Darin Fisher.
3672
3673         Since Skia on Chrome Mac uses CoreText to determine
3674         text metrics, CG font architecture is used to return
3675         fallback fonts.
3676
3677         This improves many existing layout tests, including
3678         justify-ideograph-simple and t0905-c414-flt-04-c 
3679
3680         * platform/graphics/skia/FontSkia.cpp:
3681         (WebCore::Font::canReturnFallbackFontsForComplexText):
3682
3683 2011-08-15  Aaron Boodman  <aa@chromium.org>
3684
3685         Pass additional details to client in didCreateIsolatedContext
3686         https://bugs.webkit.org/show_bug.cgi?id=66037
3687
3688         Reviewed by Darin Fisher.
3689
3690         * bindings/v8/IsolatedWorld.cpp:
3691         (WebCore::IsolatedWorld::IsolatedWorld):
3692         * bindings/v8/IsolatedWorld.h:
3693         (WebCore::IsolatedWorld::create):
3694         (WebCore::IsolatedWorld::id):
3695         * bindings/v8/V8IsolatedContext.cpp:
3696         (WebCore::V8IsolatedContext::V8IsolatedContext):
3697         * bindings/v8/V8IsolatedContext.h:
3698         * bindings/v8/V8Proxy.cpp:
3699         (WebCore::V8Proxy::evaluateInIsolatedWorld):
3700         * loader/EmptyClients.h:
3701         (WebCore::EmptyFrameLoaderClient::didCreateIsolatedScriptContext):
3702         * loader/FrameLoaderClient.h:
3703
3704 2011-08-15  Chris Rogers  <crogers@google.com>
3705
3706         Add shell implementation for Web Audio API's MediaElementAudioSourceNode
3707         https://bugs.webkit.org/show_bug.cgi?id=66175
3708
3709         Reviewed by Kenneth Russell.
3710
3711         Test: webaudio/mediaelementaudiosourcenode.html
3712
3713         * DerivedSources.make:
3714         * WebCore.gypi:
3715         * WebCore.xcodeproj/project.pbxproj:
3716         * html/HTMLMediaElement.idl:
3717         * webaudio/AudioContext.cpp:
3718         (WebCore::AudioContext::createMediaElementSource):
3719         * webaudio/AudioContext.h:
3720         * webaudio/AudioContext.idl:
3721         * webaudio/AudioNode.h:
3722         * webaudio/MediaElementAudioSourceNode.cpp: Added.
3723         (WebCore::MediaElementAudioSourceNode::create):
3724         (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode):
3725         (WebCore::MediaElementAudioSourceNode::process):
3726         (WebCore::MediaElementAudioSourceNode::reset):
3727         * webaudio/MediaElementAudioSourceNode.h: Added.
3728         (WebCore::MediaElementAudioSourceNode::mediaElement):
3729         * webaudio/MediaElementAudioSourceNode.idl: Added.
3730
3731 2011-08-15  Emil A Eklund  <eae@chromium.org>
3732
3733         Switch mouse events to to new layout types
3734         https://bugs.webkit.org/show_bug.cgi?id=66179
3735
3736         Reviewed by Eric Seidel.
3737
3738         Convert mouse events to new layout abstraction as a part of the ongoing
3739         conversion work.
3740
3741         No new tests, no new functionality.
3742
3743         * dom/MouseRelatedEvent.cpp:
3744         (WebCore::contentsScrollOffset):
3745         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
3746         (WebCore::MouseRelatedEvent::initCoordinates):
3747         (WebCore::MouseRelatedEvent::computePageLocation):
3748         (WebCore::MouseRelatedEvent::computeRelativePosition):
3749         (WebCore::MouseRelatedEvent::pageLocation):
3750         * dom/MouseRelatedEvent.h:
3751         (WebCore::MouseRelatedEvent::screenLocation):
3752         (WebCore::MouseRelatedEvent::clientLocation):
3753         (WebCore::MouseRelatedEvent::absoluteLocation):
3754         (WebCore::MouseRelatedEvent::setAbsoluteLocation):
3755         * page/EventHandler.cpp:
3756         (WebCore::EventHandler::clear):
3757         (WebCore::EventHandler::handleMousePressEventSingleClick):
3758         (WebCore::selectionExtentRespectingEditingBoundary):
3759         (WebCore::EventHandler::hitTestResultAtPoint):
3760         (WebCore::EventHandler::currentMousePosition):
3761         (WebCore::documentPointForWindowPoint):
3762         (WebCore::EventHandler::handleMousePressEvent):
3763         (WebCore::EventHandler::mouseMoved):
3764         (WebCore::EventHandler::handleWheelEvent):
3765         (WebCore::EventHandler::sendContextMenuEvent):
3766         (WebCore::EventHandler::sendContextMenuEventForKey):
3767         (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
3768         (WebCore::EventHandler::dragHysteresisExceeded):
3769         (WebCore::EventHandler::handleDrag):
3770         (WebCore::EventHandler::handleTouchEvent):
3771         * page/EventHandler.h:
3772         * platform/PlatformMouseEvent.h:
3773         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
3774         (WebCore::PlatformMouseEvent::pos):
3775         (WebCore::PlatformMouseEvent::x):
3776         (WebCore::PlatformMouseEvent::y):
3777         (WebCore::PlatformMouseEvent::globalX):
3778         (WebCore::PlatformMouseEvent::globalY):
3779         * platform/mac/PlatformMouseEventMac.mm:
3780         (WebCore::globalPoint):
3781         (WebCore::pointForEvent):
3782         (WebCore::globalPointForEvent):
3783
3784 2011-08-15  Ryosuke Niwa  <rniwa@webkit.org>
3785
3786         webkit-indent-blockquote is unnecessary
3787         https://bugs.webkit.org/show_bug.cgi?id=66195
3788
3789         Reviewed by Tony Chang.
3790
3791         Stop adding class="webkit-indent-blockquote" on blockquotes created by execCommand('Indent') and
3792         execCommand('Outdent'). Also removed the code to add the class attribute in ApplyBlockElementCommand
3793         since no other class inherited from ApplyBlockElementCommand uses this feature.
3794
3795         * editing/ApplyBlockElementCommand.cpp:
3796         (WebCore::ApplyBlockElementCommand::ApplyBlockElementCommand):
3797         (WebCore::ApplyBlockElementCommand::createBlockElement):
3798         * editing/ApplyBlockElementCommand.h:
3799         * editing/IndentOutdentCommand.cpp:
3800         (WebCore::IndentOutdentCommand::IndentOutdentCommand):
3801
3802 2011-08-15  Levi Weintraub  <leviw@chromium.org>
3803
3804         Switch remaining SVG Rendering methods to LayoutUnits
3805         https://bugs.webkit.org/show_bug.cgi?id=66169
3806
3807         Reviewed by Eric Seidel.
3808
3809         Changing remaining integer SVG methods to use the LayoutUnits abstraction.
3810
3811         No tests as no change in functionality.
3812
3813         * rendering/svg/RenderSVGBlock.cpp:
3814         (WebCore::RenderSVGBlock::visualOverflowRect):
3815         * rendering/svg/RenderSVGBlock.h:
3816         * rendering/svg/RenderSVGContainer.cpp:
3817         (WebCore::RenderSVGContainer::paint):
3818         * rendering/svg/RenderSVGForeignObject.cpp:
3819         (WebCore::RenderSVGForeignObject::paint):
3820         (WebCore::RenderSVGForeignObject::clippedOverflowRectForRepaint):
3821         (WebCore::RenderSVGForeignObject::computeRectForRepaint):
3822         * rendering/svg/RenderSVGHiddenContainer.cpp:
3823         (WebCore::RenderSVGHiddenContainer::paint):
3824         * rendering/svg/RenderSVGImage.cpp:
3825         (WebCore::RenderSVGImage::paint):
3826         * rendering/svg/RenderSVGInlineText.cpp:
3827         (WebCore::RenderSVGInlineText::linesBoundingBox):
3828         * rendering/svg/RenderSVGInlineText.h:
3829         * rendering/svg/RenderSVGModelObject.cpp:
3830         (WebCore::RenderSVGModelObject::outlineBoundsForRepaint):
3831         * rendering/svg/RenderSVGPath.cpp:
3832         (WebCore::RenderSVGPath::paint):
3833         * rendering/svg/RenderSVGRoot.cpp:
3834         (WebCore::RenderSVGRoot::localToBorderBoxTransform):
3835         (WebCore::RenderSVGRoot::parentOriginToBorderBox):
3836         (WebCore::RenderSVGRoot::borderOriginToContentBox):
3837         (WebCore::RenderSVGRoot::localToRepaintContainerTransform):
3838         (WebCore::RenderSVGRoot::localToParentTransform):
3839         (WebCore::RenderSVGRoot::clippedOverflowRectForRepaint):
3840         (WebCore::RenderSVGRoot::computeRectForRepaint):
3841         * rendering/svg/RenderSVGRoot.h:
3842         * rendering/svg/RenderSVGText.cpp:
3843         (WebCore::RenderSVGText::paint):
3844         * rendering/svg/SVGInlineFlowBox.cpp:
3845         (WebCore::SVGInlineFlowBox::paint):
3846         * rendering/svg/SVGInlineTextBox.cpp:
3847         (WebCore::SVGInlineTextBox::paint):
3848         * rendering/svg/SVGRenderSupport.cpp:
3849         (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
3850         (WebCore::SVGRenderSupport::computeRectForRepaint):
3851         * rendering/svg/SVGRenderSupport.h:
3852         * rendering/svg/SVGRootInlineBox.cpp:
3853         (WebCore::SVGRootInlineBox::paint):
3854         (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
3855         (WebCore::SVGRootInlineBox::layoutChildBoxes):
3856         (WebCore::SVGRootInlineBox::layoutRootBox):
3857         (WebCore::SVGRootInlineBox::closestLeafChildForPosition):
3858         * rendering/svg/SVGRootInlineBox.h:
3859
3860 2011-08-12  Jeff Miller  <jeffm@apple.com>
3861
3862         MediaPlayerPrivateAVFoundationCF::playerItemStatus() should return MediaPlayerAVPlayerItemStatusDoesNotExist if there is no AVPlayerItem
3863         https://bugs.webkit.org/show_bug.cgi?id=66171
3864         
3865         MediaPlayerPrivateAVFoundationCF::playerItemStatus() should return MediaPlayerAVPlayerItemStatusDoesNotExist if there is no AVPlayerItem
3866         to match the Mac implementation in MediaPlayerPrivateAVFoundationObjC.  I also added better logging to notificationCallback().
3867
3868         Reviewed by Jon Honeycutt.
3869
3870         No new tests, uses existing media tests.
3871
3872         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.cpp:
3873         (WebCore::MediaPlayerPrivateAVFoundationCF::playerItemStatus): Return MediaPlayerAVPlayerItemStatusDoesNotExist if no AVPlayerItem.
3874         (WebCore::AVFWrapper::notificationCallback): Log the name of the received notification.
3875
3876 2011-08-15  Adam Roben  <aroben@apple.com>
3877
3878         Rename an instance of pageScaleFactorChanged I missed in r93040
3879
3880         I tried to make a test for this but failed. It would probably have been easier if we dumped
3881         layers' content scales in layerTreeAsText output.
3882
3883         Followup to <http://webkit.org/b/55787> WebKit uses multiple conflicting names to refer to
3884         the device scale factor
3885
3886         * platform/graphics/ca/GraphicsLayerCA.cpp:
3887         (WebCore::GraphicsLayerCA::deviceOrPageScaleFactorChanged):
3888         * platform/graphics/ca/GraphicsLayerCA.h:
3889         Renamed from pageScaleFactorChanged to match the base class.
3890
3891 2011-08-15  Pavel Feldman  <pfeldman@google.com>
3892
3893         Web Inspector: [V8] crash upon stepIn while not on pause.
3894         https://bugs.webkit.org/show_bug.cgi?id=66221
3895
3896         Reviewed by Yury Semikhatsky.
3897
3898         * inspector/InspectorDebuggerAgent.cpp:
3899         (WebCore::InspectorDebuggerAgent::resume):
3900         (WebCore::InspectorDebuggerAgent::stepOver):
3901         (WebCore::InspectorDebuggerAgent::stepInto):
3902         (WebCore::InspectorDebuggerAgent::stepOut):
3903         (WebCore::InspectorDebuggerAgent::assertPaused):
3904         * inspector/InspectorDebuggerAgent.h:
3905         * inspector/front-end/ScriptsPanel.js:
3906         (WebInspector.ScriptsPanel.prototype._stepOverClicked):
3907         (WebInspector.ScriptsPanel.prototype._stepIntoClicked):
3908         (WebInspector.ScriptsPanel.prototype._stepOutClicked):
3909
3910 2011-08-15  Vsevolod Vlasov  <vsevik@chromium.org>
3911
3912         Web Inspector: Network panel: display the current search match index in the toolbar.
3913         https://bugs.webkit.org/show_bug.cgi?id=66051
3914
3915         Reviewed by Pavel Feldman.
3916
3917         * inspector/front-end/NetworkPanel.js:
3918         (WebInspector.NetworkLogView.prototype._highlightNthMatchedResource):
3919         (WebInspector.NetworkLogView.prototype.performSearch):
3920         (WebInspector.NetworkPanel):
3921         (WebInspector.NetworkPanel.prototype._onSearchCountUpdated):
3922         (WebInspector.NetworkPanel.prototype._onSearchIndexUpdated):
3923
3924 2011-08-10  Adam Roben  <aroben@apple.com>
3925
3926         Clear up scale factor terminology
3927
3928         WebKit by and large deals with two scale factors: one intrinsic to the device on which the
3929         software is running, and one that is per-Page and can be controlled via API calls. This
3930         patch names the former "deviceScaleFactor" and the latter "pageScaleFactor", and makes the
3931         code use those names. It should introduce no behavior changes.
3932
3933         Fixes <http://webkit.org/b/55787> WebKit uses multiple conflicting names to refer to the
3934         device scale factor
3935
3936         Reviewed by Simon Fraser.
3937
3938         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3939         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3940         Removed an unused member. This is unrelated to this patch.
3941
3942         * css/MediaQueryEvaluator.cpp:
3943         * html/HTMLCanvasElement.cpp:
3944         * html/HTMLCanvasElement.h:
3945         * loader/EmptyClients.h:
3946         * page/Chrome.cpp:
3947         * page/Chrome.h:
3948         * page/ChromeClient.h:
3949         * page/DOMWindow.cpp:
3950         * page/Frame.cpp:
3951         * page/Frame.h:
3952         * platform/graphics/GraphicsLayer.cpp:
3953         * platform/graphics/GraphicsLayer.h:
3954         * platform/graphics/GraphicsLayerClient.h:
3955         * platform/graphics/ca/GraphicsLayerCA.cpp:
3956         * rendering/RenderInline.cpp:
3957         * rendering/RenderLayerBacking.cpp:
3958         * rendering/RenderLayerBacking.h:
3959         * rendering/RenderLayerCompositor.cpp:
3960         * rendering/RenderLayerCompositor.h:
3961         * rendering/RenderObject.cpp:
3962
3963 2011-08-15  Oliver Varga  <Varga.Oliver@stud.u-szeged.hu>
3964
3965         Reviewed by Nikolas Zimmermann.
3966
3967         Speed up SVGSMILElement::findInstanceTime.
3968         https://bugs.webkit.org/show_bug.cgi?id=61025
3969
3970         Replace the linear search to binary search on ordered list because
3971         the previous searches from the beginning was not efficient.
3972         Out of index error fixed by Renata Hodovan.
3973
3974         No new tests this is only a performance tweak.
3975
3976         * svg/animation/SVGSMILElement.cpp:
3977         (WebCore::extractTimeFromVector):
3978         (WebCore::SVGSMILElement::findInstanceTime):
3979
3980 2011-08-15  Hayato Ito  <hayato@chromium.org>
3981
3982         Implement proper handling of focusin/focusout events in regard to shadow DOM boundaries.
3983         https://bugs.webkit.org/show_bug.cgi?id=64249
3984
3985         Reviewed by Dimitri Glazkov.
3986
3987         Introduces FocusInEventDispatchMediator/FocusOutEventDispatchMediator so
3988         that we can shrink ancestors of event target node considering shadow
3989         DOM boundaries before dispatching focusin/focusout events.
3990
3991         Test: fast/dom/shadow/shadow-boundary-events.html
3992
3993         * dom/Document.cpp:
3994         (WebCore::Document::setFocusedNode):
3995         * dom/Node.cpp:
3996         (WebCore::Node::dispatchFocusInEvent):
3997         (WebCore::Node::dispatchFocusOutEvent):
3998         (WebCore::Node::dispatchDOMActivateEvent):
3999         (WebCore::Node::defaultEventHandler):
4000         * dom/Node.h:
4001         * dom/UIEvent.cpp:
4002         (WebCore::FocusInEventDispatchMediator::create):
4003         (WebCore::FocusInEventDispatchMediator::FocusInEventDispatchMediator):
4004         (WebCore::FocusInEventDispatchMediator::dispatchEvent):
4005         (WebCore::FocusOutEventDispatchMediator::create):
4006         (WebCore::FocusOutEventDispatchMediator::FocusOutEventDispatchMediator):
4007         (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
4008         * dom/UIEvent.h:
4009
4010 2011-08-15  Pavel Feldman  <pfeldman@google.com>
4011
4012         Web Inspector: not all of the properties have valid descriptors on all platforms.
4013         Includes PropertyDescriptor protocol documentation fixes.
4014         https://bugs.webkit.org/show_bug.cgi?id=66215
4015
4016         Activations, LocalStorage and some other properties potentially don't have
4017         valid property descriptors. InjectedScript should use conservative getter in order to
4018         mitigate this.
4019
4020         Reviewed by Yury Semikhatsky.
4021
4022         * inspector/InjectedScriptSource.js:
4023         * inspector/Inspector.json:
4024
4025 2011-08-15  Pavel Feldman  <pfeldman@google.com>
4026
4027         Web Inspector: context menu on the link in the console does not have standard link options.
4028         https://bugs.webkit.org/show_bug.cgi?id=66214
4029
4030         Reviewed by Yury Semikhatsky.
4031
4032         * English.lproj/localizedStrings.js:
4033         * inspector/front-end/ConsoleView.js:
4034         * inspector/front-end/ElementsPanel.js:
4035         * inspector/front-end/ElementsTreeOutline.js:
4036         (WebInspector.ElementsTreeOutline.prototype.populateContextMenu):
4037         * inspector/front-end/NetworkPanel.js:
4038         (WebInspector.NetworkLogView.prototype._contextMenu):
4039         * inspector/front-end/StylesSidebarPane.js:
4040         (WebInspector.StylesSidebarPane.prototype._contextMenuEventFired):
4041         * inspector/front-end/inspector.js:
4042         (WebInspector.openLinkExternallyLabel):
4043         (WebInspector.copyLinkAddressLabel):
4044         (WebInspector.populateHrefContextMenu):
4045
4046 2011-08-14  Pavel Feldman  <pfeldman@chromium.org>
4047
4048         Web Inspector: showContextMenu missing in Remote DevTools
4049         https://bugs.webkit.org/show_bug.cgi?id=63725
4050
4051         Reviewed by Yury Semikhatsky.
4052
4053         * WebCore.gypi:
4054         * WebCore.vcproj/WebCore.vcproj:
4055         * inspector/front-end/ConsoleView.js:
4056         * inspector/front-end/SoftContextMenu.js: Added.
4057         (.WebInspector.SoftContextMenu):
4058         (.WebInspector.SoftContextMenu.prototype.show):
4059         (.WebInspector.SoftContextMenu.prototype._createMenuItem):
4060         (.WebInspector.SoftContextMenu.prototype._createSeparator):
4061      &n