Changeset 88223 in webkit
- Timestamp:
- Jun 6, 2011 11:31:19 PM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r88222 r88223 1 2011-06-06 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r88222. 4 http://trac.webkit.org/changeset/88222 5 https://bugs.webkit.org/show_bug.cgi?id=62192 6 7 Broke compile on Mac (Requested by abarth on #webkit). 8 9 * Scripts/webkit2/messages.py: 10 * Shared/WebCoreArgumentCoders.h: 11 1 12 2011-06-06 Noam Rosenthal <noam.rosenthal@nokia.com> 2 13 -
trunk/Source/WebKit2/Scripts/webkit2/messages.py
r88222 r88223 256 256 'WebCore::CompositionUnderline', 257 257 'WebCore::GrammarDetail', 258 'WebCore::IdentityTransformOperation',259 258 'WebCore::KeypressCommand', 260 259 'WebCore::Length', 261 'WebCore::MatrixTransformOperation',262 'WebCore::Matrix3DTransformOperation',263 'WebCore::PerspectiveTransformOperation',264 260 'WebCore::PluginInfo', 265 261 'WebCore::PrintInfo', 266 'WebCore::RotateTransformOperation',267 'WebCore::ScaleTransformOperation',268 'WebCore::SkewTransformOperation',269 262 'WebCore::TimingFunction', 270 263 'WebCore::TransformationMatrix', 271 'WebCore::TransformOperation',272 'WebCore::TransformOperations',273 'WebCore::TranslateTransformOperation',274 264 'WebCore::ViewportArguments', 275 265 'WebCore::WindowFeatures', -
trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h
r88222 r88223 42 42 #include <WebCore/FloatRect.h> 43 43 #include <WebCore/GraphicsContext.h> 44 #include <WebCore/IdentityTransformOperation.h>45 44 #include <WebCore/IntRect.h> 46 45 #include <WebCore/KeyboardEvent.h> 47 46 #include <WebCore/Length.h> 48 #include <WebCore/Matrix3DTransformOperation.h>49 #include <WebCore/MatrixTransformOperation.h>50 #include <WebCore/PerspectiveTransformOperation.h>51 47 #include <WebCore/PluginData.h> 52 48 #include <WebCore/ProtectionSpace.h> 53 49 #include <WebCore/ResourceError.h> 54 50 #include <WebCore/ResourceRequest.h> 55 #include <WebCore/RotateTransformOperation.h>56 #include <WebCore/ScaleTransformOperation.h>57 #include <WebCore/SkewTransformOperation.h>58 51 #include <WebCore/TextCheckerClient.h> 59 52 #include <WebCore/TimingFunction.h> 60 #include <WebCore/TransformOperation.h>61 #include <WebCore/TransformOperations.h>62 53 #include <WebCore/TransformationMatrix.h> 63 #include <WebCore/TranslateTransformOperation.h>64 54 #include <WebCore/ViewportArguments.h> 65 55 #include <WebCore/WindowFeatures.h> 66 56 #include <limits> 67 68 69 57 70 58 … … 81 69 template<> struct ArgumentCoder<WebCore::Length> : SimpleArgumentCoder<WebCore::Length> { }; 82 70 template<> struct ArgumentCoder<WebCore::TransformationMatrix> : SimpleArgumentCoder<WebCore::TransformationMatrix> { }; 83 84 template<> struct ArgumentCoder<WebCore::MatrixTransformOperation> : SimpleArgumentCoder<WebCore::MatrixTransformOperation> { };85 template<> struct ArgumentCoder<WebCore::Matrix3DTransformOperation> : SimpleArgumentCoder<WebCore::Matrix3DTransformOperation> { };86 template<> struct ArgumentCoder<WebCore::PerspectiveTransformOperation> : SimpleArgumentCoder<WebCore::PerspectiveTransformOperation> { };87 template<> struct ArgumentCoder<WebCore::RotateTransformOperation> : SimpleArgumentCoder<WebCore::RotateTransformOperation> { };88 template<> struct ArgumentCoder<WebCore::ScaleTransformOperation> : SimpleArgumentCoder<WebCore::ScaleTransformOperation> { };89 template<> struct ArgumentCoder<WebCore::SkewTransformOperation> : SimpleArgumentCoder<WebCore::SkewTransformOperation> { };90 template<> struct ArgumentCoder<WebCore::TranslateTransformOperation> : SimpleArgumentCoder<WebCore::TranslateTransformOperation> { };91 71 92 72 template<> struct ArgumentCoder<WebCore::MimeClassInfo> { … … 580 560 } 581 561 }; 582 583 template<> struct ArgumentCoder<RefPtr<WebCore::TransformOperation> > {584 template<class T>585 static bool decodeOperation(ArgumentDecoder* decoder, RefPtr<WebCore::TransformOperation>& operation, PassRefPtr<T> newOperation)586 {587 if (!ArgumentCoder<T>::decode(decoder, *newOperation.get()))588 return false;589 operation = newOperation.get();590 return true;591 }592 593 template<class T>594 static void encodeOperation(ArgumentEncoder* encoder, const WebCore::TransformOperation* operation)595 {596 ArgumentCoder<T>::encode(encoder, *static_cast<const T*>(operation));597 }598 599 static void encode(ArgumentEncoder* encoder, const RefPtr<WebCore::TransformOperation>& operation)600 {601 // We don't want to encode null-references.602 ASSERT(operation);603 604 WebCore::TransformOperation::OperationType type = operation->getOperationType();605 encoder->encodeInt32(type);606 switch (type) {607 case WebCore::TransformOperation::SCALE:608 case WebCore::TransformOperation::SCALE_X:609 case WebCore::TransformOperation::SCALE_Y:610 case WebCore::TransformOperation::SCALE_Z:611 case WebCore::TransformOperation::SCALE_3D:612 encodeOperation<WebCore::ScaleTransformOperation>(encoder, operation.get());613 return;614 615 case WebCore::TransformOperation::TRANSLATE:616 case WebCore::TransformOperation::TRANSLATE_X:617 case WebCore::TransformOperation::TRANSLATE_Y:618 case WebCore::TransformOperation::TRANSLATE_Z:619 case WebCore::TransformOperation::TRANSLATE_3D:620 encodeOperation<WebCore::TranslateTransformOperation>(encoder, operation.get());621 return;622 623 case WebCore::TransformOperation::ROTATE:624 case WebCore::TransformOperation::ROTATE_X:625 case WebCore::TransformOperation::ROTATE_Y:626 case WebCore::TransformOperation::ROTATE_3D:627 encodeOperation<WebCore::RotateTransformOperation>(encoder, operation.get());628 return;629 630 case WebCore::TransformOperation::SKEW:631 case WebCore::TransformOperation::SKEW_X:632 case WebCore::TransformOperation::SKEW_Y:633 encodeOperation<WebCore::SkewTransformOperation>(encoder, operation.get());634 return;635 636 case WebCore::TransformOperation::MATRIX:637 encodeOperation<WebCore::MatrixTransformOperation>(encoder, operation.get());638 return;639 640 case WebCore::TransformOperation::MATRIX_3D:641 encodeOperation<WebCore::Matrix3DTransformOperation>(encoder, operation.get());642 return;643 644 case WebCore::TransformOperation::PERSPECTIVE:645 encodeOperation<WebCore::PerspectiveTransformOperation>(encoder, operation.get());646 return;647 648 case WebCore::TransformOperation::IDENTITY:649 case WebCore::TransformOperation::NONE:650 return;651 }652 }653 654 static bool decode(ArgumentDecoder* decoder, RefPtr<WebCore::TransformOperation>& operation)655 {656 WebCore::TransformOperation::OperationType type;657 int typeInt;658 if (!decoder->decodeInt32(typeInt))659 return false;660 type = static_cast<WebCore::TransformOperation::OperationType>(typeInt);661 switch (type) {662 case WebCore::TransformOperation::SCALE:663 case WebCore::TransformOperation::SCALE_X:664 case WebCore::TransformOperation::SCALE_Y:665 case WebCore::TransformOperation::SCALE_Z:666 case WebCore::TransformOperation::SCALE_3D:667 return decodeOperation<WebCore::ScaleTransformOperation>(decoder, operation, WebCore::ScaleTransformOperation::create(1.0, 1.0, type));668 669 case WebCore::TransformOperation::TRANSLATE:670 case WebCore::TransformOperation::TRANSLATE_X:671 case WebCore::TransformOperation::TRANSLATE_Y:672 case WebCore::TransformOperation::TRANSLATE_Z:673 case WebCore::TransformOperation::TRANSLATE_3D:674 return decodeOperation<WebCore::TranslateTransformOperation>(decoder, operation, WebCore::TranslateTransformOperation::create(WebCore::Length(0, WebCore::Fixed), WebCore::Length(0, WebCore::Fixed), type));675 676 case WebCore::TransformOperation::ROTATE:677 case WebCore::TransformOperation::ROTATE_X:678 case WebCore::TransformOperation::ROTATE_Y:679 case WebCore::TransformOperation::ROTATE_3D:680 return decodeOperation<WebCore::RotateTransformOperation>(decoder, operation, WebCore::RotateTransformOperation::create(0.0, type));681 682 case WebCore::TransformOperation::SKEW:683 case WebCore::TransformOperation::SKEW_X:684 case WebCore::TransformOperation::SKEW_Y:685 return decodeOperation<WebCore::SkewTransformOperation>(decoder, operation, WebCore::SkewTransformOperation::create(0.0, 0.0, type));686 687 case WebCore::TransformOperation::MATRIX:688 return decodeOperation<WebCore::MatrixTransformOperation>(decoder, operation, WebCore::MatrixTransformOperation::create(WebCore::TransformationMatrix()));689 690 case WebCore::TransformOperation::MATRIX_3D:691 return decodeOperation<WebCore::Matrix3DTransformOperation>(decoder, operation, WebCore::Matrix3DTransformOperation::create(WebCore::TransformationMatrix()));692 693 case WebCore::TransformOperation::PERSPECTIVE:694 return decodeOperation<WebCore::PerspectiveTransformOperation>(decoder, operation, WebCore::PerspectiveTransformOperation::create(WebCore::Length(0, WebCore::Fixed)));695 696 case WebCore::TransformOperation::IDENTITY:697 case WebCore::TransformOperation::NONE:698 operation = WebCore::IdentityTransformOperation::create();699 return true;700 }701 702 return false;703 }704 };705 706 template<> struct ArgumentCoder<WebCore::TransformOperations> {707 static void encode(ArgumentEncoder* encoder, const WebCore::TransformOperations& operations)708 {709 WTF::Vector<RefPtr<WebCore::TransformOperation> > operationsVector = operations.operations();710 int size = operationsVector.size();711 encoder->encodeInt32(size);712 for (int i = 0; i < size; ++i)713 ArgumentCoder<RefPtr<WebCore::TransformOperation> >::encode(encoder, operationsVector[i]);714 }715 716 static bool decode(ArgumentDecoder* decoder, WebCore::TransformOperations& operations)717 {718 int size;719 if (!decoder->decodeInt32(size))720 return false;721 722 WTF::Vector<RefPtr<WebCore::TransformOperation> >& operationVector = operations.operations();723 operationVector.clear();724 operationVector.resize(size);725 for (int i = 0; i < size; ++i) {726 RefPtr<WebCore::TransformOperation> operation;727 if (!ArgumentCoder<RefPtr<WebCore::TransformOperation> >::decode(decoder, operation))728 return false;729 operationVector[i] = operation;730 }731 732 return true;733 }734 };735 736 562 737 563 template<> struct ArgumentCoder<WebCore::Animation> {
Note: See TracChangeset
for help on using the changeset viewer.