LLVM Compiler build fix.
[WebKit.git] / Source / WebCore / ChangeLog
1 2011-07-14  Dan Bernstein  <mitz@apple.com>
2
3         LLVM Compiler build fix.
4
5         * css/CSSStyleApplyProperty.cpp:
6         (WebCore::ApplyPropertyComputeLength::applyValue):
7
8 2011-07-14  Darin Adler  <darin@apple.com>
9
10         [Mac] Use [NSCursor operationNotAllowedCursor] for CSS no-drop as well as CSS not-allowed
11         https://bugs.webkit.org/show_bug.cgi?id=64570
12
13         Reviewed by Alexey Proskuryakov.
14
15         Mac OS X documentation and usage makes it clear that this cursor is usually used for no-drop,
16         and that it's also reasonable to use it for not-allowed.
17
18         * platform/mac/CursorMac.mm:
19         (WebCore::Cursor::ensurePlatformCursor): Use [NSCursor operationNotAllowedCursor] for
20         Cursor::NoDrop.
21
22 2011-07-14  Luke Macpherson   <macpherson@chromium.org>
23
24         Reviewed by Dimitri Glazkov.
25
26         Introduce templated compute length class in CSSStyleApplyProperty, and use to handle several CSS properties.
27         https://bugs.webkit.org/show_bug.cgi?id=62957
28
29         No new tests / refactoring only.
30
31         * css/CSSPrimitiveValue.cpp:
32         (WebCore::CSSPrimitiveValue::computeLength):
33         Add computeLength function that returns unsigned short.
34         * css/CSSStyleApplyProperty.cpp:
35         (WebCore::ApplyPropertyComputeLength::ApplyPropertyComputeLength):
36         Added class to handle computeLength based properties.
37         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
38         Initialize ApplyPropertyComputeLength for appropriate properties.
39         * css/CSSStyleSelector.cpp:
40         (WebCore::CSSStyleSelector::useSVGZoomRules):
41         Make this a public member function instead of a private static function.
42         (WebCore::CSSStyleSelector::applyProperty):
43         Removed code now implemented in CSSStyleApplyProperty.
44         (WebCore::CSSStyleSelector::setFontSize):
45         Use new useSVGZoomRules function.
46         * css/CSSStyleSelector.h:
47         Add interface for useSVGZoomRules.
48
49 2011-07-14  Antti Koivisto  <antti@apple.com>
50
51         REGRESSION: Should not dispatch didFirstVisuallyNonEmptyLayout for the initial empty document
52         https://bugs.webkit.org/show_bug.cgi?id=64557
53
54         Reviewed by Kenneth Rohde Christiansen.
55
56         Avoid sending didFirstVisuallyNonEmptyLayout for the initial empty document of the frame. The
57         clients may not expect it and it doesn't make much sense in any case.
58
59         * page/FrameView.cpp:
60         (WebCore::FrameView::performPostLayoutTasks):
61
62 2011-07-14  Jeffrey Pfau  <jpfau@apple.com>
63
64         Character reference parser for new XML parser
65         https://bugs.webkit.org/show_bug.cgi?id=64398
66
67         Reviewed by Adam Barth.
68
69         Refactored out the HTML entity parser and added a common template for parsing character references.
70
71         * WebCore.xcodeproj/project.pbxproj:
72         * html/parser/HTMLEntityParser.cpp:
73         (WebCore::consumeHTMLEntity):
74         * xml/parser/CharacterReferenceParserInlineMethods.h: Copied from Source/WebCore/html/parser/HTMLEntityParser.cpp.
75         (WebCore::isHexDigit):
76         (WebCore::unconsumeCharacters):
77         (WebCore::consumeCharacterReference):
78         * xml/parser/XMLCharacterReferenceParser.cpp: Added.
79         (WebCore::consumeXMLCharacterReference):
80         * xml/parser/XMLCharacterReferenceParser.h: Added.
81
82 2011-07-14  Ilya Tikhonovsky  <loislo@chromium.org>
83
84         Reviewed by Pavel Feldman.
85
86         Web Inspector: panel switching is too slow.
87         https://bugs.webkit.org/show_bug.cgi?id=60959
88
89         * inspector/front-end/inspector.css:
90         (.panel):
91         (.panel.visible):
92
93 2011-07-14  Andrey Kosyakov  <caseq@chromium.org>
94
95         Web Inspector: remove more unused CSS from inspector.css
96         https://bugs.webkit.org/show_bug.cgi?id=64529
97
98         Reviewed by Pavel Feldman.
99
100         * inspector/front-end/inspector.css:
101
102 2011-07-14  Ryosuke Niwa  <rniwa@webkit.org>
103
104         Move subtreeHasChanged from RenderTextControl to HTMLTextFormControlElement
105         https://bugs.webkit.org/show_bug.cgi?id=64476
106
107         Reviewed by Kent Tamura.
108
109         Moved subtreeHasChanged from RenderTextControl, RenderTextControlSingleLine, and
110         RenderTextControlMultiLine to HTMLTextFormControlElement, HTMLInputElement, and
111         HTMLTextAreaElement. Also moved m_searchEventTimer and related functions from
112         RenderTextSingleLine to SearchInputType.
113
114         * html/HTMLInputElement.cpp:
115         (WebCore::HTMLInputElement::subtreeHasChanged): Moved from RenderTextControlSingleLine.
116         (WebCore::HTMLInputElement::onSearch): Calls stopSearchEventTimer.
117         * html/HTMLInputElement.h:
118         * html/HTMLTextAreaElement.cpp:
119         (WebCore::HTMLTextAreaElement::subtreeHasChanged): Moved from RenderTextMultiLine.
120         * html/HTMLTextAreaElement.h:
121         * html/HTMLTextFormControlElement.cpp:
122         (WebCore::HTMLTextFormControlElement::defaultEventHandler): Calls subtreeHasChanged.
123         (WebCore::HTMLTextFormControlElement::subtreeHasChanged): Added; calls respondToChangeByUser.
124         * html/HTMLTextFormControlElement.h:
125         * html/SearchInputType.cpp:
126         (WebCore::SearchInputType::SearchInputType): Initializes m_searchEventTimer.
127         (WebCore::SearchInputType::startSearchEventTimer): Moved from RenderTextControlSingleLine.
128         (WebCore::SearchInputType::stopSearchEventTimer): Ditto.
129         (WebCore::SearchInputType::searchEventTimerFired): Ditto.
130         * html/SearchInputType.h:
131         * html/TextFieldInputType.cpp:
132         (WebCore::TextFieldInputType::handleBeforeTextInsertedEvent): Updated comment.
133         * rendering/RenderTextControl.cpp:
134         * rendering/RenderTextControl.h:
135         (WebCore::RenderTextControl::respondToChangeByUser): Renamed from subtreeHasChanged.
136         * rendering/RenderTextControlMultiLine.cpp:
137         * rendering/RenderTextControlMultiLine.h:
138         * rendering/RenderTextControlSingleLine.cpp:
139         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine): No longer initializes
140         m_searchEventTimer.
141         * rendering/RenderTextControlSingleLine.h:
142
143 2011-07-14  Vsevolod Vlasov  <vsevik@chromium.org>
144
145         Move XML errors handling out from XMLDocumentParser (refactoring).
146         https://bugs.webkit.org/show_bug.cgi?id=64305
147
148         XML errors handling logic is moved out from XMLDocumentParser to allow using it for XSLT error handling as well.
149
150         Reviewed by Adam Barth.
151
152         No tests needed as there is no new functionality added.
153
154         * CMakeLists.txt:
155         * GNUmakefile.list.am:
156         * WebCore.gypi:
157         * WebCore.pro:
158         * WebCore.vcproj/WebCore.vcproj:
159         * WebCore.xcodeproj/project.pbxproj:
160         * xml/XMLErrors.cpp: Added.
161         (WebCore::XMLErrors::XMLErrors):
162         (WebCore::XMLErrors::handleError):
163         (WebCore::XMLErrors::appendErrorMessage):
164         (WebCore::createXHTMLParserErrorHeader):
165         (WebCore::XMLErrors::insertErrorMessageBlock):
166         * xml/XMLErrors.h: Added.
167         * xml/parser/XMLDocumentParser.cpp:
168         (WebCore::XMLDocumentParser::pushCurrentNode):
169         (WebCore::XMLDocumentParser::handleError):
170         (WebCore::XMLDocumentParser::insertErrorMessageBlock):
171         * xml/parser/XMLDocumentParser.h:
172         * xml/parser/XMLDocumentParserLibxml2.cpp:
173         (WebCore::PendingCallbacks::appendErrorCallback):
174         (WebCore::XMLDocumentParser::XMLDocumentParser):
175         (WebCore::XMLDocumentParser::doWrite):
176         (WebCore::XMLDocumentParser::error):
177         (WebCore::warningHandler):
178         (WebCore::fatalErrorHandler):
179         (WebCore::normalErrorHandler):
180         * xml/parser/XMLDocumentParserQt.cpp:
181         (WebCore::XMLDocumentParser::XMLDocumentParser):
182         (WebCore::XMLDocumentParser::doWrite):
183         (WebCore::XMLDocumentParser::doEnd):
184         (WebCore::XMLDocumentParser::parse):
185         (WebCore::XMLDocumentParser::parseStartElement):
186         (WebCore::XMLDocumentParser::parseDtd):
187
188 2011-07-14  Vsevolod Vlasov  <vsevik@chromium.org>
189
190         Web Inspector: InspectorResourceAgent should generate unique identifier and save cachedResource for resources from memory cache.
191         https://bugs.webkit.org/show_bug.cgi?id=64356
192
193         Reviewed by Yury Semikhatsky.
194
195         * inspector/Inspector.json:
196         * inspector/InspectorInstrumentation.cpp:
197         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
198         * inspector/InspectorInstrumentation.h:
199         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCache):
200         * inspector/InspectorResourceAgent.cpp:
201         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
202         * inspector/InspectorResourceAgent.h:
203         * inspector/front-end/NetworkManager.js:
204         (WebInspector.NetworkManager.prototype.requestContent):
205         (WebInspector.NetworkDispatcher):
206         (WebInspector.NetworkDispatcher.prototype.resourceLoadedFromMemoryCache):
207         (WebInspector.NetworkDispatcher.prototype._appendRedirect):
208         * inspector/front-end/NetworkPanel.js:
209         (WebInspector.NetworkLogView.prototype._frameNavigated):
210         * loader/FrameLoader.cpp:
211         (WebCore::FrameLoader::loadedResourceFromMemoryCache):
212         * loader/FrameLoader.h:
213
214 2011-07-14  Tim Horton  <timothy_horton@apple.com>
215
216         Clear SVGElementInstance's children immediately upon detachment
217         https://bugs.webkit.org/show_bug.cgi?id=63739
218         <rdar://problem/9705708>
219
220         Reviewed by Nikolas Zimmermann.
221
222         In addition to clearing the instance's children in the destructor,
223         clear them when the instance is detached from its <use>. This way,
224         we won't attempt to use them after we're detached but before the
225         destructor has been called.
226
227         Test: svg/custom/use-crash-using-children-before-destroy.svg
228
229         * svg/SVGElementInstance.cpp:
230         (WebCore::SVGElementInstance::~SVGElementInstance):
231         (WebCore::SVGElementInstance::clearChildren):
232         * svg/SVGElementInstance.h:
233         * svg/SVGUseElement.cpp:
234         (WebCore::SVGUseElement::detachInstance):
235
236 2011-07-14  Nate Chapin  <japhet@chromium.org>
237
238         Don't skip custom cursors if an Image* is null,
239         since this can lead to a non-custom Cursor flickering 
240         back in when the custom cursor hasn't finished loading yet.
241         https://bugs.webkit.org/show_bug.cgi?id=64321
242
243         Reviewed by Darin Fisher.
244
245         Manual test, since we're testing visual flickering.
246
247         * manual-tests/canvas-cursor.html: Added.
248         * page/EventHandler.cpp:
249         (WebCore::EventHandler::selectCursor):
250         * platform/Cursor.cpp:
251         (WebCore::determineHotSpot):
252
253 2011-07-14  Young Han Lee  <joybro@company100.net>
254
255         Reviewed by Dirk Schulze.
256
257         REGRESSION (r89774): svg/W3C-SVG-1.1/animate-elem-82-t.svg hits assertion failure.
258         https://bugs.webkit.org/show_bug.cgi?id=63911
259
260         Some functions assumed calculateKeyTimesIndex() does not return the last index of
261         the keyTimes, but it would be right behavior for calculateKeyTimesIndex() when it
262         accepts 1 as the percent argument.
263
264         To avoid the assumption, and for more efficiency, this patch allows the functions
265         using calculateKeyTimesIndex() to return early when it accepts 1 as the percent argument.
266         These functions have always returned the last element of the corresponding vector
267         in that situation.
268
269         * svg/SVGAnimationElement.cpp:
270         (WebCore::SVGAnimationElement::calculatePercentFromKeyPoints):
271         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
272
273 2011-07-14  Andrey Kosyakov  <caseq@chromium.org>
274
275         Web Inspector: remove more dead code
276         https://bugs.webkit.org/show_bug.cgi?id=64524
277
278         Reviewed by Yury Semikhatsky.
279
280         * WebCore.gypi:
281         * inspector/front-end/SummaryBar.js: Removed.
282         * inspector/front-end/WebKit.qrc:
283         * inspector/front-end/inspector.css:
284         * inspector/front-end/inspector.html:
285
286 2011-07-14  Peter Varga  <pvarga@webkit.org>
287
288         [Qt][V8] Build fix after r90830.
289
290         Reviewed by Csaba Osztrogonác.
291
292         The histogramEnumeration() function isn't available from the Qt port's
293         PlatformBridge.h because this function is Chromium specific.
294         Since the http://trac.webkit.org/changeset/90830 change we need to
295         guard the usage of the histogramEnumeration() function.
296
297         No new tests needed.
298
299         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
300         (WebCore::V8InspectorFrontendHost::recordActionTakenCallback):
301         (WebCore::V8InspectorFrontendHost::recordPanelShownCallback):
302         (WebCore::V8InspectorFrontendHost::recordSettingChangedCallback):
303
304 2011-07-14  Yury Semikhatsky  <yurys@chromium.org>
305
306         Web Inspector: show only Console and Scripts panels in shared worker inspector front-end
307         https://bugs.webkit.org/show_bug.cgi?id=64519
308
309         Reviewed by Pavel Feldman.
310
311         * inspector/front-end/WorkerManager.js:
312         (WebInspector.WorkerManager):
313         (WebInspector.WorkerManager.isWorkerFrontend):
314         (WebInspector.WorkerManager.isSharedWorkerFrontend):
315         (WebInspector.WorkerManager.prototype._openInspectorWindow):
316         (WebInspector.DedicatedWorkerMessageForwarder):
317
318 2011-07-14  MORITA Hajime  <morrita@google.com>
319
320         Unreviewed, rolling out r90976, r90981, and r90985.
321         http://trac.webkit.org/changeset/90976
322         http://trac.webkit.org/changeset/90981
323         http://trac.webkit.org/changeset/90985
324         https://bugs.webkit.org/show_bug.cgi?id=64251
325
326         build break
327
328         * WebCore.exp.in:
329         * dom/NodeRenderingContext.cpp:
330         (WebCore::NodeRenderingContext::NodeRenderingContext):
331         (WebCore::NodeRenderingContext::nextRenderer):
332         (WebCore::NodeRenderingContext::previousRenderer):
333         * dom/NodeRenderingContext.h:
334         * dom/ShadowContentElement.cpp:
335         (WebCore::ShadowContentElement::attach):
336         (WebCore::ShadowContentElement::detach):
337         * dom/ShadowContentElement.h:
338         * dom/ShadowContentSelector.cpp:
339         (WebCore::ShadowContentSelector::ShadowContentSelector):
340         (WebCore::ShadowContentSelector::selectInclusion):
341         (WebCore::ShadowContentSelector::willAttachContentFor):
342         (WebCore::ShadowContentSelector::didAttachContent):
343         (WebCore::ShadowContentSelector::activeElement):
344         * dom/ShadowContentSelector.h:
345         * dom/ShadowRoot.cpp:
346         (WebCore::ShadowRoot::~ShadowRoot):
347         (WebCore::ShadowRoot::activeContentElement):
348         * dom/ShadowRoot.h:
349         * testing/Internals.cpp:
350         * testing/Internals.h:
351         * testing/Internals.idl:
352
353 2011-07-13  Ryosuke Niwa  <rniwa@webkit.org>
354
355         Move forwardEvent from RenderTextControl to HTMLTextFormControlElement
356         https://bugs.webkit.org/show_bug.cgi?id=64475
357
358         Reviewed by Kent Tamura.
359
360         Moved forwardEvent from RenderTextControl, RenderTextControlSingleLine, and RenderTextControlMultiLine
361         to HTMLTextFormControlElement, HTMLInputElement, and HTMLTextAreaElement.
362
363         This removes the last dependency on Event.h and EventNames.h in the cpp files for the above render
364         objects classes.
365
366         * html/HTMLTextAreaElement.cpp:
367         (WebCore::HTMLTextAreaElement::defaultEventHandler):
368         * html/HTMLTextFormControlElement.cpp:
369         (WebCore::HTMLTextFormControlElement::forwardEvent):
370         * html/HTMLTextFormControlElement.h:
371         * html/TextFieldInputType.cpp:
372         (WebCore::TextFieldInputType::forwardEvent):
373         * rendering/RenderTextControl.cpp:
374         * rendering/RenderTextControl.h:
375         * rendering/RenderTextControlMultiLine.cpp:
376         * rendering/RenderTextControlMultiLine.h:
377         * rendering/RenderTextControlSingleLine.cpp:
378         * rendering/RenderTextControlSingleLine.h:
379
380 2011-07-13  Ilya Tikhonovsky  <loislo@chromium.org>
381
382         Web Inspector: if you rename an element into the INPUT element the browser will crash.
383         https://bugs.webkit.org/show_bug.cgi?id=64292
384
385         Reviewed by Joseph Pecoraro.
386
387         * inspector/InspectorDOMAgent.cpp:
388         (WebCore::InspectorDOMAgent::setNodeName):
389         Unnecessary function call copyNonAttributeProperties was removed.
390
391 2011-07-13  Yuta Kitamura  <yutak@chromium.org>
392
393         WebSocket: Implement hybi handshake
394         https://bugs.webkit.org/show_bug.cgi?id=64344
395
396         Reviewed by Kent Tamura.
397
398         Implement WebSocket handshake which is described at
399         <http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10#section-5.1>.
400
401         Notable differences from hixie-76 protocol are:
402         - Challenge-response scheme has been changed dramatically.
403         - Servers do not send Sec-WebSocket-Location and Sec-WebSocket-Origin anymore.
404         - The value of "Upgrade" header has been changed to "websocket" (lower-case only).
405         - "Origin" header in client's request is renamed to "Sec-WebSocket-Origin".
406
407         New tests: http/tests/websocket/tests/hybi/handshake-fail-by-extensions-header.html
408                    http/tests/websocket/tests/hybi/handshake-fail-by-no-accept-header.html
409                    http/tests/websocket/tests/hybi/handshake-fail-by-wrong-accept-header.html
410
411         Note: Tests under hybi/ directory (including the new ones) are skipped and cannot be enabled
412         yet, because pywebsocket does not accept requests from half-baked client implementation
413         (i.e. hybi handshake + hixie-76 framing). They will be unskipped when hybi framing is landed
414         in WebCore.
415
416         * websockets/WebSocketHandshake.cpp:
417         Functions and members only used for hixie-76 handshake are renamed so that they are not confused
418         with hybi-10's ones.
419         (WebCore::generateHixie76SecWebSocketKey):
420         (WebCore::generateHixie76Key3):
421         (WebCore::generateHixie76ExpectedChallengeResponse):
422         (WebCore::generateSecWebSocketKey):
423         Generates a value for Sec-WebSocket-Key as stated in hybi-10.
424         (WebCore::getExpectedWebSocketAccept):
425         Calculates the expected value of Sec-WebSocket-Accept.
426         (WebCore::WebSocketHandshake::WebSocketHandshake):
427         (WebCore::WebSocketHandshake::clientHandshakeMessage):
428         (WebCore::WebSocketHandshake::clientHandshakeRequest):
429         (WebCore::WebSocketHandshake::readServerHandshake):
430         (WebCore::WebSocketHandshake::serverWebSocketAccept):
431         (WebCore::WebSocketHandshake::serverWebSocketExtensions):
432         (WebCore::WebSocketHandshake::checkResponseHeaders):
433         * websockets/WebSocketHandshake.h:
434
435 2011-07-13  MORITA Hajime  <morrita@google.com>
436
437         [ShadowContentElement] forwarded node should be able to access its hosting content element.
438         https://bugs.webkit.org/show_bug.cgi?id=64251
439         
440         Reviewed by Dimitri Glazkov.
441
442         - Introduced ShadowInclusionSet to manage included nodes to its includer content element.
443           ShadowInclusionSet instance is owned by ShadowRoot.
444         - Updated the set on inclusion list changes.
445         - Used the set to retrieve the content element of NodeRenderingContext.
446         
447         There are also related refactoring and cleanup:
448         - Renamed NodeRenderingContext::m_contentElement to m_includer
449         - ShadowContentSelector::m_activeElement is no longer used, thus removed.
450         
451         Test: fast/dom/shadow/content-element-includer.html
452
453         * WebCore.exp.in:
454         * dom/NodeRenderingContext.cpp:
455         (WebCore::NodeRenderingContext::NodeRenderingContext):
456         (WebCore::NodeRenderingContext::nextRenderer):
457         (WebCore::NodeRenderingContext::previousRenderer):
458         * dom/NodeRenderingContext.h:
459         (WebCore::NodeRenderingContext::includer): 
460         * dom/ShadowContentElement.cpp:
461         (WebCore::removeFromSet): Added
462         (WebCore::addToSet): Added
463         (WebCore::ShadowContentElement::attach):
464         (WebCore::ShadowContentElement::detach):
465         * dom/ShadowContentElement.h:
466         (WebCore::ShadowInclusionSet::add):
467         (WebCore::ShadowInclusionSet::remove):
468         (WebCore::ShadowInclusionSet::isEmpty):
469         (WebCore::ShadowInclusionSet::Translator::hash):
470         (WebCore::ShadowInclusionSet::Translator::equal):
471         (WebCore::ShadowInclusionSet::Hash::hash):
472         (WebCore::ShadowInclusionSet::Hash::equal):
473         (WebCore::ShadowInclusionSet::find):
474         * dom/ShadowContentSelector.cpp:
475         (WebCore::ShadowContentSelector::ShadowContentSelector):
476         (WebCore::ShadowContentSelector::selectInclusion):
477         * dom/ShadowContentSelector.h:
478         * dom/ShadowRoot.cpp:
479         (WebCore::ShadowRoot::~ShadowRoot):
480         (WebCore::ShadowRoot::includerFor): Replaced activeElement()
481         (WebCore::ShadowRoot::inclusions): Added
482         (WebCore::ShadowRoot::ensureInclusions): Added
483         * dom/ShadowRoot.h:
484         (WebCore::toShadowRoot):
485         * testing/Internals.cpp:
486         (WebCore::Internals::includerFor):
487         * testing/Internals.h:
488         * testing/Internals.idl:
489
490 2011-07-12  Dominic Cooney  <dominicc@chromium.org>
491
492         Raise if dispatchEvent dispatches an event that is being dispatched
493         https://bugs.webkit.org/show_bug.cgi?id=64150
494
495         Reviewed by Dimitri Glazkov.
496
497         Spec: http://www.w3.org/TR/DOM-Level-3-Events/#events-EventTarget-dispatchEvent
498
499         Test: fast/events/dispatch-event-being-dispatched.html
500
501         * dom/Event.h:
502         (WebCore::Event::isBeingDispatched): Added.
503         * dom/EventException.h:
504         * dom/EventException.idl: Add DISPATCH_REQUEST_ERR.
505         * dom/EventTarget.cpp:
506         (WebCore::EventTarget::dispatchEvent): Raise if being dispatched.
507         * dom/ExceptionCode.cpp: Add gunk for DISPATCH_REQUEST_ERR.
508
509 2011-07-13  Kent Tamura  <tkent@chromium.org>
510
511         Implement text field placeholders using shadow DOM
512         https://bugs.webkit.org/show_bug.cgi?id=64253
513
514         Reviewed by Dimitri Glazkov.
515
516         Represents a placeholder text as a shadow element, and its
517         visibility is controlled by 'visibility' CSS property.
518
519         This patch removes all of existing code about placeholder from
520         RenderTextControl*. RenderTextControl* have only small code about
521         placeholder layout.
522
523         Also, this patch removes INPUT_PLACEHOLDER legacy pseudo ID, and
524         the placeholder style uses Element::shadowPseudoId().
525
526         This fixes the following regressions:
527         - https://bugs.webkit.org/show_bug.cgi?id=51290
528         - https://bugs.webkit.org/show_bug.cgi?id=54797
529         - https://bugs.webkit.org/show_bug.cgi?id=54814
530         - https://bugs.webkit.org/show_bug.cgi?id=63367
531
532         Test: fast/forms/textarea-placeholder-wrapping.html
533
534         * css/CSSSelector.cpp: Remove INPUT_PLACEHOLDER legacy pseudo ID.
535         (WebCore::CSSSelector::pseudoId):
536         (WebCore::nameToPseudoTypeMap):
537         (WebCore::CSSSelector::extractPseudoType):
538         * css/CSSSelector.h: ditto.
539         * css/html.css:
540         (::-webkit-input-placeholder): Added. This contains properties
541         common in <input> and <textarea>. Some properties have !important
542         so that a stylesheet specified by a page author won't break
543         WebKit's assumption.
544         (input::-webkit-input-placeholder, isindex::-webkit-input-placeholder):
545          Added the default style for <input> placeholders.
546         * html/HTMLInputElement.cpp:
547         (WebCore::HTMLInputElement::placeholderElement): Delegate to an InputType.
548         (WebCore::HTMLInputElement::updatePlaceholderText): ditto.
549         * html/HTMLInputElement.h: Declare placeholderElement() and updatePlaceholderText().
550         * html/HTMLTextAreaElement.cpp:
551         (WebCore::HTMLTextAreaElement::createRenderer):
552         Remove the 'placeholderVisible' argument.
553         (WebCore::HTMLTextAreaElement::placeholderElement): Added.
554         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
555          Added. This creates, deletes, or updates the placeholder element.
556         * html/HTMLTextAreaElement.h:
557         - Declare placeholderElement() and updatePlaceholderText().
558         - Add m_placeholder.
559         * html/HTMLTextFormControlElement.cpp:
560         (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
561         Update the placeholder element and 'visibility' CSS property,
562         instead of delegating the job to a renderer.
563         * html/HTMLTextFormControlElement.h:
564         Declare two pure virtual functions: placeholderElement() and updatePlaceholderText().
565         * html/InputType.cpp:
566         (WebCore::InputType::placeholderElement): Add an empty implementation.
567         (WebCore::InputType::updatePlaceholderText): Add an empty implementation.
568         * html/InputType.h: Declare placeholderElement() and updatePlaceholderText().
569         * html/TextFieldInputType.cpp:
570         (WebCore::TextFieldInputType::createRenderer):
571         Remove the 'placeholderVisible' argument.
572         (WebCore::TextFieldInputType::placeholderElement): Added.
573         (WebCore::TextFieldInputType::destroyShadowSubtree): Deletes m_placeholder.
574         (WebCore::TextFieldInputType::updatePlaceholderText):
575          Added. This creates, deletes, or updates the placeholder element.
576         * html/TextFieldInputType.h:
577         - Declare placeholderElement() and updatePlaceholderText().
578         - Add m_placeholder.
579         * rendering/RenderTextControl.cpp:
580         (WebCore::RenderTextControl::RenderTextControl):
581         Remove the 'placeholderVisible' argument.
582         (WebCore::RenderTextControl::layoutSpecialExcludedChild):
583         Excludes the placeholder renderer in order to avoid to secure a box for
584         the placeholder.
585         * rendering/RenderTextControl.h:
586         - Remove declarations of removed functions.
587         - Update the RenderTextControl signature.
588         - Add layoutSpecialExcludedChild().
589         * rendering/RenderTextControlMultiLine.cpp:
590         (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
591         Remove the 'placeholderVisible' argument.
592         (WebCore::RenderTextControlMultiLine::layoutSpecialExcludedChild):
593         Laying out the placeholder box so that it has correct width and location.
594         * rendering/RenderTextControlMultiLine.h:
595         - Remove declarations of removed functions.
596         - Update the RenderTextControlMultiLine signature.
597         - Add layoutSpecialExcludedChild().
598         * rendering/RenderTextControlSingleLine.cpp:
599         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
600         Remove the 'placeholderVisible' argument.
601         (WebCore::RenderTextControlSingleLine::layout):
602         Laying out the placeholder box so that it has correct width and location.
603         * rendering/RenderTextControlSingleLine.h:
604         - Remove declarations of removed functions.
605         - Update the RenderTextControlSingleLine signature.
606         * rendering/style/RenderStyleConstants.h: Remove INPUT_PLACEHOLDER.
607
608 2011-07-13  James Simonsen  <simonjam@chromium.org>
609
610         Remove hack that forcefully prevents scripts from running in shadow SVG
611         https://bugs.webkit.org/show_bug.cgi?id=64419
612
613         This hack was put in to prevent scripts from running in shadow SVG. This should never have
614         happened, but did because we didn't parse <script> tags in SVG properly. This was fixed in
615         r88584, so the hack is no longer needed.
616
617         No new tests since there is no change in functionality.
618
619         Reviewed by Tony Gentilcore.
620
621         * dom/ScriptElement.cpp:
622         (WebCore::ScriptElement::prepareScript):
623
624 2011-07-13  Mihnea Ovidenie  <mihnea@adobe.com>
625
626         [CSSRegions] Parse -webkit-content-order property
627         https://bugs.webkit.org/show_bug.cgi?id=63897
628
629         Reviewed by David Hyatt.
630
631         Test: fast/regions/webkit-content-order-parsing.html
632
633         * css/CSSComputedStyleDeclaration.cpp:
634         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
635         * css/CSSParser.cpp:
636         (WebCore::CSSParser::parseValue):
637         * css/CSSPropertyNames.in:
638         * css/CSSStyleSelector.cpp:
639         (WebCore::CSSStyleSelector::applyProperty):
640         * rendering/style/RenderStyle.cpp:
641         (WebCore::RenderStyle::diff):
642         * rendering/style/RenderStyle.h:
643         (WebCore::InheritedFlags::regionIndex):
644         (WebCore::InheritedFlags::setRegionIndex):
645         (WebCore::InheritedFlags::initialRegionIndex):
646         * rendering/style/StyleRareNonInheritedData.cpp:
647         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
648         (WebCore::StyleRareNonInheritedData::operator==):
649         * rendering/style/StyleRareNonInheritedData.h:
650
651 2011-07-13  James Robinson  <jamesr@chromium.org>
652
653         Reviewed by Kenneth Russell.
654
655         [chromium] Move draw implementation for ContentLayerChromium/ImageLayerChromium to the appropriate CCLayerImpl subclass
656         https://bugs.webkit.org/show_bug.cgi?id=58833
657
658         Adds a TiledLayerChromium class to handle the tiling logic shared by ContentLayerChromium and ImageLayerChromium
659         so that they can be siblings in the class hierarchy instead of children. Also adds a CCTiledLayerImpl to handle
660         the drawing responsibilities for tiled layers.
661
662         TiledLayerChromium maintains a tiler, tiling options, and calculates the tiling transform. Subclasses are
663         responsible for providing an appropriate texture updater implementation. CCTiledLayerImpl takes the tiler,
664         tiling transform and layer properties and draws the layer.  Longer term it'd be better of the CCTiledLayerImpl
665         owned the tiler and the TiledLayerChromium only owned an updater, but getting there will require changing the
666         way tile eviction works.
667
668         * WebCore.gypi:
669         * platform/graphics/chromium/ContentLayerChromium.cpp:
670         (WebCore::ContentLayerChromium::ContentLayerChromium):
671         (WebCore::ContentLayerChromium::paintContentsIfDirty):
672         (WebCore::ContentLayerChromium::drawsContent):
673         * platform/graphics/chromium/ContentLayerChromium.h:
674         (WebCore::ContentLayerChromium::textureUpdater):
675         * platform/graphics/chromium/ImageLayerChromium.cpp:
676         (WebCore::ImageLayerChromium::ImageLayerChromium):
677         (WebCore::ImageLayerChromium::cleanupResources):
678         (WebCore::ImageLayerChromium::paintContentsIfDirty):
679         (WebCore::ImageLayerChromium::textureUpdater):
680         (WebCore::ImageLayerChromium::contentBounds):
681         (WebCore::ImageLayerChromium::drawsContent):
682         (WebCore::ImageLayerChromium::createTextureUpdaterIfNeeded):
683         * platform/graphics/chromium/ImageLayerChromium.h:
684         * platform/graphics/chromium/LayerChromium.cpp:
685         (WebCore::LayerChromium::pushPropertiesTo):
686         (WebCore::LayerChromium::ccLayerImpl):
687         * platform/graphics/chromium/LayerChromium.h:
688         * platform/graphics/chromium/LayerRendererChromium.cpp:
689         (WebCore::LayerRendererChromium::drawRootLayer):
690         * platform/graphics/chromium/LayerTilerChromium.cpp:
691         (WebCore::LayerTilerChromium::updateRect):
692         (WebCore::LayerTilerChromium::draw):
693         (WebCore::LayerTilerChromium::drawTiles):
694         * platform/graphics/chromium/LayerTilerChromium.h:
695         * platform/graphics/chromium/TiledLayerChromium.cpp: Added.
696         (WebCore::TiledLayerChromium::TiledLayerChromium):
697         (WebCore::TiledLayerChromium::~TiledLayerChromium):
698         (WebCore::TiledLayerChromium::createCCLayerImpl):
699         (WebCore::TiledLayerChromium::cleanupResources):
700         (WebCore::TiledLayerChromium::setLayerRenderer):
701         (WebCore::TiledLayerChromium::updateTileSizeAndTilingOption):
702         (WebCore::TiledLayerChromium::drawsContent):
703         (WebCore::TiledLayerChromium::createTilerIfNeeded):
704         (WebCore::TiledLayerChromium::updateCompositorResources):
705         (WebCore::TiledLayerChromium::setTilingOption):
706         (WebCore::TiledLayerChromium::setIsMask):
707         (WebCore::TiledLayerChromium::tilingTransform):
708         (WebCore::TiledLayerChromium::pushPropertiesTo):
709         (WebCore::writeIndent):
710         (WebCore::TiledLayerChromium::dumpLayerProperties):
711         * platform/graphics/chromium/TiledLayerChromium.h: Added.
712         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
713         (WebCore::CCLayerImpl::draw):
714         * platform/graphics/chromium/cc/CCLayerImpl.h:
715         (WebCore::CCLayerImpl::setDrawsContent):
716         (WebCore::CCLayerImpl::drawsContent):
717         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: Added.
718         (WebCore::CCTiledLayerImpl::CCTiledLayerImpl):
719         (WebCore::CCTiledLayerImpl::~CCTiledLayerImpl):
720         (WebCore::CCTiledLayerImpl::draw):
721         (WebCore::CCTiledLayerImpl::bindContentsTexture):
722         (WebCore::CCTiledLayerImpl::dumpLayerProperties):
723         * platform/graphics/chromium/cc/CCTiledLayerImpl.h: Added.
724         (WebCore::CCTiledLayerImpl::create):
725         (WebCore::CCTiledLayerImpl::setTilingTransform):
726         (WebCore::CCTiledLayerImpl::setTiler):
727
728 2011-07-13  Julien Chaffraix  <jchaffraix@webkit.org>
729
730         Remove an unused bit in RenderObject
731         https://bugs.webkit.org/show_bug.cgi?id=64485
732
733         Reviewed by Darin Adler.
734
735         No change in behavior so no new test.
736
737         * rendering/RenderObject.h: Removed a bit that was duplicated from RenderTableCell.
738         However it was not used in RenderObject and RenderTableCell already packed this bit.
739         We were lying in the number of used bits in RenderObject which was 33. This change
740         brings us back to what was advertised.
741
742 2011-07-13  Simon Fraser  <simon.fraser@apple.com>
743
744         Fix non-debug builds.
745
746         * rendering/RenderLayerBacking.cpp:
747         (WebCore::RenderLayerBacking::createGraphicsLayer):
748
749 2011-07-13  Vitaly Repeshko  <vitalyr@chromium.org>
750
751         [chromium] Fix mac build after r90949.
752
753         * bindings/v8/V8HiddenPropertyName.cpp:
754         (WebCore::V8HiddenPropertyName::hiddenReferenceName):
755         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
756         (WebCore::toV8Object):
757
758 2011-07-13  Emil A Eklund  <eae@chromium.org>
759
760         Switch table rendering to to new layout types
761         https://bugs.webkit.org/show_bug.cgi?id=64478
762
763         Reviewed by Eric Seidel.
764
765         No new tests, no new functionality.
766
767         * rendering/AutoTableLayout.cpp:
768         * rendering/AutoTableLayout.h:
769         * rendering/HitTestResult.cpp:
770         * rendering/HitTestResult.h:
771         * rendering/LayoutTypes.h:
772         * rendering/RenderBlock.h:
773         * rendering/RenderBoxModelObject.cpp:
774         * rendering/RenderBoxModelObject.h:
775         * rendering/RenderObject.h:
776         * rendering/RenderTable.cpp:
777         * rendering/RenderTable.h:
778         * rendering/RenderTableCell.cpp:
779         * rendering/RenderTableCell.h:
780
781 2011-07-13  Simon Fraser  <simon.fraser@apple.com>
782
783         Factor some GraphicsLayer creation code in RenderLayerBacking
784         https://bugs.webkit.org/show_bug.cgi?id=64487
785
786         Reviewed by Sam Weinig.
787
788         Move the GraphicsLayer::create() calls into once place so that we
789         don't have lots of #ifndef NDEBUG in various places, and can share
790         more code in future.
791         
792         No behavior change, so no new tests.
793
794         * rendering/RenderLayerBacking.cpp:
795         (WebCore::RenderLayerBacking::RenderLayerBacking):
796         (WebCore::RenderLayerBacking::~RenderLayerBacking):
797         (WebCore::RenderLayerBacking::createGraphicsLayer):
798         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
799         (WebCore::RenderLayerBacking::destroyGraphicsLayers):
800         (WebCore::RenderLayerBacking::updateLayerTransform):
801         (WebCore::RenderLayerBacking::updateClippingLayers):
802         (WebCore::RenderLayerBacking::updateOverflowControlsLayers):
803         (WebCore::RenderLayerBacking::updateForegroundLayer):
804         (WebCore::RenderLayerBacking::updateMaskLayer):
805         * rendering/RenderLayerBacking.h:
806
807 2011-07-13  Xan Lopez  <xlopez@igalia.com>
808
809         [GTK] Fix distcheck.
810
811         Reviewed by Martin Robinson.
812
813         * GNUmakefile.list.am: add missing files.
814
815 2011-07-13  James Robinson  <jamesr@chromium.org>
816
817         [chromium] No implementation defined for WTF::monotonicallyIncreasingTime
818         https://bugs.webkit.org/show_bug.cgi?id=64420
819
820         Reviewed by Tony Gentilcore.
821
822         Removes some redundant time related code.
823
824         * platform/chromium/PlatformBridge.h:
825         * platform/chromium/SystemTimeChromium.cpp:
826         (WebCore::userIdleTime):
827
828 2011-07-13  Vitaly Repeshko  <vitalyr@chromium.org>
829
830         [V8] Avoid memory leaks with hidden references.
831         https://bugs.webkit.org/show_bug.cgi?id=64467
832
833         Reviewed by Adam Barth.
834
835         We used to have growing arrays of hidden references associated
836         with objects. The entries in this array had no keys and were never
837         removed. This patch changes the interface to require a reference
838         name. This way it's harder to leak an unbounded number of
839         objects. Also it makes our wrapper objects one machine word
840         smaller.
841
842         * bindings/scripts/CodeGeneratorV8.pm:
843         (GenerateNormalAttrGetter): Started using new interface.
844
845         Interface changes:
846         * bindings/v8/V8DOMWrapper.cpp:
847         (WebCore::V8DOMWrapper::setNamedHiddenReference):
848         (WebCore::V8DOMWrapper::setNamedHiddenWindowReference):
849         * bindings/v8/V8DOMWrapper.h:
850
851         Added a helper to compute hidden reference names as V8 strings:
852         * bindings/v8/V8HiddenPropertyName.cpp:
853         (WebCore::V8HiddenPropertyName::hiddenReferenceName):
854         * bindings/v8/V8HiddenPropertyName.h:
855
856         * bindings/v8/WrapperTypeInfo.h: Removed the hidden reference
857         array internal field.
858
859         Update usages of hidden references:
860         * bindings/v8/custom/V8CSSStyleSheetCustom.cpp:
861         (WebCore::toV8):
862         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
863         (WebCore::toV8):
864         * bindings/v8/custom/V8DOMTokenListCustom.cpp:
865         (WebCore::toV8):
866         * bindings/v8/custom/V8LocationCustom.cpp:
867         (WebCore::toV8):
868         * bindings/v8/custom/V8MessageChannelConstructor.cpp:
869         (WebCore::V8MessageChannel::constructorCallback):
870         * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
871         (WebCore::toV8):
872         * bindings/v8/custom/V8StyleSheetCustom.cpp:
873         (WebCore::toV8):
874         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
875         (WebCore::toV8Object):
876
877         * bindings/scripts/test/V8/V8TestObj.cpp:
878         (WebCore::TestObjInternal::readOnlyTestObjAttrAttrGetter): Updated.
879
880 2011-07-13  Joseph Pecoraro  <joepeck@webkit.org>
881
882         Improve names of some ApplicationCacheStorage accessor methods
883         https://bugs.webkit.org/show_bug.cgi?id=64433
884
885         Reviewed by Alexey Proskuryakov.
886
887         Some methods returned a bool for success/failure and
888         actually returned a value as an out parameter so their
889         name was confusing. Rename these methods to make them
890         more clear.
891
892         (WebCore::ApplicationCache::diskUsageForOrigin):
893         * loader/appcache/ApplicationCacheGroup.cpp:
894         (WebCore::ApplicationCacheGroup::recalculateAvailableSpaceInQuota):
895         * loader/appcache/ApplicationCacheStorage.cpp:
896         (WebCore::ApplicationCacheStorage::calculateQuotaForOrigin):
897         (WebCore::ApplicationCacheStorage::calculateUsageForOrigin):
898         (WebCore::ApplicationCacheStorage::calculateRemainingSizeForOriginExcludingCache):
899         (WebCore::ApplicationCacheStorage::checkOriginQuota):
900         * loader/appcache/ApplicationCacheStorage.h:
901         * loader/appcache/ApplicationCache.cpp:
902         Rename the methods.
903
904         * WebCore.exp.in:
905         Replaced old versions. Also, calculateRemaining wasn't needed
906         outside WebCore, so no longer export it.
907
908 2011-07-13  Joseph Pecoraro  <joepeck@webkit.org>
909
910         Some ApplicationCache Origin Cleanup
911         https://bugs.webkit.org/show_bug.cgi?id=64431
912
913         Reviewed by Alexey Proskuryakov.
914
915         - m_loadedSize is inaccurate. This just replaces it with
916         calls to ApplicationCache::estimatedSizeInStorage.
917
918         - m_availableSpaceInQuota can get out of date, so we just
919         recalculate it at the start of appcache downloads.
920
921         * loader/appcache/ApplicationCacheGroup.h:
922         * loader/appcache/ApplicationCacheGroup.cpp:
923         (WebCore::ApplicationCacheGroup::ApplicationCacheGroup):
924         (WebCore::ApplicationCacheGroup::didReceiveData):
925         Remove references to m_loadedSize.
926
927         (WebCore::ApplicationCacheGroup::didFinishLoading):
928         Replace m_loadedSize with estimatedSizeInStorage after we
929         add the new cached resource to the cache. The calculation
930         already happened so this check is fast.
931
932         (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
933         When we start the Downloading phase, recalculate the quota
934         so that we have an up to date quota value so that we can
935         break early if needed.
936
937 2011-07-12  Brent Fulgham  <bfulgham@webkit.org>
938
939         Standardize WinCairo conditionalized code under PLATFORM macro.
940         https://bugs.webkit.org/show_bug.cgi?id=64377
941
942         Reviewed by Maciej Stachowiak.
943
944         Update compile-time conditions that had previously used #ifdef
945         of WIN_CAIRO to consistently use PLATFORM(WIN_CAIRO).
946
947         * WebCore.vcproj/WebCoreCairo.vsprops: Remove redundant declaration
948           of WIN_CAIRO.
949         * WebCore.vcproj/WebCoreDebugCairoCFLite.vsprops: Update to use
950           the existing WinCairo.vsprops file.
951         * WebCorePrefix.h: Update for new WTF_PLATFORM_WIN_CAIRO define.
952         * config.h: Update to use PLATFORM(WIN_CAIRO).
953
954 2011-07-13  Alexandru Chiculita  <achicu@adobe.com>
955
956         [CSS Exclusions] Fix for comment #23 on wrap-shape parsing bug 61726
957         https://bugs.webkit.org/show_bug.cgi?id=64464
958
959         Reviewed by Tony Chang.
960
961         No new tests needed.
962
963         * css/CSSParser.cpp:
964         (WebCore::CSSParser::parseWrapShapeRect): Removed the "valid" local.
965         (WebCore::CSSParser::parseWrapShapeCircle): Removed the "valid" local.
966         (WebCore::CSSParser::parseWrapShapeEllipse): Removed the "valid" local.
967         * css/CSSPrimitiveValue.cpp:
968         * css/CSSWrapShapes.h:
969         (WebCore::CSSWrapShapePolygon::getXAt): Replaced bit shift with multiplication.
970         (WebCore::CSSWrapShapePolygon::getYAt): Replaced bit shift with multiplication.
971         * rendering/style/RenderStyle.cpp:
972         * rendering/style/StyleRareNonInheritedData.h:
973
974 2011-07-13  Abhishek Arya  <inferno@chromium.org>
975
976         Reviewed by Adam Barth.
977
978         Issue with Frame lifetime due to deletion in beforeload event.
979         https://bugs.webkit.org/show_bug.cgi?id=64457
980
981         Copy the Frame protector higher in the stack from loadWithDocumentLoader
982         to loadFrameRequest since any of loadPostRequest or loadURL can call
983         loadWithDocumentLoader, thereby dispatching the beforeload event and
984         blowing away the frame. This deleted frame will be later accessed in
985         the loadFrameRequest function causing a crash.       
986  
987         Test: fast/events/form-iframe-target-before-load-crash2.html
988
989         * loader/FrameLoader.cpp:
990         (WebCore::FrameLoader::loadFrameRequest):
991         (WebCore::FrameLoader::loadWithDocumentLoader):
992
993 2011-07-13  Mihnea Ovidenie  <mihnea@adobe.com>
994
995         [CSSRegions]content:-webkit-from-flow not applied correctly
996         https://bugs.webkit.org/show_bug.cgi?id=64438
997
998         Reviewed by Tony Chang.
999
1000         Forgot to modify getStringValue(), i was modifying only getStringValue(ExceptionCode&).
1001
1002         Test: fast/regions/content-webkit-from-flow-parsing.html (existing).
1003
1004         * css/CSSPrimitiveValue.cpp:
1005         (WebCore::CSSPrimitiveValue::getStringValue):
1006
1007 2011-07-12  Ryosuke Niwa  <rniwa@webkit.org>
1008
1009         Don't reuse the last InsertTextCommand
1010         https://bugs.webkit.org/show_bug.cgi?id=64416
1011
1012         Reviewed by Justin Garcia.
1013
1014         This patch makes the interface of InsertTextCommand less foreign. It now takes arguments in
1015         its constructor and executes the command in doApply like other edit commands.
1016
1017         * editing/CompositeEditCommand.cpp:
1018         (WebCore::CompositeEditCommand::applyCommandToComposite): Added.
1019         * editing/CompositeEditCommand.h:
1020         * editing/InsertTextCommand.cpp:
1021         (WebCore::InsertTextCommand::InsertTextCommand): Takes arguments input used to take.
1022         (WebCore::InsertTextCommand::doApply): Renamed from input.
1023         * editing/InsertTextCommand.h:
1024         (WebCore::InsertTextCommand::create): Takes arguments input used to take.
1025         * editing/TypingCommand.cpp:
1026         (WebCore::TypingCommand::insertTextRunWithoutNewlines): Creates InsertTextCommand.
1027
1028 2011-07-12  Dmitry Lomov  <dslomov@google.com>
1029
1030         https://bugs.webkit.org/show_bug.cgi?id=63041
1031         [Chromium][V8] Make DOMDataStore per-isolate
1032         This patch:
1033          - makes DOMData class an utility class with static members only
1034          - adds an isolate-specific DOMDataStore in V8BindingPerIsolateData.
1035         Dromaeo benchmarks are not affected.
1036
1037         Reviewed by Adam Barth.
1038
1039         * bindings/v8/DOMData.cpp:
1040         (WebCore::getDefaultStore):
1041         (WebCore::DOMData::getCurrentStore):
1042         * bindings/v8/DOMData.h:
1043         * bindings/v8/DOMDataStore.cpp:
1044         (WebCore::DOMDataStore::DOMDataStore):
1045         (WebCore::DOMDataStore::allStores):
1046         * bindings/v8/DOMDataStore.h:
1047         * bindings/v8/ScopedDOMDataStore.cpp:
1048         (WebCore::ScopedDOMDataStore::ScopedDOMDataStore):
1049         * bindings/v8/ScopedDOMDataStore.h:
1050         * bindings/v8/StaticDOMDataStore.cpp:
1051         (WebCore::StaticDOMDataStore::StaticDOMDataStore):
1052         * bindings/v8/StaticDOMDataStore.h:
1053         * bindings/v8/V8Binding.h:
1054         (WebCore::V8BindingPerIsolateData::allStores):
1055         (WebCore::V8BindingPerIsolateData::getDOMDataStore):
1056         (WebCore::V8BindingPerIsolateData::setDOMDataStore):
1057         * bindings/v8/V8Binding.cpp:
1058         (WebCore::V8BindingPerIsolateData::V8BindingPerIsolateData):
1059         * bindings/v8/V8DOMMap.cpp:
1060         (WebCore::DOMDataStoreHandle::DOMDataStoreHandle):
1061         (WebCore::getDOMDataStore):
1062         (WebCore::enableFasterDOMStoreAccess):
1063
1064 2011-07-12  Simon Fraser  <simon.fraser@apple.com>
1065
1066         Rename compositing-related updateContentsScale() methods
1067         https://bugs.webkit.org/show_bug.cgi?id=64430
1068
1069         Reviewed by Joseph Pecoraro.
1070
1071         Rename updateContentsScale() to something less presumptuous; layers may choose
1072         to do something other than update their contents scale when the page scale factor
1073         changes. pageScaleFactorChanged() is a better name.
1074
1075         * page/Frame.cpp:
1076         (WebCore::Frame::pageScaleFactorChanged):
1077         (WebCore::Frame::scalePage):
1078         * page/Frame.h:
1079         * rendering/RenderLayer.cpp:
1080         (WebCore::RenderLayer::pageScaleFactorChanged):
1081         * rendering/RenderLayer.h:
1082         * rendering/RenderLayerBacking.cpp:
1083         (WebCore::RenderLayerBacking::pageScaleFactorChanged):
1084         * rendering/RenderLayerBacking.h:
1085         * rendering/RenderLayerCompositor.cpp:
1086         (WebCore::RenderLayerCompositor::pageScaleFactorChanged):
1087         * rendering/RenderLayerCompositor.h:
1088
1089 2011-07-13  Pierre Rossi  <pierre.rossi@gmail.com>
1090
1091         Fix compile for QRawFont.
1092
1093         https://bugs.webkit.org/show_bug.cgi?id=64453
1094
1095         Reviewed by Andreas Kling.
1096
1097         * platform/graphics/GraphicsContext.h:
1098         * platform/graphics/qt/FontQt.cpp:
1099         (WebCore::Font::drawGlyphs):
1100
1101 2011-07-13  John Knottenbelt  <jknotten@chromium.org>
1102
1103         Reference Geolocation object from GeoNotifier and Geolocation::setIsAllowed.
1104         https://bugs.webkit.org/show_bug.cgi?id=64363
1105
1106         Reviewed by Tony Gentilcore.
1107
1108         Test: fast/dom/Geolocation/remove-remote-context-in-error-callback-crash.html
1109
1110         * page/Geolocation.cpp:
1111         (WebCore::Geolocation::setIsAllowed):
1112         * page/Geolocation.h:
1113
1114 2011-07-13  Vsevolod Vlasov  <vsevik@chromium.org>
1115
1116         Web Inspector: Network panel search needs each resource to have unique identifier.
1117         https://bugs.webkit.org/show_bug.cgi?id=64287
1118
1119         Reviewed by Pavel Feldman.
1120
1121         * inspector/front-end/NetworkManager.js:
1122         (WebInspector.NetworkManager.prototype.requestContent):
1123         (WebInspector.NetworkDispatcher):
1124         (WebInspector.NetworkDispatcher.prototype.requestWillBeSent):
1125         (WebInspector.NetworkDispatcher.prototype.resourceLoadedFromMemoryCache):
1126         (WebInspector.NetworkDispatcher.prototype._appendRedirect):
1127         * inspector/front-end/NetworkPanel.js:
1128         (WebInspector.NetworkPanel.prototype._appendResource):
1129         (WebInspector.NetworkPanel.prototype._frameNavigated):
1130         (WebInspector.NetworkPanel.prototype._updateSearchMatchedListAfterResourceIdentifierChanged):
1131
1132 2011-07-13  Alexandru Chiculita  <achicu@adobe.com>
1133
1134         Bridge RenderBoxModelObject::calculateBackgroundImageGeometry parameters into a class
1135         https://bugs.webkit.org/show_bug.cgi?id=63987
1136
1137         Reviewed by Hajime Morita.
1138
1139         Change doesn't add new functionality. No test needed.
1140
1141         * rendering/RenderBox.cpp:
1142         (WebCore::RenderBox::maskClipRect):
1143         (WebCore::RenderBox::repaintLayerRectsForImage):
1144         * rendering/RenderBoxModelObject.cpp:
1145         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1146         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatX):
1147         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatY):
1148         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::useFixedAttachment):
1149         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::clip):
1150         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::relativePhase):
1151         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1152         * rendering/RenderBoxModelObject.h:
1153         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::destOrigin):
1154         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setDestOrigin):
1155         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::destRect):
1156         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setDestRect):
1157         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::phase):
1158         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhase):
1159         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::tileSize):
1160         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setTileSize):
1161         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhaseX):
1162         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhaseY):
1163
1164 2011-07-13  MORITA Hajime  <morrita@google.com>
1165
1166         Refactoring: Ignored ExceptionCode value should be less annoying.
1167         https://bugs.webkit.org/show_bug.cgi?id=63688
1168
1169         - Introduced ExceptionCodePlaceholder class for the default parameter of ExceptionCode.
1170         - Introduced ASSERT_NO_EXCEPTION to check ExceptionCode not set to non-zero after the call.
1171         - Adopted ASSERT_NO_EXCEPTION in Range.cpp
1172
1173         No new tests. No behaviour change.
1174
1175         Reviewed by Darin Adler.
1176
1177         * GNUmakefile.list.am:
1178         * WebCore.gypi:
1179         * WebCore.xcodeproj/project.pbxproj:
1180         * dom/ExceptionCodePlaceholder.h: Added.
1181         (WebCore::ExceptionCodePlaceholder::ExceptionCodePlaceholder):
1182         (WebCore::ExceptionCodePlaceholder::operator ExceptionCode& ):
1183         (WebCore::IgnorableExceptionCode::IgnorableExceptionCode):
1184         (WebCore::CheckedExceptionCode::CheckedExceptionCode):
1185         (WebCore::CheckedExceptionCode::~CheckedExceptionCode):
1186         * dom/Range.cpp:
1187         (WebCore::Range::Range):
1188         (WebCore::Range::editingStartPosition):
1189         * dom/Range.h:        
1190
1191 2011-07-13  Nikolas Zimmermann  <nzimmermann@rim.com>
1192
1193         Regression: OOB read in svg text run
1194         https://bugs.webkit.org/show_bug.cgi?id=63627
1195
1196         Not reviewed.
1197
1198         Fixed last minute typo leading to assertions.
1199
1200         * rendering/InlineTextBox.cpp:
1201         (WebCore::InlineTextBox::paintSelection):
1202
1203 2011-07-12  Andrey Kosyakov  <caseq@chromium.org>
1204
1205         Web Inspector: factor NetworkLogView out of Network panel
1206         https://bugs.webkit.org/show_bug.cgi?id=64366
1207
1208         Reviewed by Pavel Feldman.
1209
1210         * inspector/front-end/NetworkPanel.js:
1211         (WebInspector.NetworkLogView):
1212         (WebInspector.NetworkLogView.prototype.get useLargeRows):
1213         (WebInspector.NetworkLogView.prototype.set allowPopover):
1214         (WebInspector.NetworkLogView.prototype.elementsToRestoreScrollPositionsFor):
1215         (WebInspector.NetworkLogView.prototype.resize):
1216         (WebInspector.NetworkLogView.prototype._createTable):
1217         (WebInspector.NetworkLogView.prototype.show):
1218         (WebInspector.NetworkLogView.prototype.hide):
1219         (WebInspector.NetworkLogView.prototype._reset):
1220         (WebInspector.NetworkLogView.prototype.switchToDetailedView):
1221         (WebInspector.NetworkLogView.prototype.switchToBriefView):
1222         (WebInspector.NetworkLogView.prototype.get _setLargerResources):
1223         (WebInspector.NetworkLogView.prototype._getPopoverAnchor):
1224         (WebInspector.NetworkPanel):
1225         (WebInspector.NetworkPanel.prototype.get toolbarItemLabel):
1226         (WebInspector.NetworkPanel.prototype.get statusBarItems):
1227         (WebInspector.NetworkPanel.prototype.elementsToRestoreScrollPositionsFor):
1228         (WebInspector.NetworkPanel.prototype.resize):
1229         (WebInspector.NetworkPanel.prototype._reset):
1230         (WebInspector.NetworkPanel.prototype.updateSidebarWidth):
1231         (WebInspector.NetworkPanel.prototype.updateMainViewWidth):
1232         (WebInspector.NetworkPanel.prototype.handleShortcut):
1233         (WebInspector.NetworkPanel.prototype.show):
1234         (WebInspector.NetworkPanel.prototype.hide):
1235         (WebInspector.NetworkPanel.prototype.get resources):
1236         (WebInspector.NetworkPanel.prototype.resourceById):
1237         (WebInspector.NetworkPanel.prototype.canShowAnchorLocation):
1238         (WebInspector.NetworkPanel.prototype.showAnchorLocation):
1239         (WebInspector.NetworkPanel.prototype._onViewCleared):
1240         (WebInspector.NetworkPanel.prototype._onRowSizeChanged):
1241         (WebInspector.NetworkPanel.prototype._onResourceSelected):
1242         (WebInspector.NetworkPanel.prototype._showResource):
1243         (WebInspector.NetworkPanel.prototype._closeVisibleResource):
1244         (WebInspector.NetworkPanel.prototype._toggleGridMode):
1245         (WebInspector.NetworkPanel.prototype._toggleViewingResourceMode):
1246         (WebInspector.NetworkPanel.prototype.performSearch):
1247         (WebInspector.NetworkPanel.prototype.jumpToPreviousSearchResult):
1248         (WebInspector.NetworkPanel.prototype.jumpToNextSearchResult):
1249         (WebInspector.NetworkPanel.prototype.searchCanceled):
1250         (WebInspector.NetworkDataGridNode):
1251         (WebInspector.NetworkDataGridNode.prototype.isFilteredOut):
1252         (WebInspector.NetworkDataGridNode.prototype.select):
1253         (WebInspector.NetworkDataGridNode.prototype.get selectable):
1254
1255 2011-07-13  Sheriff Bot  <webkit.review.bot@gmail.com>
1256
1257         Unreviewed, rolling out r90634.
1258         http://trac.webkit.org/changeset/90634
1259         https://bugs.webkit.org/show_bug.cgi?id=64448
1260
1261         Qt HTTP Pipelining is not robust enough to be used in that
1262         generic way. (Requested by benjaminp on #webkit).
1263
1264         * platform/network/qt/ResourceRequestQt.cpp:
1265         (WebCore::ResourceRequest::toNetworkRequest):
1266
1267 2011-07-13  Nikolas Zimmermann  <nzimmermann@rim.com>
1268
1269         Regression: OOB read in svg text run
1270         https://bugs.webkit.org/show_bug.cgi?id=63627
1271
1272         Reviewed by Zoltan Herczeg.
1273
1274         A TextRun is constructed for a portion of a string [a,b] whose original length is c (0 < a < b < c).
1275         The TextRun charactersLength variable stores the length of the remaining text from (b..c) in order
1276         to support ligatures in SVG Fonts. Example: <text>ffl</text>. When measuring the advance from char 0
1277         to char 1 the whole 'ffl' text must be passed to the SVG glyph selection code, as the SVG Font may
1278         define a single glyph for the characters 'ffl' thus leading to a single character long text
1279         pointing to the ffl ligature, not three individual 'f' / 'f' / 'l' characters anymore.
1280
1281         constructTextRun(..const UChar*, int length, ..) did not correctly calculate the maximum length (b..c).
1282         The passed in UChar buffer starts at eg. textRenderer->characters() + start(), and following condition
1283         holds true for 'length': start() + length <= textRenderer->textLength() (which denotes the maximum length
1284         of the textRenderer->characters() buffer). We have to keep track of the start() offset, so that we
1285         can calculate the charactersLength for the TextRun correctly: textRenderer->textLength() - start().
1286
1287         There are also other cases like RenderCombinedText and/or the presence of hyphens that were incorrectly
1288         tracked. Only InlineTextBox had to be fixed, the other callsites in eg. RenderBlockLineLayout already
1289         computed the maximum length correctly - I assured this by valgrind runs on all SVG Font tests.
1290
1291         * rendering/InlineTextBox.cpp:
1292         (WebCore::InlineTextBox::paint):
1293         (WebCore::InlineTextBox::paintSelection):
1294         (WebCore::InlineTextBox::constructTextRun): Add maximumLength parameter to constructTextRun.
1295         * rendering/InlineTextBox.h: Ditto.
1296
1297 2011-07-12  Antti Koivisto  <antti@apple.com>
1298
1299         didFirstVisuallyNonEmptyLayout dispatched too early
1300         https://bugs.webkit.org/show_bug.cgi?id=64412
1301
1302         Reviewed by Darin Adler and Sam Weinig.
1303
1304         Improve the mechanism that dispatches didFirstVisuallyNonEmptyLayout
1305
1306         - Wait until a threshold of characters and pixels has been exceeded before dispatching.
1307         - Wait until stylesheets are loaded (painting is disabled in this case).
1308
1309         * page/FrameView.cpp:
1310         (WebCore::FrameView::reset):
1311         (WebCore::FrameView::performPostLayoutTasks):
1312         * page/FrameView.h:
1313         (WebCore::FrameView::incrementVisuallyNonEmptyCharacterCount):
1314         (WebCore::FrameView::incrementVisuallyNonEmptyPixelCount):
1315         * rendering/RenderImage.cpp:
1316         (WebCore::RenderImage::RenderImage):
1317         (WebCore::RenderImage::imageChanged):
1318         * rendering/RenderImage.h:
1319         * rendering/RenderText.cpp:
1320         (WebCore::RenderText::RenderText):
1321
1322 2011-07-12  MORITA Hajime  <morrita@google.com>
1323
1324         [Refactoring][ShadowContentElement] Forwarded node list should be a linked-list.
1325         https://bugs.webkit.org/show_bug.cgi?id=64252
1326
1327         Reviewed by Dimitri Glazkov.
1328
1329         Introduced ShadowInclusionList and ShadowInclusion for maintaining
1330         forwarded content children. ShadowInclusion is doubly-linked list.
1331         ShadowContentElement::m_inclusions is replaced by ShadowInclusionList.
1332         
1333         This change is a prepration for bug 64251, which will introduce
1334         forwarded-children to content-element table.
1335         
1336         No new tests. No behavioral change.
1337
1338         * dom/NodeRenderingContext.cpp:
1339         (WebCore::nextRendererOf):
1340         (WebCore::previousRendererOf):
1341         (WebCore::firstRendererOf):
1342         (WebCore::lastRendererOf):
1343         * dom/ShadowContentElement.cpp:
1344         (WebCore::ShadowInclusion::append):
1345         (WebCore::ShadowInclusion::unlink):
1346         (WebCore::ShadowInclusionList::ShadowInclusionList):
1347         (WebCore::ShadowInclusionList::~ShadowInclusionList):
1348         (WebCore::ShadowInclusionList::find):
1349         (WebCore::ShadowInclusionList::clear):
1350         (WebCore::ShadowInclusionList::append):
1351         (WebCore::ShadowContentElement::attach):
1352         * dom/ShadowContentElement.h:
1353         (WebCore::ShadowInclusion::includer):
1354         (WebCore::ShadowInclusion::content):
1355         (WebCore::ShadowInclusion::next):
1356         (WebCore::ShadowInclusion::previous):
1357         (WebCore::ShadowInclusion::ShadowInclusion):
1358         (WebCore::ShadowInclusion::create):
1359         (WebCore::ShadowInclusionList::first):
1360         (WebCore::ShadowInclusionList::last):
1361         (WebCore::ShadowInclusionList::isEmpty):
1362         (WebCore::ShadowInclusionList::append):
1363         (WebCore::ShadowContentElement::inclusions):
1364         * dom/ShadowContentSelector.cpp:
1365         (WebCore::ShadowContentSelector::selectInclusion):
1366         * dom/ShadowContentSelector.h:
1367
1368 2011-07-12  David Reveman  <reveman@chromium.org>
1369
1370         [Chromium] Use nearest filter method with pixel aligned transforms.
1371         https://bugs.webkit.org/show_bug.cgi?id=64338
1372
1373         Reviewed by James Robinson.
1374
1375         Check for integer translation and use nearest texture filter when
1376         possible to avoid filter precisions problems at the layer edges.
1377
1378         Test: compositing/iframes/nested-iframe-scrolling.html (existing)
1379
1380         * platform/graphics/chromium/LayerTilerChromium.cpp:
1381         (WebCore::LayerTilerChromium::drawTiles):
1382         * platform/graphics/transforms/TransformationMatrix.cpp:
1383         (WebCore::TransformationMatrix::isIntegerTranslation):
1384         * platform/graphics/transforms/TransformationMatrix.h:
1385
1386 2011-07-12  David Reveman  <reveman@chromium.org>
1387
1388         Removed unnecessary function parameters from TilingData::textureOffset.
1389         https://bugs.webkit.org/show_bug.cgi?id=64245
1390
1391         Reviewed by Brent Fulgham.
1392
1393         No new tests, no functionality changes.
1394
1395         * platform/graphics/chromium/LayerTilerChromium.cpp:
1396         (WebCore::LayerTilerChromium::drawTiles):
1397         * platform/graphics/gpu/TilingData.cpp:
1398         (WebCore::TilingData::textureOffset):
1399         * platform/graphics/gpu/TilingData.h:
1400
1401 2011-07-12  Ryosuke Niwa  <rniwa@webkit.org>
1402
1403         Move RenderTextControl::indexForVisiblePosition to HTMLTextFormControlElement
1404         https://bugs.webkit.org/show_bug.cgi?id=64403
1405
1406         Reviewed by Hajime Morita.
1407
1408         Moved indexForVisiblePosition from RenderTextControl to HTMLTextFormControlElement.
1409
1410         Also replaced the call to RenderTextControl::isSelectableElement by a call to enclosingTextFormControl
1411         (moved from htmlediting to HTMLTextFormControlElement) because we are only interested in checking
1412         whether the given position is inside the current text form control or not.
1413
1414         In addition, modernized the code in indexForVisiblePosition by calling parentAnchoredEquivalent on the
1415         given position and replacing calls to deprecateNode and deprecatedEditingOffset by calls to containerNode
1416         and offsetInContainer.
1417
1418         * accessibility/AccessibilityRenderObject.cpp:
1419         (WebCore::AccessibilityRenderObject::indexForVisiblePosition): Calls indexForVisiblePosition.
1420         * editing/htmlediting.cpp: Removed enclosingTextFromControl.
1421         * editing/htmlediting.h: Removed enclosingTextFromControl.
1422         * html/HTMLTextFormControlElement.cpp:
1423         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition): Moved from RenderTextControl.
1424         (WebCore::HTMLTextFormControlElement::computeSelectionStart): Calls indexForVisiblePosition.
1425         (WebCore::HTMLTextFormControlElement::computeSelectionEnd): Calls indexForVisiblePosition.
1426         (WebCore::enclosingTextFormControl): Moved from htmlediting.cpp
1427         * html/HTMLTextFormControlElement.h:
1428         * rendering/RenderTextControl.cpp:
1429         * rendering/RenderTextControl.h:
1430
1431 2011-07-12  Julien Chaffraix  <jchaffraix@webkit.org>
1432
1433         Make RenderObject::containingBlock virtual for better speed and clarity
1434         https://bugs.webkit.org/show_bug.cgi?id=64318
1435
1436         Reviewed by Darin Adler.
1437
1438         No new tests, performance refactoring.
1439
1440         On some of my test cases, this method takes between 3 and 5% of the time spend.
1441         The method makes 2 calls to virtual methods which could be moved to their overriden
1442         version of containingBlock if we made it virtual.
1443
1444         That's what this patch does. It saves between 1 and 2% on some synthetic test cases
1445         as well as made the current method shorter.
1446
1447         * rendering/RenderObject.cpp:
1448         (WebCore::RenderObject::containingBlock): Removed code for RenderView and RenderTableCell,
1449         replaced by ASSERTs.
1450
1451         * rendering/RenderObject.h: Made containingBlock virtual.
1452
1453         * rendering/RenderTableCell.h:
1454         (WebCore::RenderTableCell::containingBlock):
1455         * rendering/RenderView.h:
1456         (WebCore::RenderView::containingBlock):
1457         The code moved from RenderObject is inlined in those 2 methods.
1458
1459 2011-07-12  James Robinson  <jamesr@chromium.org>
1460
1461         [chromium] Chromium win build fix.
1462
1463         * platform/graphics/chromium/FontChromiumWin.cpp:
1464         (WebCore::drawGlyphsWin):
1465
1466 2011-07-12  Pratik Solanki  <psolanki@apple.com>
1467
1468         Get webkit to compile with USE(CFNETWORK) enabled on Mac
1469         https://bugs.webkit.org/show_bug.cgi?id=63674
1470
1471         Reviewed by David Kilzer.
1472
1473         Changes to ResourceHandle class to get it to compile with USE(CFNETWORK).
1474
1475         No new tests because no change in functionality and option is not enabled on Mac.
1476
1477         * platform/network/ResourceHandle.h:
1478         * platform/network/ResourceHandleInternal.h:
1479         * platform/network/cf/ResourceHandleCFNet.cpp:
1480         (WebCore::didReceiveResponse):
1481         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
1482         (WebCore::ResourceHandle::start):
1483         (WebCore::WebCoreSynchronousLoaderClient::willSendRequest): Call adjustMIMETypeIfNecessary
1484         on Mac. Also port over fix for <rdar://problem/6901522> added in r43993 which forces the
1485         MIME type to text/html if the request is annotated with a "ForceHTMLMIMEType" property.
1486
1487 2011-07-12  James Robinson  <jamesr@chromium.org>
1488
1489         [chromium] Delete the unused legacy accelerated canvas 2d code
1490         https://bugs.webkit.org/show_bug.cgi?id=64214
1491
1492         Reviewed by Stephen White.
1493
1494         This removes the legacy accelerated canvas 2d path and support logic since we (chromium) are no longer using
1495         this codepath and it seems clear that no other port is interested.
1496
1497         Refactoring and removing unused code, so no new tests.
1498
1499         * WebCore.gypi:
1500         * WebCore.xcodeproj/project.pbxproj:
1501         * html/canvas/CanvasRenderingContext2D.cpp:
1502         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
1503         (WebCore::CanvasRenderingContext2D::setGlobalCompositeOperation):
1504         (WebCore::CanvasRenderingContext2D::didDraw):
1505         * html/canvas/CanvasRenderingContext2D.h:
1506         * loader/EmptyClients.h:
1507         * page/ChromeClient.h:
1508         * page/Page.cpp:
1509         (WebCore::Page::sharedGraphicsContext3D):
1510         * page/Page.h:
1511         * platform/graphics/GraphicsContext.cpp:
1512         (WebCore::GraphicsContext::setSharedGraphicsContext3D):
1513         (WebCore::GraphicsContext::syncSoftwareCanvas):
1514         * platform/graphics/GraphicsContext.h:
1515         * platform/graphics/GraphicsContext3D.h:
1516         * platform/graphics/chromium/DrawingBufferChromium.cpp:
1517         (WebCore::DrawingBuffer::setGrContext):
1518         * platform/graphics/chromium/FontLinux.cpp:
1519         (WebCore::Font::drawGlyphs):
1520         * platform/graphics/chromium/cc/CCLayerSorter.cpp:
1521         (WebCore::pointInTriangle):
1522         * platform/graphics/gpu/BicubicShader.cpp: Removed.
1523         * platform/graphics/gpu/BicubicShader.h: Removed.
1524         * platform/graphics/gpu/ConvolutionShader.cpp: Removed.
1525         * platform/graphics/gpu/ConvolutionShader.h: Removed.
1526         * platform/graphics/gpu/GraphicsContextGPU.cpp: Removed.
1527         * platform/graphics/gpu/GraphicsContextGPU.h: Removed.
1528         * platform/graphics/gpu/SharedGraphicsContext3D.cpp: Removed.
1529         * platform/graphics/gpu/SharedGraphicsContext3D.h: Removed.
1530         * platform/graphics/gpu/SolidFillShader.cpp: Removed.
1531         * platform/graphics/gpu/SolidFillShader.h: Removed.
1532         * platform/graphics/gpu/TexShader.cpp: Removed.
1533         * platform/graphics/gpu/TexShader.h: Removed.
1534         * platform/graphics/skia/GraphicsContextSkia.cpp:
1535         (WebCore::GraphicsContext::savePlatformState):
1536         (WebCore::GraphicsContext::restorePlatformState):
1537         (WebCore::GraphicsContext::addInnerRoundedRectClip):
1538         (WebCore::GraphicsContext::clearRect):
1539         (WebCore::GraphicsContext::clip):
1540         (WebCore::GraphicsContext::canvasClip):
1541         (WebCore::GraphicsContext::clipOut):
1542         (WebCore::GraphicsContext::clipPath):
1543         (WebCore::GraphicsContext::concatCTM):
1544         (WebCore::GraphicsContext::setCTM):
1545         (WebCore::GraphicsContext::drawConvexPolygon):
1546         (WebCore::GraphicsContext::drawEllipse):
1547         (WebCore::GraphicsContext::drawFocusRing):
1548         (WebCore::GraphicsContext::drawLine):
1549         (WebCore::GraphicsContext::drawLineForTextChecking):
1550         (WebCore::GraphicsContext::drawLineForText):
1551         (WebCore::GraphicsContext::drawRect):
1552         (WebCore::GraphicsContext::fillPath):
1553         (WebCore::GraphicsContext::fillRect):
1554         (WebCore::GraphicsContext::fillRoundedRect):
1555         (WebCore::GraphicsContext::scale):
1556         (WebCore::GraphicsContext::setAlpha):
1557         (WebCore::GraphicsContext::setPlatformCompositeOperation):
1558         (WebCore::GraphicsContext::setPlatformFillColor):
1559         (WebCore::GraphicsContext::setPlatformShadow):
1560         (WebCore::GraphicsContext::strokeArc):
1561         (WebCore::GraphicsContext::strokePath):
1562         (WebCore::GraphicsContext::strokeRect):
1563         (WebCore::GraphicsContext::rotate):
1564         (WebCore::GraphicsContext::translate):
1565         (WebCore::GraphicsContext::setSharedGraphicsContext3D):
1566         (WebCore::GraphicsContext::syncSoftwareCanvas):
1567         * platform/graphics/skia/ImageBufferSkia.cpp:
1568         (WebCore::ImageBuffer::copyImage):
1569         (WebCore::ImageBuffer::draw):
1570         (WebCore::ImageBuffer::getUnmultipliedImageData):
1571         (WebCore::ImageBuffer::getPremultipliedImageData):
1572         (WebCore::ImageBuffer::putUnmultipliedImageData):
1573         (WebCore::ImageBuffer::putPremultipliedImageData):
1574         * platform/graphics/skia/ImageSkia.cpp:
1575         (WebCore::BitmapImage::draw):
1576         (WebCore::BitmapImageSingleFrameSkia::draw):
1577         * platform/graphics/skia/NativeImageSkia.cpp:
1578         (WebCore::NativeImageSkia::~NativeImageSkia):
1579         * platform/graphics/skia/PlatformContextSkia.cpp:
1580         (WebCore::PlatformContextSkia::PlatformContextSkia):
1581         (WebCore::PlatformContextSkia::~PlatformContextSkia):
1582         (WebCore::PlatformContextSkia::setSharedGraphicsContext3D):
1583         (WebCore::PlatformContextSkia::makeGrContextCurrent):
1584         * platform/graphics/skia/PlatformContextSkia.h:
1585
1586 2011-07-12  Emil A Eklund  <eae@chromium.org>
1587
1588         Switch InlineFlowBox to to new layout types
1589         https://bugs.webkit.org/show_bug.cgi?id=64399
1590
1591         Reviewed by Eric Seidel.
1592
1593         First step in moving floats over to the new layout abstraction.
1594
1595         No new tests, no new functionality.
1596
1597         * rendering/InlineBox.cpp:
1598         (WebCore::InlineBox::logicalHeight):
1599         * rendering/InlineBox.h:
1600         (WebCore::InlineBox::logicalTop):
1601         (WebCore::InlineBox::logicalBottom):
1602         (WebCore::InlineBox::setLogicalTop):
1603         * rendering/InlineFlowBox.cpp:
1604         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
1605         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
1606         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
1607         (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
1608         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
1609         (WebCore::InlineFlowBox::addReplacedChildOverflow):
1610         (WebCore::InlineFlowBox::constrainToLineTopAndBottomIfNeeded):
1611         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
1612         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
1613         * rendering/InlineFlowBox.h:
1614         * rendering/RenderBlock.cpp:
1615         (WebCore::RenderBlock::logicalRightSelectionGap):
1616         * rendering/RenderBlock.h:
1617         * rendering/RootInlineBox.cpp:
1618         (WebCore::RootInlineBox::alignBoxesInBlockDirection):
1619         (WebCore::RootInlineBox::lineSelectionGap):
1620         (WebCore::RootInlineBox::ascentAndDescentForBox):
1621         (WebCore::RootInlineBox::verticalPositionForBox):
1622         * rendering/RootInlineBox.h:
1623         * rendering/style/RenderStyle.cpp:
1624         (WebCore::RenderStyle::getShadowExtent):
1625         (WebCore::RenderStyle::getShadowHorizontalExtent):
1626         (WebCore::RenderStyle::getShadowVerticalExtent):
1627         * rendering/style/RenderStyle.h:
1628         (WebCore::InheritedFlags::getTextShadowExtent):
1629         (WebCore::InheritedFlags::getTextShadowHorizontalExtent):
1630         (WebCore::InheritedFlags::getTextShadowVerticalExtent):
1631         (WebCore::InheritedFlags::getTextShadowInlineDirectionExtent):
1632         (WebCore::InheritedFlags::getTextShadowBlockDirectionExtent):
1633         (WebCore::InheritedFlags::getBoxShadowExtent):
1634         (WebCore::InheritedFlags::getBoxShadowHorizontalExtent):
1635         (WebCore::InheritedFlags::getBoxShadowVerticalExtent):
1636         (WebCore::InheritedFlags::getBoxShadowInlineDirectionExtent):
1637         (WebCore::InheritedFlags::getBoxShadowBlockDirectionExtent):
1638         (WebCore::InheritedFlags::getShadowInlineDirectionExtent):
1639         (WebCore::InheritedFlags::getShadowBlockDirectionExtent):
1640         * rendering/style/ShadowData.cpp:
1641         (WebCore::calculateShadowExtent):
1642         (WebCore::ShadowData::adjustRectForShadow):
1643         * rendering/style/ShadowData.h:
1644         (WebCore::ShadowData::ShadowData):
1645         (WebCore::ShadowData::x):
1646         (WebCore::ShadowData::y):
1647
1648 2011-07-12  Kenichi Ishibashi  <bashi@chromium.org>
1649
1650         [Chromium] SVG text is not rendered sometimes with geometricPrecision
1651         https://bugs.webkit.org/show_bug.cgi?id=64341
1652
1653         Changing the type of x and y offsets of ComplexTextControllerLinux to make it possible to treat negative offsets.
1654
1655         Reviewed by Tony Chang.
1656
1657         Test: platform/chromium-linux/svg/text/text-with-geometric-precision.svg
1658
1659         * platform/graphics/chromium/ComplexTextControllerLinux.cpp: Changed the type of m_offsetX and m_startingY from unsigned to int.
1660         (WebCore::ComplexTextController::ComplexTextController): Changed the type of the argument.
1661         (WebCore::ComplexTextController::reset): Ditto.
1662         * platform/graphics/chromium/ComplexTextControllerLinux.h:
1663
1664 2011-07-12  Alexandru Chiculita  <achicu@adobe.com>
1665
1666         Reviewed by David Hyatt.
1667
1668         [CSS Exclusions] Parse wrap-shape property
1669         https://bugs.webkit.org/show_bug.cgi?id=61726
1670
1671         Parsing wrap-shape: rect, circle, ellipse and polygon.
1672         Moved WindRule from Path.h to it's own file.
1673
1674         Test: fast/exclusions/parsing-wrap-shape.html
1675
1676         * WebCore.vcproj/WebCore.vcproj:
1677         * WebCore.xcodeproj/project.pbxproj:
1678         * css/CSSComputedStyleDeclaration.cpp:
1679         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1680         * css/CSSParser.cpp:
1681         (WebCore::CSSParser::parseValue):
1682         (WebCore::CSSParser::parseWrapShapeRect):
1683         (WebCore::CSSParser::parseWrapShapeCircle):
1684         (WebCore::CSSParser::parseWrapShapeEllipse):
1685         (WebCore::CSSParser::parseWrapShapePolygon):
1686         (WebCore::CSSParser::parseWrapShape):
1687         * css/CSSParser.h:
1688         * css/CSSPrimitiveValue.cpp:
1689         (WebCore::CSSPrimitiveValue::init):
1690         (WebCore::CSSPrimitiveValue::cleanup):
1691         (WebCore::CSSPrimitiveValue::cssText):
1692         * css/CSSPrimitiveValue.h:
1693         (WebCore::CSSPrimitiveValue::getShapeValue):
1694         * css/CSSPropertyNames.in:
1695         * css/CSSStyleSelector.cpp:
1696         (WebCore::CSSStyleSelector::applyProperty):
1697         * css/CSSValueKeywords.in:
1698         * css/CSSWrapShapes.cpp: Added.
1699         (WebCore::CSSWrapShapeRect::cssText):
1700         (WebCore::CSSWrapShapeCircle::cssText):
1701         (WebCore::CSSWrapShapeEllipse::cssText):
1702         (WebCore::CSSWrapShapePolygon::cssText):
1703         * css/CSSWrapShapes.h: Added.
1704         (WebCore::CSSWrapShape::~CSSWrapShape):
1705         (WebCore::CSSWrapShape::CSSWrapShape):
1706         (WebCore::CSSWrapShapeRect::create):
1707         (WebCore::CSSWrapShapeRect::left):
1708         (WebCore::CSSWrapShapeRect::top):
1709         (WebCore::CSSWrapShapeRect::width):
1710         (WebCore::CSSWrapShapeRect::height):
1711         (WebCore::CSSWrapShapeRect::radiusX):
1712         (WebCore::CSSWrapShapeRect::radiusY):
1713         (WebCore::CSSWrapShapeRect::setLeft):
1714         (WebCore::CSSWrapShapeRect::setTop):
1715         (WebCore::CSSWrapShapeRect::setWidth):
1716         (WebCore::CSSWrapShapeRect::setHeight):
1717         (WebCore::CSSWrapShapeRect::setRadiusX):
1718         (WebCore::CSSWrapShapeRect::setRadiusY):
1719         (WebCore::CSSWrapShapeRect::type):
1720         (WebCore::CSSWrapShapeRect::CSSWrapShapeRect):
1721         (WebCore::CSSWrapShapeCircle::create):
1722         (WebCore::CSSWrapShapeCircle::left):
1723         (WebCore::CSSWrapShapeCircle::top):
1724         (WebCore::CSSWrapShapeCircle::radius):
1725         (WebCore::CSSWrapShapeCircle::setLeft):
1726         (WebCore::CSSWrapShapeCircle::setTop):
1727         (WebCore::CSSWrapShapeCircle::setRadius):
1728         (WebCore::CSSWrapShapeCircle::type):
1729         (WebCore::CSSWrapShapeCircle::CSSWrapShapeCircle):
1730         (WebCore::CSSWrapShapeEllipse::create):
1731         (WebCore::CSSWrapShapeEllipse::left):
1732         (WebCore::CSSWrapShapeEllipse::top):
1733         (WebCore::CSSWrapShapeEllipse::radiusX):
1734         (WebCore::CSSWrapShapeEllipse::radiusY):
1735         (WebCore::CSSWrapShapeEllipse::setLeft):
1736         (WebCore::CSSWrapShapeEllipse::setTop):
1737         (WebCore::CSSWrapShapeEllipse::setRadiusX):
1738         (WebCore::CSSWrapShapeEllipse::setRadiusY):
1739         (WebCore::CSSWrapShapeEllipse::type):
1740         (WebCore::CSSWrapShapeEllipse::CSSWrapShapeEllipse):
1741         (WebCore::CSSWrapShapePolygon::create):
1742         (WebCore::CSSWrapShapePolygon::appendPoint):
1743         (WebCore::CSSWrapShapePolygon::getXAt):
1744         (WebCore::CSSWrapShapePolygon::getYAt):
1745         (WebCore::CSSWrapShapePolygon::setWindRule):
1746         (WebCore::CSSWrapShapePolygon::windRule):
1747         (WebCore::CSSWrapShapePolygon::type):
1748         (WebCore::CSSWrapShapePolygon::CSSWrapShapePolygon):
1749         * css/SVGCSSValueKeywords.in:
1750         * platform/graphics/Path.h:
1751         * platform/graphics/WindRule.h: Added.
1752         * rendering/style/RenderStyle.cpp:
1753         (WebCore::RenderStyle::diff):
1754         * rendering/style/RenderStyle.h:
1755         (WebCore::InheritedFlags::setWrapShape):
1756         (WebCore::InheritedFlags::wrapShape):
1757         (WebCore::InheritedFlags::initialWrapShape):
1758         * rendering/style/StyleRareNonInheritedData.cpp:
1759         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1760         (WebCore::StyleRareNonInheritedData::operator==):
1761         * rendering/style/StyleRareNonInheritedData.h:
1762
1763 2011-07-12  Simon Fraser  <simon.fraser@apple.com>
1764
1765         Clean up some RenderLayerCompositor code relating to scroll and root layers
1766         https://bugs.webkit.org/show_bug.cgi?id=64400
1767
1768         Reviewed by James Robinson.
1769
1770         There was no need for FrameView::syncCompositingStateForThisFrame()
1771         to call syncCompositingStateForThisLayerOnly() on the various
1772         scrollbar-related layers, because the subsequent call to 
1773         compositor()->flushPendingLayerChanges() starts to flush at
1774         m_overflowControlsHostLayer if one exists, and it's an ancestor
1775         of the scrollbar layers.
1776         
1777         Also clean up terminology in RenderLayerCompositor.
1778             m_rootPlatformLayer -> m_rootContentLayer
1779             rootPlatformLayer() -> rootGraphicsLayer()
1780         
1781         No behavior change, so no new tests.
1782         
1783         * page/FrameView.cpp:
1784         (WebCore::FrameView::syncCompositingStateForThisFrame):
1785         * rendering/RenderLayerCompositor.cpp:
1786         (WebCore::RenderLayerCompositor::enableCompositingMode):
1787         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
1788         (WebCore::RenderLayerCompositor::updateCompositingLayers):
1789         (WebCore::RenderLayerCompositor::layerTreeAsText):
1790         (WebCore::RenderLayerCompositor::parentFrameContentLayers):
1791         (WebCore::RenderLayerCompositor::rootGraphicsLayer):
1792         (WebCore::RenderLayerCompositor::didMoveOnscreen):
1793         (WebCore::RenderLayerCompositor::willMoveOffscreen):
1794         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
1795         (WebCore::RenderLayerCompositor::ensureRootLayer):
1796         (WebCore::RenderLayerCompositor::destroyRootLayer):
1797         (WebCore::RenderLayerCompositor::attachRootLayer):
1798         (WebCore::RenderLayerCompositor::detachRootLayer):
1799         (WebCore::RenderLayerCompositor::updateRootLayerAttachment):
1800         * rendering/RenderLayerCompositor.h:
1801
1802 2011-07-12  Sheriff Bot  <webkit.review.bot@gmail.com>
1803
1804         Unreviewed, rolling out r90842.
1805         http://trac.webkit.org/changeset/90842
1806         https://bugs.webkit.org/show_bug.cgi?id=64401
1807
1808         Causes crash in debug on compositing/overflow/content-gains-
1809         scrollbars.html (Requested by jamesr on #webkit).
1810
1811         * WebCore.gypi:
1812         * platform/graphics/chromium/ContentLayerChromium.cpp:
1813         (WebCore::ContentLayerChromium::ContentLayerChromium):
1814         (WebCore::ContentLayerChromium::paintContentsIfDirty):
1815         (WebCore::ContentLayerChromium::cleanupResources):
1816         (WebCore::ContentLayerChromium::setLayerRenderer):
1817         (WebCore::ContentLayerChromium::tilingTransform):
1818         (WebCore::ContentLayerChromium::contentBounds):
1819         (WebCore::ContentLayerChromium::updateLayerSize):
1820         (WebCore::ContentLayerChromium::draw):
1821         (WebCore::ContentLayerChromium::drawsContent):
1822         (WebCore::ContentLayerChromium::createTilerIfNeeded):
1823         (WebCore::ContentLayerChromium::updateCompositorResources):
1824         (WebCore::ContentLayerChromium::setTilingOption):
1825         (WebCore::ContentLayerChromium::bindContentsTexture):
1826         (WebCore::ContentLayerChromium::setIsMask):
1827         (WebCore::writeIndent):
1828         (WebCore::ContentLayerChromium::dumpLayerProperties):
1829         * platform/graphics/chromium/ContentLayerChromium.h:
1830         * platform/graphics/chromium/ImageLayerChromium.cpp:
1831         (WebCore::ImageLayerChromium::ImageLayerChromium):
1832         (WebCore::ImageLayerChromium::paintContentsIfDirty):
1833         (WebCore::ImageLayerChromium::updateCompositorResources):
1834         (WebCore::ImageLayerChromium::contentBounds):
1835         * platform/graphics/chromium/ImageLayerChromium.h:
1836         (WebCore::ImageLayerChromium::drawsContent):
1837         * platform/graphics/chromium/LayerChromium.cpp:
1838         (WebCore::LayerChromium::pushPropertiesTo):
1839         (WebCore::LayerChromium::ccLayerImpl):
1840         * platform/graphics/chromium/LayerChromium.h:
1841         (WebCore::LayerChromium::draw):
1842         * platform/graphics/chromium/LayerRendererChromium.cpp:
1843         (WebCore::LayerRendererChromium::drawRootLayer):
1844         * platform/graphics/chromium/LayerTilerChromium.cpp:
1845         (WebCore::LayerTilerChromium::updateRect):
1846         (WebCore::LayerTilerChromium::draw):
1847         (WebCore::LayerTilerChromium::drawTiles):
1848         * platform/graphics/chromium/LayerTilerChromium.h:
1849         * platform/graphics/chromium/TiledLayerChromium.cpp: Removed.
1850         * platform/graphics/chromium/TiledLayerChromium.h: Removed.
1851         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1852         (WebCore::CCLayerImpl::drawsContent):
1853         (WebCore::CCLayerImpl::draw):
1854         * platform/graphics/chromium/cc/CCLayerImpl.h:
1855         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: Removed.
1856         * platform/graphics/chromium/cc/CCTiledLayerImpl.h: Removed.
1857
1858 2011-07-12  Joseph Pecoraro  <joepeck@webkit.org>
1859
1860         ApplicationCache update should not immediately fail when reaching per-origin quota
1861         https://bugs.webkit.org/show_bug.cgi?id=64177
1862
1863         Reviewed by Alexey Proskuryakov.
1864
1865         New behavior of handling ApplicationCache per-origin quotas. Previously,
1866         if the quota was reached while downloading we would fail the download
1867         and then prompt the user for a storage increase. This required a refresh,
1868         a redownload of resources, and the total storage was not known so the
1869         process could be repeated multiple times before an acceptable quota
1870         was found or the user disallowed an increase.
1871         
1872         The new behavior is to complete the download of the entire appcache.
1873         When the cache completes downloading and it is greater than the origin
1874         quota, prompt the user to allow a quota increase with the known space
1875         needed. If the quota is increased, the cache will succeed, otherwise
1876         it will fail with the normal failure steps.
1877
1878         An alternative behavior is prompting while downloading immediately
1879         when the origin quota is reached, however at that point the entire
1880         space needed is unknown and so quota increases might not be enough
1881         and could result in multiple prompts to the user.
1882
1883         Tests: http/tests/appcache/origin-quota-continued-download-multiple-manifests.html
1884                http/tests/appcache/origin-quota-continued-download.html
1885
1886         * loader/appcache/ApplicationCacheGroup.h:
1887         * loader/appcache/ApplicationCacheGroup.cpp:
1888         (WebCore::ApplicationCacheGroup::ApplicationCacheGroup):
1889         Rename instance variable to be more clear on its intent.
1890
1891         (WebCore::ApplicationCacheGroup::didFinishLoading):
1892         Check the quota limit while downloading so we can fail early
1893         if the user already denied a quota increase.
1894
1895         (WebCore::ApplicationCacheGroup::didReachOriginQuota):
1896         Pass the space needed information to the chrome client.
1897
1898         (WebCore::ApplicationCacheGroup::cacheUpdateFailedDueToOriginQuota):
1899         Removed. Instead convert the callers to update state and console
1900         log when the per-origin quota is reached. This allows us to follow
1901         the normal failure steps if the quota is reached at the end of a
1902         download, and the alternative short path when we fail during downloading.
1903
1904         (WebCore::ApplicationCacheGroup::recalculateAvailableSpaceInQuota):
1905         Extract to a helper function.
1906
1907         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
1908         Allow for a quota increase at the end of the download now that
1909         we know the space needed. Then proceed to fail or succeed
1910         as we normally would.
1911
1912         * loader/appcache/ApplicationCacheStorage.h:
1913         * loader/appcache/ApplicationCacheStorage.cpp:
1914         (WebCore::ApplicationCacheStorage::checkOriginQuota):
1915         (WebCore::ApplicationCacheStorage::storeNewestCache):
1916         Extract checking the origin quota for when an ApplicationCacheGroup
1917         will be replacing an ApplicationCacheGroup into a helper function.
1918         The helper also provides an out parameter for the space needed
1919         to properly fit the new cache group if it wouldn't fit.
1920
1921         * page/ChromeClient.h:
1922         * loader/EmptyClients.h:
1923         (WebCore::EmptyChromeClient::reachedApplicationCacheOriginQuota):
1924         Add a space needed parameter when reaching the per-origin quota.
1925
1926 2011-07-12  Chris Rogers  <crogers@google.com>
1927
1928         AudioDevice::Stop can close NULL handle.
1929         https://bugs.webkit.org/show_bug.cgi?id=64157
1930
1931         Reviewed by Kenneth Russell.
1932
1933         No new tests since audio API is not yet implemented.
1934
1935         * bindings/js/JSAudioContextCustom.cpp:
1936         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
1937         * bindings/v8/custom/V8AudioContextCustom.cpp:
1938         (WebCore::V8AudioContext::constructorCallback):
1939         * webaudio/AudioContext.cpp:
1940         (WebCore::AudioContext::create):
1941         (WebCore::AudioContext::uninitialize):
1942         * webaudio/AudioContext.h:
1943
1944 2011-07-12  John Bates  <jbates@google.com>
1945
1946         Move call to syncCompositingLayers so that we do not trigger redundant draws.
1947         https://bugs.webkit.org/show_bug.cgi?id=64224
1948
1949         doComposite was triggering two composites every time a canvas was dirtied.
1950         By moving syncCompositingLayers call to layout, the client code can draw without triggering
1951         a redundant frame. Also renamed WebViewImpl::updateLayers to
1952         syncCompositingLayers, because it was confusing. CCLayerTreeHostImplProxy::updateLayers was
1953         no longer needed, because animateAndLayout calls WebViewImpl::layout.
1954
1955         Reviewed by James Robinson.
1956
1957         * platform/graphics/chromium/LayerRendererChromium.cpp:
1958         (WebCore::LayerRendererChromium::updateLayers):
1959         * platform/graphics/chromium/LayerRendererChromium.h:
1960         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1961         (WebCore::CCLayerTreeHost::syncCompositingLayers):
1962         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1963         * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp:
1964         (WebCore::CCLayerTreeHostImplProxy::requestFrameAndCommit):
1965
1966 2011-07-12  Ryosuke Niwa  <rniwa@webkit.org>
1967
1968         Isolate HTMLTextFormControlElement into a separate file
1969         https://bugs.webkit.org/show_bug.cgi?id=64381
1970
1971         Reviewed by Dimitri Glazkov.
1972
1973         Extracted HTMLTextFormControlElement.h and HTMLTextFormControlElement.cpp out of
1974         HTMLFormControlElement.h and HTMLFormControlElement.cpp.
1975
1976         Also moved defaultEventHandler from HTMLFormControlElementWithState to HTMLTextFormControlElement
1977         because it was specific to HTMLTextFormControlElement, and replaced all references to
1978         HTMLFormControlElementWithState in HTMLInputElement and HTMLTextAreaElement by ones to
1979         HTMLTextFormControlElement.
1980
1981         * CMakeLists.txt:
1982         * GNUmakefile.list.am:
1983         * WebCore.gypi:
1984         * WebCore.pro:
1985         * WebCore.vcproj/WebCore.vcproj:
1986         * WebCore.xcodeproj/project.pbxproj:
1987         * editing/TextIterator.cpp:
1988         * editing/htmlediting.cpp:
1989         * html/HTMLElementsAllInOne.cpp:
1990         * html/HTMLFormControlElement.cpp:
1991         (WebCore::HTMLFormControlElement::isFocusable):
1992         * html/HTMLFormControlElement.h:
1993         * html/HTMLInputElement.cpp:
1994         (WebCore::HTMLInputElement::isKeyboardFocusable):
1995         (WebCore::HTMLInputElement::isMouseFocusable):
1996         (WebCore::HTMLInputElement::updateFocusAppearance):
1997         (WebCore::HTMLInputElement::canStartSelection):
1998         (WebCore::HTMLInputElement::parseMappedAttribute):
1999         (WebCore::HTMLInputElement::finishParsingChildren):
2000         (WebCore::HTMLInputElement::rendererIsNeeded):
2001         (WebCore::HTMLInputElement::attach):
2002         (WebCore::HTMLInputElement::detach):
2003         (WebCore::HTMLInputElement::copyNonAttributeProperties):
2004         (WebCore::HTMLInputElement::defaultEventHandler):
2005         (WebCore::HTMLInputElement::willMoveToNewOwnerDocument):
2006         (WebCore::HTMLInputElement::didMoveToNewOwnerDocument):
2007         (WebCore::HTMLInputElement::addSubresourceAttributeURLs):
2008         (WebCore::HTMLInputElement::recalcWillValidate):
2009         * html/HTMLInputElement.h:
2010         * html/HTMLTextAreaElement.cpp:
2011         (WebCore::HTMLTextAreaElement::defaultEventHandler):
2012         * html/HTMLTextAreaElement.h:
2013         * html/HTMLTextFormControlElement.cpp: Copied from Source/WebCore/html/HTMLFormControlElement.cpp.
2014         (WebCore::HTMLTextFormControlElement::defaultEventHandler):
2015         * html/HTMLTextFormControlElement.h: Copied from Source/WebCore/html/HTMLFormControlElement.h.
2016
2017 2011-07-12  Sheriff Bot  <webkit.review.bot@gmail.com>
2018
2019         Unreviewed, rolling out r90831.
2020         http://trac.webkit.org/changeset/90831
2021         https://bugs.webkit.org/show_bug.cgi?id=64389
2022
2023         Likely caused fast/canvas/DrawImageSinglePixelStretch.html to
2024         start timing out on the chromium GPU bots (Requested by ojan
2025         on #webkit).
2026
2027         * platform/graphics/skia/ImageBufferSkia.cpp:
2028         (WebCore::getImageData):
2029         (WebCore::putImageData):
2030
2031 2011-07-12  James Robinson  <jamesr@chromium.org>
2032
2033         Reviewed by Kenneth Russell.
2034
2035         [chromium] Move draw implementation for ContentLayerChromium/ImageLayerChromium to the appropriate CCLayerImpl subclass
2036         https://bugs.webkit.org/show_bug.cgi?id=58833
2037
2038         Adds a TiledLayerChromium class to handle the tiling logic shared by ContentLayerChromium and ImageLayerChromium
2039         so that they can be siblings in the class hierarchy instead of children. Also adds a CCTiledLayerImpl to handle
2040         the drawing responsibilities for tiled layers.
2041
2042         TiledLayerChromium maintains a tiler, tiling options, and calculates the tiling transform. Subclasses are
2043         responsible for providing an appropriate texture updater implementation. CCTiledLayerImpl takes the tiler,
2044         tiling transform and layer properties and draws the layer.  Longer term it'd be better of the CCTiledLayerImpl
2045         owned the tiler and the TiledLayerChromium only owned an updater, but getting there will require changing the
2046         way tile eviction works.
2047
2048         * WebCore.gypi:
2049         * platform/graphics/chromium/ContentLayerChromium.cpp:
2050         (WebCore::ContentLayerChromium::ContentLayerChromium):
2051         (WebCore::ContentLayerChromium::paintContentsIfDirty):
2052         (WebCore::ContentLayerChromium::drawsContent):
2053         * platform/graphics/chromium/ContentLayerChromium.h:
2054         (WebCore::ContentLayerChromium::textureUpdater):
2055         * platform/graphics/chromium/ImageLayerChromium.cpp:
2056         (WebCore::ImageLayerChromium::ImageLayerChromium):
2057         (WebCore::ImageLayerChromium::cleanupResources):
2058         (WebCore::ImageLayerChromium::paintContentsIfDirty):
2059         (WebCore::ImageLayerChromium::textureUpdater):
2060         (WebCore::ImageLayerChromium::contentBounds):
2061         (WebCore::ImageLayerChromium::drawsContent):
2062         (WebCore::ImageLayerChromium::createTextureUpdaterIfNeeded):
2063         * platform/graphics/chromium/ImageLayerChromium.h:
2064         * platform/graphics/chromium/LayerChromium.cpp:
2065         (WebCore::LayerChromium::pushPropertiesTo):
2066         (WebCore::LayerChromium::ccLayerImpl):
2067         * platform/graphics/chromium/LayerChromium.h:
2068         (WebCore::LayerChromium::contentBounds):
2069         * platform/graphics/chromium/LayerRendererChromium.cpp:
2070         (WebCore::LayerRendererChromium::drawRootLayer):
2071         (WebCore::visibleLayerRect):
2072         (WebCore::paintLayerContentsIfDirty):
2073         (WebCore::LayerRendererChromium::paintLayerContents):
2074         (WebCore::LayerRendererChromium::drawLayer):
2075         * platform/graphics/chromium/LayerTilerChromium.cpp:
2076         (WebCore::LayerTilerChromium::updateRect):
2077         (WebCore::LayerTilerChromium::draw):
2078         (WebCore::LayerTilerChromium::drawTiles):
2079         * platform/graphics/chromium/LayerTilerChromium.h:
2080         * platform/graphics/chromium/TiledLayerChromium.cpp: Added.
2081         (WebCore::TiledLayerChromium::TiledLayerChromium):
2082         (WebCore::TiledLayerChromium::~TiledLayerChromium):
2083         (WebCore::TiledLayerChromium::createCCLayerImpl):
2084         (WebCore::TiledLayerChromium::cleanupResources):
2085         (WebCore::TiledLayerChromium::setLayerRenderer):
2086         (WebCore::TiledLayerChromium::updateTileSizeAndTilingOption):
2087         (WebCore::TiledLayerChromium::drawsContent):
2088         (WebCore::TiledLayerChromium::createTilerIfNeeded):
2089         (WebCore::TiledLayerChromium::updateCompositorResources):
2090         (WebCore::TiledLayerChromium::setTilingOption):
2091         (WebCore::TiledLayerChromium::setIsMask):
2092         (WebCore::TiledLayerChromium::tilingTransform):
2093         (WebCore::TiledLayerChromium::pushPropertiesTo):
2094         (WebCore::writeIndent):
2095         (WebCore::TiledLayerChromium::dumpLayerProperties):
2096         * platform/graphics/chromium/TiledLayerChromium.h: Copied from Source/WebCore/platform/graphics/chromium/ContentLayerChromium.h.
2097         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2098         (WebCore::CCLayerImpl::draw):
2099         * platform/graphics/chromium/cc/CCLayerImpl.h:
2100         (WebCore::CCLayerImpl::setDrawsContent):
2101         (WebCore::CCLayerImpl::drawsContent):
2102         (WebCore::CCLayerImpl::contentBounds):
2103         (WebCore::CCLayerImpl::setContentBounds):
2104         (WebCore::CCLayerImpl::doubleSided):
2105         (WebCore::CCLayerImpl::setDoubleSided):
2106         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: Added.
2107         (WebCore::CCTiledLayerImpl::CCTiledLayerImpl):
2108         (WebCore::CCTiledLayerImpl::~CCTiledLayerImpl):
2109         (WebCore::CCTiledLayerImpl::draw):
2110         (WebCore::CCTiledLayerImpl::bindContentsTexture):
2111         (WebCore::CCTiledLayerImpl::dumpLayerProperties):
2112         * platform/graphics/chromium/cc/CCTiledLayerImpl.h: Added.
2113         (WebCore::CCTiledLayerImpl::create):
2114         (WebCore::CCTiledLayerImpl::setTilingTransform):
2115         (WebCore::CCTiledLayerImpl::setTiler):
2116
2117 2011-07-12  Arno Renevier  <arno@renevier.net>
2118
2119         [GTK] DOM bindings do not have gir annotations
2120         https://bugs.webkit.org/show_bug.cgi?id=45395
2121
2122         Reviewed by Xan Lopez.
2123
2124         * bindings/scripts/CodeGeneratorGObject.pm: generate introspection annotations.
2125         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h: update for new output.
2126         * bindings/scripts/test/GObject/WebKitDOMTestObj.h: ditto.
2127         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h: ditto.
2128
2129 2011-07-12  Chris Rogers  <crogers@google.com>
2130
2131         webkitAudioContext does not do proper sanity checking on its arguments.
2132         https://bugs.webkit.org/show_bug.cgi?id=64076
2133
2134         Reviewed by Kenneth Russell.
2135
2136         No new tests since audio API is not yet implemented.
2137
2138         * bindings/js/JSAudioContextCustom.cpp:
2139         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
2140         (WebCore::JSAudioContext::createBuffer):
2141         * bindings/v8/custom/V8AudioContextCustom.cpp:
2142         (WebCore::V8AudioContext::constructorCallback):
2143         (WebCore::V8AudioContext::createBufferCallback):
2144         * platform/audio/HRTFDatabaseLoader.h:
2145         (WebCore::HRTFDatabaseLoader::databaseSampleRate):
2146         * webaudio/AudioContext.cpp:
2147         (WebCore::AudioContext::create):
2148         (WebCore::AudioContext::createOfflineContext):
2149         (WebCore::AudioContext::createBuffer):
2150         * webaudio/AudioContext.h:
2151
2152 2011-07-12  Pratik Solanki  <psolanki@apple.com>
2153
2154         Implement didReceiveDataArray callback for CFNetwork based loader
2155         https://bugs.webkit.org/show_bug.cgi?id=64130
2156
2157         Reviewed by David Kilzer.
2158
2159         Factor out the didReceiveDataArray code from ResourceHandleMac.mm into
2160         a new method ResourceHandle::handleDataArray(). Implement the callback
2161         in the CFNetwork loader code and call handleDataArray() to process
2162         incoming data.
2163
2164         No new tests because the flag is not enabled for any bots.
2165
2166         * platform/network/ResourceHandle.h:
2167         * platform/network/cf/ResourceHandleCFNet.cpp:
2168         (WebCore::didReceiveDataArray):
2169         (WebCore::ResourceHandle::createCFURLConnection):
2170         (WebCore::ResourceHandle::handleDataArray):
2171         * platform/network/mac/ResourceHandleMac.mm:
2172         (-[WebCoreResourceHandleAsDelegate connection:didReceiveDataArray:]):
2173
2174 2011-07-12  Emil A Eklund  <eae@chromium.org>
2175
2176         Switch preferred width/height and columns to to new layout types
2177         https://bugs.webkit.org/show_bug.cgi?id=64329
2178
2179         Reviewed by Eric Seidel.
2180
2181         No new tests, no new functionality.
2182
2183         * rendering/LayoutTypes.h:
2184         (WebCore::ceiledLayoutUnit):
2185         Add ceiledLayoutUnit to go with the floored version.
2186         
2187         * rendering/RenderBlock.cpp:
2188         (WebCore::RenderBlock::adjustRectForColumns):
2189         (WebCore::RenderBlock::flipForWritingModeIncludingColumns):
2190         (WebCore::RenderBlock::adjustStartEdgeForWritingModeIncludingColumns):
2191         Rename rect version of flipForWritingModeIncludingColumns to
2192         adjustStartEdgeForWritingModeIncludingColumns as it adjust the start edge
2193         and does not flip the rect.
2194        
2195         (WebCore::RenderBlock::adjustForColumns):
2196         (WebCore::updatePreferredWidth):
2197         * rendering/RenderBlock.h:
2198         * rendering/RenderBox.cpp:
2199         (WebCore::RenderBox::minPreferredLogicalWidth):
2200         (WebCore::RenderBox::maxPreferredLogicalWidth):
2201         (WebCore::RenderBox::offsetFromContainer):
2202         (WebCore::RenderBox::computePercentageLogicalHeight):
2203         (WebCore::RenderBox::flipForWritingMode):
2204         (WebCore::RenderBox::flipForWritingModeIncludingColumns):
2205         * rendering/RenderBox.h:
2206         * rendering/RenderListBox.cpp:
2207         (WebCore::RenderListBox::itemBoundingBoxRect):
2208         * rendering/RenderListBox.h:
2209         * rendering/RenderObject.h:
2210         (WebCore::RenderObject::minPreferredLogicalWidth):
2211         (WebCore::RenderObject::maxPreferredLogicalWidth):
2212         (WebCore::RenderObject::adjustForColumns):
2213         * rendering/RenderReplaced.cpp:
2214         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
2215         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
2216         * rendering/TableLayout.h:
2217
2218 2011-07-12  Levi Weintraub  <leviw@chromium.org>
2219
2220         Change roundedIntRect to roundedRect
2221         https://bugs.webkit.org/show_bug.cgi?id=64326
2222
2223         Reviewed by Eric Seidel.
2224
2225         Renaming RoundedIntRect to RoundedRect and moving the underlying type to Layout units from
2226         integer-based versions.
2227
2228         No new tests, no new functionality
2229
2230         * WebCore.gypi:
2231         * WebCore.pro:
2232         * WebCore.vcproj/WebCore.vcproj:
2233         * WebCore.xcodeproj/project.pbxproj:
2234         * platform/graphics/GraphicsContext.cpp:
2235         (WebCore::GraphicsContext::addRoundedRectClip):
2236         (WebCore::GraphicsContext::clipOutRoundedRect):
2237         (WebCore::GraphicsContext::fillRoundedRect):
2238         (WebCore::GraphicsContext::fillRectWithRoundedHole):
2239         * platform/graphics/GraphicsContext.h:
2240         * platform/graphics/Path.cpp:
2241         (WebCore::Path::addRoundedRect):
2242         * platform/graphics/Path.h:
2243         * platform/graphics/RoundedIntRect.cpp: Removed.
2244         * platform/graphics/RoundedIntRect.h: Removed.
2245         * platform/graphics/RoundedRect.cpp: Copied from Source/WebCore/platform/graphics/RoundedIntRect.cpp.
2246         (WebCore::RoundedRect::Radii::isZero):
2247         (WebCore::RoundedRect::Radii::scale):
2248         (WebCore::RoundedRect::Radii::expand):
2249         (WebCore::RoundedRect::inflateWithRadii):
2250         (WebCore::RoundedRect::Radii::includeLogicalEdges):
2251         (WebCore::RoundedRect::Radii::excludeLogicalEdges):
2252         (WebCore::RoundedRect::RoundedRect):
2253         (WebCore::RoundedRect::includeLogicalEdges):
2254         (WebCore::RoundedRect::excludeLogicalEdges):
2255         (WebCore::RoundedRect::isRenderable):
2256         * platform/graphics/RoundedRect.h: Copied from Source/WebCore/platform/graphics/RoundedIntRect.h.
2257         (WebCore::RoundedRect::Radii::Radii):
2258         (WebCore::RoundedRect::Radii::setTopLeft):
2259         (WebCore::RoundedRect::Radii::setTopRight):
2260         (WebCore::RoundedRect::Radii::setBottomLeft):
2261         (WebCore::RoundedRect::Radii::setBottomRight):
2262         (WebCore::RoundedRect::Radii::topLeft):
2263         (WebCore::RoundedRect::Radii::topRight):
2264         (WebCore::RoundedRect::Radii::bottomLeft):
2265         (WebCore::RoundedRect::Radii::bottomRight):
2266         (WebCore::RoundedRect::Radii::expand):
2267         (WebCore::RoundedRect::Radii::shrink):
2268         (WebCore::RoundedRect::rect):
2269         (WebCore::RoundedRect::setRect):
2270         (WebCore::RoundedRect::move):
2271         (WebCore::RoundedRect::inflate):
2272         (WebCore::RoundedRect::expandRadii):
2273         (WebCore::RoundedRect::shrinkRadii):
2274         (WebCore::operator==):
2275         * platform/graphics/ShadowBlur.cpp:
2276         (WebCore::ScratchBuffer::setLastShadowValues):
2277         (WebCore::ScratchBuffer::setLastInsetShadowValues):
2278         (WebCore::ScratchBuffer::matchesLastShadow):
2279         (WebCore::ScratchBuffer::matchesLastInsetShadow):
2280         (WebCore::computeSliceSizesFromRadii):
2281         (WebCore::ShadowBlur::templateSize):
2282         (WebCore::ShadowBlur::drawRectShadow):
2283         (WebCore::ShadowBlur::drawInsetShadow):
2284         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
2285         (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
2286         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
2287         (WebCore::ShadowBlur::drawRectShadowWithTiling):
2288         (WebCore::ShadowBlur::drawLayerPieces):
2289         * platform/graphics/ShadowBlur.h:
2290         * platform/graphics/cg/GraphicsContextCG.cpp:
2291         (WebCore::GraphicsContext::fillRect):
2292         (WebCore::GraphicsContext::fillRoundedRect):
2293         (WebCore::GraphicsContext::fillRectWithRoundedHole):
2294         * rendering/RenderBox.cpp:
2295         (WebCore::RenderBox::paintBoxDecorations):
2296         * rendering/RenderBoxModelObject.cpp:
2297         (WebCore::RenderBoxModelObject::getBackgroundRoundedRect):
2298         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2299         (WebCore::RenderBoxModelObject::paintOneBorderSide):
2300         (WebCore::RenderBoxModelObject::paintBorderSides):
2301         (WebCore::RenderBoxModelObject::paintTranslucentBorderSides):
2302         (WebCore::RenderBoxModelObject::paintBorder):
2303         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
2304         (WebCore::RenderBoxModelObject::clipBorderSidePolygon):
2305         (WebCore::RenderBoxModelObject::paintBoxShadow):
2306         * rendering/RenderBoxModelObject.h:
2307         * rendering/RenderThemeMac.mm:
2308         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
2309         (WebCore::RenderThemeMac::paintSliderTrack):
2310         * rendering/style/RenderStyle.cpp:
2311         (WebCore::calcRadiiFor):
2312         (WebCore::calcConstraintScaleFor):
2313         (WebCore::RenderStyle::getRoundedBorderFor):
2314         (WebCore::RenderStyle::getRoundedInnerBorderFor):
2315         * rendering/style/RenderStyle.h:
2316
2317 2011-07-12  Mike Reed  <reed@google.com>
2318
2319         [skia] optimize getImageData to avoid a copy when not needed. lockPixels() now does the right thing.
2320         https://bugs.webkit.org/show_bug.cgi?id=64302
2321
2322         Reviewed by Stephen White.
2323
2324         No new tests. Just an optimization for getImageData(), existing <canvas> tests apply
2325
2326         * platform/graphics/skia/ImageBufferSkia.cpp:
2327         (WebCore::getImageData):
2328         (WebCore::putImageData):
2329
2330 2011-07-12  Pavel Feldman  <pfeldman@google.com>
2331
2332         Web Inspector: introduce UserMetrics for collecting stats in Chromium port.
2333         https://bugs.webkit.org/show_bug.cgi?id=64350
2334
2335         Reviewed by Yury Semikhatsky.
2336
2337         Test: inspector/user-metrics.html
2338
2339         * WebCore.gypi:
2340         * WebCore.vcproj/WebCore.vcproj:
2341         * bindings/js/JSInspectorFrontendHostCustom.cpp:
2342         (WebCore::JSInspectorFrontendHost::recordActionTaken):
2343         (WebCore::JSInspectorFrontendHost::recordPanelShown):
2344         (WebCore::JSInspectorFrontendHost::recordSettingChanged):
2345         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
2346         (WebCore::histogramEnumeration):
2347         (WebCore::V8InspectorFrontendHost::recordActionTakenCallback):
2348         (WebCore::V8InspectorFrontendHost::recordPanelShownCallback):
2349         (WebCore::V8InspectorFrontendHost::recordSettingChangedCallback):
2350         * inspector/InspectorFrontendHost.idl:
2351         * inspector/front-end/AuditsPanel.js:
2352         (WebInspector.AuditsPanel.prototype.initiateAudit):
2353         * inspector/front-end/ConsoleView.js:
2354         * inspector/front-end/DebuggerModel.js:
2355         (WebInspector.DebuggerModel.prototype.setBreakpoint):
2356         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
2357         * inspector/front-end/InspectorFrontendHostStub.js:
2358         (.WebInspector.InspectorFrontendHostStub.prototype.loadSessionSetting):
2359         (.WebInspector.InspectorFrontendHostStub.prototype.recordActionTaken):
2360         (.WebInspector.InspectorFrontendHostStub.prototype.recordPanelShown):
2361         (.WebInspector.InspectorFrontendHostStub.prototype.recordSettingChanged):
2362         * inspector/front-end/ProfilesPanel.js:
2363         (WebInspector.ProfilesPanel.prototype._setRecordingProfile):
2364         (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot):
2365         * inspector/front-end/TimelinePanel.js:
2366         (WebInspector.TimelinePanel.prototype._toggleTimelineButtonClicked):
2367         * inspector/front-end/UserMetrics.js: Added.
2368         (WebInspector.UserMetrics.settingChanged):
2369         (WebInspector.UserMetrics):
2370         (WebInspector.UserMetrics.prototype.panelShown):
2371         (WebInspector.UserMetrics._Recorder):
2372         (WebInspector.UserMetrics._Recorder.prototype.record):
2373         * inspector/front-end/WebKit.qrc:
2374         * inspector/front-end/inspector.html:
2375         * inspector/front-end/inspector.js:
2376         (WebInspector._toggleAttach):
2377
2378 2011-07-12  Pratik Solanki  <psolanki@apple.com>
2379
2380         Reviewed by David Kilzer.
2381
2382         Add NSURLResponse wrapper in ResourceResponse when USE(CFNETWORK) is enabled
2383         https://bugs.webkit.org/show_bug.cgi?id=63286
2384
2385         When USE(CFNETWORK) is enabled on Mac, keep an NSURLResponse object along with the
2386         CFURLResponseRef so that WebKit can continue using the NSURLResponse.
2387
2388         No new tests because no change in functionality and option is not enabled on Mac.
2389
2390         * platform/network/cf/ResourceResponse.h:
2391         (WebCore::ResourceResponse::ResourceResponse):
2392         * platform/network/mac/ResourceResponseMac.mm:
2393         (WebCore::ResourceResponse::initNSURLResponse):
2394         (WebCore::ResourceResponse::nsURLResponse):
2395         (WebCore::ResourceResponse::ResourceResponse):
2396
2397 2011-07-12  Pavel Podivilov  <podivilov@chromium.org>
2398
2399         Web Inspector: Cancelling an empty edit fails.
2400         https://bugs.webkit.org/show_bug.cgi?id=64351
2401
2402         Reviewed by Pavel Feldman.
2403
2404         * inspector/front-end/ResourceView.js:
2405         (WebInspector.EditableResourceSourceFrame.prototype.cancelEditing):
2406
2407 2011-07-12  Pavel Podivilov  <podivilov@chromium.org>
2408
2409         Web Inspector: make TextViewerDelegate methods implementations public in SourceFrame.
2410         https://bugs.webkit.org/show_bug.cgi?id=64353
2411
2412         Reviewed by Pavel Feldman.
2413
2414         * inspector/front-end/SourceFrame.js:
2415         (WebInspector.SourceFrame.prototype.beforeTextChanged):
2416         (WebInspector.SourceFrame.prototype.afterTextChanged):
2417         (WebInspector.SourceFrame.prototype.populateTextAreaContextMenu):
2418         (WebInspector.SourceFrame.prototype.suggestedFileName):
2419         (WebInspector.SourceFrame.prototype.doubleClick):
2420         (WebInspector.SourceFrame.prototype.cancelEditing):
2421         (WebInspector.TextViewerDelegateForSourceFrame.prototype.doubleClick):
2422         (WebInspector.TextViewerDelegateForSourceFrame.prototype.beforeTextChanged):
2423         (WebInspector.TextViewerDelegateForSourceFrame.prototype.afterTextChanged):
2424         (WebInspector.TextViewerDelegateForSourceFrame.prototype.commitEditing):
2425         (WebInspector.TextViewerDelegateForSourceFrame.prototype.cancelEditing):
2426         (WebInspector.TextViewerDelegateForSourceFrame.prototype.populateLineGutterContextMenu):
2427         (WebInspector.TextViewerDelegateForSourceFrame.prototype.populateTextAreaContextMenu):
2428         (WebInspector.TextViewerDelegateForSourceFrame.prototype.suggestedFileName):
2429
2430 2011-07-12  Andrey Kosyakov  <caseq@chromium.org>
2431
2432         Web Inspector: remove more dead code from the Network panel
2433         https://bugs.webkit.org/show_bug.cgi?id=64291
2434
2435         Reviewed by Pavel Feldman.
2436
2437         * inspector/front-end/NetworkPanel.js:
2438         (WebInspector.NetworkPanel.prototype._toggleGridMode):
2439         (WebInspector.NetworkPanel.prototype._toggleViewingResourceMode):
2440         * inspector/front-end/networkPanel.css:
2441
2442 2011-07-12  Adam Roben  <aroben@apple.com>
2443
2444         Unreviewed, rolling out r90811.
2445         http://trac.webkit.org/changeset/90811
2446         https://bugs.webkit.org/show_bug.cgi?id=61025
2447
2448         Several svg tests failing assertions beneath
2449         SVGSMILElement::findInstanceTime
2450
2451         * svg/animation/SVGSMILElement.cpp:
2452         (WebCore::SVGSMILElement::findInstanceTime):
2453
2454 2011-07-12  Oliver Varga  <Varga.Oliver@stud.u-szeged.hu>
2455
2456         Reviewed by Nikolas Zimmermann.
2457
2458         Speed up SVGSMILElement::findInstanceTime.
2459         https://bugs.webkit.org/show_bug.cgi?id=61025
2460
2461         Replace the linear search to binary search on ordered list because
2462         the previous searches from the beginning was not efficient.
2463         Out of index error fixed by Renata Hodovan.
2464
2465         No new tests this is only a performance tweak.
2466
2467         * svg/animation/SVGSMILElement.cpp:
2468         (WebCore::extractTimeFromVector):
2469         (WebCore::SVGSMILElement::findInstanceTime):
2470
2471 2011-07-11  Zeng Huiqing  <huiqing.zeng@intel.com>
2472
2473         Optimize HTMLInputElement::updateCheckedRadioButtons
2474         https://bugs.webkit.org/show_bug.cgi?id=62840
2475
2476         Reviewed by Kent Tamura.
2477
2478         No new tests.
2479
2480         * dom/Document.h:
2481         (WebCore::Document::getFormElements):
2482         * html/HTMLInputElement.cpp:
2483         (WebCore::HTMLInputElement::updateCheckedRadioButtons):
2484         (WebCore::HTMLInputElement::setChecked):
2485
2486 2011-07-11  Pratik Solanki  <psolanki@apple.com>
2487
2488         Reviewed by David Kilzer.
2489
2490         Add NSURLRequest wrapper in ResourceRequest when USE(CFNETWORK) is enabled
2491         https://bugs.webkit.org/show_bug.cgi?id=63276
2492
2493         When USE(CFNETWORK) is enabled on Mac, keep an NSURLRequest object along with the
2494         CFURLRequestRef so that WebKit can continue using the NSURLRequest.
2495
2496         No new tests because no change in functionality and option is not enabled on Mac.
2497
2498         * platform/network/cf/ResourceRequest.h:
2499         (WebCore::ResourceRequest::updateNSURLRequest):
2500         (WebCore::ResourceRequest::ResourceRequest):
2501         * platform/network/cf/ResourceRequestCFNet.cpp:
2502         (WebCore::findCFURLRequestSetContentDispositionEncodingFallbackArrayFunction):
2503         (WebCore::findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction):
2504         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2505         (WebCore::ResourceRequest::applyWebArchiveHackForMail):
2506         * platform/network/mac/ResourceRequestMac.mm:
2507         (WebCore::ResourceRequest::nsURLRequest):
2508         (WebCore::ResourceRequest::ResourceRequest):
2509         (WebCore::ResourceRequest::updateNSURLRequest):
2510
2511 2011-07-11  Ryosuke Niwa  <rniwa@webkit.org>
2512
2513         positionForPoint is broken when a block is positioned relatively inside the parent
2514         https://bugs.webkit.org/show_bug.cgi?id=64298
2515
2516         Reviewed by Simon Fraser.
2517
2518         The bug was caused by positionForPointRespectingEditingBoundaries's not taking relativePositionOffset
2519         into account when computing the point in child coordinates. Fixed the bug by adding the offset to
2520         childLocation as needed.
2521
2522         Test: fast/block/positioning/hittest-on-relative-positioned-children.html
2523
2524         * rendering/RenderBlock.cpp:
2525         (WebCore::positionForPointRespectingEditingBoundaries): Fixed the bug; also replaced all instances of
2526         IntPoint by LayoutPoint.
2527
2528 2011-07-11  Dan Bernstein  <mitz@apple.com>
2529
2530         Excessive expansion of justified text when rounding hacks are enabled
2531         https://bugs.webkit.org/show_bug.cgi?id=64331
2532
2533         Reviewed by Anders Carlsson.
2534
2535         Test: platform/mac/fast/text/rounding-hacks-expansion.html
2536
2537         When rounding hacks are enabled, the expansion at each expansion opportunity should be by an
2538         integer. Restored more of the logic that was removed in r78846 in order to ensure this.
2539
2540         * platform/graphics/WidthIterator.cpp:
2541         (WebCore::WidthIterator::advance):
2542         * platform/graphics/mac/ComplexTextController.cpp:
2543         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
2544
2545 2011-07-11  Jer Noble  <jer.noble@apple.com>
2546
2547         HTML5 video controller in fullscreen is partly off-screen (at least on youtube) using ClickToFlash
2548         https://bugs.webkit.org/show_bug.cgi?id=64327
2549
2550         Reviewed by Darin Adler.
2551
2552         No new tests; no change in functionality, so covered by existing tests.
2553
2554         Make the rules from fullscreenQuickTime.css !important so they are not overridden
2555         by page authors.
2556
2557         * css/fullscreenQuickTime.css:
2558         (video:-webkit-full-screen::-webkit-media-controls-panel):
2559
2560 2011-07-11  Levi Weintraub  <leviw@chromium.org>
2561
2562         Switch lineTop and lineBottom to new layout types
2563         https://bugs.webkit.org/show_bug.cgi?id=64317
2564
2565         Reviewed by Eric Seidel.
2566
2567         Changing lineTop and lineBottom to LayoutUnits and preparing all uses
2568         of them for the upcoming conversion.
2569
2570         No new tests, no new functionality.
2571
2572         * rendering/EllipsisBox.cpp:
2573         (WebCore::EllipsisBox::nodeAtPoint):
2574         * rendering/EllipsisBox.h:
2575         * rendering/GapRects.h:
2576         (WebCore::GapRects::left):
2577         (WebCore::GapRects::center):
2578         (WebCore::GapRects::right):
2579         (WebCore::GapRects::uniteLeft):
2580         (WebCore::GapRects::uniteCenter):
2581         (WebCore::GapRects::uniteRight):
2582         (WebCore::GapRects::operator LayoutRect):
2583         * rendering/InlineBox.cpp:
2584         (WebCore::InlineBox::nodeAtPoint):
2585         * rendering/InlineBox.h:
2586         * rendering/InlineFlowBox.cpp:
2587         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
2588         (WebCore::InlineFlowBox::flipLinesInBlockDirection):
2589         (WebCore::InlineFlowBox::computeOverflow):
2590         (WebCore::InlineFlowBox::setLayoutOverflow):
2591         (WebCore::InlineFlowBox::setVisualOverflow):
2592         (WebCore::InlineFlowBox::setOverflowFromLogicalRects):
2593         (WebCore::InlineFlowBox::nodeAtPoint):
2594         * rendering/InlineFlowBox.h:
2595         (WebCore::InlineFlowBox::layoutOverflowRect):
2596         (WebCore::InlineFlowBox::visualOverflowRect):
2597         * rendering/InlineTextBox.cpp:
2598         (WebCore::InlineTextBox::nodeAtPoint):
2599         * rendering/RenderLineBoxList.cpp:
2600         (WebCore::RenderLineBoxList::anyLineIntersectsRect):
2601         * rendering/RenderLineBoxList.h:
2602         * rendering/RenderListItem.cpp:
2603         (WebCore::RenderListItem::positionListMarker):
2604         * rendering/RenderTextControl.h:
2605         * rendering/RenderTextControlMultiLine.cpp:
2606         (WebCore::RenderTextControlMultiLine::adjustControlHeightBasedOnLineHeight):
2607         * rendering/RenderTextControlSingleLine.cpp:
2608         (WebCore::RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight):
2609         * rendering/RenderTextControlSingleLine.h:
2610         * rendering/RootInlineBox.cpp:
2611         (WebCore::RootInlineBox::nodeAtPoint):
2612         * rendering/RootInlineBox.h:
2613         (WebCore::RootInlineBox::lineTop):
2614         (WebCore::RootInlineBox::lineBottom):
2615         (WebCore::RootInlineBox::setLineTopBottomPositions):
2616         (WebCore::RootInlineBox::logicalTopVisualOverflow):
2617         (WebCore::RootInlineBox::logicalBottomVisualOverflow):
2618         (WebCore::RootInlineBox::logicalTopLayoutOverflow):
2619         (WebCore::RootInlineBox::logicalBottomLayoutOverflow):
2620         * rendering/svg/SVGInlineFlowBox.h:
2621         * rendering/svg/SVGInlineTextBox.cpp:
2622         (WebCore::SVGInlineTextBox::nodeAtPoint):
2623         * rendering/svg/SVGInlineTextBox.h:
2624         * rendering/svg/SVGRootInlineBox.h:
2625
2626 2011-07-11  Martin Robinson  <mrobinson@igalia.com>
2627
2628         Reviewed by Daniel Bates.
2629
2630         [GTK] Transition to Mozilla named cursors have incorrect hotspot and rendering
2631         https://bugs.webkit.org/show_bug.cgi?id=62752
2632
2633         Instead of offsetting the cursor blit by the hotspot, just pass the hotspot
2634         arguments to the GdkCursor constructor.
2635
2636         No new tests. This is covered by manual-tests/cursor.html.
2637
2638         * platform/gtk/CursorGtk.cpp:
2639         (WebCore::createNamedCursor):
2640
2641 2011-07-11  Yi Shen  <yi.4.shen@nokia.com>
2642
2643         [Qt] Unreviewed rollout 90779 which may fail the layout-test.
2644
2645         * platform/network/qt/QNetworkReplyHandler.cpp:
2646         (WebCore::QNetworkReplyHandlerCallQueue::setDeferSignals):
2647         * platform/network/qt/QNetworkReplyHandler.h:
2648
2649 2011-07-11  Bradley Nelson  <bradnelson@chromium.org>
2650
2651         Reviewed by Darin Fisher.
2652
2653         Split webcore_dom off webcore_remaining to reduce its size for
2654         whole program optimization builds.
2655
2656         https://bugs.webkit.org/show_bug.cgi?id=64299
2657
2658         * WebCore.gyp/WebCore.gyp:
2659
2660 2011-07-11  Yi Shen  <yi.4.shen@nokia.com>
2661
2662         [Qt] ASSERTION FAILED in ResourceHandle::setDefersLoading causes crash
2663         https://bugs.webkit.org/show_bug.cgi?id=62808
2664
2665         Reviewed by Benjamin Poulain.
2666
2667         The assertion in ResourceHandle::setDefersLoading assumes asynchronous
2668         content delivery -- To resume a page, first, its main resource loader
2669         calls setDefersLoading to resume loading the main content; then all the
2670         sub-resource loaders calls setDefersLoading to resume sub-contents.
2671         However, since QNetworkReplyHandler delivers content synchronously,
2672         some new sub-resource loaders get created as soon as the main resource
2673         loader resumed, and all these new sub-resource loaders set their
2674         defersLoading flag to false. Then, the assertion fails for these new
2675         sub-resource loaders when calling setDefersLoading on them. As a fix,
2676         this path makes QNetworkReplyHandler deliver content asynchronously.
2677
2678         Test: loader/load-defer-resume-crash.html
2679
2680         * platform/network/qt/QNetworkReplyHandler.cpp:
2681         (WebCore::QNetworkReplyHandlerCallQueue::setDeferSignals):
2682         * platform/network/qt/QNetworkReplyHandler.h:
2683
2684 2011-07-08  Ryosuke Niwa  <rniwa@webkit.org>
2685
2686         Move innerTextElement() from RenderTextControl to HTMLTextFormControlElement
2687         https://bugs.webkit.org/show_bug.cgi?id=64134
2688
2689         Reviewed by Kent Tamura.
2690
2691         Moved innerTextElement from RenderTextControl to HTMLTextFormControlElement. It is implemented by
2692         HTMLInputElement and HTMLTextAreaElement instead of RenderTextControlSingleLine and
2693         RenderTextControlMultiLine.
2694
2695         This refactoring removes the indirection through RenderTextControl and makes the ownership of
2696         shadow DOM for input and textarea elements clear. Accessing the shadow DOM of input and textarea elements
2697         are now less error prone because it no longer depends on the lifetime of the render tree.
2698
2699         * accessibility/AccessibilityRenderObject.cpp:
2700         (WebCore::AccessibilityRenderObject::indexForVisiblePosition): Access innerTextElement via
2701         HTMLTextFormControlElement.
2702         * dom/Node.cpp:
2703         (WebCore::traverseTreeAndMark): No longer calls innerTextElement because this was a work-around
2704         needed before making input and textarea elements use the new shadow DOM model.
2705         * editing/TextIterator.cpp:
2706         (WebCore::TextIterator::handleReplacedElement): Access innerTextElement via HTMLTextFormControlElement.
2707         * html/HTMLFormControlElement.cpp:
2708         (WebCore::hasVisibleTextArea): Takes innerTextElement.
2709         (WebCore::HTMLTextFormControlElement::setSelectionRange): Calls innerTextElement().
2710         (WebCore::HTMLTextFormControlElement::selection): Ditto.
2711         (WebCore::HTMLTextFormControlElement::selectionStart): Ditto; no longer uses a temporary local variable
2712         for innerTextElement because innerTextElement() no longer depends on the lifetime of the render tree.
2713         (WebCore::HTMLTextFormControlElement::selectionEnd): Ditto.
2714         * html/HTMLFormControlElement.h:
2715         * html/HTMLTextAreaElement.cpp:
2716         (WebCore::HTMLTextAreaElement::innerTextElement): Added.
2717         * html/HTMLTextAreaElement.h:
2718         * rendering/RenderTextControl.cpp:
2719         (WebCore::RenderTextControl::textFormControlElement): Made this function a const member.
2720         (WebCore::RenderTextControl::innerTextElement): Added.
2721         * rendering/RenderTextControl.h:
2722         * rendering/RenderTextControlMultiLine.cpp:
2723         * rendering/RenderTextControlMultiLine.h:
2724         * rendering/RenderTextControlSingleLine.cpp:
2725         * rendering/RenderTextControlSingleLine.h:
2726
2727 2011-07-11  Tony Chang  <tony@chromium.org>
2728
2729         rename RenderObject::isFlexibleBox to isDeprecatedFlexibleBox
2730         https://bugs.webkit.org/show_bug.cgi?id=64217
2731
2732         Reviewed by Ojan Vafai.
2733
2734         This is to make way for the new flexbox needing a similar method.
2735         RenderObject also has isFlexingChildren() and isStretchingChildren(),
2736         but we may be able to use those for the new flexbox as well so I
2737         didn't rename them.
2738
2739         No new tests, just refactoring.
2740
2741         * rendering/RenderBlock.cpp:
2742         (WebCore::RenderBlock::removeChild):
2743         (WebCore::RenderBlock::expandsToEncloseOverhangingFloats):
2744         (WebCore::shouldCheckLines):
2745         * rendering/RenderBox.cpp:
2746         (WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists):
2747         (WebCore::RenderBox::computeLogicalWidth):
2748         (WebCore::RenderBox::sizesToIntrinsicLogicalWidth):
2749         (WebCore::RenderBox::computeLogicalHeight):
2750         * rendering/RenderDeprecatedFlexibleBox.cpp:
2751         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
2752         * rendering/RenderDeprecatedFlexibleBox.h:
2753         (WebCore::RenderDeprecatedFlexibleBox::isDeprecatedFlexibleBox):
2754         * rendering/RenderObject.h:
2755         (WebCore::RenderObject::isDeprecatedFlexibleBox):
2756
2757 2011-07-11  Nate Chapin  <japhet@chromium.org>
2758
2759         [Chromium] Ensure we don't crash when an
2760         HTMLSelectElement mouse release event removes
2761         the element from the DOM.
2762         https://bugs.webkit.org/show_bug.cgi?id=64295
2763
2764         Reviewed by Dimitri Glazkov.
2765
2766         Manual test only because the crash requires a
2767         real popup menu, which DRT doesn't provide.
2768
2769         * manual-tests/chromium/popup-menu-crash.html: Added.
2770         * platform/chromium/PopupMenuChromium.cpp:
2771         (WebCore::PopupContainer::handleMouseReleaseEvent):
2772
2773 2011-07-11  Mike Reed  <reed@google.com>
2774
2775         [skia] remove platform helpers for gradients and patterns
2776         https://bugs.webkit.org/show_bug.cgi?id=64281
2777
2778         Reviewed by Stephen White.
2779
2780         No new tests. fixes canvas/philip/tests/2d.gradient.object.update.html
2781
2782         Remove (now empty) platform helpers for fill/stroke gradients/patterns. We now pickup the platformGradient
2783         and platformPattern fresh when they're needed, so we can see any edits that have occurred to them
2784         2d.gradient.object.update.html sets the fillgradient, and then edits the gradient object. This CL allows
2785         us to see that edit.
2786
2787         * platform/graphics/GraphicsContext.cpp:
2788         (WebCore::GraphicsContext::setStrokePattern):
2789         (WebCore::GraphicsContext::setFillPattern):
2790         (WebCore::GraphicsContext::setStrokeGradient):
2791         (WebCore::GraphicsContext::setFillGradient):
2792         * platform/graphics/GraphicsContext.h:
2793         * platform/graphics/skia/GraphicsContextSkia.cpp:
2794         (WebCore::GraphicsContext::platformInit):
2795         * platform/graphics/skia/PlatformContextSkia.cpp:
2796         (WebCore::PlatformContextSkia::State::State):
2797         (WebCore::PlatformContextSkia::State::~State):
2798         (WebCore::PlatformContextSkia::PlatformContextSkia):
2799         (WebCore::PlatformContextSkia::drawRect):
2800         (WebCore::PlatformContextSkia::setupShader):
2801         (WebCore::PlatformContextSkia::setupPaintForFilling):
2802         (WebCore::PlatformContextSkia::setupPaintForStroking):
2803         (WebCore::PlatformContextSkia::setFillColor):
2804         (WebCore::PlatformContextSkia::setStrokeColor):
2805         (WebCore::PlatformContextSkia::canAccelerate):
2806         * platform/graphics/skia/PlatformContextSkia.h:
2807         (WebCore::PlatformContextSkia::setGraphicsContext):
2808
2809 2011-07-11  Young Han Lee  <joybro@company100.net>
2810
2811         Reviewed by Simon Fraser.
2812
2813         Transition LayoutTest using pause API shows wrong result if it tries to pause a transition after its delay time.
2814         https://bugs.webkit.org/show_bug.cgi?id=63859
2815
2816         The existing code to set the m_startTime haven't worked because 
2817         the animation is not the right state to accept the start event. 
2818         This patch just sets the values directly instead of using event.
2819
2820         Test: transitions/delay.html
2821
2822         * page/animation/AnimationBase.cpp:
2823         (WebCore::AnimationBase::freezeAtTime):
2824
2825 2011-07-11  Ryosuke Niwa  <rniwa@webkit.org>
2826
2827         Move selection related code from RenderTextControl to HTMLTextFormControlElement
2828         https://bugs.webkit.org/show_bug.cgi?id=64133
2829
2830         Reviewed by Dimitri Glazkov.
2831
2832         Moved selectionStart, selectionEnd, hasVisibleTextArea, setSelectionRange, setContainerAndOffsetForRange
2833         and selection from RenderTextControl.cpp to HTMLFormControlElement.cpp.
2834
2835         This refactoring removes RenderTextControl's dependency on FrameSelection.
2836
2837         * accessibility/AccessibilityRenderObject.cpp:
2838         (WebCore::AccessibilityRenderObject::selectedText): Calls HTMLTextFromControl::selectedText.
2839         (WebCore::AccessibilityRenderObject::selectedTextRange): Calls selectionStart and selectionEnd.
2840         (WebCore::AccessibilityRenderObject::setSelectedTextRange): Ditto.
2841         * html/HTMLFormControlElement.cpp:
2842         (WebCore::HTMLTextFormControlElement::selectedText): Extracted from AccessibilityRenderObject::selectedText.
2843         (WebCore::hasVisibleTextArea): Added.
2844         (WebCore::HTMLTextFormControlElement::setSelectionRange): Merged with the function of the same name in RenderTextControl.
2845         (WebCore::HTMLTextFormControlElement::selectionStart): Calls computeSelectionStart instead of RenderTextControl::selectionStart.
2846         (WebCore::HTMLTextFormControlElement::computeSelectionStart): Moved from RenderTextControl::selectionStart.
2847         (WebCore::HTMLTextFormControlElement::selectionEnd): Calls computeSelectionEnd instead of RenderText::selectionEnd.
2848         (WebCore::HTMLTextFormControlElement::computeSelectionEnd): Moved from RenderTextControl::selectionStart.
2849         (WebCore::setContainerAndOffsetForRange): Moved from RenderTextControl.cpp.
2850         (WebCore::HTMLTextFormControlElement::selection): Merged with the function of the same name in RenderTextControl.
2851         (WebCore::HTMLTextFormControlElement::restoreCachedSelection): Calls computeSelectionStart and computeSelectionEnd instead of
2852         RenderTextControl::selectionStart and RenderTextControl::selectionEnd.
2853         (WebCore::HTMLTextFormControlElement::selectionChanged): Calls selectionStart and selectionEnd.
2854         * html/HTMLFormControlElement.h:
2855         * html/HTMLInputElement.cpp:
2856         (WebCore::HTMLInputElement::setValue): Calls setSelectionRange.
2857         * rendering/RenderTextControl.cpp:
2858         (WebCore::RenderTextControl::textFormControlElement): Added.
2859         * rendering/RenderTextControl.h:
2860
2861 2011-07-11  Andreas Kling  <kling@webkit.org>
2862
2863         Reviewed by Oliver Hunt.
2864
2865         Canvas: Use fast, approximate dirty rects for stroke()
2866         https://bugs.webkit.org/show_bug.cgi?id=59764
2867
2868         No new tests, this is an optimization.
2869
2870         * html/canvas/CanvasRenderingContext2D.cpp:
2871         (WebCore::CanvasRenderingContext2D::stroke): Instead of using
2872         Path::strokeBoundingRect() to calculate the exact bounding rect
2873         for a path stroke, get the Path::boundingRect() and inflate it by
2874         miterLimit + lineWidth to get a slightly oversized dirty rect
2875         in a fraction of the time.
2876
2877 2011-07-11  Andrey Kosyakov  <caseq@chromium.org>
2878
2879         Reviewed by Pavel Feldman.
2880
2881         Web Inspector: [refactoring] Remove dependencies of components requiring network resource list from network panel
2882         https://bugs.webkit.org/show_bug.cgi?id=62477
2883
2884         * inspector/front-end/AuditsPanel.js:
2885         * inspector/front-end/ExtensionServer.js:
2886         (WebInspector.ExtensionServer):
2887         (WebInspector.ExtensionServer.prototype._inspectedURLChanged):
2888         (WebInspector.ExtensionServer.prototype._onGetHAR):
2889         (WebInspector.ExtensionServer.prototype.initExtensions):
2890         * inspector/front-end/HAREntry.js:
2891         (WebInspector.HARLog):
2892         (WebInspector.HARLog.prototype.build):
2893         * inspector/front-end/NetworkManager.js:
2894         (WebInspector.NetworkLog):
2895         (WebInspector.NetworkLog.prototype.get resources):
2896         (WebInspector.NetworkLog.prototype._onInspectedURLChanged):
2897         (WebInspector.NetworkLog.prototype._onResourceStarted):
2898         * inspector/front-end/NetworkPanel.js:
2899         (WebInspector.NetworkPanel.prototype._reset):
2900         (WebInspector.NetworkPanel.prototype._copyAll):
2901         (WebInspector.NetworkPanel.prototype._exportAll):
2902         * inspector/front-end/inspector.js:
2903         (WebInspector.reset):
2904
2905 2011-07-11  Pavel Podivilov  <podivilov@chromium.org>
2906
2907         Web Inspector: make SourceFrame a View.
2908         https://bugs.webkit.org/show_bug.cgi?id=64274
2909
2910         Reviewed by Pavel Feldman.
2911
2912         * inspector/front-end/SourceFrame.js:
2913         (WebInspector.SourceFrame):
2914         (WebInspector.SourceFrame.createSearchRegex):
2915         (WebInspector.SourceFrame.prototype.show):
2916         (WebInspector.SourceFrame.prototype.hide):
2917         (WebInspector.SourceFrame.prototype._beforeTextChanged):
2918         (WebInspector.SourceFrame.prototype._afterTextChanged):
2919         (WebInspector.SourceFrame.prototype._initializeTextViewer):
2920         (WebInspector.SourceFrame.prototype.performSearch.doFindSearchMatches):
2921         (WebInspector.SourceFrame.prototype.performSearch):
2922         (WebInspector.SourceFrame.prototype._populateTextAreaContextMenu):
2923         (WebInspector.SourceFrame.prototype._suggestedFileName):
2924         (WebInspector.SourceFrame.prototype._doubleClick):
2925         (WebInspector.SourceFrame.prototype._cancelEditing):
2926         (WebInspector.TextViewerDelegateForSourceFrame):
2927         (WebInspector.TextViewerDelegateForSourceFrame.prototype.doubleClick):
2928         (WebInspector.TextViewerDelegateForSourceFrame.prototype.beforeTextChanged):
2929         (WebInspector.TextViewerDelegateForSourceFrame.prototype.afterTextChanged):
2930         (WebInspector.TextViewerDelegateForSourceFrame.prototype.commitEditing):
2931         (WebInspector.TextViewerDelegateForSourceFrame.prototype.cancelEditing):
2932         (WebInspector.TextViewerDelegateForSourceFrame.prototype.populateLineGutterContextMenu):
2933         (WebInspector.TextViewerDelegateForSourceFrame.prototype.populateTextAreaContextMenu):
2934         (WebInspector.TextViewerDelegateForSourceFrame.prototype.suggestedFileName):
2935         * inspector/front-end/TextViewer.js:
2936         (WebInspector.TextViewerDelegate.prototype.populateLineGutterContextMenu):
2937
2938 2011-07-11  Noel Gordon  <noel.gordon@gmail.com>
2939
2940         Reviewed by Adam Roben.
2941
2942         Forward focus events to windowless plugins on the windows port.
2943         https://bugs.webkit.org/show_bug.cgi?id=62375
2944
2945         * plugins/win/PluginViewWin.cpp:
2946         (WebCore::PluginView::setFocus): Forward focus events if the plugin is windowless.
2947
2948 2011-07-11  Shinya Kawanaka  <shinyak@google.com>
2949
2950         Added accessibility notification when value is changed.
2951         https://bugs.webkit.org/show_bug.cgi?id=64256
2952
2953         Notifies the value change of range input when accessibility is enabled.
2954
2955         Reviewed by Kent Tamura.
2956
2957         Covered by existing tests.
2958
2959         * html/RangeInputType.cpp:
2960         (WebCore::RangeInputType::handleKeydownEvent):
2961           Added accessibility notification when value is changed.
2962
2963 2011-07-08  Mikhail Naganov  <mnaganov@chromium.org>
2964
2965         Web Inspector: Fix resizing of sidebar pane in Timeline and Profile panels.
2966         https://bugs.webkit.org/show_bug.cgi?id=64161
2967
2968         Reviewed by Pavel Feldman.
2969
2970         * inspector/front-end/ProfilesPanel.js:
2971         (WebInspector.ProfilesPanel.prototype.updateMainViewWidth):
2972         * inspector/front-end/TimelineOverviewPane.js:
2973         (WebInspector.TimelineOverviewPane.prototype.updateMainViewWidth):
2974
2975 2011-07-11  Pavel Feldman  <pfeldman@google.com>
2976
2977         Web Inspector: [REGRESSION r89753-89754] highlight does not respect scroller location.
2978         https://bugs.webkit.org/show_bug.cgi?id=63982
2979
2980         Rolling out 89760, 89756, 89754, 89753 for breaking inspector highlight.
2981
2982         Reviewed by Yury Semikhatsky.
2983
2984         * WebCore.exp.in:
2985         * inspector/DOMNodeHighlighter.cpp:
2986         (WebCore::DOMNodeHighlighter::drawNodeHighlight):
2987         * page/FrameView.cpp:
2988         * page/FrameView.h:
2989         * platform/ScrollView.h:
2990         * platform/Widget.cpp:
2991         * platform/Widget.h:
2992         * rendering/RenderBox.cpp:
2993         (WebCore::RenderBox::mapLocalToContainer):
2994         * rendering/RenderBox.h:
2995         * rendering/RenderInline.cpp:
2996         (WebCore::RenderInline::mapLocalToContainer):
2997         * rendering/RenderInline.h:
2998         * rendering/RenderObject.cpp:
2999         (WebCore::RenderObject::mapLocalToContainer):
3000         (WebCore::RenderObject::localToContainerQuad):
3001         * rendering/RenderObject.h:
3002         (WebCore::RenderObject::localToAbsoluteQuad):
3003         * rendering/RenderView.cpp:
3004         (WebCore::RenderView::mapLocalToContainer):
3005         * rendering/RenderView.h:
3006         * rendering/svg/RenderSVGForeignObject.cpp:
3007         (WebCore::RenderSVGForeignObject::mapLocalToContainer):
3008         * rendering/svg/RenderSVGForeignObject.h:
3009         * rendering/svg/RenderSVGInline.cpp:
3010         (WebCore::RenderSVGInline::mapLocalToContainer):
3011         * rendering/svg/RenderSVGInline.h:
3012         * rendering/svg/RenderSVGModelObject.cpp:
3013         (WebCore::RenderSVGModelObject::mapLocalToContainer):
3014         * rendering/svg/RenderSVGModelObject.h:
3015         * rendering/svg/RenderSVGRoot.cpp:
3016         (WebCore::RenderSVGRoot::mapLocalToContainer):
3017         * rendering/svg/RenderSVGRoot.h:
3018         * rendering/svg/RenderSVGText.cpp:
3019         (WebCore::RenderSVGText::mapLocalToContainer):
3020         * rendering/svg/RenderSVGText.h:
3021         * rendering/svg/SVGRenderSupport.cpp:
3022         (WebCore::SVGRenderSupport::mapLocalToContainer):
3023         * rendering/svg/SVGRenderSupport.h:
3024
3025 2011-07-11  Mustafizur Rahaman  <mustaf.here@gmail.com>
3026
3027         Reviewed by James Robinson.
3028
3029         Fix LayoutTests/canvas/philip/tests/2d.composite.uncovered.fill.destination-atop.html
3030         https://bugs.webkit.org/show_bug.cgi?id=48292
3031         
3032         and
3033         
3034         Fix LayoutTests/canvas/philip/tests/2d.composite.uncovered.pattern.destination-atop.html
3035         https://bugs.webkit.org/show_bug.cgi?id=48302
3036
3037         * html/canvas/CanvasRenderingContext2D.cpp:
3038         (WebCore::CanvasRenderingContext2D::shouldDisplayTransparencyElsewhere): Added CompositeDestinationAtop 
3039         to draw transparency elsewhere for destination-atop
3040
3041 2011-07-08  Mikhail Naganov  <mnaganov@chromium.org>
3042
3043         Web Inspector: [Chromium] Get rid of flickering "Please wait" message in Heap profiler.
3044         https://bugs.webkit.org/show_bug.cgi?id=61175
3045
3046         The message has been replaced with spinner icons appearing instead of profile's
3047         icon. As each profile owns a worker, they run independently, and there can be
3048         multiple spinners at the same time.
3049
3050         Reviewed by Pavel Feldman.
3051
3052         * WebCore.gypi:
3053         * WebCore.vcproj/WebCore.vcproj:
3054         * inspector/front-end/DetailedHeapshotGridNodes.js:
3055         (WebInspector.HeapSnapshotGridNode.prototype._populate.sorted):
3056         (WebInspector.HeapSnapshotGridNode.prototype._populate):
3057         (WebInspector.HeapSnapshotGridNode.prototype.populateChildren.childrenRetrieved):
3058         (WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
3059         * inspector/front-end/DetailedHeapshotView.js:
3060         (WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged):
3061         (WebInspector.HeapSnapshotRetainingPathsList.prototype.showNext):
3062         (WebInspector.HeapSnapshotRetainingPathsList.prototype.searchCancelled):
3063         (WebInspector.DetailedHeapshotView.profileCallback):
3064         (WebInspector.DetailedHeapshotView):
3065         (WebInspector.DetailedHeapshotView.prototype._changeBase.baseProfileLoaded):
3066         (WebInspector.DetailedHeapshotView.prototype._changeBase):
3067         (WebInspector.DetailedHeapshotView.prototype.processLoadedSnapshot):
3068         (WebInspector.DetailedHeapshotView.prototype._changeView):
3069         * inspector/front-end/HeapSnapshotProxy.js:
3070         (WebInspector.HeapSnapshotWorker):
3071         (WebInspector.HeapSnapshotWorker.prototype.dispose):
3072         (WebInspector.HeapSnapshotWorker.prototype.startCheckingForLongRunningCalls):
3073         (WebInspector.HeapSnapshotWorker.prototype._checkLongRunningCalls):
3074         (WebInspector.HeapSnapshotProxyObject.prototype.callMethod):
3075         (WebInspector.HeapSnapshotProxyObject.prototype.get worker):
3076         * inspector/front-end/Images/spinnerActive.gif: Added. Generated using ajaxload.info.
3077         * inspector/front-end/Images/spinnerActiveSelected.gif: Added. Generated using ajaxload.info.
3078         * inspector/front-end/Images/spinnerInactive.gif: Added. Generated using ajaxload.info.
3079         * inspector/front-end/Images/spinnerInactiveSelected.gif: Added. Generated using ajaxload.info.
3080         * inspector/front-end/PleaseWaitMessage.js: Removed.
3081         * inspector/front-end/ProfilesPanel.js:
3082         (WebInspector.ProfilesPanel.prototype._addProfileHeader):
3083         (WebInspector.ProfilesPanel.prototype.loadHeapSnapshot.setProfileWait):
3084         (WebInspector.ProfilesPanel.prototype.loadHeapSnapshot):
3085         (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot.parsed):
3086         (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot):
3087         (WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress):
3088         * inspector/front-end/SidebarTreeElement.js:
3089         (WebInspector.SidebarTreeElement.prototype.set wait):
3090         * inspector/front-end/WebKit.qrc:
3091         * inspector/front-end/heapProfiler.css:
3092         (.heap-snapshot-sidebar-tree-item.wait .icon):
3093         (.heap-snapshot-sidebar-tree-item.wait.selected .icon):
3094         (body.inactive .heap-snapshot-sidebar-tree-item.wait .icon):
3095         (body.inactive .heap-snapshot-sidebar-tree-item.wait.selected .icon):
3096         * inspector/front-end/inspector.html:
3097
3098 2011-07-10  Patrick Gansterer  <paroga@webkit.org>
3099
3100         Generate conditional include statements in CodeGeneratorJS
3101         https://bugs.webkit.org/show_bug.cgi?id=64231
3102
3103         Reviewed by Brent Fulgham.
3104
3105         Suround headers with a correspondig #if ENABLE() line.
3106         This allows us to generate bindings only of required IDL files.
3107
3108         Changing the current preprocessor statements to the Conditional attribute
3109         in a next step helps in getting rid of calls to the preprocessor,
3110         which causes so much pain on a natvie Windows environment. 
3111
3112         * bindings/scripts/CodeGeneratorJS.pm:
3113         (GenerateImplementation):
3114         (WriteData):
3115
3116 2011-07-10  Patrick Gansterer  <paroga@webkit.org>
3117
3118         Remove array size from generated JSC binding tables
3119         https://bugs.webkit.org/show_bug.cgi?id=64229
3120
3121         Reviewed by Brent Fulgham.
3122
3123         Because many items in the array are surrounded with #if(ENABLE_XXX) lines,
3124         the array size isn't fix and correct in all cases.
3125         So let the compiler calculate the correct size itself.
3126
3127         * bindings/scripts/CodeGeneratorJS.pm:
3128         (GenerateHashTable):
3129         * bindings/scripts/test/JS/JSTestInterface.cpp:
3130         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3131         * bindings/scripts/test/JS/JSTestObj.cpp:
3132         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3133
3134 2011-07-10  Kenichi Ishibashi  <bashi@chromium.org>
3135
3136         Let plugins participate in form submission
3137         https://bugs.webkit.org/show_bug.cgi?id=13061
3138
3139         Implements HTMLObjectElement::appendFormData() so that object
3140         elements respond as form associated elements.
3141
3142         Reviewed by Anders Carlsson.
3143
3144         Test: plugins/form-value.html
3145
3146         * html/HTMLObjectElement.cpp:
3147         (WebCore::HTMLObjectElement::appendFormData): Implemented.
3148         * plugins/PluginViewBase.h:
3149         (WebCore::PluginViewBase::getFormValue): Added.
3150
3151 2011-07-10  Anders Carlsson  <andersca@apple.com>
3152
3153         WebKit2 is leaking NSCursors created by leakNamedCursor
3154         https://bugs.webkit.org/show_bug.cgi?id=64241
3155         <rdar://problem/9507151>
3156
3157         Reviewed by Oliver Hunt.
3158
3159         * platform/mac/CursorMac.mm:
3160         (WebCore::createNamedCursor):
3161         Rename this from leakNamedCursor to createNamedCursor and make it return a
3162         RetainPtr<NSCursor> instead of a raw pointer.
3163
3164         (WebCore::Cursor::ensurePlatformCursor):
3165         Don't leak cursors here. We still won't deallocate cursors during shutdown (which leakNamedCursor
3166         was said to prevent) because the cursor singletons are all allocated from the heap and are never destroyed
3167         anyway.
3168
3169 2011-07-10  Yuta Kitamura  <yutak@chromium.org>
3170
3171         WebSocket: Add useHixie76Protocol flag to WebSocketChannel and WebSocketHandshake
3172         https://bugs.webkit.org/show_bug.cgi?id=64244
3173
3174         Reviewed by Kent Tamura.
3175
3176         Get the value of Settings::useHixie76WebSocketProtocol() and save it in
3177         WebSocketChannel and WebSocketHandshake instances. Obtained flag value
3178         is not used for now.
3179
3180         No behavior change, thus no new tests.
3181
3182         * websockets/WebSocketChannel.cpp:
3183         (WebCore::WebSocketChannel::WebSocketChannel):
3184         WebSocketChannel is always created in context of Document (see
3185         ThreadableWebSocketChannel::create()).
3186         Because m_useHixie76Protocol must be passed to WebSocketHandshake
3187         constructor, WebSocketHandshake instance is allocated dynamically
3188         and stored in OwnPtr.
3189         (WebCore::WebSocketChannel::connect):
3190         (WebCore::WebSocketChannel::fail):
3191         (WebCore::WebSocketChannel::disconnect):
3192         (WebCore::WebSocketChannel::didOpen):
3193         (WebCore::WebSocketChannel::didFail):
3194         (WebCore::WebSocketChannel::processBuffer):
3195         * websockets/WebSocketChannel.h:
3196         * websockets/WebSocketHandshake.cpp:
3197         (WebCore::WebSocketHandshake::WebSocketHandshake):
3198         * websockets/WebSocketHandshake.h:
3199
3200 2011-07-10  Tom Hudson  <tomhudson@google.com>
3201
3202         Reviewed by James Robinson.
3203
3204         GraphicsContextSkia::drawConvexPolygon doesn't pay attention to shouldAntialias
3205         https://bugs.webkit.org/show_bug.cgi?id=61369
3206
3207         * platform/graphics/skia/GraphicsContextSkia.cpp:
3208         (WebCore::GraphicsContext::drawConvexPolygon): Pass the
3209         shouldAntialias parameter on to Skia.
3210
3211 2011-07-10  Yuzo Fujishima  <yuzo@google.com>
3212
3213         Fix for Bug 63968 - Add comment to explain Vector usage in FontCache::purgeInactiveFontData
3214         https://bugs.webkit.org/show_bug.cgi?id=63968
3215
3216         Reviewed by Dan Bernstein.
3217
3218         No new tests because this changes comments only.
3219
3220         * platform/graphics/FontCache.cpp:
3221         (WebCore::FontCache::purgeInactiveFontData): Add explanation why SimpleFontData is not deleted in the iteration loop.
3222
3223 2011-07-10  Emil A Eklund  <eae@chromium.org>
3224
3225         Switch updateHitTestResult to to new layout types
3226         https://bugs.webkit.org/show_bug.cgi?id=64209
3227
3228         Reviewed by Eric Seidel.
3229
3230         No new tests, no functionality changes.
3231
3232         * rendering/EllipsisBox.cpp:
3233         (WebCore::EllipsisBox::nodeAtPoint):
3234         * rendering/RenderBlock.cpp:
3235         (WebCore::RenderBlock::hitTestFloats):
3236         (WebCore::RenderBlock::updateHitTestResult):
3237         * rendering/RenderBlock.h:
3238         * rendering/RenderInline.cpp:
3239         (WebCore::RenderInline::updateHitTestResult):
3240         * rendering/RenderInline.h:
3241         * rendering/RenderLineBoxList.cpp:
3242         (WebCore::RenderLineBoxList::hitTest):
3243         * rendering/RenderObject.cpp:
3244         (WebCore::RenderObject::updateHitTestResult):
3245         * rendering/RenderObject.h:
3246         * rendering/RenderView.cpp:
3247         (WebCore::RenderView::updateHitTestResult):
3248         * rendering/RenderView.h:
3249         * rendering/svg/RenderSVGContainer.cpp:
3250         (WebCore::RenderSVGContainer::nodeAtFloatPoint):
3251         * rendering/svg/RenderSVGImage.cpp:
3252         (WebCore::RenderSVGImage::nodeAtFloatPoint):
3253         * rendering/svg/RenderSVGPath.cpp:
3254         (WebCore::RenderSVGPath::nodeAtFloatPoint):
3255         * rendering/svg/RenderSVGRoot.cpp:
3256         (WebCore::RenderSVGRoot::nodeAtPoint):
3257
3258 2011-07-10  Patrick Gansterer  <paroga@webkit.org>
3259
3260         Reviewed by Adam Barth.
3261
3262         Fix member variable order of ContextMenuItem
3263         https://bugs.webkit.org/show_bug.cgi?id=59905
3264
3265         Use the same order at decleration and assignment to silence compiler warning.
3266
3267         * platform/ContextMenuItem.h:
3268
3269 2011-07-10  Dan Bernstein  <mitz@apple.com>
3270
3271         <rdar://problem/9750062> REGRESSION: Button text missing in many iTunes Store pages
3272         https://bugs.webkit.org/show_bug.cgi?id=64236
3273
3274         Reviewed by Maciej Stachowiak.
3275
3276         Test: fast/css/empty-display-none.html
3277
3278         When an :empty selector caused an element to not have a renderer, the check for empty style
3279         change when finishing parsing the elemenet did nothing, because it could not check if the
3280         element’s current style was affected by :empty. The fix is to record the fact that the style
3281         was affected by :empty in ElementRareData in the no-renderer case.
3282
3283         * dom/Element.cpp:
3284         (WebCore::Element::recalcStyle): Clear the m_styleAffectedByEmpty flag.
3285         (WebCore::checkForEmptyStyleChange): If the style is null (meaning there is no renderer), check
3286         Element::styleAffectedByEmpty().
3287         (WebCore::Element::setStyleAffectedByEmpty): Added. Sets the flag in rare data.
3288         (WebCore::Element::styleAffectedByEmpty): Added. Checks for the flag in rare data.
3289         * dom/Element.h:
3290         * dom/ElementRareData.h:
3291         (WebCore::ElementRareData::ElementRareData): Added m_styleAffectedByEmpty and initialized it
3292         to false.
3293         * dom/NodeRenderingContext.cpp:
3294         (WebCore::NodeRendererFactory::createRendererAndStyle): If an element doesn’t need a renderer
3295         and its style is affected by :empty, record this fact in the element by calling setStyleAffectedByEmpty().
3296
3297 2011-07-10  Mark Rowe  <mrowe@apple.com>
3298
3299         Fix the build.
3300
3301         * svg/properties/SVGAttributeToPropertyMap.h: Forward-declare SVGPropertyInfo as a struct
3302         since that's what it is.
3303
3304 2011-07-09  Patrick Gansterer  <paroga@webkit.org>
3305
3306         Unreviewed WinCE build fix for r90680.
3307
3308         Repeat the change done in r90681 for all other SVGAnimated*PropertyTearOff.h files.
3309
3310         * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h: Make create public and remove friendship with SVGAnimatedProperty.
3311         * svg/properties/SVGAnimatedListPropertyTearOff.h: Ditto.
3312         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h: Ditto.
3313         * svg/properties/SVGAnimatedPropertyTearOff.h: Ditto.
3314         * svg/properties/SVGAnimatedTransformListPropertyTearOff.h: Ditto.
3315
3316 2011-07-09  Nikolas Zimmermann  <nzimmermann@rim.com>
3317
3318         Add a possibility to retrieve the associated SVGAnimatedProperty object for a certain XML attribute
3319         https://bugs.webkit.org/show_bug.cgi?id=63797
3320
3321         Fix WinCE build. Funny none other platform complained.
3322
3323         * svg/properties/SVGAnimatedStaticPropertyTearOff.h: Make create public, SVGAnimatedProperty needs it - remove friendship with it.
3324
3325 2011-07-09  Nikolas Zimmermann  <nzimmermann@rim.com>
3326
3327         Add a possibility to retrieve the associated SVGAnimatedProperty object for a certain XML attribute
3328         https://bugs.webkit.org/show_bug.cgi?id=63797
3329
3330         Reviewed by Dirk Schulze.
3331
3332         In order to prepare animVal support we need a way to map a given SVG DOM attribute to a SVGAnimatedProperty.
3333         eg. SVGNames::xAttr -> SVGRectElement::xAnimated(), etc. This will be needed to update the animVal of the
3334         SVGAnimatedProperty, if an animation is running. It would required adding a new method to all SVG* classes
3335         that define animated properties. Unfortunately we already have lots of repeated code in methods like
3336         synchronizeProperty / fillAttributeToPropertyTypeMap. Look at SVGRectElement for example:
3337
3338         void SVGRectElement::synchronizeProperty(const QualifiedName& attrName)
3339         {
3340             if (attrName == anyQName()) {
3341                 synchronizeX();
3342                 synchronizeY();
3343                  ...
3344               }
3345
3346             if (attrName == SVGNames::xAttr) {
3347                 synchronizeX();
3348                 return;
3349             }
3350
3351             if (attrName == SVGNames::yAttr) {
3352                 synchronizeY();
3353                 return;
3354             }
3355             ...
3356         }
3357
3358         or
3359
3360         void SVGRectElement::fillAttributeToPropertyTypeMap()
3361         {
3362             AttributeToPropertyTypeMap& attributeToPropertyTypeMap = this->attributeToPropertyTypeMap();
3363         
3364             SVGStyledTransformableElement::fillPassedAttributeToPropertyTypeMap(attributeToPropertyTypeMap);
3365             attributeToPropertyTypeMap.set(SVGNames::xAttr, AnimatedLength);
3366             attributeToPropertyTypeMap.set(SVGNames::yAttr, AnimatedLength);
3367             ...
3368         }
3369
3370         These lookups are all performed dynamically. Each synchronizeProperty() call does a lot of comparisons.
3371         fillAttributeToPropertyTypeMap() isn't that bad as the result is cached in a static HashMap per-SVGRectElement.
3372         There's no reason to do these things dynamically!
3373
3374         Inspired by JSC, I'm adding a "static const SVGPropertyInfo s_fooPropertyInfo" object for each animated SVG property.
3375         For example, for SVGRectElements SVGAnimatedLength x property we're storing:
3376         - "AnimatedPropertyType type" (AnimatedLength -- note the enum was named AnimatedAttributeType, I renamed it to AnimatedPropertyType for clarity)
3377         - "const QualifiedName& attributeName" (SVGNames::xAttr)
3378         - "const AtomicString& propertyIdentifier" (SVGNames::xAttr.localName() -- only different if N-wrappers map to a single XML DOM attribute, eg. orientAttr)
3379         - "SynchronizeProperty synchronizeProperty" (callback to SVGRectElement::synchronizeX)
3380         - "LookupOrCreateWrapperForAnimatedProperty lookupOrCreateWrapperForAnimatedProperty" (callback to SVGRectElement::xAnimated)
3381
3382         Using this information, we can replace all the various synchronizeProperty/fillAttributeToPropertyMap implementations, with a single one in SVGElement.
3383         All these are auto-generated, using the standard macros used to define/declare SVG animated properties. This required several changes to the macros.
3384         Here's a summary:
3385     
3386         #1) In all headers, wrap DECLARE_ANIMATED_* calls, in BEGIN_DECLARE_ANIMATED_PROPERTIES(ClassName) / END_DECLARE_ANIMATED_PROPERTIES blocks.
3387         
3388             Sample change for SVGRectElement:
3389             -    DECLARE_ANIMATED_LENGTH(X, x)
3390             -    DECLARE_ANIMATED_LENGTH(Y, y)
3391             -    ...
3392
3393             +    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGRectElement)
3394             +        DECLARE_ANIMATED_LENGTH(X, x)
3395             +        DECLARE_ANIMATED_LENGTH(Y, y)
3396             +         ...
3397             +    END_DECLARE_ANIMATED_PROPERTIES
3398
3399         #2) In all cpp files, add a new section wrapped in BEGIN_REGISTER_ANIMATED_PROPERTIES(ClassName / END_REGISTER_ANIMATED_PROPERTIES blocks:
3400
3401             Sample change for SVGRectElement:
3402             +BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGRectElement)
3403             +    REGISTER_LOCAL_ANIMATED_PROPERTY(x)
3404             +    REGISTER_LOCAL_ANIMATED_PROPERTY(y)
3405             +    ...
3406             +    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGStyledTransformableElement)
3407             +    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGTests)
3408             +END_REGISTER_ANIMATED_PROPERTIES
3409
3410             This is the main piece of the logic that replaces the manual synchronizeProperty/fillAttributeToPropertyMap implementation. It expands to following:
3411
3412             SVGAttributeToPropertyMap& SVGRectElement::attributeToPropertyMap()
3413             {
3414                 DEFINE_STATIC_LOCAL(SVGAttributeToPropertyMap, s_attributeToPropertyMap, ());
3415             }
3416
3417             static void registerAnimatedPropertiesForSVGRectElement()
3418             {
3419                 SVGAttributeToPropertyMap& map = SVGRectElement::attributeToPropertyMap();
3420                 if (!map.isEmpty())
3421                     return;
3422                 map.addProperty(SVGRectElement::xPropertyInfo());
3423                 map.addProperty(SVGRectElement::yPropertyInfo());
3424                 ...
3425                 map.addProperties(SVGStyledTransformableElement::attributeToPropertyMap());
3426                 map.addProperties(SVGTests::attributeToPropertyMap());
3427             }
3428
3429             A single-instance of SVGAttributeToPropertyMap is created for each SVG*Element. The constructor of SVGRectElement is supposed to call
3430             registerAnimatedPropertiesForSVGRectElement(), which collects all properties of SVGRectElement and all its parent classes and stores them
3431             in a Vector<const SVGPropertyInfo*>. This Vector is stored in a HashMap<QualifiedName, Vector<const SVGPropertyInfo*> > where the key
3432             is the attribute name (eg. SVGNames::xAttr -> SVGRectElement::xPropertyInfo). This is only done _once_ per SVGRectElement.
3433
3434             SVGElement contains a "virtual SVGAttributeToPropertyMap& localAttributeToPropertyMap()" method, and SVGRectElement overrides it
3435             and returns SVGRectElement::attributeToPropertyMap() (which is static!) -- this is hidden again in the macros, no need to write any code.
3436
3437             SVGAttributeToPropertyMap provides following API:
3438             - bool synchronizeProperty(SVGElement* contextElement, const QualifiedName& attributeName)
3439             - void synchronizeProperties(SVGElement* contextElement)
3440             
3441                 A generic way to synchronize a SVGAnimatedProperty with its XML DOM attribute. Any SVG DOM change to eg. <rect>s x property will now trigger
3442                 contextElement->localAttributeToPropertyMap().synchronizeProperty(this, SVGNames::xAttr)
3443                 The SVGAttributeToPropertyMap will ask its HashMap for the Vector containing the properties for SVGNames::xAttr (in that case, just one xAnimated()).
3444
3445             - void animatedPropertyTypeForAttribute(const QualifiedName& attributeName, Vector<AnimatedPropertyType>& propertyTypes)
3446
3447                 This method replaces the fillAttributeToPropertyMap implementations everywhere.
3448         
3449             - void animatedPropertiesForAttribute(SVGElement* contextElement, const QualifiedName& attributeName, Vector<RefPtr<SVGAnimatedProperty> >& properties);
3450
3451                 This method is not used yet, but allows us to collect all SVGAnimatedProperties for a QualifiedName -- the initial goal for this patch.
3452
3453         #3) In all cpp files, add a call to "registerAnimatedPropertiesForClassName()" in the constructor. Forgetting this will result in a compile error.
3454
3455         Doesn't affect any tests.
3456
3457         * CMakeLists.txt:
3458         * GNUmakefile.list.am:
3459         * WebCore.gypi:
3460         * WebCore.pro:
3461         * WebCore.vcproj/WebCore.vcproj:
3462         * WebCore.xcodeproj/project.pbxproj:
3463         * bindings/scripts/CodeGeneratorJS.pm:
3464         (NativeToJSValue):
3465         * bindings/scripts/CodeGeneratorObjC.pm:
3466         (GenerateImplementation):
3467         * bindings/scripts/CodeGeneratorV8.pm:
3468         (GenerateNormalAttrGetter):
3469         * svg/SVGAElement.cpp:
3470         (WebCore::SVGAElement::SVGAElement):
3471         * svg/SVGAElement.h:
3472         (WebCore::SVGAElement::synchronizeRequiredFeatures):
3473         (WebCore::SVGAElement::synchronizeRequiredExtensions):
3474         (WebCore::SVGAElement::synchronizeSystemLanguage):
3475         * svg/SVGAltGlyphElement.cpp:
3476         (WebCore::SVGAltGlyphElement::SVGAltGlyphElement):
3477         * svg/SVGAltGlyphElement.h:
3478         * svg/SVGAnimateElement.cpp:
3479         (WebCore::SVGAnimateElement::SVGAnimateElement):
3480         (WebCore::SVGAnimateElement::hasValidAttributeType):
3481         (WebCore::SVGAnimateElement::determineAnimatedPropertyType):
3482         (WebCore::SVGAnimateElement::determinePropertyValueTypes):
3483         (WebCore::SVGAnimateElement::calculateAnimatedValue):
3484         (WebCore::SVGAnimateElement::calculateFromAndToValues):
3485         (WebCore::SVGAnimateElement::calculateFromAndByValues):
3486         (WebCore::SVGAnimateElement::resetToBaseValue):
3487         (WebCore::SVGAnimateElement::applyResultsToTarget):
3488         (WebCore::SVGAnimateElement::calculateDistance):
3489         (WebCore::SVGAnimateElement::ensureAnimator):
3490         * svg/SVGAnimateElement.h:
3491         * svg/SVGAnimateTransformElement.cpp:
3492         (WebCore::SVGAnimateTransformElement::hasValidAttributeType):
3493         (WebCore::SVGAnimateTransformElement::determineAnimatedPropertyType):
3494         (WebCore::SVGAnimateTransformElement::resetToBaseValue):
3495         (WebCore::SVGAnimateTransformElement::calculateAnimatedValue):
3496         (WebCore::SVGAnimateTransformElement::applyResultsToTarget):
3497         * svg/SVGAnimateTransformElement.h:
3498         * svg/SVGAnimatedAngle.h:
3499         * svg/SVGAnimatedBoolean.h:
3500         * svg/SVGAnimatedEnumeration.h:
3501         * svg/SVGAnimatedInteger.h:
3502         * svg/SVGAnimatedLength.h:
3503         * svg/SVGAnimatedLengthList.h:
3504         * svg/SVGAnimatedNumber.h:
3505         * svg/SVGAnimatedNumberList.h:
3506         * svg/SVGAnimatedPreserveAspectRatio.h:
3507         * svg/SVGAnimatedRect.h:
3508         * svg/SVGAnimatedString.h:
3509         * svg/SVGAnimatedTransformList.h:
3510         * svg/SVGAnimatedType.cpp:
3511         (WebCore::SVGAnimatedType::SVGAnimatedType):