Web Inspector: implement import/export for timeline data.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-07-19  Ilya Tikhonovsky  <loislo@chromium.org>
2
3         Web Inspector: implement import/export for timeline data.
4         https://bugs.webkit.org/show_bug.cgi?id=64601
5
6         Reviewed by Yury Semikhatsky.
7
8         Test: inspector/timeline/timeline-load.html
9
10         * English.lproj/localizedStrings.js:
11         * inspector/InspectorFrontendHost.cpp:
12         (WebCore::FrontendMenuProvider::contextMenuItemSelected):
13         * inspector/front-end/TimelinePanel.js:
14         (WebInspector.TimelinePanel):
15         (WebInspector.TimelinePanel.prototype._createFileSelector):
16         (WebInspector.TimelinePanel.prototype._contextMenu):
17         (WebInspector.TimelinePanel.prototype._exportToFile):
18         (WebInspector.TimelinePanel.prototype._importFromFile):
19         (WebInspector.TimelinePanel.prototype._addRecordToTimeline):
20         (WebInspector.TimelinePanel.prototype._clearPanel):
21         (WebInspector.TimelineModel):
22         (WebInspector.TimelineModel.prototype._addRecord):
23         (WebInspector.TimelineModel.prototype._importNextChunk):
24         (WebInspector.TimelineModel.prototype._importFromFile):
25         (WebInspector.TimelineModel.prototype._importFromFile.onError):
26         (WebInspector.TimelineModel.prototype._exportToFile):
27         (WebInspector.TimelineModel.prototype._reset):
28         * inspector/front-end/utilities.js:
29         ():
30
31 2011-07-19  Vsevolod Vlasov  <vsevik@chromium.org>
32
33         Web Inspector: Rename agentIdentifierPrefix to processId, move out from page agent and make static.
34         https://bugs.webkit.org/show_bug.cgi?id=64729
35
36         Reviewed by Pavel Feldman.
37
38         * CMakeLists.txt:
39         * GNUmakefile.list.am:
40         * WebCore.gypi:
41         * WebCore.pro:
42         * WebCore.vcproj/WebCore.vcproj:
43         * WebCore.xcodeproj/project.pbxproj:
44         * inspector/IdentifiersFactory.cpp: Added.
45         (WebCore::IdentifiersFactory::createIdentifier):
46         * inspector/IdentifiersFactory.h: Added.
47         (WebCore::IdentifiersFactory::setProcessId):
48         * inspector/InspectorController.cpp:
49         (WebCore::InspectorController::setProcessId):
50         * inspector/InspectorController.h:
51         * inspector/InspectorPageAgent.cpp:
52         (WebCore::InspectorPageAgent::frameId):
53         (WebCore::InspectorPageAgent::loaderId):
54         * inspector/InspectorPageAgent.h:
55
56 2011-07-19  Jeremy Moskovich  <jeremy@chromium.org>
57
58         Fix microphone icon placement in speech input control for dir=rtl.
59         https://bugs.webkit.org/show_bug.cgi?id=64668
60
61         Reviewed by Dimitri Glazkov.
62
63         Modify default stylesheet to propagate dir=rtl from the outer input
64         control to the shadow DOM container.  This makes the microphone
65         icon appear on the left for dir=rtl, which is the desired behavior.
66
67         Test: fast/speech/speech-bidi-rendering.html
68
69         * css/html.css:
70         (input[x-webkit-speech][dir=rtl]::-webkit-textfield-decoration-container):
71
72 2011-07-19  Raphael Kubo da Costa  <kubo@profusion.mobi>
73
74         [EFL] Account for the invalid pointer case in WebCore::screenRect()
75         https://bugs.webkit.org/show_bug.cgi?id=64543
76
77         Reviewed by Antonio Gomes.
78
79         Fix a regression introduced in r88245: it assumes the pointer passed
80         to screenRect() is always valid.
81         fast/frames/crash-removed-iframe.html proves this is not always true,
82         so we need to do some sanity check on the pointer before using it.
83         No new tests as this has been caught by the current test suite.
84
85         * platform/efl/PlatformScreenEfl.cpp:
86         (WebCore::screenRect):
87
88 2011-07-19  Robin Qiu  <robin.qiu@torchmobile.com.cn>
89
90         Reviewed by Antonio Gomes.
91
92         ScrollBar should initialize current position in constructor.
93         https://bugs.webkit.org/show_bug.cgi?id=39284
94
95         When ScrollBar is created, m_currentPos should be initialized to
96         m_scrollableArea's current scrollPosition. Because scrollbars may
97         be created after the content of m_scrollableArea has been scrolled.
98
99         Test: scrollbars/scrollbar-initial-position.html
100
101         * platform/Scrollbar.cpp:
102         (WebCore::Scrollbar::Scrollbar):
103
104 2011-07-19  Yuta Kitamura  <yutak@chromium.org>
105
106         WebSocket: Implement hybi framing
107         https://bugs.webkit.org/show_bug.cgi?id=64522
108
109         Reviewed by Kent Tamura.
110
111         Implement WebSocket framing protocol which is mainly described in
112         <http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10#section-4> and
113         <http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10#section-6>.
114
115         Hybi protocol introduces a new frame format which is drastically different from
116         the old one. Notable differences are:
117         - Binary data support.
118         - Fragmentation support: a single message can be fragmented to multiple frames.
119         - Ping-pong support.
120         - Masking: frame content of a client must be masked to prevent cross-protocol attacks.
121
122         This patch covers the following features:
123         - Send a pong frame when a ping frame is received.
124         - Receive fragmented frames.
125         - Receive masked frames. (Servers do not have to mask frames, but they may if they wish.)
126
127         The following features are NOT implemented yet:
128         - Send or receive binary messages.
129         - Send a ping message.
130         - Send fragmented frames. (It is unclear whether this is necessary.)
131         - Rewrite the frame content by WebSocket protocol extensions (like frame compression).
132
133         New tests: http/tests/websocket/tests/hybi/broken-utf8.html
134                    http/tests/websocket/tests/hybi/fragmented-control-frame.html
135                    http/tests/websocket/tests/hybi/fragmented-frames.html
136                    http/tests/websocket/tests/hybi/interleaved-fragments.html
137                    http/tests/websocket/tests/hybi/long-control-frame.html
138                    http/tests/websocket/tests/hybi/masked-frames.html
139                    http/tests/websocket/tests/hybi/pong.html
140                    http/tests/websocket/tests/hybi/reserved-bits.html
141                    http/tests/websocket/tests/hybi/reserved-opcodes.html
142                    http/tests/websocket/tests/hybi/too-long-payload.html
143
144         * websockets/WebSocketChannel.cpp:
145         (WebCore::WebSocketChannel::WebSocketChannel):
146         (WebCore::WebSocketChannel::send):
147         The original content of send() was moved to a private method sendFrameHixie76().
148         (WebCore::WebSocketChannel::fail):
149         Stop handling incoming data after the WebSocket connection is failed.
150         It was unclear to me whether we should do the same thing for hixie-76 connection;
151         for now, I kept the original behavior.
152         (WebCore::WebSocketChannel::processBuffer):
153         (WebCore::WebSocketChannel::resumeTimerFired):
154         (WebCore::WebSocketChannel::startClosingHandshake):
155         (WebCore::WebSocketChannel::closingTimerFired):
156         (WebCore::WebSocketChannel::parseFrame):
157         (WebCore::WebSocketChannel::processFrame):
158         (WebCore::WebSocketChannel::processFrameHixie76):
159         (WebCore::WebSocketChannel::sendFrame):
160         (WebCore::WebSocketChannel::sendFrameHixie76):
161         * websockets/WebSocketChannel.h:
162         (WebCore::WebSocketChannel::isNonControlOpCode):
163         (WebCore::WebSocketChannel::isControlOpCode):
164         (WebCore::WebSocketChannel::isReservedOpCode):
165
166 2011-07-19  Nikolas Zimmermann  <nzimmermann@rim.com>
167
168         REGRESSION (r88913): Preview in Safari's snippet editor has a fixed height instead of filling the entire pane
169         https://bugs.webkit.org/show_bug.cgi?id=64059
170
171         REGRESSION (r88913): <object> has wrong computed height
172         https://bugs.webkit.org/show_bug.cgi?id=62769
173
174         Reviewed by Rob Buis.
175
176         Fix misinterpretation of CSS 2.1 - "10.5 Content height: the 'height' property".
177         It says "If the height of the containing block is not specified explicitelz (i.e. it depends on the
178         content height), and this element is not absolutely positioned, the value computes to 'auto'".
179
180         Checking whether the containing block height depends on the content height is not equal to checking
181         whether the height property is set on the containing block, there are other ways to implicitly specify
182         the height by setting top & bottom. Fix that by checking whether the containing block has a height
183         property or top & bottom set.
184
185         While I was at it, make computeReplacedLogicalWidth/Height a bit more explicit to make it easier to compare
186         the code with the spec quoatations - this doesn't change the functionality only the readability.
187         
188         Test: fast/css/replaced-element-implicit-size.html
189
190         * rendering/RenderReplaced.cpp:
191         (WebCore::RenderReplaced::computeReplacedLogicalWidth): Cleanup comment, make code more explicit.
192         (WebCore::RenderReplaced::logicalHeightIsAuto): Add helper method used by computeReplacedLogicalHeight.
193         (WebCore::RenderReplaced::computeReplacedLogicalHeight): Fix height=auto detection.
194         * rendering/RenderReplaced.h:
195
196 2011-07-18  Ryosuke Niwa  <rniwa@webkit.org>
197
198         REGRESSION(91209?): fast/css/custom-font-xheight.html is failing on Leopard
199         https://bugs.webkit.org/show_bug.cgi?id=64767
200
201         Add a runtime check for font cascading optimization.
202
203         It's a constant value in Mac port so hopefully gcc will constant-propagate the value
204         and eliminate the function altogether.
205
206         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
207         (WebCore::canSetCascadeListForCustomFont): Added.
208         (WebCore::FontPlatformData::ctFont):
209
210 2011-07-18  MORITA Hajime  <morrita@google.com>
211
212         [ShadowContentElement] forwarded node should be able to access its hosting content element.
213         https://bugs.webkit.org/show_bug.cgi?id=64251
214         
215         Reviewed by Dimitri Glazkov.
216
217         - Introduced ShadowInclusionSet to manage included nodes to its includer content element.
218           ShadowInclusionSet instance is owned by ShadowRoot.
219         - Updated the set on inclusion list changes.
220         - Used the set to retrieve the content element of NodeRenderingContext.
221         
222         There are also related refactoring and cleanup:
223         - Renamed NodeRenderingContext::m_contentElement to m_includer
224         - ShadowContentSelector::m_activeElement is no longer used, thus removed.
225         
226         Test: fast/dom/shadow/content-element-includer.html
227
228         * WebCore.exp.in:
229         * dom/NodeRenderingContext.cpp:
230         (WebCore::NodeRenderingContext::NodeRenderingContext):
231         (WebCore::NodeRenderingContext::nextRenderer):
232         (WebCore::NodeRenderingContext::previousRenderer):
233         * dom/NodeRenderingContext.h:
234         (WebCore::NodeRenderingContext::includer):
235         * dom/ShadowContentElement.cpp:
236         (WebCore::removeFromSet):
237         (WebCore::addToSet):
238         (WebCore::ShadowContentElement::attach):
239         (WebCore::ShadowContentElement::detach):
240         * dom/ShadowContentElement.h:
241         (WebCore::ShadowInclusionSet::add):
242         (WebCore::ShadowInclusionSet::remove):
243         (WebCore::ShadowInclusionSet::isEmpty):
244         (WebCore::ShadowInclusionSet::Translator::hash):
245         (WebCore::ShadowInclusionSet::Translator::equal):
246         (WebCore::ShadowInclusionSet::Hash::hash):
247         (WebCore::ShadowInclusionSet::Hash::equal):
248         (WebCore::ShadowInclusionSet::find):
249         * dom/ShadowContentSelector.cpp:
250         (WebCore::ShadowContentSelector::ShadowContentSelector):
251         (WebCore::ShadowContentSelector::selectInclusion):
252         * dom/ShadowContentSelector.h:
253         * dom/ShadowRoot.cpp:
254         (WebCore::ShadowRoot::~ShadowRoot):
255         (WebCore::ShadowRoot::includerFor):
256         (WebCore::ShadowRoot::inclusions):
257         (WebCore::ShadowRoot::ensureInclusions):
258         * dom/ShadowRoot.h:
259         (WebCore::toShadowRoot):
260         * testing/Internals.cpp:
261         (WebCore::Internals::includerFor):
262         * testing/Internals.h:
263         * testing/Internals.idl:
264
265 2011-07-18  Dean Jackson  <dino@apple.com>
266
267         https://bugs.webkit.org/show_bug.cgi?id=64742
268         Expose WebPreferences for media playback requiring user gestures and inline playback
269
270         Reviewed by Simon Fraser.
271
272         Media playback already tested if it should require user gestures, but
273         no setting was ever exposed to clients. Also, some ports only allow media
274         playback to be fullscreen, so exposing a new setting for them.
275
276         * html/HTMLMediaElement.cpp:
277         (WebCore::HTMLMediaElement::HTMLMediaElement): Examine the new Setting
278         for user gestures.
279         * page/Settings.cpp:
280         (WebCore::Settings::Settings):
281         * page/Settings.h: Two new settings.
282         (WebCore::Settings::setMediaPlaybackRequiresUserGesture):
283         (WebCore::Settings::mediaPlaybackRequiresUserGesture):
284         (WebCore::Settings::setMediaPlaybackAllowsInline):
285         (WebCore::Settings::mediaPlaybackAllowsInline):
286
287 2011-07-18  Ryosuke Niwa  <rniwa@webkit.org>
288
289         Leopard build fix after r91229.
290
291         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
292         (WebCore::FontPlatformData::ctFont):
293
294 2011-07-18  Dan Bernstein  <mitz@apple.com>
295
296         REGRESSION(91209?): fast/css/custom-font-xheight.html is failing on Leopard
297         https://bugs.webkit.org/show_bug.cgi?id=64767
298
299         Reviewed by Sam Weinig.
300
301         * platform/graphics/Font.h:
302         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
303         (WebCore::FontPlatformData::ctFont): Undo the cascade list optimization on Leopard for custom
304         fonts, because adding a cascade list apparently breaks the font.
305
306 2011-07-18  Matthew Delaney  <mdelaney@apple.com>
307
308         Remove drawsUsingCopy now that all ports handle the copying
309         https://bugs.webkit.org/show_bug.cgi?id=64768
310         
311         Introduced in https://bugs.webkit.org/show_bug.cgi?id=43507, ImageBuffer::drawsUsingCopy
312         was used to know whether or not an ImageBuffer should be explicitly copied before being
313         painted into a context (as was used in HTMLCanvasElement::paint). All platforms now
314         handle the logic of copying or not in their ImageBuffer::draw() implementations, so
315         drawsUsingCopy() is no longer needed. This patch removes it.
316
317         Reviewed by Dan Bernstein.
318
319         No new tests; does not affect behavior.
320
321         * html/HTMLCanvasElement.cpp:
322         (WebCore::HTMLCanvasElement::paint):
323         * platform/graphics/ImageBuffer.h:
324         (WebCore::ImageBuffer::isAccelerated):
325         * platform/graphics/cairo/ImageBufferCairo.cpp:
326         * platform/graphics/cg/ImageBufferCG.cpp:
327         * platform/graphics/qt/ImageBufferQt.cpp:
328         * platform/graphics/skia/ImageBufferSkia.cpp:
329         * platform/graphics/wince/ImageBufferWinCE.cpp:
330         * platform/graphics/wx/ImageBufferWx.cpp:
331
332 2011-07-18  Vsevolod Vlasov  <vsevik@chromium.org>
333
334         Web Inspector: [REGRESSION] Resource preserving fails when frameNavigated event is dispatched on NetworkPanel.
335         https://bugs.webkit.org/show_bug.cgi?id=64748
336
337         Reviewed by Pavel Feldman.
338
339         * inspector/front-end/NetworkPanel.js:
340         (WebInspector.NetworkLogView.prototype._frameNavigated):
341
342 2011-07-18  Brian Weinstein  <bweinstein@apple.com>
343
344         Prep work for: Crash under WebPage::platformDragEnded when dragging on Mac
345         https://bugs.webkit.org/show_bug.cgi?id=64766
346         <rdar://problem/9548174>
347         
348         Reviewed by Darin Adler.
349
350         Add a DragClient function that is called when a drag is ended, and call it from DragController::dragEnded.
351         This isn't used yet, but will be used by WebKit2 on Mac.
352         
353         This patch also cleans up style in DragClient.h.
354
355         No change in behavior, no tests needed.
356
357         * page/DragClient.h:
358         (WebCore::DragClient::dragEnded): Stub virtual implementation for now, this will be used by
359             WebKit2 on Mac.
360         * page/DragController.cpp:
361         (WebCore::DragController::dragEnded): Call DragClient::dragEnded.
362
363 2011-07-18  Jon Honeycutt  <jhoneycutt@apple.com>
364
365         Focus and selection events are not fired when a <select>'s selection
366         changes
367         https://bugs.webkit.org/show_bug.cgi?id=64504
368         <rdar://problem/9319881>
369
370         Reviewed by Alice Liu.
371
372         Test: platform/win/accessibility/option-element-selection-and-focus-events.html
373
374         * accessibility/chromium/AXObjectCacheChromium.cpp:
375         (WebCore::AXObjectCache::postPlatformNotification):
376         Add new notification type to the section of unhandled notifications.
377
378         * accessibility/AXObjectCache.h:
379         Declare a new notification, AXMenuListItemSelected.
380
381         * accessibility/AccessibilityMenuList.cpp:
382         (WebCore::AccessibilityMenuList::didUpdateActiveOption):
383         Tell our child popup that the active option changed, and post a
384         notification that our value changed.
385
386         * accessibility/AccessibilityMenuList.h:
387         Declare didUpdateActiveOption().
388
389         * accessibility/AccessibilityMenuListPopup.cpp:
390         (WebCore::AccessibilityMenuListPopup::didUpdateActiveOption):
391         Get the child <option> element that is selected, and fire focus and
392         selection events for it.
393
394         * accessibility/AccessibilityMenuListPopup.h:
395         Declare didUpdateActiveOption().
396
397         * accessibility/win/AXObjectCacheWin.cpp:
398         (WebCore::AXObjectCache::postPlatformNotification):
399         Map AXMenuListItemSelected -> EVENT_OBJECT_SELECTION.
400
401         * dom/SelectElement.cpp:
402         (WebCore::SelectElement::setSelectedIndex):
403         Pass the newly-selected index.
404
405         * rendering/RenderMenuList.cpp:
406         (WebCore::RenderMenuList::RenderMenuList):
407         Update the initialization list for the renamed m_lastActiveIndex.
408         (WebCore::RenderMenuList::setTextFromOption):
409         A new selection has been made in the popup; call
410         didUpdateActiveOption().
411         (WebCore::RenderMenuList::didSetSelectedIndex):
412         Call didUpdateActiveOption(), passing the index of the newly-selected
413         <option>.
414         (WebCore::RenderMenuList::didUpdateActiveOption):
415         If accessibility is disabled, or if the active option has not changed,
416         return early. Check whether the option index is in the range of list
417         items, and assert that the item at that index is an <option> element.
418         Tell the AccessibilityMenuList for this element that we updated the
419         active option.
420
421         * rendering/RenderMenuList.h:
422         Updated the declaration of didSetSelectedIndex() to take the selected
423         index. Declared didUpdateActiveOption(). Renamed m_lastSelectedIndex to
424         m_lastActiveIndex.
425
426 2011-07-18  Dan Bernstein  <mitz@apple.com>
427
428         Specify a cascade list consisting of the last resort font for Core Text
429         https://bugs.webkit.org/show_bug.cgi?id=64747
430
431         Reviewed by Sam Weinig.
432
433         No new tests, because this does not affect behavior.
434
435         This prevents Core Text from taking its default, longer fallback list when the primary font does
436         not include a character. This is OK to do because WebKit never uses the results of Core Text
437         fallback anyway.
438
439         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
440         (WebCore::cascadeToLastResortFontDescriptor): Added. Returns a CTFontDescriptor with a cascade
441         list consisting of the last resort font.
442         (WebCore::FontPlatformData::ctFont): Changed to include the cascadeToLastResortFontDescriptor
443         in the returned font.
444
445 2011-07-18  James Robinson  <jamesr@chromium.org>
446
447         Timer scheduling should be based off the monotonic clock
448         https://bugs.webkit.org/show_bug.cgi?id=64544
449
450         Reviewed by Darin Adler.
451
452         Changes the Timer scheduling logic from using absolute values in terms of currentTime() to using relative
453         intervals in terms of monotonicallyIncreasingTime().  This provides better standards compliance, compatibility,
454         and predictability when the system clock is adjusted.
455
456         No automated tests since there is no way to modify the system clock from DRT.
457
458         * platform/SharedTimer.h:
459         (WebCore::MainThreadSharedTimer::setFireInterval):
460         * platform/ThreadTimers.cpp:
461         (WebCore::ThreadTimers::updateSharedTimer):
462         (WebCore::ThreadTimers::sharedTimerFiredInternal):
463         * platform/Timer.cpp:
464         (WebCore::TimerBase::start):
465         (WebCore::TimerBase::nextFireInterval):
466         * platform/android/SharedTimerAndroid.cpp:
467         (WebCore::setSharedTimerFireInterval):
468         * platform/brew/SharedTimerBrew.cpp:
469         (WebCore::setSharedTimerFireInterval):
470         * platform/chromium/PlatformBridge.h:
471         * platform/chromium/SharedTimerChromium.cpp:
472         (WebCore::setSharedTimerFireInterval):
473         * platform/efl/SharedTimerEfl.cpp:
474         (WebCore::addNewTimer):
475         (WebCore::setSharedTimerFireInterval):
476         * platform/gtk/SharedTimerGtk.cpp:
477         (WebCore::setSharedTimerFireInterval):
478         * platform/haiku/SharedTimerHaiku.cpp:
479         (WebCore::SharedTimerHaiku::start):
480         (WebCore::setSharedTimerFireInterval):
481         * platform/mac/SharedTimerMac.mm:
482         (WebCore::setSharedTimerFireInterval):
483         * platform/qt/SharedTimerQt.cpp:
484         (WebCore::SharedTimerQt::start):
485         (WebCore::setSharedTimerFireInterval):
486         * platform/win/SharedTimerWin.cpp:
487         (WebCore::setSharedTimerFireInterval):
488         * platform/wince/SharedTimerWinCE.cpp:
489         (WebCore::setSharedTimerFireInterval):
490         * platform/wx/SharedTimerWx.cpp:
491         (WebCore::setSharedTimerFireInterval):
492         * workers/WorkerRunLoop.cpp:
493         (WebCore::WorkerSharedTimer::setFireInterval):
494
495 2011-07-18  Pratik Solanki  <psolanki@apple.com>
496
497         Unreviewed. Fix Windows build. Move static function defaultSessionCookieStorage() to before
498         its use in defaultCookieStorage().
499
500         * platform/network/cf/CookieStorageCFNet.cpp:
501         (WebCore::defaultSessionCookieStorage):
502
503 2011-07-18  Pratik Solanki  <psolanki@apple.com>
504
505         Part of https://bugs.webkit.org/show_bug.cgi?id=63674
506         Get webkit to compile with USE(CFNETWORK) enabled on Mac
507
508         Reviewed by David Kilzer.
509
510         Get coookie storage code to work with USE(CFNETWORK) enabled on Mac.
511
512         No new tests because no change in functionality.
513
514         * platform/network/cf/CookieStorageCFNet.cpp:
515         (WebCore::defaultCookieStorage):
516         (WebCore::defaultSessionCookieStorage):
517         * platform/network/cf/ResourceHandleCFNet.cpp:
518         (WebCore::ResourceHandle::createPrivateBrowsingStorageSession):
519         * platform/network/mac/CookieStorageMac.mm:
520
521 2011-07-18  Pratik Solanki  <psolanki@apple.com>
522
523         Part of https://bugs.webkit.org/show_bug.cgi?id=63674
524         Get webkit to compile with USE(CFNETWORK) enabled on Mac
525
526         Reviewed by David Kilzer.
527
528         * WebCore.exp.in:
529
530 2011-07-18  Gavin Barraclough  <barraclough@apple.com>
531
532         Speculative fix for Leopard assertions caused by 91095.
533
534         Rubber stamped by Sam Weinig.
535
536         * bridge/NP_jsobject.cpp:
537         (_NPN_Invoke):
538             - ensure we pass the window shell, not the global object.
539
540 2011-07-18  Mark Hahnenberg  <mhahnenberg@apple.com>
541
542         Refactor JSC to replace JSCell::operator new with static create method
543         https://bugs.webkit.org/show_bug.cgi?id=64466
544
545         Reviewed by Oliver Hunt (oliver@apple.com) and Darin Adler (darin@apple.com).
546
547         First step in a longer refactoring process to remove the use of
548         operator new overloading in order to allocate GC objects and to replace
549         this method with static create methods for each individual type of heap-allocated
550         JS object.  This particular patch only deals with replacing uses of
551         operator new within JSC proper.  Future patches will remove it from the
552         parts that interface with the DOM.  Due to the DOM's continued dependence
553         on it, operator new has not actually been removed from JSCell.
554
555         * bindings/js/JSDOMBinding.cpp:
556         (WebCore::jsDateOrNull):
557         (WebCore::objectToStringFunctionGetter):
558         * bindings/js/JSDOMWindowCustom.cpp:
559         (WebCore::nonCachingStaticFunctionGetter):
560         * bindings/js/JSHistoryCustom.cpp:
561         (WebCore::nonCachingStaticBackFunctionGetter):
562         (WebCore::nonCachingStaticForwardFunctionGetter):
563         (WebCore::nonCachingStaticGoFunctionGetter):
564         * bindings/js/JSLocationCustom.cpp:
565         (WebCore::nonCachingStaticReplaceFunctionGetter):
566         (WebCore::nonCachingStaticReloadFunctionGetter):
567         (WebCore::nonCachingStaticAssignFunctionGetter):
568         * bindings/js/SerializedScriptValue.cpp:
569         (WebCore::CloneDeserializer::readTerminal):
570         * bridge/qt/qt_runtime.cpp:
571         (JSC::Bindings::convertQVariantToValue):
572
573 2011-07-18  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
574
575         [Texmap] [Qt] [WK2] Unsync in TextureMapperNode between parent and child lists cause crashes on WK2.
576         https://bugs.webkit.org/show_bug.cgi?id=62587
577
578         Reviewed by Noam Rosenthal.
579
580         Fix unsync between m_parent and m_children list in child and parent texture mapper nodes 
581         in syncCompositingStateSelf.
582
583         * platform/graphics/texmap/TextureMapperNode.cpp:
584         (WebCore::TextureMapperNode::syncCompositingStateSelf):
585
586 2011-07-18  Rob Buis  <rbuis@rim.com>
587
588         Stroking of zero-length paths in SVG should change according to erratum
589         https://bugs.webkit.org/show_bug.cgi?id=18356
590
591         Reviewed by Nikolas Zimmermann.
592
593         Do not rely on toolkits to correctly render zero-length path with stroke-linecap=round, render
594         it ourselves just like for stroke-linecap=square.
595
596         * rendering/svg/RenderSVGPath.cpp:
597         (WebCore::RenderSVGPath::shouldStrokeZeroLengthSubpath):
598         (WebCore::RenderSVGPath::setupSquareCapPath):
599
600 2011-07-18  Mihnea Ovidenie  <mihnea@adobe.com>
601
602         [REGRESSION] Value 'none' breaks multiple background-image display
603         https://bugs.webkit.org/show_bug.cgi?id=59274
604
605         Reviewed by Simon Fraser.
606
607         When taking fast path for simple color background, we should draw
608         the background only if it is the last in the list of backgrounds.
609         Otherwise, it will obscure the previously drawn backgrounds.
610
611         Test: fast/backgrounds/background-fast-path-simple-color.html
612
613         * rendering/RenderBoxModelObject.cpp:
614         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
615
616 2011-07-18  Yi Shen  <yi.4.shen@nokia.com>
617
618         [Qt] ASSERTION FAILED in ResourceHandle::setDefersLoading causes crash
619         https://bugs.webkit.org/show_bug.cgi?id=62808
620
621         The assertion in ResourceHandle::setDefersLoading assumes asynchronous
622         content delivery -- To resume a page, first, its main resource loader
623         calls setDefersLoading to resume loading the main content; then all the
624         sub-resource loaders calls setDefersLoading to resume sub-contents.
625         However, since QNetworkReplyHandler delivers content synchronously,
626         some new sub-resource loaders get created as soon as the main resource
627         loader resumed, and all these new sub-resource loaders set their
628         defersLoading flag to false. Then, the assertion fails for these new
629         sub-resource loaders when calling setDefersLoading on them. As a fix,
630         this path makes QNetworkReplyHandler deliver content asynchronously
631         when its load type is set to SynchronousLoad.
632
633         Reviewed by Benjamin Poulain.
634
635         Test: loader/load-defer-resume-crash.html
636
637         * platform/network/qt/QNetworkReplyHandler.cpp:
638         (WebCore::QNetworkReplyHandlerCallQueue::setDeferSignals):
639         * platform/network/qt/QNetworkReplyHandler.h:
640         (WebCore::QNetworkReplyHandler::setLoadingDeferred):
641
642 2011-07-18  Young Han Lee  <joybro@company100.net>
643
644         AnimationBase asserts if a test tries to pause during the delay phase
645         https://bugs.webkit.org/show_bug.cgi?id=59475
646
647         Reviewed by Simon Fraser.
648
649         There is no more assertion failure after r90765, but the testcase still fails due to
650         the miscalculation of the pauseTime. This patch pauses the animation at its startTime
651         if a test tries to pause it during the delay phase.
652
653         Test: transitions/transition-in-delay-phase.html
654
655         * page/animation/AnimationBase.cpp:
656         (WebCore::AnimationBase::freezeAtTime):
657
658 2011-07-18  Vsevolod Vlasov  <vsevik@chromium.org>
659
660         Web Inspector: Web Inspector: provide unique identifiers for loaders
661         https://bugs.webkit.org/show_bug.cgi?id=64599
662
663         Reviewed by Pavel Feldman.
664
665         * inspector/InspectorInstrumentation.cpp:
666         (WebCore::InspectorInstrumentation::loaderDetachedFromFrameImpl):
667         * inspector/InspectorInstrumentation.h:
668         (WebCore::InspectorInstrumentation::frameDestroyed):
669         (WebCore::InspectorInstrumentation::loaderDetachedFromFrame):
670         * inspector/InspectorPageAgent.cpp:
671         (WebCore::InspectorPageAgent::loaderId):
672         (WebCore::InspectorPageAgent::loaderDetachedFromFrame):
673         * inspector/InspectorPageAgent.h:
674         * loader/DocumentLoader.cpp:
675         (WebCore::DocumentLoader::detachFromFrame):
676
677 2011-07-18  Pavel Feldman  <pfeldman@google.com>
678
679         Web Inspector: "Reveal in Elements Panel" is broken.
680         https://bugs.webkit.org/show_bug.cgi?id=64688
681
682         Reviewed by Yury Semikhatsky.
683
684         * inspector/front-end/ElementsTreeOutline.js:
685         (WebInspector.ElementsTreeOutline):
686         (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired.focusElement):
687         (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired):
688         (WebInspector.ElementsTreeOutline.prototype.populateContextMenu):
689
690 2011-07-18  Julien Chaffraix  <jchaffraix@webkit.org>
691
692         Remove RenderObject::addLayers second argument
693         https://bugs.webkit.org/show_bug.cgi?id=64649
694
695         Reviewed by Benjamin Poulain.
696
697         No change in behavior.
698
699         The code was always passing |this| as the second argument. Thus just
700         removed the argument for clarity.
701
702         * rendering/RenderObject.h:
703         * rendering/RenderObject.cpp:
704         (WebCore::RenderObject::addLayers): Removed the argument, replaced
705         by |this|.
706
707         * rendering/RenderObjectChildList.cpp:
708         (WebCore::RenderObjectChildList::appendChildNode):
709         (WebCore::RenderObjectChildList::insertChildNode):
710         Removed the second argument at those 2 call sites.
711
712 2011-07-18  Pavel Feldman  <pfeldman@google.com>
713
714         Web Inspector: do not pause on caught exceptions while typing in the console.
715         https://bugs.webkit.org/show_bug.cgi?id=64379
716
717         Reviewed by Yury Semikhatsky.
718
719         * inspector/Inspector.json:
720         * inspector/InspectorController.cpp:
721         (WebCore::InspectorController::InspectorController):
722         * inspector/InspectorRuntimeAgent.cpp:
723         (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
724         (WebCore::InspectorRuntimeAgent::evaluate):
725         (WebCore::InspectorRuntimeAgent::setScriptDebugServer):
726         * inspector/InspectorRuntimeAgent.h:
727         * inspector/WorkerInspectorController.cpp:
728         (WebCore::WorkerInspectorController::WorkerInspectorController):
729         * inspector/front-end/ConsoleView.js:
730         (WebInspector.ConsoleView.prototype.evalInInspectedWindow):
731         * inspector/front-end/WatchExpressionsSidebarPane.js:
732         (WebInspector.WatchExpressionsSection.prototype.update):
733
734 2011-07-18  Sheriff Bot  <webkit.review.bot@gmail.com>
735
736         Unreviewed, rolling out r91132 and r91135.
737         http://trac.webkit.org/changeset/91132
738         http://trac.webkit.org/changeset/91135
739         https://bugs.webkit.org/show_bug.cgi?id=64681
740
741         Broke GTK and Chromium debug bots (Requested by rniwa on
742         #webkit).
743
744         * accessibility/AXObjectCache.h:
745         * accessibility/AccessibilityMenuList.cpp:
746         * accessibility/AccessibilityMenuList.h:
747         * accessibility/AccessibilityMenuListPopup.cpp:
748         * accessibility/AccessibilityMenuListPopup.h:
749         * accessibility/chromium/AXObjectCacheChromium.cpp:
750         (WebCore::AXObjectCache::postPlatformNotification):
751         * accessibility/win/AXObjectCacheWin.cpp:
752         (WebCore::AXObjectCache::postPlatformNotification):
753         * dom/SelectElement.cpp:
754         (WebCore::SelectElement::setSelectedIndex):
755         * rendering/RenderMenuList.cpp:
756         (WebCore::RenderMenuList::RenderMenuList):
757         (WebCore::RenderMenuList::setTextFromOption):
758         (WebCore::RenderMenuList::didSetSelectedIndex):
759         * rendering/RenderMenuList.h:
760
761 2011-07-17  Luke Macpherson   <macpherson@chromium.org>
762
763         Implement CSSPropertyCursor in CSSStyleApplyProperty
764         https://bugs.webkit.org/show_bug.cgi?id=64432
765
766         Reviewed by Dimitri Glazkov.
767
768         No new tests / refectoring only.
769
770         * css/CSSStyleApplyProperty.cpp:
771         Add handler for CSSPropertyCursor.
772         * css/CSSStyleSelector.cpp:
773         Remove current handler of CSSPropertyCursor.
774         * css/CSSStyleSelector.h:
775         Make styleImage and cachedOrPendingFromValue public.
776
777 2011-07-16  Simon Fraser  <simon.fraser@apple.com>
778
779         Add code to attempt to align compositing layers to pixel boundaries when page scale changes
780         https://bugs.webkit.org/show_bug.cgi?id=64658
781
782         Reviewed by Dan Bernstein.
783         
784         Implemented a new behavior on GraphicsLayerCA which attempts to keep layers pixel
785         aligned as page scale changes.
786         
787         This requires denoting which layer has the page scale on it (it is assumed to be
788         already aligned), via setAppliesPageScale(). We also now pass a scale and offset
789         down through the GraphicsLayer commits, which are used to map layer bounds to display
790         coordinates for rounding.
791
792         * platform/graphics/GraphicsLayer.h: New flags and getters/setters for pixel alignment,
793         and the layer that is the applier of the scale.
794         (WebCore::GraphicsLayer::setMaintainsPixelAlignment):
795         (WebCore::GraphicsLayer::maintainsPixelAlignment):
796         (WebCore::GraphicsLayer::setAppliesPageScale):
797         (WebCore::GraphicsLayer::appliesPageScale):
798
799         * platform/graphics/GraphicsLayer.cpp:
800         (WebCore::GraphicsLayer::GraphicsLayer): Initialize the new flags.
801         (WebCore::GraphicsLayer::backingScaleFactor): Utility method that calls the client if there is one.
802         (WebCore::GraphicsLayer::pageScaleFactor): Ditto.
803
804         * platform/graphics/GraphicsLayerClient.h:
805         (WebCore::GraphicsLayerClient::backingScaleFactor): Provide default implementation.
806         (WebCore::GraphicsLayerClient::pageScaleFactor): Ditto.
807
808         * platform/graphics/ca/GraphicsLayerCA.h: Pass scale and base-relative offset around
809         to methods that need to update geometry during commit.
810         Some new methods related to pixel alignment.
811         
812         * platform/graphics/ca/GraphicsLayerCA.cpp:
813         (WebCore::GraphicsLayerCA::computePositionRelativeToBase): For single-layer commits,
814         we have to compute the base-relative offset, and whether we're under the layer
815         applying the scale by walking up the tree.
816         
817         (WebCore::GraphicsLayerCA::syncCompositingStateForThisLayerOnly): Call
818         computePositionRelativeToBase() to get scaling parameters for the target layer.
819         
820         (WebCore::GraphicsLayerCA::recursiveCommitChanges): Pass flags related to scaling.
821         positionRelativeToBase is an offset relative to the ancestor layer known to be pixel
822         aligned. affectedByPageScale is true for layers which are descendants of the layer
823         which applies the scale.
824         
825         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Pass scale and offset.
826         (WebCore::GraphicsLayerCA::updateGeometry): Call computePixelAlignment() to get
827         pixel-aligned geometry. This only needs to be applied to layers which render content,
828         so re-organize the code to use the unchanged layer geometry for the structural layer,
829         but to apply the adjusted geometry to the m_layer.
830         
831         (WebCore::GraphicsLayerCA::updateStructuralLayer): Pass scale and offset.
832         (WebCore::GraphicsLayerCA::ensureStructuralLayer): Ditto.
833         (WebCore::GraphicsLayerCA::updateLayerDrawsContent): Ditto.
834         (WebCore::GraphicsLayerCA::updateContentsScale): Ditto.
835         (WebCore::GraphicsLayerCA::requiresTiledLayer): Ditto.
836         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Ditto.
837         (WebCore::GraphicsLayerCA::setKeepPixelAligned): When set, dirties flags
838         for properties that need to be recomputed.
839         (WebCore::GraphicsLayerCA::noteChangesForScaleSensitiveProperties):
840         (WebCore::isIntegral):
841         (WebCore::GraphicsLayerCA::computePixelAlignment): Map our bounds to screen
842         scale, round out to an integral rect, then map it back, adding a fudge factor
843         so that CA backing stores don't end up being smaller than we expect because
844         of integer truncation.
845
846         * rendering/RenderLayerBacking.cpp:
847         (WebCore::RenderLayerBacking::createGraphicsLayer): Turn on pixel alignment if
848         the compositor says so.
849         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Set the RenderView's
850         layer as the one applying the scale, for the main frame.
851
852         * rendering/RenderLayerCompositor.h: New method.
853         * rendering/RenderLayerCompositor.cpp:
854         (WebCore::RenderLayerCompositor::keepLayersPixelAligned): Master switch for
855         pixel alignment. Default to on.
856         (WebCore::RenderLayerCompositor::ensureRootLayer): Give the two root-ish layers
857         a client so they can ask for page scale if necessary.
858
859 2011-07-16  Enrica Casucci  <enrica@apple.com>
860
861         REGRESSION: Pressing return in a particular document sends the cursor to the end of the document.
862         https://bugs.webkit.org/show_bug.cgi?id=64140
863         <rdar://problem/9737491>
864
865         Inserting a paragraph separator at a break element, inside an inline, generates redundant markup
866         and moves the selection at the end of the inserted block.
867         The fix consists in detecting that the insertion point is a break element and simply inserting another
868         break element. This solves the problem of the wrong final selection and also produces less redundant
869         markup.
870
871         Reviewed by Simon Fraser.
872
873         Test: editing/inserting/insert-paragraph-separator-at-break.html
874
875         * editing/InsertParagraphSeparatorCommand.cpp:
876         (WebCore::InsertParagraphSeparatorCommand::doApply): Modified logic for insertion at a break
877         element.
878
879 2011-07-16  Pratik Solanki  <psolanki@apple.com>
880
881         SubresourceLoader::didReceiveDataArray can crash when calling m_client->didReceiveData()
882         https://bugs.webkit.org/show_bug.cgi?id=64656
883         <rdar://problem/9754425>
884
885         Reviewed by Alexey Proskuryakov.
886
887         * loader/cf/SubresourceLoaderCF.cpp:
888         (WebCore::SubresourceLoader::didReceiveDataArray): Check for m_client before calling
889         m_client->didReceiveData().
890
891 2011-07-16  Dinu Jacob  <dinu.jacob@nokia.com>
892
893         [Qt] Compilation fails on disabling TextureMapper
894         https://bugs.webkit.org/show_bug.cgi?id=64408
895
896         Fix compilation error due to API name change in GraphicsLayer
897
898         Reviewed by Noam Rosenthal.
899
900         * platform/graphics/qt/GraphicsLayerQt.cpp:
901         (WebCore::GraphicsLayerQt::setContentsToBackgroundColor):
902         * platform/graphics/qt/GraphicsLayerQt.h:
903
904 2011-07-15  Pratik Solanki  <psolanki@apple.com>
905
906         Part of https://bugs.webkit.org/show_bug.cgi?id=63674
907         Get webkit to compile with USE(CFNETWORK) enabled on Mac
908
909         Reviewed by David Kilzer.
910
911         New WebKitSystemInterface functions for CFNetwork-based loader.
912
913         * WebCore.exp.in:
914         * platform/mac/WebCoreSystemInterface.h:
915         * platform/mac/WebCoreSystemInterface.mm:
916
917 2011-07-16  Jessie Berlin  <jberlin@apple.com>
918
919         Work towards determining the cause of frequent crashes due to null frame below
920         ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache.
921         https://bugs.webkit.org/show_bug.cgi?id=62764
922
923         Reviewed by Darin Adler.
924
925         No loads should be going on for a DocumentLoader that has been detached from its frame, but
926         that appears to be what is happening in this bug.
927
928         Add assertions with the hope that someone will run into this while debugging and thereby find
929         a reproducible case.
930
931         * loader/ResourceLoader.cpp:
932         (WebCore::ResourceLoader::willSendRequest):
933         (WebCore::ResourceLoader::didSendData):
934         (WebCore::ResourceLoader::didReceiveResponse):
935         (WebCore::ResourceLoader::didReceiveData):
936         (WebCore::ResourceLoader::didFinishLoading):
937         (WebCore::ResourceLoader::didFail):
938         (WebCore::ResourceLoader::wasBlocked):
939         (WebCore::ResourceLoader::cannotShowURL):
940         (WebCore::ResourceLoader::shouldUseCredentialStorage):
941         (WebCore::ResourceLoader::willCacheResponse):
942
943 2011-07-16  Sergey Glazunov  <serg.glazunov@gmail.com>
944
945         DOMWindow::open performs a security check on a wrong window
946         https://bugs.webkit.org/show_bug.cgi?id=64651
947
948         Reviewed by Adam Barth.
949
950         Test: http/tests/security/xss-DENIED-window-open-parent.html
951
952         * page/DOMWindow.cpp:
953         (WebCore::DOMWindow::open):
954
955 2011-07-16  Sam Weinig  <sam@webkit.org>
956
957         Attribute selectors don't handle glob namespaces (e.g. *|E)
958         https://bugs.webkit.org/show_bug.cgi?id=64567
959
960         Reviewed by Anders Carlsson.
961
962         Change checking of attribute selectors to match CSS 3 Selectors in
963         the presence of namespaces. This entails changing the algorithm to
964         check each attribute on an element as a match for the attribute selector
965         and taking into account a prefix of *.
966
967         * css/CSSStyleSelector.cpp:
968         (WebCore::attributeQualifiedNameMatches):
969         Checks if the a particular attributes qualified name matches
970         the attribute selector, taking into account a prefix of *.
971
972         (WebCore::attributeValueMatches):
973         Checks if a particular attribute on an element, matches
974         the attribute selector.
975
976         (WebCore::anyAttributeMatches):
977         Top level attribute check. Checks if any of an elements attributes
978         match the attribute selector.
979         
980         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
981         Factor out attribute checking code into the above functions.
982
983 2011-07-16  Jon Honeycutt  <jhoneycutt@apple.com>
984
985         WinCE build fix. Unreviewed.
986
987         * dom/SelectElement.cpp:
988
989 2011-07-16  Kulanthaivel Palanichamy  <kulanthaivel@codeaurora.org>
990
991         Reviewed by Nikolas Zimmermann.
992
993         SVG animation API crashes on SVGAnimateTransform
994         https://bugs.webkit.org/show_bug.cgi?id=64104
995
996         This patch ensures the update in AnimatedTransform list in
997         SVGAnimateTransformElement.cpp is in sync with its wrapper list.
998
999         Test: svg/animations/svgtransform-animation-discrete.html
1000
1001         * svg/SVGAnimateTransformElement.cpp:
1002         (WebCore::animatedTransformListFor):
1003         (WebCore::SVGAnimateTransformElement::resetToBaseValue):
1004         (WebCore::SVGAnimateTransformElement::calculateAnimatedValue):
1005         (WebCore::SVGAnimateTransformElement::applyResultsToTarget):
1006
1007 2011-07-15  Simon Fraser  <simon.fraser@apple.com>
1008
1009         Fix the build.
1010
1011         * platform/mac/ScrollbarThemeMac.mm:
1012         (WebCore::ScrollbarThemeMac::updateEnabledState):
1013
1014 2011-07-15  Simon Fraser  <simon.fraser@apple.com>
1015
1016         Another Windows build fix; make this method non-pure virtual.
1017
1018         * platform/graphics/GraphicsLayerClient.h:
1019         (WebCore::GraphicsLayerClient::didCommitChangesForLayer):
1020
1021 2011-07-15  Simon Fraser  <simon.fraser@apple.com>
1022
1023         Fix build error in 32-bit builds.
1024
1025         * rendering/svg/RenderSVGPath.cpp:
1026         (WebCore::RenderSVGPath::zeroLengthSubpathRect):
1027
1028 2011-07-15  Simon Fraser  <simon.fraser@apple.com>
1029
1030         Fix Windows build.
1031
1032         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
1033         (WebCore::MediaPlayerPrivate::backingScaleFactor):
1034         (WebCore::MediaPlayerPrivate::pageScaleFactor):
1035
1036 2011-07-15  Simon Fraser  <simon.fraser@apple.com>
1037
1038         Have GraphicsLayer pull their contentsScale, rather than pushing it onto them
1039         https://bugs.webkit.org/show_bug.cgi?id=64643
1040
1041         Reviewed by Darin Adler.
1042
1043         RenderLayerBacking would set the contentsScale on GraphicsLayers
1044         on creation, and update it when the pageScaleFactor changed. However,
1045         RenderLayerBacking doesn't really know what contentsScale is best
1046         for a layer, so instead, have GraphicsLayers call back through the
1047         GraphicsLayerClient to get the two relevant scale factors, and do
1048         their own computation of contentsScale.
1049
1050         No testable behavior changes.
1051
1052         * page/Frame.cpp:
1053         (WebCore::Frame::pageScaleFactorChanged): No need to pass the scale.
1054
1055         * platform/graphics/GraphicsLayer.cpp:
1056         (WebCore::GraphicsLayer::notePageScaleFactorChangedIncludingDescendants):
1057         Recurse through the GraphicsLayer tree, calling pageScaleFactorChanged() on 
1058         each layer.
1059
1060         * platform/graphics/GraphicsLayer.h:
1061         (WebCore::GraphicsLayer::pageScaleFactorChanged):
1062         Remove contentsScale/setContentsScale
1063         
1064         * platform/graphics/GraphicsLayerClient.h:
1065         Add methods to fetch the backingScaleFactor() and pageScaleFactor().
1066         
1067         * platform/graphics/ca/GraphicsLayerCA.cpp:
1068         (WebCore::GraphicsLayerCA::GraphicsLayerCA): m_uncommittedChanges
1069         defaults to ContentsScaleChanged so we update contentsScale on
1070         the first flush.
1071         
1072         (WebCore::GraphicsLayerCA::setContentsToBackgroundColor):
1073         This was the wrong time to call updateContentsRect() and setupContentsLayer();
1074         those should be done at commit time, so moved to updateLayerBackgroundColor().
1075         (WebCore::GraphicsLayerCA::recursiveCommitChanges): Note whether we
1076         have any changes, and call didCommitChangesForLayer() on the client.
1077         (WebCore::GraphicsLayerCA::updateLayerBackgroundColor): Code moved to here.
1078         (WebCore::clampedContentsScaleForScale): No longer has any hysteresis
1079         on the scale, and now just clamps.
1080         (WebCore::GraphicsLayerCA::updateContentsScale): Fetch the scales
1081         from the client, and multiply them, then clamp.
1082         (WebCore::GraphicsLayerCA::requiresTiledLayer): This now takes
1083         contentsScale into account when deciding to use tiled layer,
1084         so that zooming in will cause layers to start tiling.
1085         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Don't call
1086         setContentsScale(), but rather updateContentsScale().
1087         (WebCore::GraphicsLayerCA::pageScaleFactorChanged): Set the bits
1088         for properties that depend on the scale.
1089         (WebCore::GraphicsLayerCA::noteChangesForScaleSensitiveProperties):
1090         Note that contentsScale needs to be updated. At some point we might also
1091         need to dirty other properties.
1092         * platform/graphics/ca/GraphicsLayerCA.h: Moved the m_allowTiledLayer
1093         bool for better packing. No need for a m_contentsScale member now.
1094         * rendering/RenderLayer.cpp: Removed pageScaleFactorChanged().
1095         * rendering/RenderLayer.h: Ditto.
1096         * rendering/RenderLayerBacking.cpp:
1097         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): No need
1098         to push the contents scale.
1099         (WebCore::RenderLayerBacking::updateForegroundLayer): Ditto.
1100         (WebCore::RenderLayerBacking::updateMaskLayer): Ditto.
1101         (WebCore::RenderLayerBacking::pageScaleFactor): GraphicsLayerClient method.
1102         (WebCore::RenderLayerBacking::backingScaleFactor): GraphicsLayerClient method.
1103         (WebCore::RenderLayerBacking::didCommitChangesForLayer): Send through
1104         to the compositor.
1105         * rendering/RenderLayerBacking.h: GraphicsLayerClient methods.
1106         * rendering/RenderLayerCompositor.cpp:
1107         (WebCore::RenderLayerCompositor::didFlushChangesForLayer): We'll use
1108         this later.
1109         (WebCore::RenderLayerCompositor::backingScaleFactor): GraphicsLayerClient method.
1110         (WebCore::RenderLayerCompositor::pageScaleFactor): Ditto.
1111         (WebCore::RenderLayerCompositor::didCommitChangesForLayer): Ditto.
1112         (WebCore::RenderLayerCompositor::ensureRootLayer): No need to push the contents scale.
1113         (WebCore::RenderLayerCompositor::pageScaleFactorChanged): Just call notePageScaleFactorChangedIncludingDescendants()
1114         on the root GraphicsLayer.
1115         * rendering/RenderLayerCompositor.h: Added GraphicsLayerClient methods.
1116
1117 2011-07-15  Jon Honeycutt  <jhoneycutt@apple.com>
1118
1119         Build fix. Unreviewed.
1120
1121         * accessibility/AccessibilityMenuListPopup.cpp:
1122         (WebCore::AccessibilityMenuListPopup::didUpdateActiveOption):
1123         Cast size_t to int for comparison.
1124
1125 2011-07-15  Andy Estes  <aestes@apple.com>
1126
1127         Rename applicationIsSolarWalk() to applicationIsSolarWalkMac().
1128         https://bugs.webkit.org/show_bug.cgi?id=64641
1129
1130         Reviewed by Brian Weinstein.
1131
1132         * WebCore.exp.in: Update to new symbol.
1133         * platform/RuntimeApplicationChecks.cpp:
1134         (WebCore::applicationIsSolarWalkMac): Renamed from applicationIsSolarWalk.
1135         * platform/RuntimeApplicationChecks.h: Ditto.
1136
1137 2011-07-15  Mark Rowe  <mrowe@apple.com>
1138
1139         Fix the build.
1140
1141         * platform/graphics/GraphicsContext.h:
1142         (WebCore::GraphicsContextStateSaver::context): Remove a bogus type qualifier.
1143
1144 2011-07-13  Jon Honeycutt  <jhoneycutt@apple.com>
1145
1146         Focus and selection events are not fired when a <select>'s selection
1147         changes
1148         https://bugs.webkit.org/show_bug.cgi?id=64504
1149         <rdar://problem/9319881>
1150
1151         Reviewed by Alice Liu.
1152
1153         Test: platform/win/accessibility/option-element-selection-and-focus-events.html
1154
1155         * accessibility/chromium/AXObjectCacheChromium.cpp:
1156         (WebCore::AXObjectCache::postPlatformNotification):
1157         Add new notification type to the section of unhandled notifications.
1158
1159         * accessibility/AXObjectCache.h:
1160         Declare a new notification, AXMenuListItemSelected.
1161
1162         * accessibility/AccessibilityMenuList.cpp:
1163         (WebCore::AccessibilityMenuList::didUpdateActiveOption):
1164         Tell our child popup that the active option changed, and post a
1165         notification that our value changed.
1166
1167         * accessibility/AccessibilityMenuList.h:
1168         Declare didUpdateActiveOption().
1169
1170         * accessibility/AccessibilityMenuListPopup.cpp:
1171         (WebCore::AccessibilityMenuListPopup::didUpdateActiveOption):
1172         Get the child <option> element that is selected, and fire focus and
1173         selection events for it.
1174
1175         * accessibility/AccessibilityMenuListPopup.h:
1176         Declare didUpdateActiveOption().
1177
1178         * accessibility/win/AXObjectCacheWin.cpp:
1179         (WebCore::AXObjectCache::postPlatformNotification):
1180         Map AXMenuListItemSelected -> EVENT_OBJECT_SELECTION.
1181
1182         * dom/SelectElement.cpp:
1183         (WebCore::SelectElement::setSelectedIndex):
1184         Pass the newly-selected index.
1185
1186         * rendering/RenderMenuList.cpp:
1187         (WebCore::RenderMenuList::RenderMenuList):
1188         Update the initialization list for the renamed m_lastActiveIndex.
1189         (WebCore::RenderMenuList::setTextFromOption):
1190         A new selection has been made in the popup; call
1191         didUpdateActiveOption().
1192         (WebCore::RenderMenuList::didSetSelectedIndex):
1193         Call didUpdateActiveOption(), passing the index of the newly-selected
1194         <option>.
1195         (WebCore::RenderMenuList::didUpdateActiveOption):
1196         If accessibility is disabled, or if the active option has not changed,
1197         return early. Check whether the option index is in the range of list
1198         items, and assert that the item at that index is an <option> element.
1199         Tell the AccessibilityMenuList for this element that we updated the
1200         active option.
1201
1202         * rendering/RenderMenuList.h:
1203         Updated the declaration of didSetSelectedIndex() to take the selected
1204         index. Declared didUpdateActiveOption(). Renamed m_lastSelectedIndex to
1205         m_lastActiveIndex.
1206
1207 2011-07-13  Jon Honeycutt  <jhoneycutt@apple.com>
1208
1209         ALT + DOWN arrow key does not open select
1210
1211         https://bugs.webkit.org/show_bug.cgi?id=14407
1212         <rdar://problem/5319507>
1213
1214         Reviewed by Alexey Proskuryakov.
1215
1216         No test, because eventSender sends events to the WebView, rather than
1217         the popup menu, so the popup isn't closed.
1218
1219         * WebCore.vcproj/WebCore.vcproj:
1220         Add SelectElementWin.cpp to project.
1221
1222         * dom/SelectElement.cpp:
1223         (WebCore::SelectElement::platformHandleKeydownEvent):
1224         Moved ARROW_KEYS_POP_MENU code here. Updated to return whether the
1225         function has handled the key, or whether the caller needs to process it
1226         further.
1227         (WebCore::SelectElement::menuListDefaultEventHandler):
1228         Allow the platform the first chance at handling the keyboard event.
1229
1230         * dom/SelectElement.h:
1231         Declare platformHandleKeydownEvent().
1232         * dom/SelectElementWin.cpp: Added.
1233         (WebCore::SelectElement::platformHandleKeyboardEvent):
1234         Allow (Shift) F4 and (Ctrl/Shift) Alt/AltGr + Up/Down
1235         arrow to show the popup. After the popup is dismissed, call
1236         setSelectedIndex(), and report that we handled the event.
1237
1238         * platform/win/PopupMenuWin.cpp:
1239         Declare HIGH_BIT_MASK_SHORT.
1240         (WebCore::PopupMenuWin::show):
1241         Forward WM_SYSKEYDOWN to the popup's HWND.
1242         (WebCore::PopupMenuWin::wndProc):
1243         Allow the same shortcuts that show the menu to hide it, matching
1244         Firefox.
1245
1246 2011-07-12  Jon Honeycutt  <jhoneycutt@apple.com>
1247
1248         Ensure that a single select element's child option elements are
1249         reported correctly to accessibility clients if the children are
1250         changed.
1251
1252         https://bugs.webkit.org/show_bug.cgi?id=64500
1253         <rdar://problem/9773066>
1254
1255         Reviewed by Beth Dakin.
1256
1257         Test: platform/win/accessibility/single-select-children-changed.html
1258
1259         * accessibility/AccessibilityMenuListPopup.cpp:
1260         (WebCore::AccessibilityMenuListPopup::addChildren):
1261         Remove a comment about WML, which we no longer support.
1262         (WebCore::AccessibilityMenuListPopup::childrenChanged):
1263         Don't just remove children that were detached - this will miss childen
1264         that were dynamically added. Clear the children and re-add them.
1265
1266 2011-07-15  Rob Buis  <rbuis@rim.com>
1267
1268         Stroking of zero-length paths in SVG should change according to erratum
1269         https://bugs.webkit.org/show_bug.cgi?id=18356
1270
1271         Reviewed by Nikolas Zimmermann.
1272
1273         Ensure rendering of zero-length paths with stroke-linecap=square works by
1274         creating the square rectangle manually.
1275
1276         Tests: svg/W3C-SVG-1.1-SE/painting-control-04-f.svg
1277                svg/custom/zero-path-square-cap-rendering.svg
1278
1279         * platform/graphics/GraphicsContext.h:
1280         (WebCore::GraphicsContextStateSaver::context):
1281         * rendering/svg/RenderSVGPath.cpp:
1282         (WebCore::RenderSVGPath::strokeContains):
1283         (WebCore::RenderSVGPath::shouldStrokeZeroLengthSubpath):
1284         (WebCore::RenderSVGPath::zeroLengthSubpathRect):
1285         (WebCore::RenderSVGPath::setupSquareCapPath):
1286         (WebCore::RenderSVGPath::setupNonScalingStrokePath):
1287         (WebCore::RenderSVGPath::fillAndStrokePath):
1288         (WebCore::RenderSVGPath::updateCachedBoundaries):
1289         * rendering/svg/RenderSVGPath.h:
1290
1291 2011-06-27  Adrienne Walker  <enne@google.com>
1292
1293         Reviewed by Simon Fraser.
1294
1295         Overlap map for compositing needs to consider clipping
1296         https://bugs.webkit.org/show_bug.cgi?id=63493
1297
1298         Test: compositing/layer-creation/overlap-clipping.html
1299
1300         * rendering/RenderLayerCompositor.cpp:
1301         (WebCore::RenderLayerCompositor::addToOverlapMap):
1302         * rendering/RenderLayerCompositor.h:
1303
1304 2011-07-15  Sheriff Bot  <webkit.review.bot@gmail.com>
1305
1306         Unreviewed, rolling out r90592.
1307         http://trac.webkit.org/changeset/90592
1308         https://bugs.webkit.org/show_bug.cgi?id=64627
1309
1310         Causes crashes with the web audio async decoding API
1311         (Requested by jamesr on #webkit).
1312
1313         * html/canvas/ArrayBuffer.cpp:
1314         (WebCore::ArrayBuffer::~ArrayBuffer):
1315         (WebCore::ArrayBuffer::tryAllocate):
1316         * manual-tests/array-buffer-memory.html: Removed.
1317
1318 2011-07-15  Kenneth Russell  <kbr@google.com>
1319
1320         Don't restore WebGL context if it was guilty of a graphics reset
1321         https://bugs.webkit.org/show_bug.cgi?id=64497
1322
1323         Reviewed by Stephen White.
1324
1325         Use getGraphicsResetStatusARB already defined in Extensions3D to
1326         determine why the context was lost, and respond to guilty context
1327         notifications by forbidding restoration of the context.
1328
1329         It isn't currently possible to write an automated test for this.
1330         We might consider extending the WEBKIT_lose_context extension to
1331         allow a reason to be provided why the context was lost. It was
1332         tested manually in Chromium on Windows and Linux with some test
1333         cases that provoke actual graphics card resets.
1334
1335         * html/canvas/WebGLRenderingContext.cpp:
1336         (WebCore::WebGLRenderingContext::WebGLRenderingContextRestoreTimer::fired):
1337         (WebCore::WebGLRenderingContext::forceLostContext):
1338         (WebCore::WebGLRenderingContext::maybeRestoreContext):
1339         * html/canvas/WebGLRenderingContext.h:
1340
1341 2011-07-15  Chris Marrin  <cmarrin@apple.com>
1342
1343         Move TransformState to platform/graphics and give it the option to transform just a FloatQuad
1344         https://bugs.webkit.org/show_bug.cgi?id=64542
1345
1346         Reviewed by Simon Fraser.
1347
1348         This is to make it possible to use TransformState in some GraphicsLayer work. HitTestingTransformState
1349         was split out and left in rendering since it's not needed in the platform code. Also added a FIXME
1350         because HitTestingTransformState should eventually be replaced by TransformState.
1351
1352         * CMakeLists.txt:
1353         * GNUmakefile.list.am:
1354         * WebCore.gypi:
1355         * WebCore.pro:
1356         * WebCore.vcproj/WebCore.vcproj:
1357         * WebCore.xcodeproj/project.pbxproj:
1358         * platform/graphics/transforms/TransformState.cpp: Copied from Source/WebCore/rendering/TransformState.cpp.
1359         (WebCore::TransformState::move):
1360         (WebCore::TransformState::flattenWithTransform):
1361         * platform/graphics/transforms/TransformState.h: Copied from Source/WebCore/rendering/TransformState.h.
1362         (WebCore::TransformState::TransformState):
1363         (WebCore::TransformState::setQuad):
1364         * rendering/HitTestingTransformState.cpp: Copied from Source/WebCore/rendering/TransformState.cpp.
1365         * rendering/HitTestingTransformState.h: Copied from Source/WebCore/rendering/TransformState.h.
1366         * rendering/RenderLayer.cpp:
1367         * rendering/RenderObject.cpp:
1368         (WebCore::RenderObject::localToContainerQuad):
1369         * rendering/RenderingAllInOne.cpp:
1370         * rendering/TransformState.cpp: Removed.
1371         * rendering/TransformState.h: Removed.
1372
1373 2011-07-15  Pratik Solanki  <psolanki@apple.com>
1374
1375         Part of https://bugs.webkit.org/show_bug.cgi?id=63674
1376         Get webkit to compile with USE(CFNETWORK) enabled on Mac
1377
1378         Reviewed by David Kilzer.
1379
1380         Minor changes needed to keep the compiler happy.
1381
1382         No new tests because no change in functionality.
1383
1384         * platform/network/cf/FormDataStreamCFNet.cpp:
1385         * platform/network/cf/ResourceErrorCF.cpp:
1386         (WebCore::ResourceError::platformCopy):
1387         * platform/network/cf/ResourceHandleCFNet.cpp:
1388         (WebCore::WebCoreSynchronousLoaderClient::willSendRequest):
1389         * platform/network/cf/ResourceResponseCFNet.cpp:
1390         (WebCore::toTimeT):
1391
1392 2011-07-15  Dan Bernstein  <mitz@apple.com>
1393
1394         REGRESSION: Mouse cursor doesn’t hide when full screen video HUD hides
1395         https://bugs.webkit.org/show_bug.cgi?id=64615
1396
1397         Reviewed by Anders Carlsson.
1398
1399         * html/shadow/MediaControlRootElement.cpp:
1400         (WebCore::MediaControlRootElement::enteredFullscreen): Hide the mouse cursor immediately when
1401         entering full screen.
1402         (WebCore::MediaControlRootElement::hideFullscreenControlsTimerFired): Hide the mouse cursor when
1403         hiding the HUD.
1404         * loader/EmptyClients.h:
1405         (WebCore::EmptyChromeClient::setCursorHiddenUntilMouseMoves): Added empty implementation.
1406         * page/Chrome.cpp:
1407         (WebCore::Chrome::setCursorHiddenUntilMouseMoves): Added. Calls through to the client.
1408         * page/Chrome.h:
1409         * page/ChromeClient.h:
1410         * platform/HostWindow.h:
1411
1412 2011-07-14  Gavin Barraclough  <barraclough@apple.com>
1413
1414         https://bugs.webkit.org/show_bug.cgi?id=64250
1415         Global strict mode function leaking global object as "this".
1416
1417         Reviewed by Oliver Hunt.
1418
1419         * bindings/js/JSMainThreadExecState.h:
1420         (WebCore::JSMainThreadExecState::call):
1421         * bindings/scripts/CodeGeneratorJS.pm:
1422         (GenerateHeader):
1423             - Change call to pass DOM Window shell, instead of the global varaible object.
1424
1425 2011-07-15  Brian Salomon  <bsalomon@google.com>
1426
1427         [SKIA] Must make skia's GL context current before drawing in GraphicsContext::clearRect
1428         https://bugs.webkit.org/show_bug.cgi?id=64612
1429
1430         Reviewed by Stephen White.
1431
1432         Tested by compositing/shadows/shadow-drawing.html
1433
1434         * platform/graphics/skia/GraphicsContextSkia.cpp:
1435         (WebCore::GraphicsContext::clearRect):
1436
1437 2011-07-15  Ian Henderson  <ianh@apple.com>
1438
1439         Avoid rounded rect corner-drawing overhead if no corners are visible
1440         https://bugs.webkit.org/show_bug.cgi?id=64584
1441
1442         Reviewed by Simon Fraser.
1443
1444         No new tests, rendering is visually identical.
1445
1446         * rendering/InlineFlowBox.cpp:
1447         (WebCore::InlineFlowBox::paintBoxDecorations): Pass PaintInfo into
1448         paintBorder.
1449         * rendering/RenderBox.cpp:
1450         (WebCore::RenderBox::paintBoxDecorations): Ditto.
1451         * rendering/RenderBoxModelObject.cpp:
1452         (WebCore::unroundClippedCorners):
1453         (WebCore::RenderBoxModelObject::paintBorder):
1454         Any invisible corner may be replaced with a corner of radius zero, as
1455         long as the stroke style is solid.  Change the GraphicsContext
1456         parameter into a PaintInfo parameter so we can get the rect to be
1457         drawn.
1458         * rendering/RenderBoxModelObject.h:
1459         * rendering/RenderFieldset.cpp:
1460         (WebCore::RenderFieldset::paintBoxDecorations): Pass PaintInfo into
1461         paintBorder.
1462         * rendering/RenderTable.cpp:
1463         (WebCore::RenderTable::paintBoxDecorations): Ditto.
1464         * rendering/RenderTableCell.cpp:
1465         (WebCore::RenderTableCell::paintBoxDecorations): Ditto.
1466
1467 2011-07-15  Jeff Miller  <jeffm@apple.com>
1468
1469         Add UserAgentStyleSheetsData.cpp to WebCore.vcproj
1470         https://bugs.webkit.org/show_bug.cgi?id=64609
1471         
1472         Add UserAgentStyleSheetsData.cpp to WebCore.vcproj for convenient access, but don't compile it.
1473         This matches what we do with other generated DerivedSources.
1474
1475         Reviewed by Brian Weinstein.
1476         
1477         No new tests, just adding a file.
1478
1479         * WebCore.vcproj/WebCore.vcproj: Add UserAgentStyleSheetsData.cpp.
1480
1481 2011-07-15  Pratik Solanki  <psolanki@apple.com>
1482
1483         Part of https://bugs.webkit.org/show_bug.cgi?id=63674
1484         Get webkit to compile with USE(CFNETWORK) enabled on Mac
1485
1486         Reviewed by David Kilzer.
1487
1488         No new tests because no change in functionality and option is not enabled on Mac.
1489
1490         * platform/network/cf/AuthenticationCF.h: Just use AuthenticationMac.h instead of having
1491         Mac-specific declarations here.
1492         * platform/network/cf/CredentialStorageCFNet.cpp:
1493         * platform/network/mac/AuthenticationMac.h:
1494
1495 2011-07-15  Pratik Solanki  <psolanki@apple.com>
1496
1497         Part of https://bugs.webkit.org/show_bug.cgi?id=63674
1498         Get webkit to compile with USE(CFNETWORK) enabled on Mac
1499
1500         Reviewed by David Kilzer.
1501
1502         Get LoaderRunLoop to work on Mac when USE(CFNETWORK) is enabled. Although we could use the
1503         main run loop, it's better to have a separate thread handling the loads so that it can work
1504         in parallel to the main thread. This is similar to what NSURLConnection does for us
1505         internally when we use the NS APIs.
1506
1507         No new tests because no change in functionality and option is not enabled on Mac.
1508
1509         * platform/network/cf/LoaderRunLoopCF.cpp:
1510         (WebCore::runLoaderThread): Create an autorelease pool for objc code that might be called in
1511         the run loop.
1512         (WebCore::loaderRunLoop):
1513         * platform/network/cf/LoaderRunLoopCF.h:
1514
1515 2011-07-15  Xiaomei Ji  <xji@chromium.org>
1516
1517         --webkit-visual-word crash on mixed editability
1518         https://bugs.webkit.org/show_bug.cgi?id=61978
1519
1520         --webkit-visual-word crashes (VisiblePosition.getInlineBoxAndOffset could return null box)
1521         https://bugs.webkit.org/show_bug.cgi?id=62814
1522
1523         Reviewed by Ryosuke Niwa.
1524
1525         Replace previousWordPosition/nextWordPosition with previousBoundary/nextBoundary which do
1526         not honor editable bounary. Honor editable boundary as the last stage of leftWordPosition
1527         and rightWordPosition.
1528
1529         Check previousBoundary/nextBoundary against NULL.  Have a static function to encapsulate the
1530         usage of getInlineBoxAndOffset and check the visible position is not NULL before passing to 
1531         getInlineBoxAndOffset. Check the box returned from getInlineBoxAndOffset is not NULL before
1532         accessing.
1533
1534         Test: editing/selection/move-by-word-visually-null-box.html
1535
1536         * editing/visible_units.cpp:
1537         (WebCore::positionIsInBox):
1538         (WebCore::previousWordBreakInBoxInsideBlockWithSameDirectionality):
1539         (WebCore::lastWordBreakInBox):
1540         (WebCore::positionIsVisuallyOrderedInBoxInBlockWithDifferentDirectionality):
1541         (WebCore::nextWordBreakInBoxInsideBlockWithDifferentDirectionality):
1542         (WebCore::positionIsInsideBox):
1543         (WebCore::leftWordPositionAcrossBoundary):
1544         (WebCore::rightWordPositionAcrossBoundary):
1545         (WebCore::leftWordPosition):
1546         (WebCore::rightWordPosition):
1547
1548 2011-07-15  Pratik Solanki  <psolanki@apple.com>
1549
1550         Remove unncessary creation of connectionProperties dictionary
1551         https://bugs.webkit.org/show_bug.cgi?id=63958
1552
1553         Reviewed by Alexey Proskuryakov.
1554
1555         No new tests because no change in functionality.
1556
1557         * platform/network/cf/ResourceHandleCFNet.cpp:
1558         (WebCore::ResourceHandle::loadResourceSynchronously):
1559
1560 2011-07-15  Pavel Feldman  <pfeldman@google.com>
1561
1562         Web Inspector: Focusing on another node while editing CSS property does not update styles
1563         https://bugs.webkit.org/show_bug.cgi?id=64283
1564
1565         Reviewed by Yury Semikhatsky.
1566
1567         Test: inspector/styles/styles-change-node-while-editing.html
1568
1569         * inspector/front-end/CSSStyleModel.js:
1570         (WebInspector.CSSProperty.prototype.setText):
1571         (WebInspector.CSSProperty.prototype.setText.callback):
1572         * inspector/front-end/DOMAgent.js:
1573         (WebInspector.DOMAgent.prototype._inlineStyleInvalidated):
1574         (WebInspector.DOMDispatcher.prototype.inlineStyleInvalidated):
1575         * inspector/front-end/ElementsPanel.js:
1576         (WebInspector.ElementsPanel):
1577         (WebInspector.ElementsPanel.prototype._attributesUpdated):
1578         (WebInspector.ElementsPanel.prototype.updateStyles):
1579         * inspector/front-end/MetricsSidebarPane.js:
1580         (WebInspector.MetricsSidebarPane):
1581         (WebInspector.MetricsSidebarPane.prototype.update):
1582         (WebInspector.MetricsSidebarPane.prototype._innerUpdate.callback):
1583         (WebInspector.MetricsSidebarPane.prototype._innerUpdate.inlineStyleCallback):
1584         (WebInspector.MetricsSidebarPane.prototype._innerUpdate):
1585         (WebInspector.MetricsSidebarPane.prototype._styleSheetChanged):
1586         (WebInspector.MetricsSidebarPane.prototype._attributesUpdated):
1587         (WebInspector.MetricsSidebarPane.prototype.startEditing):
1588         (WebInspector.MetricsSidebarPane.prototype.editingEnded):
1589         * inspector/front-end/StylesSidebarPane.js:
1590         (WebInspector.StylesSidebarPane):
1591         (WebInspector.StylesSidebarPane.prototype.update):
1592         (WebInspector.StylesSidebarPane.prototype._innerUpdate.stylesCallback):
1593         (WebInspector.StylesSidebarPane.prototype._innerUpdate.computedStyleCallback):
1594         (WebInspector.StylesSidebarPane.prototype._innerUpdate):
1595         (WebInspector.StylesSidebarPane.prototype._styleSheetChanged):
1596         (WebInspector.StylesSidebarPane.prototype._attributesUpdated):
1597         (WebInspector.StylesSidebarPane.prototype._refreshUpdate):
1598         (WebInspector.StylesSidebarPane.prototype._rebuildUpdate):
1599         (WebInspector.StylesSidebarPane.prototype._nodeStylesUpdatedForTest):
1600         (WebInspector.StylesSidebarPane.prototype._toggleElementStatePane):
1601         (WebInspector.StylesSidebarPane.prototype._createElementStatePane.clickListener):
1602         (WebInspector.StylePropertyTreeElement.prototype):
1603         (WebInspector.StylePropertyTreeElement.prototype.event):
1604         (WebInspector.StylePropertyTreeElement.prototype.element.userInput.previousContent.context.moveDirection):
1605         (WebInspector.StylePropertyTreeElement.prototype.styleText.updateInterface.majorChange.isRevert):
1606
1607 2011-07-15  Mike Reed  <reed@google.com>
1608
1609         [skia] remove legacy draw-text-as-paths code, as skia now draws all text as text
1610         https://bugs.webkit.org/show_bug.cgi?id=64368
1611
1612         Reviewed by James Robinson.
1613
1614         * platform/graphics/chromium/FontChromiumWin.cpp:
1615         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
1616         * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
1617         (WebCore::FontPlatformData::RefCountedHFONT::~RefCountedHFONT):
1618         * platform/graphics/chromium/UniscribeHelper.cpp:
1619         (WebCore::UniscribeHelper::draw):
1620         * platform/graphics/skia/SkiaFontWin.cpp:
1621         (WebCore::skiaDrawText):
1622         (WebCore::setupPaintForFont):
1623         (WebCore::paintSkiaText):
1624         * platform/graphics/skia/SkiaFontWin.h:
1625
1626 2011-07-15  Piroska András  <Piroska.Andras@stud.u-szeged.hu>
1627
1628         Pixel difference in FEMorphology effect
1629         https://bugs.webkit.org/show_bug.cgi?id=63930
1630
1631         Reviewed by Zoltan Herczeg.
1632
1633         Using short-circuit evaluation in the setFilterEffectAttribute function
1634         was wrong. We should call both setRadius functions and evaluate the
1635         changes separately.
1636
1637         * svg/SVGFEMorphologyElement.cpp:
1638         (WebCore::SVGFEMorphologyElement::setFilterEffectAttribute):
1639
1640 2011-07-15  Jeff Miller  <jeffm@apple.com>
1641
1642         Fullscreen content doesn't use fullscreen controller on Windows
1643         https://bugs.webkit.org/show_bug.cgi?id=64540
1644         <rdar://problem/9510455>
1645
1646         Reviewed by Darin Adler.
1647
1648         RenderThemeWin needs to override extraFullScreenStyleSheet() to return
1649         the fullscreenQuickTime stylesheet.
1650
1651         Test added to fullscreen/video-controls-override.html.
1652
1653         * rendering/RenderThemeWin.cpp:
1654         (WebCore::RenderThemeWin::extraFullScreenStyleSheet): Added.
1655         * rendering/RenderThemeWin.h: Override extraFullScreenStyleSheet().
1656
1657 2011-07-15  Nikolas Zimmermann  <nzimmermann@rim.com>
1658
1659         Not reviewed. Fix build failure introduced in r91061.
1660
1661         * page/Console.cpp:
1662         (WebCore::Console::markTimeline): Remove argument name from unused parameter.
1663
1664 2011-07-15  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1665
1666         Upstream QtWebKit/N9 changes related to visibleContentRect
1667         https://bugs.webkit.org/show_bug.cgi?id=64589
1668
1669         Reviewed by Simon Hausmann.
1670
1671         Rename setActualVisibleContentRect to setFixedVisibleContentRect
1672         as that makes it more obvious that it is an override. It is also
1673         consistent with the setFixedLayout which is often used in
1674         conjunction with it.
1675
1676         Make visibleContentRect return the fixed value if set, and remove
1677         all calls to actualVisibleContentRect.
1678
1679         Also updated the documentation.
1680
1681         This is similar to what we have on our QtWebKit/N9 branch and is
1682         pretty well tested.
1683
1684         * platform/ScrollView.cpp:
1685         (WebCore::ScrollView::visibleContentRect):
1686         If a fixed visibleContentRect is set, return that.
1687         Remove the code returning the contents size when in
1688         paintsEntireContents mode as that is wrong and already
1689         ifdeffed out for EFL.
1690         (WebCore::ScrollView::setScrollPosition):
1691         Do not try to be smart and update the fixed visibleContentsRect
1692         automatically, as the embedder might ignore the scroll request
1693         for various reasons.
1694         * platform/ScrollView.h:
1695         (WebCore::ScrollView::setFixedVisibleContentRect):
1696         (WebCore::ScrollView::fixedVisibleContentRect):
1697
1698 2011-07-15  Mike West  <mkwst@chromium.org>
1699
1700         Web Inspector: Rename console.markTimeline() to console.timeStamp() for Firebug compatibility.
1701         https://bugs.webkit.org/show_bug.cgi?id=63317
1702
1703         Reviewed by Pavel Feldman.
1704
1705         Test: inspector/timeline/timeline-time-stamp.html
1706
1707         * inspector/InspectorConsoleInstrumentation.h:
1708         (WebCore::InspectorInstrumentation::consoleTimeStamp):
1709         * inspector/InspectorInstrumentation.cpp:
1710         (WebCore::InspectorInstrumentation::consoleTimeStampImpl):
1711         * inspector/InspectorInstrumentation.h:
1712         * inspector/InspectorTimelineAgent.cpp:
1713         (WebCore::InspectorTimelineAgent::didTimeStamp):
1714         * inspector/InspectorTimelineAgent.h:
1715         * inspector/TimelineRecordFactory.cpp:
1716         (WebCore::TimelineRecordFactory::createTimeStampData):
1717         * inspector/TimelineRecordFactory.h:
1718         * inspector/front-end/TimelineAgent.js:
1719         * inspector/front-end/TimelineOverviewPane.js:
1720         (WebInspector.TimelineOverviewPane.prototype.update.markPercentagesForRecord):
1721         (WebInspector.TimelineOverviewPane.prototype.update):
1722         * inspector/front-end/TimelinePanel.js:
1723         (WebInspector.TimelinePanel):
1724         (WebInspector.TimelinePanel.prototype.get _recordStyles):
1725         (WebInspector.TimelinePanel.prototype._updateEventDividers):
1726         (WebInspector.TimelinePanel.prototype._createEventDivider):
1727         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
1728         (WebInspector.TimelinePanel.prototype._clearPanel):
1729         (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails):
1730         * page/Console.cpp:
1731         (WebCore::Console::markTimeline):
1732         (WebCore::Console::timeStamp):
1733         * page/Console.h:
1734         * page/Console.idl:
1735
1736 2011-07-15  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1737
1738         LocalStorage: Changed the value type of ItemTable from TEXT to BLOB
1739         to avoid string truncation.
1740         This patch will also convert the exsisting ItemTable and perform
1741         the DATA MIGRATION job.
1742         https://bugs.webkit.org/show_bug.cgi?id=58762
1743
1744         Reviewed by Jeremy Orlow.
1745
1746         Tests: manual-tests/localstorage-value-truncation.html
1747
1748         * manual-tests/localstorage-value-truncation.html: Added.
1749         Demostrate the testcase shown in bug 58762.
1750         * platform/sql/SQLiteStatement.cpp:
1751         (WebCore::SQLiteStatement::isColumnDeclearedAsBlob):
1752         Test if the pre-defined type of column is BLOB.
1753         * platform/sql/SQLiteStatement.h:
1754         * storage/StorageAreaSync.cpp:
1755         Change the localStorage value type from Text to BLOB to avoid the
1756         value string truncation at \x00.
1757         (WebCore::StorageAreaSync::openDatabase):
1758         Change the database structure, use BLOB to replace the TEXT type of
1759         value segment in ItemTable.
1760         (WebCore::StorageAreaSync::migrateItemTableIfNeeded):
1761         Migrate the ItemTable if the pre-defined type of value is TEXT.
1762         (WebCore::StorageAreaSync::performImport):
1763         Use getColumnBlobAsString() to import the BLOB value.
1764         (WebCore::StorageAreaSync::sync):
1765         Use bindBlob() to bind value string to the SQLiteStatement for the
1766         database execution.
1767         * storage/StorageAreaSync.h:
1768
1769 2011-07-15  Kentaro Hara  <haraken@google.com>
1770
1771         Clear the content of a search input form when 'Escape' is pressed.
1772         https://bugs.webkit.org/show_bug.cgi?id=51897
1773
1774         This change added handleKeydownEvent() to a search input form,
1775         which clears the form and triggers a 'search' event when 'Escape' is pressed.
1776
1777         Reviewed by Kent Tamura.
1778
1779         Test: fast/forms/input-search-press-escape-key.html
1780
1781         * html/SearchInputType.cpp:
1782         (WebCore::SearchInputType::handleKeydownEvent):
1783         * html/SearchInputType.h:
1784
1785 2011-07-15  Alexandru Chiculita  <achicu@adobe.com>
1786
1787         Move useRepaintBounds from RenderBlock::layoutRunsAndFloats to LineLayoutState
1788         https://bugs.webkit.org/show_bug.cgi?id=64360
1789
1790         Reviewed by Hajime Morita.
1791
1792         No new tests needed because the patch is just a refactor.
1793
1794         * rendering/RenderBlock.h:
1795         * rendering/RenderBlockLineLayout.cpp:
1796         (WebCore::LineLayoutState::LineLayoutState):
1797         (WebCore::LineLayoutState::usesRepaintBounds):
1798         (WebCore::LineLayoutState::setRepaintRange):
1799         (WebCore::LineLayoutState::updateRepaintRangeFromBox):
1800         (WebCore::RenderBlock::layoutRunsAndFloats):
1801         (WebCore::RenderBlock::determineStartPosition):
1802
1803 2011-07-14  MORITA Hajime  <morrita@google.com>
1804
1805         ExceptionCodePlaceholder should have its own ExceptionCodePlaceholder.cpp file
1806         https://bugs.webkit.org/show_bug.cgi?id=64503
1807
1808         Reviewed by Darin Adler.
1809
1810         No new tests. Just a file reorg.
1811
1812         * CMakeLists.txt:
1813         * GNUmakefile.list.am:
1814         * WebCore.gypi:
1815         * WebCore.pro:
1816         * WebCore.vcproj/WebCore.vcproj:
1817         * WebCore.xcodeproj/project.pbxproj:
1818         * dom/DOMAllInOne.cpp:
1819         * dom/ExceptionCodePlaceholder.cpp: Added.
1820         (WebCore::NoExceptionAssertionChecker::NoExceptionAssertionChecker):
1821         (WebCore::NoExceptionAssertionChecker::~NoExceptionAssertionChecker):
1822         * dom/ExceptionCodePlaceholder.h: Removed NoExceptionAssertionChecker::m_function, which is loonger used.
1823
1824 2011-07-14  Mark Pilgrim  <pilgrim@chromium.org>
1825
1826         Remove LegacyDefaultOptionalArguments flag from WebGL
1827         https://bugs.webkit.org/show_bug.cgi?id=64549
1828
1829         Reviewed by Kenneth Russell.
1830
1831         * html/canvas/WebGLRenderingContext.idl:
1832
1833 2011-07-14  Yuta Kitamura  <yutak@chromium.org>
1834
1835         WebSocket: Introduce pywebsocket-0.6b2
1836         https://bugs.webkit.org/show_bug.cgi?id=64534
1837
1838         Reviewed by Kent Tamura.
1839
1840         pywebsocket now accepts "Sec-WebSocket-Version: 8" as required in hybi-10 specification.
1841
1842         No new functionality is added, thus no new tests. Existing WebSocket tests should keep passing.
1843
1844         * websockets/WebSocketHandshake.cpp:
1845         (WebCore::WebSocketHandshake::clientHandshakeMessage):
1846         (WebCore::WebSocketHandshake::clientHandshakeRequest):
1847
1848 2011-07-14  SravanKumar S  <sravan.ken@gmail.com>
1849
1850         Replaced isChecked() with shouldAppearChecked() in HTMLInputElement.cpp along with all the corresponding function calls.
1851         https://bugs.webkit.org/show_bug.cgi?id=54476
1852
1853         Reviewed by Darin Adler.
1854
1855         No new tests, since existing fast/dom/HTMLInputElement/checked-pseudo-selector.html verifies the patch.
1856
1857         * accessibility/AccessibilityRenderObject.cpp:
1858         (WebCore::AccessibilityRenderObject::isChecked):
1859         * css/CSSStyleSelector.cpp:
1860         (WebCore::CSSStyleSelector::canShareStyleWithControl):
1861         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
1862         * dom/CheckedRadioButtons.cpp:
1863         (WebCore::CheckedRadioButtons::removeButton):
1864         * html/HTMLInputElement.cpp:
1865         (WebCore::HTMLInputElement::shouldAppearChecked):
1866         * html/HTMLInputElement.h: Removed virtual declaration from shouldAppearChecked().
1867         * rendering/RenderTheme.cpp:
1868         (WebCore::RenderTheme::isChecked):
1869
1870 2011-07-14  Kenichi Ishibashi  <bashi@chromium.org>
1871
1872         <input form="x"> should not associate the input with any forms when there is no  form with id="x"
1873         https://bugs.webkit.org/show_bug.cgi?id=64509
1874
1875         Don't set form owner when a form associated element has the form attribute but there is no such form element.
1876
1877         Reviewed by Kent Tamura.
1878
1879         Test: fast/forms/form-attribute-nonexistence-form-id.html
1880
1881         * dom/Document.cpp:
1882         (WebCore::Document::resetFormElementsOwner): Removed the argument which is no longer needed.
1883         * dom/Document.h: Ditto.
1884         * html/FormAssociatedElement.cpp:
1885         (WebCore::FormAssociatedElement::insertedIntoTree): Resets m_form whenever the element has the form attribute.
1886         (WebCore::FormAssociatedElement::resetFormOwner): Don't set m_form when there is no form element which has the given id.
1887         (WebCore::FormAssociatedElement::formAttributeChanged): Removed the argument of resetFormOwner().
1888         * html/FormAssociatedElement.h: Ditto.
1889         * html/HTMLFormElement.cpp: Ditto.
1890         (WebCore::HTMLFormElement::insertedIntoDocument):
1891         (WebCore::HTMLFormElement::removedFromDocument):
1892
1893 2011-07-14  Kent Tamura  <tkent@chromium.org>
1894
1895         REGRESSION (r90809): Setting a checkbox's checked property, doesn't render as checked until app window loses focus
1896         https://bugs.webkit.org/show_bug.cgi?id=64537
1897
1898         Reviewed by Darin Adler.
1899
1900         We stopped to call updateCheckedRadioButtons() for checkboxes
1901         since r90809, but we need to call RenderTheme::stateChanged(),
1902         which was in updateCheckedRadioButtons(), for checkboxes.
1903
1904         Tests: fast/forms/checkbox-appearance-change-by-checked-expected.html
1905                fast/forms/checkbox-appearance-change-by-checked.html
1906
1907         * html/HTMLInputElement.cpp: Move the RenderTheme::stateChanged() call
1908         from updateCheckedRadioButtons() to setChecked().
1909         (WebCore::HTMLInputElement::updateCheckedRadioButtons):
1910         (WebCore::HTMLInputElement::setChecked):
1911
1912 2011-07-14  Adam Barth  <abarth@webkit.org>
1913
1914         The beforeload event allows tracking URI changes in a frame
1915         https://bugs.webkit.org/show_bug.cgi?id=64482
1916
1917         Reviewed by Nate Chapin.
1918
1919         Tests: http/tests/security/beforeload-iframe-client-redirect.html
1920                http/tests/security/beforeload-iframe-server-redirect.html
1921
1922         Only dispatch the beforeload event for a frame if we haven't yet
1923         committed our first real load.  The URL that we send to our parent will
1924         be the same URL the parent seens in the src attribute.
1925
1926         * loader/FrameLoader.cpp:
1927         (WebCore::FrameLoader::loadWithDocumentLoader):
1928
1929 2011-07-14  Dan Bernstein  <mitz@apple.com>
1930
1931         LLVM Compiler build fix.
1932
1933         * css/CSSStyleApplyProperty.cpp:
1934         (WebCore::ApplyPropertyComputeLength::applyValue):
1935
1936 2011-07-14  Darin Adler  <darin@apple.com>
1937
1938         [Mac] Use [NSCursor operationNotAllowedCursor] for CSS no-drop as well as CSS not-allowed
1939         https://bugs.webkit.org/show_bug.cgi?id=64570
1940
1941         Reviewed by Alexey Proskuryakov.
1942
1943         Mac OS X documentation and usage makes it clear that this cursor is usually used for no-drop,
1944         and that it's also reasonable to use it for not-allowed.
1945
1946         * platform/mac/CursorMac.mm:
1947         (WebCore::Cursor::ensurePlatformCursor): Use [NSCursor operationNotAllowedCursor] for
1948         Cursor::NoDrop.
1949
1950 2011-07-14  Luke Macpherson   <macpherson@chromium.org>
1951
1952         Reviewed by Dimitri Glazkov.
1953
1954         Introduce templated compute length class in CSSStyleApplyProperty, and use to handle several CSS properties.
1955         https://bugs.webkit.org/show_bug.cgi?id=62957
1956
1957         No new tests / refactoring only.
1958
1959         * css/CSSPrimitiveValue.cpp:
1960         (WebCore::CSSPrimitiveValue::computeLength):
1961         Add computeLength function that returns unsigned short.
1962         * css/CSSStyleApplyProperty.cpp:
1963         (WebCore::ApplyPropertyComputeLength::ApplyPropertyComputeLength):
1964         Added class to handle computeLength based properties.
1965         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
1966         Initialize ApplyPropertyComputeLength for appropriate properties.
1967         * css/CSSStyleSelector.cpp:
1968         (WebCore::CSSStyleSelector::useSVGZoomRules):
1969         Make this a public member function instead of a private static function.
1970         (WebCore::CSSStyleSelector::applyProperty):
1971         Removed code now implemented in CSSStyleApplyProperty.
1972         (WebCore::CSSStyleSelector::setFontSize):
1973         Use new useSVGZoomRules function.
1974         * css/CSSStyleSelector.h:
1975         Add interface for useSVGZoomRules.
1976
1977 2011-07-14  Antti Koivisto  <antti@apple.com>
1978
1979         REGRESSION: Should not dispatch didFirstVisuallyNonEmptyLayout for the initial empty document
1980         https://bugs.webkit.org/show_bug.cgi?id=64557
1981
1982         Reviewed by Kenneth Rohde Christiansen.
1983
1984         Avoid sending didFirstVisuallyNonEmptyLayout for the initial empty document of the frame. The
1985         clients may not expect it and it doesn't make much sense in any case.
1986
1987         * page/FrameView.cpp:
1988         (WebCore::FrameView::performPostLayoutTasks):
1989
1990 2011-07-14  Jeffrey Pfau  <jpfau@apple.com>
1991
1992         Character reference parser for new XML parser
1993         https://bugs.webkit.org/show_bug.cgi?id=64398
1994
1995         Reviewed by Adam Barth.
1996
1997         Refactored out the HTML entity parser and added a common template for parsing character references.
1998
1999         * WebCore.xcodeproj/project.pbxproj:
2000         * html/parser/HTMLEntityParser.cpp:
2001         (WebCore::consumeHTMLEntity):
2002         * xml/parser/CharacterReferenceParserInlineMethods.h: Copied from Source/WebCore/html/parser/HTMLEntityParser.cpp.
2003         (WebCore::isHexDigit):
2004         (WebCore::unconsumeCharacters):
2005         (WebCore::consumeCharacterReference):
2006         * xml/parser/XMLCharacterReferenceParser.cpp: Added.
2007         (WebCore::consumeXMLCharacterReference):
2008         * xml/parser/XMLCharacterReferenceParser.h: Added.
2009
2010 2011-07-14  Ilya Tikhonovsky  <loislo@chromium.org>
2011
2012         Reviewed by Pavel Feldman.
2013
2014         Web Inspector: panel switching is too slow.
2015         https://bugs.webkit.org/show_bug.cgi?id=60959
2016
2017         * inspector/front-end/inspector.css:
2018         (.panel):
2019         (.panel.visible):
2020
2021 2011-07-14  Andrey Kosyakov  <caseq@chromium.org>
2022
2023         Web Inspector: remove more unused CSS from inspector.css
2024         https://bugs.webkit.org/show_bug.cgi?id=64529
2025
2026         Reviewed by Pavel Feldman.
2027
2028         * inspector/front-end/inspector.css:
2029
2030 2011-07-14  Ryosuke Niwa  <rniwa@webkit.org>
2031
2032         Move subtreeHasChanged from RenderTextControl to HTMLTextFormControlElement
2033         https://bugs.webkit.org/show_bug.cgi?id=64476
2034
2035         Reviewed by Kent Tamura.
2036
2037         Moved subtreeHasChanged from RenderTextControl, RenderTextControlSingleLine, and
2038         RenderTextControlMultiLine to HTMLTextFormControlElement, HTMLInputElement, and
2039         HTMLTextAreaElement. Also moved m_searchEventTimer and related functions from
2040         RenderTextSingleLine to SearchInputType.
2041
2042         * html/HTMLInputElement.cpp:
2043         (WebCore::HTMLInputElement::subtreeHasChanged): Moved from RenderTextControlSingleLine.
2044         (WebCore::HTMLInputElement::onSearch): Calls stopSearchEventTimer.
2045         * html/HTMLInputElement.h:
2046         * html/HTMLTextAreaElement.cpp:
2047         (WebCore::HTMLTextAreaElement::subtreeHasChanged): Moved from RenderTextMultiLine.
2048         * html/HTMLTextAreaElement.h:
2049         * html/HTMLTextFormControlElement.cpp:
2050         (WebCore::HTMLTextFormControlElement::defaultEventHandler): Calls subtreeHasChanged.
2051         (WebCore::HTMLTextFormControlElement::subtreeHasChanged): Added; calls respondToChangeByUser.
2052         * html/HTMLTextFormControlElement.h:
2053         * html/SearchInputType.cpp:
2054         (WebCore::SearchInputType::SearchInputType): Initializes m_searchEventTimer.
2055         (WebCore::SearchInputType::startSearchEventTimer): Moved from RenderTextControlSingleLine.
2056         (WebCore::SearchInputType::stopSearchEventTimer): Ditto.
2057         (WebCore::SearchInputType::searchEventTimerFired): Ditto.
2058         * html/SearchInputType.h:
2059         * html/TextFieldInputType.cpp:
2060         (WebCore::TextFieldInputType::handleBeforeTextInsertedEvent): Updated comment.
2061         * rendering/RenderTextControl.cpp:
2062         * rendering/RenderTextControl.h:
2063         (WebCore::RenderTextControl::respondToChangeByUser): Renamed from subtreeHasChanged.
2064         * rendering/RenderTextControlMultiLine.cpp:
2065         * rendering/RenderTextControlMultiLine.h:
2066         * rendering/RenderTextControlSingleLine.cpp:
2067         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine): No longer initializes
2068         m_searchEventTimer.
2069         * rendering/RenderTextControlSingleLine.h:
2070
2071 2011-07-14  Vsevolod Vlasov  <vsevik@chromium.org>
2072
2073         Move XML errors handling out from XMLDocumentParser (refactoring).
2074         https://bugs.webkit.org/show_bug.cgi?id=64305
2075
2076         XML errors handling logic is moved out from XMLDocumentParser to allow using it for XSLT error handling as well.
2077
2078         Reviewed by Adam Barth.
2079
2080         No tests needed as there is no new functionality added.
2081
2082         * CMakeLists.txt:
2083         * GNUmakefile.list.am:
2084         * WebCore.gypi:
2085         * WebCore.pro:
2086         * WebCore.vcproj/WebCore.vcproj:
2087         * WebCore.xcodeproj/project.pbxproj:
2088         * xml/XMLErrors.cpp: Added.
2089         (WebCore::XMLErrors::XMLErrors):
2090         (WebCore::XMLErrors::handleError):
2091         (WebCore::XMLErrors::appendErrorMessage):
2092         (WebCore::createXHTMLParserErrorHeader):
2093         (WebCore::XMLErrors::insertErrorMessageBlock):
2094         * xml/XMLErrors.h: Added.
2095         * xml/parser/XMLDocumentParser.cpp:
2096         (WebCore::XMLDocumentParser::pushCurrentNode):
2097         (WebCore::XMLDocumentParser::handleError):
2098         (WebCore::XMLDocumentParser::insertErrorMessageBlock):
2099         * xml/parser/XMLDocumentParser.h:
2100         * xml/parser/XMLDocumentParserLibxml2.cpp:
2101         (WebCore::PendingCallbacks::appendErrorCallback):
2102         (WebCore::XMLDocumentParser::XMLDocumentParser):
2103         (WebCore::XMLDocumentParser::doWrite):
2104         (WebCore::XMLDocumentParser::error):
2105         (WebCore::warningHandler):
2106         (WebCore::fatalErrorHandler):
2107         (WebCore::normalErrorHandler):
2108         * xml/parser/XMLDocumentParserQt.cpp:
2109         (WebCore::XMLDocumentParser::XMLDocumentParser):
2110         (WebCore::XMLDocumentParser::doWrite):
2111         (WebCore::XMLDocumentParser::doEnd):
2112         (WebCore::XMLDocumentParser::parse):
2113         (WebCore::XMLDocumentParser::parseStartElement):
2114         (WebCore::XMLDocumentParser::parseDtd):
2115
2116 2011-07-14  Vsevolod Vlasov  <vsevik@chromium.org>
2117
2118         Web Inspector: InspectorResourceAgent should generate unique identifier and save cachedResource for resources from memory cache.
2119         https://bugs.webkit.org/show_bug.cgi?id=64356
2120
2121         Reviewed by Yury Semikhatsky.
2122
2123         * inspector/Inspector.json:
2124         * inspector/InspectorInstrumentation.cpp:
2125         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
2126         * inspector/InspectorInstrumentation.h:
2127         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCache):
2128         * inspector/InspectorResourceAgent.cpp:
2129         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
2130         * inspector/InspectorResourceAgent.h:
2131         * inspector/front-end/NetworkManager.js:
2132         (WebInspector.NetworkManager.prototype.requestContent):
2133         (WebInspector.NetworkDispatcher):
2134         (WebInspector.NetworkDispatcher.prototype.resourceLoadedFromMemoryCache):
2135         (WebInspector.NetworkDispatcher.prototype._appendRedirect):
2136         * inspector/front-end/NetworkPanel.js:
2137         (WebInspector.NetworkLogView.prototype._frameNavigated):
2138         * loader/FrameLoader.cpp:
2139         (WebCore::FrameLoader::loadedResourceFromMemoryCache):
2140         * loader/FrameLoader.h:
2141
2142 2011-07-14  Tim Horton  <timothy_horton@apple.com>
2143
2144         Clear SVGElementInstance's children immediately upon detachment
2145         https://bugs.webkit.org/show_bug.cgi?id=63739
2146         <rdar://problem/9705708>
2147
2148         Reviewed by Nikolas Zimmermann.
2149
2150         In addition to clearing the instance's children in the destructor,
2151         clear them when the instance is detached from its <use>. This way,
2152         we won't attempt to use them after we're detached but before the
2153         destructor has been called.
2154
2155         Test: svg/custom/use-crash-using-children-before-destroy.svg
2156
2157         * svg/SVGElementInstance.cpp:
2158         (WebCore::SVGElementInstance::~SVGElementInstance):
2159         (WebCore::SVGElementInstance::clearChildren):
2160         * svg/SVGElementInstance.h:
2161         * svg/SVGUseElement.cpp:
2162         (WebCore::SVGUseElement::detachInstance):
2163
2164 2011-07-14  Nate Chapin  <japhet@chromium.org>
2165
2166         Don't skip custom cursors if an Image* is null,
2167         since this can lead to a non-custom Cursor flickering 
2168         back in when the custom cursor hasn't finished loading yet.
2169         https://bugs.webkit.org/show_bug.cgi?id=64321
2170
2171         Reviewed by Darin Fisher.
2172
2173         Manual test, since we're testing visual flickering.
2174
2175         * manual-tests/canvas-cursor.html: Added.
2176         * page/EventHandler.cpp:
2177         (WebCore::EventHandler::selectCursor):
2178         * platform/Cursor.cpp:
2179         (WebCore::determineHotSpot):
2180
2181 2011-07-14  Young Han Lee  <joybro@company100.net>
2182
2183         Reviewed by Dirk Schulze.
2184
2185         REGRESSION (r89774): svg/W3C-SVG-1.1/animate-elem-82-t.svg hits assertion failure.
2186         https://bugs.webkit.org/show_bug.cgi?id=63911
2187
2188         Some functions assumed calculateKeyTimesIndex() does not return the last index of
2189         the keyTimes, but it would be right behavior for calculateKeyTimesIndex() when it
2190         accepts 1 as the percent argument.
2191
2192         To avoid the assumption, and for more efficiency, this patch allows the functions
2193         using calculateKeyTimesIndex() to return early when it accepts 1 as the percent argument.
2194         These functions have always returned the last element of the corresponding vector
2195         in that situation.
2196
2197         * svg/SVGAnimationElement.cpp:
2198         (WebCore::SVGAnimationElement::calculatePercentFromKeyPoints):
2199         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
2200
2201 2011-07-14  Andrey Kosyakov  <caseq@chromium.org>
2202
2203         Web Inspector: remove more dead code
2204         https://bugs.webkit.org/show_bug.cgi?id=64524
2205
2206         Reviewed by Yury Semikhatsky.
2207
2208         * WebCore.gypi:
2209         * inspector/front-end/SummaryBar.js: Removed.
2210         * inspector/front-end/WebKit.qrc:
2211         * inspector/front-end/inspector.css:
2212         * inspector/front-end/inspector.html:
2213
2214 2011-07-14  Peter Varga  <pvarga@webkit.org>
2215
2216         [Qt][V8] Build fix after r90830.
2217
2218         Reviewed by Csaba Osztrogonác.
2219
2220         The histogramEnumeration() function isn't available from the Qt port's
2221         PlatformBridge.h because this function is Chromium specific.
2222         Since the http://trac.webkit.org/changeset/90830 change we need to
2223         guard the usage of the histogramEnumeration() function.
2224
2225         No new tests needed.
2226
2227         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
2228         (WebCore::V8InspectorFrontendHost::recordActionTakenCallback):
2229         (WebCore::V8InspectorFrontendHost::recordPanelShownCallback):
2230         (WebCore::V8InspectorFrontendHost::recordSettingChangedCallback):
2231
2232 2011-07-14  Yury Semikhatsky  <yurys@chromium.org>
2233
2234         Web Inspector: show only Console and Scripts panels in shared worker inspector front-end
2235         https://bugs.webkit.org/show_bug.cgi?id=64519
2236
2237         Reviewed by Pavel Feldman.
2238
2239         * inspector/front-end/WorkerManager.js:
2240         (WebInspector.WorkerManager):
2241         (WebInspector.WorkerManager.isWorkerFrontend):
2242         (WebInspector.WorkerManager.isSharedWorkerFrontend):
2243         (WebInspector.WorkerManager.prototype._openInspectorWindow):
2244         (WebInspector.DedicatedWorkerMessageForwarder):
2245
2246 2011-07-14  MORITA Hajime  <morrita@google.com>
2247
2248         Unreviewed, rolling out r90976, r90981, and r90985.
2249         http://trac.webkit.org/changeset/90976
2250         http://trac.webkit.org/changeset/90981
2251         http://trac.webkit.org/changeset/90985
2252         https://bugs.webkit.org/show_bug.cgi?id=64251
2253
2254         build break
2255
2256         * WebCore.exp.in:
2257         * dom/NodeRenderingContext.cpp:
2258         (WebCore::NodeRenderingContext::NodeRenderingContext):
2259         (WebCore::NodeRenderingContext::nextRenderer):
2260         (WebCore::NodeRenderingContext::previousRenderer):
2261         * dom/NodeRenderingContext.h:
2262         * dom/ShadowContentElement.cpp:
2263         (WebCore::ShadowContentElement::attach):
2264         (WebCore::ShadowContentElement::detach):
2265         * dom/ShadowContentElement.h:
2266         * dom/ShadowContentSelector.cpp:
2267         (WebCore::ShadowContentSelector::ShadowContentSelector):
2268         (WebCore::ShadowContentSelector::selectInclusion):
2269         (WebCore::ShadowContentSelector::willAttachContentFor):
2270         (WebCore::ShadowContentSelector::didAttachContent):
2271         (WebCore::ShadowContentSelector::activeElement):
2272         * dom/ShadowContentSelector.h:
2273         * dom/ShadowRoot.cpp:
2274         (WebCore::ShadowRoot::~ShadowRoot):
2275         (WebCore::ShadowRoot::activeContentElement):
2276         * dom/ShadowRoot.h:
2277         * testing/Internals.cpp:
2278         * testing/Internals.h:
2279         * testing/Internals.idl:
2280
2281 2011-07-13  Ryosuke Niwa  <rniwa@webkit.org>
2282
2283         Move forwardEvent from RenderTextControl to HTMLTextFormControlElement
2284         https://bugs.webkit.org/show_bug.cgi?id=64475
2285
2286         Reviewed by Kent Tamura.
2287
2288         Moved forwardEvent from RenderTextControl, RenderTextControlSingleLine, and RenderTextControlMultiLine
2289         to HTMLTextFormControlElement, HTMLInputElement, and HTMLTextAreaElement.
2290
2291         This removes the last dependency on Event.h and EventNames.h in the cpp files for the above render
2292         objects classes.
2293
2294         * html/HTMLTextAreaElement.cpp:
2295         (WebCore::HTMLTextAreaElement::defaultEventHandler):
2296         * html/HTMLTextFormControlElement.cpp:
2297         (WebCore::HTMLTextFormControlElement::forwardEvent):
2298         * html/HTMLTextFormControlElement.h:
2299         * html/TextFieldInputType.cpp:
2300         (WebCore::TextFieldInputType::forwardEvent):
2301         * rendering/RenderTextControl.cpp:
2302         * rendering/RenderTextControl.h:
2303         * rendering/RenderTextControlMultiLine.cpp:
2304         * rendering/RenderTextControlMultiLine.h:
2305         * rendering/RenderTextControlSingleLine.cpp:
2306         * rendering/RenderTextControlSingleLine.h:
2307
2308 2011-07-13  Ilya Tikhonovsky  <loislo@chromium.org>
2309
2310         Web Inspector: if you rename an element into the INPUT element the browser will crash.
2311         https://bugs.webkit.org/show_bug.cgi?id=64292
2312
2313         Reviewed by Joseph Pecoraro.
2314
2315         * inspector/InspectorDOMAgent.cpp:
2316         (WebCore::InspectorDOMAgent::setNodeName):
2317         Unnecessary function call copyNonAttributeProperties was removed.
2318
2319 2011-07-13  Yuta Kitamura  <yutak@chromium.org>
2320
2321         WebSocket: Implement hybi handshake
2322         https://bugs.webkit.org/show_bug.cgi?id=64344
2323
2324         Reviewed by Kent Tamura.
2325
2326         Implement WebSocket handshake which is described at
2327         <http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10#section-5.1>.
2328
2329         Notable differences from hixie-76 protocol are:
2330         - Challenge-response scheme has been changed dramatically.
2331         - Servers do not send Sec-WebSocket-Location and Sec-WebSocket-Origin anymore.
2332         - The value of "Upgrade" header has been changed to "websocket" (lower-case only).
2333         - "Origin" header in client's request is renamed to "Sec-WebSocket-Origin".
2334
2335         New tests: http/tests/websocket/tests/hybi/handshake-fail-by-extensions-header.html
2336                    http/tests/websocket/tests/hybi/handshake-fail-by-no-accept-header.html
2337                    http/tests/websocket/tests/hybi/handshake-fail-by-wrong-accept-header.html
2338
2339         Note: Tests under hybi/ directory (including the new ones) are skipped and cannot be enabled
2340         yet, because pywebsocket does not accept requests from half-baked client implementation
2341         (i.e. hybi handshake + hixie-76 framing). They will be unskipped when hybi framing is landed
2342         in WebCore.
2343
2344         * websockets/WebSocketHandshake.cpp:
2345         Functions and members only used for hixie-76 handshake are renamed so that they are not confused
2346         with hybi-10's ones.
2347         (WebCore::generateHixie76SecWebSocketKey):
2348         (WebCore::generateHixie76Key3):
2349         (WebCore::generateHixie76ExpectedChallengeResponse):
2350         (WebCore::generateSecWebSocketKey):
2351         Generates a value for Sec-WebSocket-Key as stated in hybi-10.
2352         (WebCore::getExpectedWebSocketAccept):
2353         Calculates the expected value of Sec-WebSocket-Accept.
2354         (WebCore::WebSocketHandshake::WebSocketHandshake):
2355         (WebCore::WebSocketHandshake::clientHandshakeMessage):
2356         (WebCore::WebSocketHandshake::clientHandshakeRequest):
2357         (WebCore::WebSocketHandshake::readServerHandshake):
2358         (WebCore::WebSocketHandshake::serverWebSocketAccept):
2359         (WebCore::WebSocketHandshake::serverWebSocketExtensions):
2360         (WebCore::WebSocketHandshake::checkResponseHeaders):
2361         * websockets/WebSocketHandshake.h:
2362
2363 2011-07-13  MORITA Hajime  <morrita@google.com>
2364
2365         [ShadowContentElement] forwarded node should be able to access its hosting content element.
2366         https://bugs.webkit.org/show_bug.cgi?id=64251
2367         
2368         Reviewed by Dimitri Glazkov.
2369
2370         - Introduced ShadowInclusionSet to manage included nodes to its includer content element.
2371           ShadowInclusionSet instance is owned by ShadowRoot.
2372         - Updated the set on inclusion list changes.
2373         - Used the set to retrieve the content element of NodeRenderingContext.
2374         
2375         There are also related refactoring and cleanup:
2376         - Renamed NodeRenderingContext::m_contentElement to m_includer
2377         - ShadowContentSelector::m_activeElement is no longer used, thus removed.
2378         
2379         Test: fast/dom/shadow/content-element-includer.html
2380
2381         * WebCore.exp.in:
2382         * dom/NodeRenderingContext.cpp:
2383         (WebCore::NodeRenderingContext::NodeRenderingContext):
2384         (WebCore::NodeRenderingContext::nextRenderer):
2385         (WebCore::NodeRenderingContext::previousRenderer):
2386         * dom/NodeRenderingContext.h:
2387         (WebCore::NodeRenderingContext::includer): 
2388         * dom/ShadowContentElement.cpp:
2389         (WebCore::removeFromSet): Added
2390         (WebCore::addToSet): Added
2391         (WebCore::ShadowContentElement::attach):
2392         (WebCore::ShadowContentElement::detach):
2393         * dom/ShadowContentElement.h:
2394         (WebCore::ShadowInclusionSet::add):
2395         (WebCore::ShadowInclusionSet::remove):
2396         (WebCore::ShadowInclusionSet::isEmpty):
2397         (WebCore::ShadowInclusionSet::Translator::hash):
2398         (WebCore::ShadowInclusionSet::Translator::equal):
2399         (WebCore::ShadowInclusionSet::Hash::hash):
2400         (WebCore::ShadowInclusionSet::Hash::equal):
2401         (WebCore::ShadowInclusionSet::find):
2402         * dom/ShadowContentSelector.cpp:
2403         (WebCore::ShadowContentSelector::ShadowContentSelector):
2404         (WebCore::ShadowContentSelector::selectInclusion):
2405         * dom/ShadowContentSelector.h:
2406         * dom/ShadowRoot.cpp:
2407         (WebCore::ShadowRoot::~ShadowRoot):
2408         (WebCore::ShadowRoot::includerFor): Replaced activeElement()
2409         (WebCore::ShadowRoot::inclusions): Added
2410         (WebCore::ShadowRoot::ensureInclusions): Added
2411         * dom/ShadowRoot.h:
2412         (WebCore::toShadowRoot):
2413         * testing/Internals.cpp:
2414         (WebCore::Internals::includerFor):
2415         * testing/Internals.h:
2416         * testing/Internals.idl:
2417
2418 2011-07-12  Dominic Cooney  <dominicc@chromium.org>
2419
2420         Raise if dispatchEvent dispatches an event that is being dispatched
2421         https://bugs.webkit.org/show_bug.cgi?id=64150
2422
2423         Reviewed by Dimitri Glazkov.
2424
2425         Spec: http://www.w3.org/TR/DOM-Level-3-Events/#events-EventTarget-dispatchEvent
2426
2427         Test: fast/events/dispatch-event-being-dispatched.html
2428
2429         * dom/Event.h:
2430         (WebCore::Event::isBeingDispatched): Added.
2431         * dom/EventException.h:
2432         * dom/EventException.idl: Add DISPATCH_REQUEST_ERR.
2433         * dom/EventTarget.cpp:
2434         (WebCore::EventTarget::dispatchEvent): Raise if being dispatched.
2435         * dom/ExceptionCode.cpp: Add gunk for DISPATCH_REQUEST_ERR.
2436
2437 2011-07-13  Kent Tamura  <tkent@chromium.org>
2438
2439         Implement text field placeholders using shadow DOM
2440         https://bugs.webkit.org/show_bug.cgi?id=64253
2441
2442         Reviewed by Dimitri Glazkov.
2443
2444         Represents a placeholder text as a shadow element, and its
2445         visibility is controlled by 'visibility' CSS property.
2446
2447         This patch removes all of existing code about placeholder from
2448         RenderTextControl*. RenderTextControl* have only small code about
2449         placeholder layout.
2450
2451         Also, this patch removes INPUT_PLACEHOLDER legacy pseudo ID, and
2452         the placeholder style uses Element::shadowPseudoId().
2453
2454         This fixes the following regressions:
2455         - https://bugs.webkit.org/show_bug.cgi?id=51290
2456         - https://bugs.webkit.org/show_bug.cgi?id=54797
2457         - https://bugs.webkit.org/show_bug.cgi?id=54814
2458         - https://bugs.webkit.org/show_bug.cgi?id=63367
2459
2460         Test: fast/forms/textarea-placeholder-wrapping.html
2461
2462         * css/CSSSelector.cpp: Remove INPUT_PLACEHOLDER legacy pseudo ID.
2463         (WebCore::CSSSelector::pseudoId):
2464         (WebCore::nameToPseudoTypeMap):
2465         (WebCore::CSSSelector::extractPseudoType):
2466         * css/CSSSelector.h: ditto.
2467         * css/html.css:
2468         (::-webkit-input-placeholder): Added. This contains properties
2469         common in <input> and <textarea>. Some properties have !important
2470         so that a stylesheet specified by a page author won't break
2471         WebKit's assumption.
2472         (input::-webkit-input-placeholder, isindex::-webkit-input-placeholder):
2473          Added the default style for <input> placeholders.
2474         * html/HTMLInputElement.cpp:
2475         (WebCore::HTMLInputElement::placeholderElement): Delegate to an InputType.
2476         (WebCore::HTMLInputElement::updatePlaceholderText): ditto.
2477         * html/HTMLInputElement.h: Declare placeholderElement() and updatePlaceholderText().
2478         * html/HTMLTextAreaElement.cpp:
2479         (WebCore::HTMLTextAreaElement::createRenderer):
2480         Remove the 'placeholderVisible' argument.
2481         (WebCore::HTMLTextAreaElement::placeholderElement): Added.
2482         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
2483          Added. This creates, deletes, or updates the placeholder element.
2484         * html/HTMLTextAreaElement.h:
2485         - Declare placeholderElement() and updatePlaceholderText().
2486         - Add m_placeholder.
2487         * html/HTMLTextFormControlElement.cpp:
2488         (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
2489         Update the placeholder element and 'visibility' CSS property,
2490         instead of delegating the job to a renderer.
2491         * html/HTMLTextFormControlElement.h:
2492         Declare two pure virtual functions: placeholderElement() and updatePlaceholderText().
2493         * html/InputType.cpp:
2494         (WebCore::InputType::placeholderElement): Add an empty implementation.
2495         (WebCore::InputType::updatePlaceholderText): Add an empty implementation.
2496         * html/InputType.h: Declare placeholderElement() and updatePlaceholderText().
2497         * html/TextFieldInputType.cpp:
2498         (WebCore::TextFieldInputType::createRenderer):
2499         Remove the 'placeholderVisible' argument.
2500         (WebCore::TextFieldInputType::placeholderElement): Added.
2501         (WebCore::TextFieldInputType::destroyShadowSubtree): Deletes m_placeholder.
2502         (WebCore::TextFieldInputType::updatePlaceholderText):
2503          Added. This creates, deletes, or updates the placeholder element.
2504         * html/TextFieldInputType.h:
2505         - Declare placeholderElement() and updatePlaceholderText().
2506         - Add m_placeholder.
2507         * rendering/RenderTextControl.cpp:
2508         (WebCore::RenderTextControl::RenderTextControl):
2509         Remove the 'placeholderVisible' argument.
2510         (WebCore::RenderTextControl::layoutSpecialExcludedChild):
2511         Excludes the placeholder renderer in order to avoid to secure a box for
2512         the placeholder.
2513         * rendering/RenderTextControl.h:
2514         - Remove declarations of removed functions.
2515         - Update the RenderTextControl signature.
2516         - Add layoutSpecialExcludedChild().
2517         * rendering/RenderTextControlMultiLine.cpp:
2518         (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
2519         Remove the 'placeholderVisible' argument.
2520         (WebCore::RenderTextControlMultiLine::layoutSpecialExcludedChild):
2521         Laying out the placeholder box so that it has correct width and location.
2522         * rendering/RenderTextControlMultiLine.h:
2523         - Remove declarations of removed functions.
2524         - Update the RenderTextControlMultiLine signature.
2525         - Add layoutSpecialExcludedChild().
2526         * rendering/RenderTextControlSingleLine.cpp:
2527         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
2528         Remove the 'placeholderVisible' argument.
2529         (WebCore::RenderTextControlSingleLine::layout):
2530         Laying out the placeholder box so that it has correct width and location.
2531         * rendering/RenderTextControlSingleLine.h:
2532         - Remove declarations of removed functions.
2533         - Update the RenderTextControlSingleLine signature.
2534         * rendering/style/RenderStyleConstants.h: Remove INPUT_PLACEHOLDER.
2535
2536 2011-07-13  James Simonsen  <simonjam@chromium.org>
2537
2538         Remove hack that forcefully prevents scripts from running in shadow SVG
2539         https://bugs.webkit.org/show_bug.cgi?id=64419
2540
2541         This hack was put in to prevent scripts from running in shadow SVG. This should never have
2542         happened, but did because we didn't parse <script> tags in SVG properly. This was fixed in
2543         r88584, so the hack is no longer needed.
2544
2545         No new tests since there is no change in functionality.
2546
2547         Reviewed by Tony Gentilcore.
2548
2549         * dom/ScriptElement.cpp:
2550         (WebCore::ScriptElement::prepareScript):
2551
2552 2011-07-13  Mihnea Ovidenie  <mihnea@adobe.com>
2553
2554         [CSSRegions] Parse -webkit-content-order property
2555         https://bugs.webkit.org/show_bug.cgi?id=63897
2556
2557         Reviewed by David Hyatt.
2558
2559         Test: fast/regions/webkit-content-order-parsing.html
2560
2561         * css/CSSComputedStyleDeclaration.cpp:
2562         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2563         * css/CSSParser.cpp:
2564         (WebCore::CSSParser::parseValue):
2565         * css/CSSPropertyNames.in:
2566         * css/CSSStyleSelector.cpp:
2567         (WebCore::CSSStyleSelector::applyProperty):
2568         * rendering/style/RenderStyle.cpp:
2569         (WebCore::RenderStyle::diff):
2570         * rendering/style/RenderStyle.h:
2571         (WebCore::InheritedFlags::regionIndex):
2572         (WebCore::InheritedFlags::setRegionIndex):
2573         (WebCore::InheritedFlags::initialRegionIndex):
2574         * rendering/style/StyleRareNonInheritedData.cpp:
2575         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2576         (WebCore::StyleRareNonInheritedData::operator==):
2577         * rendering/style/StyleRareNonInheritedData.h:
2578
2579 2011-07-13  James Robinson  <jamesr@chromium.org>
2580
2581         Reviewed by Kenneth Russell.
2582
2583         [chromium] Move draw implementation for ContentLayerChromium/ImageLayerChromium to the appropriate CCLayerImpl subclass
2584         https://bugs.webkit.org/show_bug.cgi?id=58833
2585
2586         Adds a TiledLayerChromium class to handle the tiling logic shared by ContentLayerChromium and ImageLayerChromium
2587         so that they can be siblings in the class hierarchy instead of children. Also adds a CCTiledLayerImpl to handle
2588         the drawing responsibilities for tiled layers.
2589
2590         TiledLayerChromium maintains a tiler, tiling options, and calculates the tiling transform. Subclasses are
2591         responsible for providing an appropriate texture updater implementation. CCTiledLayerImpl takes the tiler,
2592         tiling transform and layer properties and draws the layer.  Longer term it'd be better of the CCTiledLayerImpl
2593         owned the tiler and the TiledLayerChromium only owned an updater, but getting there will require changing the
2594         way tile eviction works.
2595
2596         * WebCore.gypi:
2597         * platform/graphics/chromium/ContentLayerChromium.cpp:
2598         (WebCore::ContentLayerChromium::ContentLayerChromium):
2599         (WebCore::ContentLayerChromium::paintContentsIfDirty):
2600         (WebCore::ContentLayerChromium::drawsContent):
2601         * platform/graphics/chromium/ContentLayerChromium.h:
2602         (WebCore::ContentLayerChromium::textureUpdater):
2603         * platform/graphics/chromium/ImageLayerChromium.cpp:
2604         (WebCore::ImageLayerChromium::ImageLayerChromium):
2605         (WebCore::ImageLayerChromium::cleanupResources):
2606         (WebCore::ImageLayerChromium::paintContentsIfDirty):
2607         (WebCore::ImageLayerChromium::textureUpdater):
2608         (WebCore::ImageLayerChromium::contentBounds):
2609         (WebCore::ImageLayerChromium::drawsContent):
2610         (WebCore::ImageLayerChromium::createTextureUpdaterIfNeeded):
2611         * platform/graphics/chromium/ImageLayerChromium.h:
2612         * platform/graphics/chromium/LayerChromium.cpp:
2613         (WebCore::LayerChromium::pushPropertiesTo):
2614         (WebCore::LayerChromium::ccLayerImpl):
2615         * platform/graphics/chromium/LayerChromium.h:
2616         * platform/graphics/chromium/LayerRendererChromium.cpp:
2617         (WebCore::LayerRendererChromium::drawRootLayer):
2618         * platform/graphics/chromium/LayerTilerChromium.cpp:
2619         (WebCore::LayerTilerChromium::updateRect):
2620         (WebCore::LayerTilerChromium::draw):
2621         (WebCore::LayerTilerChromium::drawTiles):
2622         * platform/graphics/chromium/LayerTilerChromium.h:
2623         * platform/graphics/chromium/TiledLayerChromium.cpp: Added.
2624         (WebCore::TiledLayerChromium::TiledLayerChromium):
2625         (WebCore::TiledLayerChromium::~TiledLayerChromium):
2626         (WebCore::TiledLayerChromium::createCCLayerImpl):
2627         (WebCore::TiledLayerChromium::cleanupResources):
2628         (WebCore::TiledLayerChromium::setLayerRenderer):
2629         (WebCore::TiledLayerChromium::updateTileSizeAndTilingOption):
2630         (WebCore::TiledLayerChromium::drawsContent):
2631         (WebCore::TiledLayerChromium::createTilerIfNeeded):
2632         (WebCore::TiledLayerChromium::updateCompositorResources):
2633         (WebCore::TiledLayerChromium::setTilingOption):
2634         (WebCore::TiledLayerChromium::setIsMask):
2635         (WebCore::TiledLayerChromium::tilingTransform):
2636         (WebCore::TiledLayerChromium::pushPropertiesTo):
2637         (WebCore::writeIndent):
2638         (WebCore::TiledLayerChromium::dumpLayerProperties):
2639         * platform/graphics/chromium/TiledLayerChromium.h: Added.
2640         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2641         (WebCore::CCLayerImpl::draw):
2642         * platform/graphics/chromium/cc/CCLayerImpl.h:
2643         (WebCore::CCLayerImpl::setDrawsContent):
2644         (WebCore::CCLayerImpl::drawsContent):
2645         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: Added.
2646         (WebCore::CCTiledLayerImpl::CCTiledLayerImpl):
2647         (WebCore::CCTiledLayerImpl::~CCTiledLayerImpl):
2648         (WebCore::CCTiledLayerImpl::draw):
2649         (WebCore::CCTiledLayerImpl::bindContentsTexture):
2650         (WebCore::CCTiledLayerImpl::dumpLayerProperties):
2651         * platform/graphics/chromium/cc/CCTiledLayerImpl.h: Added.
2652         (WebCore::CCTiledLayerImpl::create):
2653         (WebCore::CCTiledLayerImpl::setTilingTransform):
2654         (WebCore::CCTiledLayerImpl::setTiler):
2655
2656 2011-07-13  Julien Chaffraix  <jchaffraix@webkit.org>
2657
2658         Remove an unused bit in RenderObject
2659         https://bugs.webkit.org/show_bug.cgi?id=64485
2660
2661         Reviewed by Darin Adler.
2662
2663         No change in behavior so no new test.
2664
2665         * rendering/RenderObject.h: Removed a bit that was duplicated from RenderTableCell.
2666         However it was not used in RenderObject and RenderTableCell already packed this bit.
2667         We were lying in the number of used bits in RenderObject which was 33. This change
2668         brings us back to what was advertised.
2669
2670 2011-07-13  Simon Fraser  <simon.fraser@apple.com>
2671
2672         Fix non-debug builds.
2673
2674         * rendering/RenderLayerBacking.cpp:
2675         (WebCore::RenderLayerBacking::createGraphicsLayer):
2676
2677 2011-07-13  Vitaly Repeshko  <vitalyr@chromium.org>
2678
2679         [chromium] Fix mac build after r90949.
2680
2681         * bindings/v8/V8HiddenPropertyName.cpp:
2682         (WebCore::V8HiddenPropertyName::hiddenReferenceName):
2683         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
2684         (WebCore::toV8Object):
2685
2686 2011-07-13  Emil A Eklund  <eae@chromium.org>
2687
2688         Switch table rendering to to new layout types
2689         https://bugs.webkit.org/show_bug.cgi?id=64478
2690
2691         Reviewed by Eric Seidel.
2692
2693         No new tests, no new functionality.
2694
2695         * rendering/AutoTableLayout.cpp:
2696         * rendering/AutoTableLayout.h:
2697         * rendering/HitTestResult.cpp:
2698         * rendering/HitTestResult.h:
2699         * rendering/LayoutTypes.h:
2700         * rendering/RenderBlock.h:
2701         * rendering/RenderBoxModelObject.cpp:
2702         * rendering/RenderBoxModelObject.h:
2703         * rendering/RenderObject.h:
2704         * rendering/RenderTable.cpp:
2705         * rendering/RenderTable.h:
2706         * rendering/RenderTableCell.cpp:
2707         * rendering/RenderTableCell.h:
2708
2709 2011-07-13  Simon Fraser  <simon.fraser@apple.com>
2710
2711         Factor some GraphicsLayer creation code in RenderLayerBacking
2712         https://bugs.webkit.org/show_bug.cgi?id=64487
2713
2714         Reviewed by Sam Weinig.
2715
2716         Move the GraphicsLayer::create() calls into once place so that we
2717         don't have lots of #ifndef NDEBUG in various places, and can share
2718         more code in future.
2719         
2720         No behavior change, so no new tests.
2721
2722         * rendering/RenderLayerBacking.cpp:
2723         (WebCore::RenderLayerBacking::RenderLayerBacking):
2724         (WebCore::RenderLayerBacking::~RenderLayerBacking):
2725         (WebCore::RenderLayerBacking::createGraphicsLayer):
2726         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
2727         (WebCore::RenderLayerBacking::destroyGraphicsLayers):
2728         (WebCore::RenderLayerBacking::updateLayerTransform):
2729         (WebCore::RenderLayerBacking::updateClippingLayers):
2730         (WebCore::RenderLayerBacking::updateOverflowControlsLayers):
2731         (WebCore::RenderLayerBacking::updateForegroundLayer):
2732         (WebCore::RenderLayerBacking::updateMaskLayer):
2733         * rendering/RenderLayerBacking.h:
2734
2735 2011-07-13  Xan Lopez  <xlopez@igalia.com>
2736
2737         [GTK] Fix distcheck.
2738
2739         Reviewed by Martin Robinson.
2740
2741         * GNUmakefile.list.am: add missing files.
2742
2743 2011-07-13  James Robinson  <jamesr@chromium.org>
2744
2745         [chromium] No implementation defined for WTF::monotonicallyIncreasingTime
2746         https://bugs.webkit.org/show_bug.cgi?id=64420
2747
2748         Reviewed by Tony Gentilcore.
2749
2750         Removes some redundant time related code.
2751
2752         * platform/chromium/PlatformBridge.h:
2753         * platform/chromium/SystemTimeChromium.cpp:
2754         (WebCore::userIdleTime):
2755
2756 2011-07-13  Vitaly Repeshko  <vitalyr@chromium.org>
2757
2758         [V8] Avoid memory leaks with hidden references.
2759         https://bugs.webkit.org/show_bug.cgi?id=64467
2760
2761         Reviewed by Adam Barth.
2762
2763         We used to have growing arrays of hidden references associated
2764         with objects. The entries in this array had no keys and were never
2765         removed. This patch changes the interface to require a reference
2766         name. This way it's harder to leak an unbounded number of
2767         objects. Also it makes our wrapper objects one machine word
2768         smaller.
2769
2770         * bindings/scripts/CodeGeneratorV8.pm:
2771         (GenerateNormalAttrGetter): Started using new interface.
2772
2773         Interface changes:
2774         * bindings/v8/V8DOMWrapper.cpp:
2775         (WebCore::V8DOMWrapper::setNamedHiddenReference):
2776         (WebCore::V8DOMWrapper::setNamedHiddenWindowReference):
2777         * bindings/v8/V8DOMWrapper.h:
2778
2779         Added a helper to compute hidden reference names as V8 strings:
2780         * bindings/v8/V8HiddenPropertyName.cpp:
2781         (WebCore::V8HiddenPropertyName::hiddenReferenceName):
2782         * bindings/v8/V8HiddenPropertyName.h:
2783
2784         * bindings/v8/WrapperTypeInfo.h: Removed the hidden reference
2785         array internal field.
2786
2787         Update usages of hidden references:
2788         * bindings/v8/custom/V8CSSStyleSheetCustom.cpp:
2789         (WebCore::toV8):
2790         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
2791         (WebCore::toV8):
2792         * bindings/v8/custom/V8DOMTokenListCustom.cpp:
2793         (WebCore::toV8):
2794         * bindings/v8/custom/V8LocationCustom.cpp:
2795         (WebCore::toV8):
2796         * bindings/v8/custom/V8MessageChannelConstructor.cpp:
2797         (WebCore::V8MessageChannel::constructorCallback):
2798         * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
2799         (WebCore::toV8):
2800         * bindings/v8/custom/V8StyleSheetCustom.cpp:
2801         (WebCore::toV8):
2802         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
2803         (WebCore::toV8Object):
2804
2805         * bindings/scripts/test/V8/V8TestObj.cpp:
2806         (WebCore::TestObjInternal::readOnlyTestObjAttrAttrGetter): Updated.
2807
2808 2011-07-13  Joseph Pecoraro  <joepeck@webkit.org>
2809
2810         Improve names of some ApplicationCacheStorage accessor methods
2811         https://bugs.webkit.org/show_bug.cgi?id=64433
2812
2813         Reviewed by Alexey Proskuryakov.
2814
2815         Some methods returned a bool for success/failure and
2816         actually returned a value as an out parameter so their
2817         name was confusing. Rename these methods to make them
2818         more clear.
2819
2820         (WebCore::ApplicationCache::diskUsageForOrigin):
2821         * loader/appcache/ApplicationCacheGroup.cpp:
2822         (WebCore::ApplicationCacheGroup::recalculateAvailableSpaceInQuota):
2823         * loader/appcache/ApplicationCacheStorage.cpp:
2824         (WebCore::ApplicationCacheStorage::calculateQuotaForOrigin):
2825         (WebCore::ApplicationCacheStorage::calculateUsageForOrigin):
2826         (WebCore::ApplicationCacheStorage::calculateRemainingSizeForOriginExcludingCache):
2827         (WebCore::ApplicationCacheStorage::checkOriginQuota):
2828         * loader/appcache/ApplicationCacheStorage.h:
2829         * loader/appcache/ApplicationCache.cpp:
2830         Rename the methods.
2831
2832         * WebCore.exp.in:
2833         Replaced old versions. Also, calculateRemaining wasn't needed
2834         outside WebCore, so no longer export it.
2835
2836 2011-07-13  Joseph Pecoraro  <joepeck@webkit.org>
2837
2838         Some ApplicationCache Origin Cleanup
2839         https://bugs.webkit.org/show_bug.cgi?id=64431
2840
2841         Reviewed by Alexey Proskuryakov.
2842
2843         - m_loadedSize is inaccurate. This just replaces it with
2844         calls to ApplicationCache::estimatedSizeInStorage.
2845
2846         - m_availableSpaceInQuota can get out of date, so we just
2847         recalculate it at the start of appcache downloads.
2848
2849         * loader/appcache/ApplicationCacheGroup.h:
2850         * loader/appcache/ApplicationCacheGroup.cpp:
2851         (WebCore::ApplicationCacheGroup::ApplicationCacheGroup):
2852         (WebCore::ApplicationCacheGroup::didReceiveData):
2853         Remove references to m_loadedSize.
2854
2855         (WebCore::ApplicationCacheGroup::didFinishLoading):
2856         Replace m_loadedSize with estimatedSizeInStorage after we
2857         add the new cached resource to the cache. The calculation
2858         already happened so this check is fast.
2859
2860         (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
2861         When we start the Downloading phase, recalculate the quota
2862         so that we have an up to date quota value so that we can
2863         break early if needed.
2864
2865 2011-07-12  Brent Fulgham  <bfulgham@webkit.org>
2866
2867         Standardize WinCairo conditionalized code under PLATFORM macro.
2868         https://bugs.webkit.org/show_bug.cgi?id=64377
2869
2870         Reviewed by Maciej Stachowiak.
2871
2872         Update compile-time conditions that had previously used #ifdef
2873         of WIN_CAIRO to consistently use PLATFORM(WIN_CAIRO).
2874
2875         * WebCore.vcproj/WebCoreCairo.vsprops: Remove redundant declaration
2876           of WIN_CAIRO.
2877         * WebCore.vcproj/WebCoreDebugCairoCFLite.vsprops: Update to use
2878           the existing WinCairo.vsprops file.
2879         * WebCorePrefix.h: Update for new WTF_PLATFORM_WIN_CAIRO define.
2880         * config.h: Update to use PLATFORM(WIN_CAIRO).
2881
2882 2011-07-13  Alexandru Chiculita  <achicu@adobe.com>
2883
2884         [CSS Exclusions] Fix for comment #23 on wrap-shape parsing bug 61726
2885         https://bugs.webkit.org/show_bug.cgi?id=64464
2886
2887         Reviewed by Tony Chang.
2888
2889         No new tests needed.
2890
2891         * css/CSSParser.cpp:
2892         (WebCore::CSSParser::parseWrapShapeRect): Removed the "valid" local.
2893         (WebCore::CSSParser::parseWrapShapeCircle): Removed the "valid" local.
2894         (WebCore::CSSParser::parseWrapShapeEllipse): Removed the "valid" local.
2895         * css/CSSPrimitiveValue.cpp:
2896         * css/CSSWrapShapes.h:
2897         (WebCore::CSSWrapShapePolygon::getXAt): Replaced bit shift with multiplication.
2898         (WebCore::CSSWrapShapePolygon::getYAt): Replaced bit shift with multiplication.
2899         * rendering/style/RenderStyle.cpp:
2900         * rendering/style/StyleRareNonInheritedData.h:
2901
2902 2011-07-13  Abhishek Arya  <inferno@chromium.org>
2903
2904         Reviewed by Adam Barth.
2905
2906         Issue with Frame lifetime due to deletion in beforeload event.
2907         https://bugs.webkit.org/show_bug.cgi?id=64457
2908
2909         Copy the Frame protector higher in the stack from loadWithDocumentLoader
2910         to loadFrameRequest since any of loadPostRequest or loadURL can call
2911         loadWithDocumentLoader, thereby dispatching the beforeload event and
2912         blowing away the frame. This deleted frame will be later accessed in
2913         the loadFrameRequest function causing a crash.       
2914  
2915         Test: fast/events/form-iframe-target-before-load-crash2.html
2916
2917         * loader/FrameLoader.cpp:
2918         (WebCore::FrameLoader::loadFrameRequest):
2919         (WebCore::FrameLoader::loadWithDocumentLoader):
2920
2921 2011-07-13  Mihnea Ovidenie  <mihnea@adobe.com>
2922
2923         [CSSRegions]content:-webkit-from-flow not applied correctly
2924         https://bugs.webkit.org/show_bug.cgi?id=64438
2925
2926         Reviewed by Tony Chang.
2927
2928         Forgot to modify getStringValue(), i was modifying only getStringValue(ExceptionCode&).
2929
2930         Test: fast/regions/content-webkit-from-flow-parsing.html (existing).
2931
2932         * css/CSSPrimitiveValue.cpp:
2933         (WebCore::CSSPrimitiveValue::getStringValue):
2934
2935 2011-07-12  Ryosuke Niwa  <rniwa@webkit.org>
2936
2937         Don't reuse the last InsertTextCommand
2938         https://bugs.webkit.org/show_bug.cgi?id=64416
2939
2940         Reviewed by Justin Garcia.
2941
2942         This patch makes the interface of InsertTextCommand less foreign. It now takes arguments in
2943         its constructor and executes the command in doApply like other edit commands.
2944
2945         * editing/CompositeEditCommand.cpp:
2946         (WebCore::CompositeEditCommand::applyCommandToComposite): Added.
2947         * editing/CompositeEditCommand.h:
2948         * editing/InsertTextCommand.cpp:
2949         (WebCore::InsertTextCommand::InsertTextCommand): Takes arguments input used to take.
2950         (WebCore::InsertTextCommand::doApply): Renamed from input.
2951         * editing/InsertTextCommand.h:
2952         (WebCore::InsertTextCommand::create): Takes arguments input used to take.
2953         * editing/TypingCommand.cpp:
2954         (WebCore::TypingCommand::insertTextRunWithoutNewlines): Creates InsertTextCommand.
2955
2956 2011-07-12  Dmitry Lomov  <dslomov@google.com>
2957
2958         https://bugs.webkit.org/show_bug.cgi?id=63041
2959         [Chromium][V8] Make DOMDataStore per-isolate
2960         This patch:
2961          - makes DOMData class an utility class with static members only
2962          - adds an isolate-specific DOMDataStore in V8BindingPerIsolateData.
2963         Dromaeo benchmarks are not affected.
2964
2965         Reviewed by Adam Barth.
2966
2967         * bindings/v8/DOMData.cpp:
2968         (WebCore::getDefaultStore):
2969         (WebCore::DOMData::getCurrentStore):
2970         * bindings/v8/DOMData.h:
2971         * bindings/v8/DOMDataStore.cpp:
2972         (WebCore::DOMDataStore::DOMDataStore):
2973         (WebCore::DOMDataStore::allStores):
2974         * bindings/v8/DOMDataStore.h:
2975         * bindings/v8/ScopedDOMDataStore.cpp:
2976         (WebCore::ScopedDOMDataStore::ScopedDOMDataStore):
2977         * bindings/v8/ScopedDOMDataStore.h:
2978         * bindings/v8/StaticDOMDataStore.cpp:
2979         (WebCore::StaticDOMDataStore::StaticDOMDataStore):
2980         * bindings/v8/StaticDOMDataStore.h:
2981         * bindings/v8/V8Binding.h:
2982         (WebCore::V8BindingPerIsolateData::allStores):
2983         (WebCore::V8BindingPerIsolateData::getDOMDataStore):
2984         (WebCore::V8BindingPerIsolateData::setDOMDataStore):
2985         * bindings/v8/V8Binding.cpp:
2986         (WebCore::V8BindingPerIsolateData::V8BindingPerIsolateData):
2987         * bindings/v8/V8DOMMap.cpp:
2988         (WebCore::DOMDataStoreHandle::DOMDataStoreHandle):
2989         (WebCore::getDOMDataStore):
2990         (WebCore::enableFasterDOMStoreAccess):
2991
2992 2011-07-12  Simon Fraser  <simon.fraser@apple.com>
2993
2994         Rename compositing-related updateContentsScale() methods
2995         https://bugs.webkit.org/show_bug.cgi?id=64430
2996
2997         Reviewed by Joseph Pecoraro.
2998
2999         Rename updateContentsScale() to something less presumptuous; layers may choose
3000         to do something other than update their contents scale when the page scale factor
3001         changes. pageScaleFactorChanged() is a better name.
3002
3003         * page/Frame.cpp:
3004         (WebCore::Frame::pageScaleFactorChanged):
3005         (WebCore::Frame::scalePage):
3006         * page/Frame.h:
3007         * rendering/RenderLayer.cpp:
3008         (WebCore::RenderLayer::pageScaleFactorChanged):
3009         * rendering/RenderLayer.h:
3010         * rendering/RenderLayerBacking.cpp:
3011         (WebCore::RenderLayerBacking::pageScaleFactorChanged):
3012         * rendering/RenderLayerBacking.h:
3013         * rendering/RenderLayerCompositor.cpp:
3014         (WebCore::RenderLayerCompositor::pageScaleFactorChanged):
3015         * rendering/RenderLayerCompositor.h:
3016
3017 2011-07-13  Pierre Rossi  <pierre.rossi@gmail.com>
3018
3019         Fix compile for QRawFont.
3020
3021         https://bugs.webkit.org/show_bug.cgi?id=64453
3022
3023         Reviewed by Andreas Kling.
3024
3025         * platform/graphics/GraphicsContext.h:
3026         * platform/graphics/qt/FontQt.cpp:
3027         (WebCore::Font::drawGlyphs):
3028
3029 2011-07-13  John Knottenbelt  <jknotten@chromium.org>
3030
3031         Reference Geolocation object from GeoNotifier and Geolocation::setIsAllowed.
3032         https://bugs.webkit.org/show_bug.cgi?id=64363
3033
3034         Reviewed by Tony Gentilcore.
3035
3036         Test: fast/dom/Geolocation/remove-remote-context-in-error-callback-crash.html
3037
3038         * page/Geolocation.cpp:
3039         (WebCore::Geolocation::setIsAllowed):
3040         * page/Geolocation.h:
3041
3042 2011-07-13  Vsevolod Vlasov  <vsevik@chromium.org>
3043
3044         Web Inspector: Network panel search needs each resource to have unique identifier.
3045         https://bugs.webkit.org/show_bug.cgi?id=64287
3046
3047         Reviewed by Pavel Feldman.
3048
3049         * inspector/front-end/NetworkManager.js:
3050         (WebInspector.NetworkManager.prototype.requestContent):
3051         (WebInspector.NetworkDispatcher):
3052         (WebInspector.NetworkDispatcher.prototype.requestWillBeSent):
3053         (WebInspector.NetworkDispatcher.prototype.resourceLoadedFromMemoryCache):
3054         (WebInspector.NetworkDispatcher.prototype._appendRedirect):
3055         * inspector/front-end/NetworkPanel.js:
3056         (WebInspector.NetworkPanel.prototype._appendResource):
3057         (WebInspector.NetworkPanel.prototype._frameNavigated):
3058         (WebInspector.NetworkPanel.prototype._updateSearchMatchedListAfterResourceIdentifierChanged):
3059
3060 2011-07-13  Alexandru Chiculita  <achicu@adobe.com>
3061
3062         Bridge RenderBoxModelObject::calculateBackgroundImageGeometry parameters into a class
3063         https://bugs.webkit.org/show_bug.cgi?id=63987
3064
3065         Reviewed by Hajime Morita.
3066
3067         Change doesn't add new functionality. No test needed.
3068
3069         * rendering/RenderBox.cpp:
3070         (WebCore::RenderBox::maskClipRect):
3071         (WebCore::RenderBox::repaintLayerRectsForImage):
3072         * rendering/RenderBoxModelObject.cpp:
3073         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3074         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatX):
3075         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatY):
3076         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::useFixedAttachment):
3077         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::clip):
3078         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::relativePhase):
3079         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
3080         * rendering/RenderBoxModelObject.h:
3081         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::destOrigin):
3082         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setDestOrigin):
3083         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::destRect):
3084         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setDestRect):
3085         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::phase):
3086         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhase):
3087         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::tileSize):
3088         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setTileSize):
3089         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhaseX):
3090         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhaseY):
3091
3092 2011-07-13  MORITA Hajime  <morrita@google.com>
3093
3094         Refactoring: Ignored ExceptionCode value should be less annoying.
3095         https://bugs.webkit.org/show_bug.cgi?id=63688
3096
3097         - Introduced ExceptionCodePlaceholder class for the default parameter of ExceptionCode.
3098         - Introduced ASSERT_NO_EXCEPTION to check ExceptionCode not set to non-zero after the call.
3099         - Adopted ASSERT_NO_EXCEPTION in Range.cpp
3100
3101         No new tests. No behaviour change.
3102
3103         Reviewed by Darin Adler.
3104
3105         * GNUmakefile.list.am:
3106         * WebCore.gypi:
3107         * WebCore.xcodeproj/project.pbxproj:
3108         * dom/ExceptionCodePlaceholder.h: Added.
3109         (WebCore::ExceptionCodePlaceholder::ExceptionCodePlaceholder):
3110         (WebCore::ExceptionCodePlaceholder::operator ExceptionCode& ):
3111         (WebCore::IgnorableExceptionCode::IgnorableExceptionCode):
3112         (WebCore::CheckedExceptionCode::CheckedExceptionCode):
3113         (WebCore::CheckedExceptionCode::~CheckedExceptionCode):
3114         * dom/Range.cpp:
3115         (WebCore::Range::Range):
3116         (WebCore::Range::editingStartPosition):
3117         * dom/Range.h:        
3118
3119 2011-07-13  Nikolas Zimmermann  <nzimmermann@rim.com>
3120
3121         Regression: OOB read in svg text run
3122         https://bugs.webkit.org/show_bug.cgi?id=63627
3123
3124         Not reviewed.
3125
3126         Fixed last minute typo leading to assertions.
3127
3128         * rendering/InlineTextBox.cpp:
3129         (WebCore::InlineTextBox::paintSelection):
3130
3131 2011-07-12  Andrey Kosyakov  <caseq@chromium.org>
3132
3133         Web Inspector: factor NetworkLogView out of Network panel
3134         https://bugs.webkit.org/show_bug.cgi?id=64366
3135
3136         Reviewed by Pavel Feldman.
3137
3138         * inspector/front-end/NetworkPanel.js:
3139         (WebInspector.NetworkLogView):
3140         (WebInspector.NetworkLogView.prototype.get useLargeRows):
3141         (WebInspector.NetworkLogView.prototype.set allowPopover):
3142         (WebInspector.NetworkLogView.prototype.elementsToRestoreScrollPositionsFor):
3143         (WebInspector.NetworkLogView.prototype.resize):
3144         (WebInspector.NetworkLogView.prototype._createTable):
3145         (WebInspector.NetworkLogView.prototype.show):
3146         (WebInspector.NetworkLogView.prototype.hide):
3147         (WebInspector.NetworkLogView.prototype._reset):
3148         (WebInspector.NetworkLogView.prototype.switchToDetailedView):
3149         (WebInspector.NetworkLogView.prototype.switchToBriefView):
3150         (WebInspector.NetworkLogView.prototype.get _setLargerResources):
3151         (WebInspector.NetworkLogView.prototype._getPopoverAnchor):
3152         (WebInspector.NetworkPanel):
3153         (WebInspector.NetworkPanel.prototype.get toolbarItemLabel):
3154         (WebInspector.NetworkPanel.prototype.get statusBarItems):
3155         (WebInspector.NetworkPanel.prototype.elementsToRestoreScrollPositionsFor):
3156         (WebInspector.NetworkPanel.prototype.resize):
3157         (WebInspector.NetworkPanel.prototype._reset):
3158         (WebInspector.NetworkPanel.prototype.updateSidebarWidth):
3159         (WebInspector.NetworkPanel.prototype.updateMainViewWidth):
3160         (WebInspector.NetworkPanel.prototype.handleShortcut):
3161         (WebInspector.NetworkPanel.prototype.show):
3162         (WebInspector.NetworkPanel.prototype.hide):
3163         (WebInspector.NetworkPanel.prototype.get resources):
3164         (WebInspector.NetworkPanel.prototype.resourceById):
3165         (WebInspector.NetworkPanel.prototype.canShowAnchorLocation):
3166         (WebInspector.NetworkPanel.prototype.showAnchorLocation):
3167         (WebInspector.NetworkPanel.prototype._onViewCleared):
3168         (WebInspector.NetworkPanel.prototype._onRowSizeChanged):
3169         (WebInspector.NetworkPanel.prototype._onResourceSelected):
3170         (WebInspector.NetworkPanel.prototype._showResource):
3171         (WebInspector.NetworkPanel.prototype._closeVisibleResource):
3172         (WebInspector.NetworkPanel.prototype._toggleGridMode):
3173         (WebInspector.NetworkPanel.prototype._toggleViewingResourceMode):
3174         (WebInspector.NetworkPanel.prototype.performSearch):
3175         (WebInspector.NetworkPanel.prototype.jumpToPreviousSearchResult):
3176         (WebInspector.NetworkPanel.prototype.jumpToNextSearchResult):
3177         (WebInspector.NetworkPanel.prototype.searchCanceled):
3178         (WebInspector.NetworkDataGridNode):
3179         (WebInspector.NetworkDataGridNode.prototype.isFilteredOut):
3180         (WebInspector.NetworkDataGridNode.prototype.select):
3181         (WebInspector.NetworkDataGridNode.prototype.get selectable):
3182
3183 2011-07-13  Sheriff Bot  <webkit.review.bot@gmail.com>
3184
3185         Unreviewed, rolling out r90634.
3186         http://trac.webkit.org/changeset/90634
3187         https://bugs.webkit.org/show_bug.cgi?id=64448
3188
3189         Qt HTTP Pipelining is not robust enough to be used in that
3190         generic way. (Requested by benjaminp on #webkit).
3191
3192         * platform/network/qt/ResourceRequestQt.cpp:
3193         (WebCore::ResourceRequest::toNetworkRequest):
3194
3195 2011-07-13  Nikolas Zimmermann  <nzimmermann@rim.com>
3196
3197         Regression: OOB read in svg text run
3198         https://bugs.webkit.org/show_bug.cgi?id=63627
3199
3200         Reviewed by Zoltan Herczeg.
3201
3202         A TextRun is constructed for a portion of a string [a,b] whose original length is c (0 < a < b < c).
3203         The TextRun charactersLength variable stores the length of the remaining text from (b..c) in order
3204         to support ligatures in SVG Fonts. Example: <text>ffl</text>. When measuring the advance from char 0
3205         to char 1 the whole 'ffl' text must be passed to the SVG glyph selection code, as the SVG Font may
3206         define a single glyph for the characters 'ffl' thus leading to a single character long text
3207         pointing to the ffl ligature, not three individual 'f' / 'f' / 'l' characters anymore.
3208
3209         constructTextRun(..const UChar*, int length, ..) did not correctly calculate the maximum length (b..c).
3210         The passed in UChar buffer starts at eg. textRenderer->characters() + start(), and following condition
3211         holds true for 'length': start() + length <= textRenderer->textLength() (which denotes the maximum length
3212         of the textRenderer->characters() buffer). We have to keep track of the start() offset, so that we
3213         can calculate the charactersLength for the TextRun correctly: textRenderer->textLength() - start().
3214
3215         There are also other cases like RenderCombinedText and/or the presence of hyphens that were incorrectly
3216         tracked. Only InlineTextBox had to be fixed, the other callsites in eg. RenderBlockLineLayout already
3217         computed the maximum length correctly - I assured this by valgrind runs on all SVG Font tests.
3218
3219         * rendering/InlineTextBox.cpp:
3220         (WebCore::InlineTextBox::paint):
3221         (WebCore::InlineTextBox::paintSelection):
3222         (WebCore::InlineTextBox::constructTextRun): Add maximumLength parameter to constructTextRun.
3223         * rendering/InlineTextBox.h: Ditto.
3224
3225 2011-07-12  Antti Koivisto  <antti@apple.com>
3226
3227         didFirstVisuallyNonEmptyLayout dispatched too early
3228         https://bugs.webkit.org/show_bug.cgi?id=64412
3229
3230         Reviewed by Darin Adler and Sam Weinig.
3231
3232         Improve the mechanism that dispatches didFirstVisuallyNonEmptyLayout
3233
3234         - Wait until a threshold of characters and pixels has been exceeded before dispatching.
3235         - Wait until stylesheets are loaded (painting is disabled in this case).
3236
3237         * page/FrameView.cpp:
3238         (WebCore::FrameView::reset):
3239         (WebCore::FrameView::performPostLayoutTasks):
3240         * page/FrameView.h:
3241         (WebCore::FrameView::incrementVisuallyNonEmptyCharacterCount):
3242         (WebCore::FrameView::incrementVisuallyNonEmptyPixelCount):
3243         * rendering/RenderImage.cpp:
3244         (WebCore::RenderImage::RenderImage):
3245         (WebCore::RenderImage::imageChanged):
3246         * rendering/RenderImage.h:
3247         * rendering/RenderText.cpp:
3248         (WebCore::RenderText::RenderText):
3249
3250 2011-07-12  MORITA Hajime  <morrita@google.com>
3251
3252         [Refactoring][ShadowContentElement] Forwarded node list should be a linked-list.
3253         https://bugs.webkit.org/show_bug.cgi?id=64252
3254
3255         Reviewed by Dimitri Glazkov.
3256
3257         Introduced ShadowInclusionList and ShadowInclusion for maintaining
3258         forwarded content children. ShadowInclusion is doubly-linked list.
3259         ShadowContentElement::m_inclusions is replaced by ShadowInclusionList.
3260         
3261         This change is a prepration for bug 64251, which will introduce
3262         forwarded-children to content-element table.
3263         
3264         No new tests. No behavioral change.
3265
3266         * dom/NodeRenderingContext.cpp:
3267         (WebCore::nextRendererOf):
3268         (WebCore::previousRendererOf):
3269         (WebCore::firstRendererOf):
3270         (WebCore::lastRendererOf):
3271         * dom/ShadowContentElement.cpp:
3272         (WebCore::ShadowInclusion::append):
3273         (WebCore::ShadowInclusion::unlink):
3274         (WebCore::ShadowInclusionList::ShadowInclusionList):
3275         (WebCore::ShadowInclusionList::~ShadowInclusionList):
3276         (WebCore::ShadowInclusionList::find):
3277         (WebCore::ShadowInclusionList::clear):
3278         (WebCore::ShadowInclusionList::append):
3279         (WebCore::ShadowContentElement::attach):
3280         * dom/ShadowContentElement.h:
3281         (WebCore::ShadowInclusion::includer):
3282         (WebCore::ShadowInclusion::content):
3283         (WebCore::ShadowInclusion::next):
3284         (WebCore::ShadowInclusion::previous):
3285         (WebCore::ShadowInclusion::ShadowInclusion):
3286         (WebCore::ShadowInclusion::create):
3287         (WebCore::ShadowInclusionList::first):
3288         (WebCore::ShadowInclusionList::last):
3289         (WebCore::ShadowInclusionList::isEmpty):
3290         (WebCore::ShadowInclusionList::append):
3291         (WebCore::ShadowContentElement::inclusions):
3292         * dom/ShadowContentSelector.cpp:
3293         (WebCore::ShadowContentSelector::selectInclusion):
3294         * dom/ShadowContentSelector.h:
3295
3296 2011-07-12  David Reveman  <reveman@chromium.org>
3297
3298         [Chromium] Use nearest filter method with pixel aligned transforms.
3299         https://bugs.webkit.org/show_bug.cgi?id=64338
3300
3301         Reviewed by James Robinson.
3302
3303         Check for integer translation and use nearest texture filter when
3304         possible to avoid filter precisions problems at the layer edges.
3305
3306         Test: compositing/iframes/nested-iframe-scrolling.html (existing)
3307
3308         * platform/graphics/chromium/LayerTilerChromium.cpp:
3309         (WebCore::LayerTilerChromium::drawTiles):
3310         * platform/graphics/transforms/TransformationMatrix.cpp:
3311         (WebCore::TransformationMatrix::isIntegerTranslation):
3312         * platform/graphics/transforms/TransformationMatrix.h:
3313
3314 2011-07-12  David Reveman  <reveman@chromium.org>
3315
3316         Removed unnecessary function parameters from TilingData::textureOffset.
3317         https://bugs.webkit.org/show_bug.cgi?id=64245
3318
3319         Reviewed by Brent Fulgham.
3320
3321         No new tests, no functionality changes.
3322
3323         * platform/graphics/chromium/LayerTilerChromium.cpp:
3324         (WebCore::LayerTilerChromium::drawTiles):
3325         * platform/graphics/gpu/TilingData.cpp:
3326         (WebCore::TilingData::textureOffset):
3327         * platform/graphics/gpu/TilingData.h:
3328
3329 2011-07-12  Ryosuke Niwa  <rniwa@webkit.org>
3330
3331         Move RenderTextControl::indexForVisiblePosition to HTMLTextFormControlElement
3332         https://bugs.webkit.org/show_bug.cgi?id=64403
3333
3334         Reviewed by Hajime Morita.
3335
3336         Moved indexForVisiblePosition from RenderTextControl to HTMLTextFormControlElement.
3337
3338         Also replaced the call to RenderTextControl::isSelectableElement by a call to enclosingTextFormControl
3339         (moved from htmlediting to HTMLTextFormControlElement) because we are only interested in checking
3340         whether the given position is inside the current text form control or not.
3341
3342         In addition, modernized the code in indexForVisiblePosition by calling parentAnchoredEquivalent on the
3343         given position and replacing calls to deprecateNode and deprecatedEditingOffset by calls to containerNode
3344         and offsetInContainer.
3345
3346         * accessibility/AccessibilityRenderObject.cpp:
3347         (WebCore::AccessibilityRenderObject::indexForVisiblePosition): Calls indexForVisiblePosition.
3348         * editing/htmlediting.cpp: Removed enclosingTextFromControl.
3349         * editing/htmlediting.h: Removed enclosingTextFromControl.
3350         * html/HTMLTextFormControlElement.cpp:
3351         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition): Moved from RenderTextControl.
3352         (WebCore::HTMLTextFormControlElement::computeSelectionStart): Calls indexForVisiblePosition.
3353         (WebCore::HTMLTextFormControlElement::computeSelectionEnd): Calls indexForVisiblePosition.
3354         (WebCore::enclosingTextFormControl): Moved from htmlediting.cpp
3355         * html/HTMLTextFormControlElement.h:
3356         * rendering/RenderTextControl.cpp:
3357         * rendering/RenderTextControl.h:
3358
3359 2011-07-12  Julien Chaffraix  <jchaffraix@webkit.org>
3360
3361         Make RenderObject::containingBlock virtual for better speed and clarity
3362         https://bugs.webkit.org/show_bug.cgi?id=64318
3363
3364         Reviewed by Darin Adler.
3365
3366         No new tests, performance refactoring.
3367
3368         On some of my test cases, this method takes between 3 and 5% of the time spend.
3369         The method makes 2 calls to virtual methods which could be moved to their overriden
3370         version of containingBlock if we made it virtual.
3371
3372         That's what this patch does. It saves between 1 and 2% on some synthetic test cases
3373         as well as made the current method shorter.
3374
3375         * rendering/RenderObject.cpp:
3376         (WebCore::RenderObject::containingBlock): Removed code for RenderView and RenderTableCell,
3377         replaced by ASSERTs.
3378
3379         * rendering/RenderObject.h: Made containingBlock virtual.
3380
3381         * rendering/RenderTableCell.h:
3382         (WebCore::RenderTableCell::containingBlock):
3383         * rendering/RenderView.h:
3384         (WebCore::RenderView::containingBlock):
3385         The code moved from RenderObject is inlined in those 2 methods.
3386
3387 2011-07-12  James Robinson  <jamesr@chromium.org>
3388
3389         [chromium] Chromium win build fix.
3390
3391         * platform/graphics/chromium/FontChromiumWin.cpp:
3392         (WebCore::drawGlyphsWin):
3393
3394 2011-07-12  Pratik Solanki  <psolanki@apple.com>
3395
3396         Get webkit to compile with USE(CFNETWORK) enabled on Mac
3397         https://bugs.webkit.org/show_bug.cgi?id=63674
3398
3399         Reviewed by David Kilzer.
3400
3401         Changes to ResourceHandle class to get it to compile with USE(CFNETWORK).
3402
3403         No new tests because no change in functionality and option is not enabled on Mac.
3404
3405         * platform/network/ResourceHandle.h:
3406         * platform/network/ResourceHandleInternal.h:
3407         * platform/network/cf/ResourceHandleCFNet.cpp:
3408         (WebCore::didReceiveResponse):
3409         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
3410         (WebCore::ResourceHandle::start):
3411         (WebCore::WebCoreSynchronousLoaderClient::willSendRequest): Call adjustMIMETypeIfNecessary
3412         on Mac. Also port over fix for <rdar://problem/6901522> added in r43993 which forces the
3413         MIME type to text/html if the request is annotated with a "ForceHTMLMIMEType" property.
3414
3415 2011-07-12  James Robinson  <jamesr@chromium.org>
3416
3417         [chromium] Delete the unused legacy accelerated canvas 2d code
3418         https://bugs.webkit.org/show_bug.cgi?id=64214
3419
3420         Reviewed by Stephen White.
3421
3422         This removes the legacy accelerated canvas 2d path and support logic since we (chromium) are no longer using
3423         this codepath and it seems clear that no other port is interested.
3424
3425         Refactoring and removing unused code, so no new tests.
3426
3427         * WebCore.gypi:
3428         * WebCore.xcodeproj/project.pbxproj:
3429         * html/canvas/CanvasRenderingContext2D.cpp:
3430         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
3431         (WebCore::CanvasRenderingContext2D::setGlobalCompositeOperation):
3432         (WebCore::CanvasRenderingContext2D::didDraw):
3433         * html/canvas/CanvasRenderingContext2D.h:
3434         * loader/EmptyClients.h:
3435         * page/ChromeClient.h:
3436         * page/Page.cpp:
3437         (WebCore::Page::sharedGraphicsContext3D):
3438         * page/Page.h:
3439         * platform/graphics/GraphicsContext.cpp:
3440         (WebCore::GraphicsContext::setSharedGraphicsContext3D):
3441         (WebCore::GraphicsContext::syncSoftwareCanvas):
3442         * platform/graphics/GraphicsContext.h:
3443         * platform/graphics/GraphicsContext3D.h:
3444         * platform/graphics/chromium/DrawingBufferChromium.cpp:
3445         (WebCore::DrawingBuffer::setGrContext):
3446         * platform/graphics/chromium/FontLinux.cpp:
3447         (WebCore::Font::drawGlyphs):
3448         * platform/graphics/chromium/cc/CCLayerSorter.cpp:
3449         (WebCore::pointInTriangle):
3450         * platform/graphics/gpu/BicubicShader.cpp: Removed.
3451         * platform/graphics/gpu/BicubicShader.h: Removed.
3452         * platform/graphics/gpu/ConvolutionShader.cpp: Removed.
3453         * platform/graphics/gpu/ConvolutionShader.h: Removed.
3454         * platform/graphics/gpu/GraphicsContextGPU.cpp: Removed.
3455         * platform/graphics/gpu/GraphicsContextGPU.h: Removed.
3456         * platform/graphics/gpu/SharedGraphicsContext3D.cpp: Removed.
3457         * platform/graphics/gpu/SharedGraphicsContext3D.h: Removed.
3458         * platform/graphics/gpu/SolidFillShader.cpp: Removed.
3459         * platform/graphics/gpu/SolidFillShader.h: Removed.
3460         * platform/graphics/gpu/TexShader.cpp: Removed.
3461         * platform/graphics/gpu/TexShader.h: Removed.
3462         * platform/graphics/skia/GraphicsContextSkia.cpp:
3463         (WebCore::GraphicsContext::savePlatformState):
3464         (WebCore::GraphicsContext::restorePlatformState):
3465         (WebCore::GraphicsContext::addInnerRoundedRectClip):
3466         (WebCore::GraphicsContext::clearRect):
3467         (WebCore::GraphicsContext::clip):
3468         (WebCore::GraphicsContext::canvasClip):
3469         (WebCore::GraphicsContext::clipOut):
3470         (WebCore::GraphicsContext::clipPath):
3471